Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Part: expose Poly HLR algorithm to Python
  • Loading branch information
wwmayer committed Dec 21, 2021
1 parent 4c303e3 commit ea85cf5
Show file tree
Hide file tree
Showing 6 changed files with 739 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/Part/App/AppPart.cpp
Expand Up @@ -144,6 +144,8 @@
#include <Mod/Part/App/GeomPlate/PointConstraintPy.h>
#include <Mod/Part/App/HLRBRep/HLRBRep_AlgoPy.h>
#include <Mod/Part/App/HLRBRep/HLRToShapePy.h>
#include <Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPy.h>
#include <Mod/Part/App/HLRBRep/PolyHLRToShapePy.h>
#include <Mod/Part/App/ShapeUpgrade/UnifySameDomainPy.h>
#include "PropertyGeometryList.h"
#include "DatumFeature.h"
Expand Down Expand Up @@ -301,6 +303,8 @@ PyMOD_INIT_FUNC(Part)
PyObject* hlrfeatModule(module.getAttr("HLRBRep").ptr());
Base::Interpreter().addType(&Part::HLRBRep_AlgoPy::Type,hlrfeatModule,"Algo");
Base::Interpreter().addType(&Part::HLRToShapePy::Type,hlrfeatModule,"HLRToShape");
Base::Interpreter().addType(&Part::HLRBRep_PolyAlgoPy::Type,hlrfeatModule,"PolyAlgo");
Base::Interpreter().addType(&Part::PolyHLRToShapePy::Type,hlrfeatModule,"PolyHLRToShape");

// Geom2d package
PyObject* geom2dModule(module.getAttr("Geom2d").ptr());
Expand Down
7 changes: 7 additions & 0 deletions src/Mod/Part/App/CMakeLists.txt
Expand Up @@ -126,6 +126,8 @@ generate_from_xml(GeomPlate/PointConstraintPy)

generate_from_xml(HLRBRep/HLRBRep_AlgoPy)
generate_from_xml(HLRBRep/HLRToShapePy)
generate_from_xml(HLRBRep/HLRBRep_PolyAlgoPy)
generate_from_xml(HLRBRep/PolyHLRToShapePy)

generate_from_xml(ShapeUpgrade/UnifySameDomainPy)

Expand Down Expand Up @@ -386,6 +388,11 @@ SET(HLRBRepPy_SRCS
HLRBRep/HLRBRep_AlgoPyImp.cpp
HLRBRep/HLRToShapePy.xml
HLRBRep/HLRToShapePyImp.cpp

HLRBRep/HLRBRep_PolyAlgoPy.xml
HLRBRep/HLRBRep_PolyAlgoPyImp.cpp
HLRBRep/PolyHLRToShapePy.xml
HLRBRep/PolyHLRToShapePyImp.cpp
)
SOURCE_GROUP("HLRBRep" FILES ${HLRBRepPy_SRCS})

Expand Down
127 changes: 127 additions & 0 deletions src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPy.xml
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="HLRBRep_PolyAlgoPy"
PythonName="Part.HLRBRep_PolyAlgo"
Twin="HLRBRep_PolyAlgo"
TwinPointer="HLRBRep_PolyAlgo"
Include="HLRBRep_PolyAlgo.hxx"
Namespace="Part"
FatherInclude="Base/PyObjectBase.h"
FatherNamespace="Base"
Constructor="true"
Delete="false">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer[at]users.sourceforge.net" />
<UserDocu>Describes functions to use HLR algorithm.</UserDocu>
</Documentation>
<Methode Name="load">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="remove">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="nbShapes">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="shape">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="index">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="setProjector" Keyword="true">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="update">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="initHide">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="moreHide">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="nextHide">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="initShow">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="moreShow">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="nextShow">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Methode Name="outLinedShape">
<Documentation>
<UserDocu>
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Angle">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
<Parameter Name="Angle" Type="Float"/>
</Attribute>
<Attribute Name="TolAngular">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
<Parameter Name="TolAngular" Type="Float"/>
</Attribute>
<Attribute Name="TolCoef">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
<Parameter Name="TolCoef" Type="Float"/>
</Attribute>
<ClassDeclarations>
private:
Handle(HLRBRep_PolyAlgo) hAlgo;

public:
Handle(HLRBRep_PolyAlgo) handle() {
return hAlgo;
}
</ClassDeclarations>
</PythonExport>
</GenerateModel>

0 comments on commit ea85cf5

Please sign in to comment.