Finalizing Python interface bindings for Import, Measure, Mesh, Points.

This commit is contained in:
Ian 'z0r0' Abreu
2025-08-31 15:34:03 -04:00
parent e8ea685e1b
commit ca435629b8
29 changed files with 37 additions and 1404 deletions

View File

@@ -29,7 +29,7 @@ SET(Import_SRCS
ReaderIges.h
ReaderStep.cpp
ReaderStep.h
StepShapePy.xml
StepShape.pyi
StepShape.h
StepShape.cpp
StepShapePyImp.cpp
@@ -76,8 +76,7 @@ SET(SCL_Resources
)
SOURCE_GROUP("SCL" FILES ${SCL_Resources})
generate_from_xml(StepShapePy)
generate_from_py_(StepShapePy)
generate_from_py(StepShape)
add_library(Import SHARED ${Import_SRCS})
target_link_libraries(Import ${Import_LIBS})

View File

@@ -4,18 +4,12 @@ from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
@export(
Father="PyObjectBase",
Name="StepShapePy",
Twin="StepShape",
TwinPointer="StepShape",
Include="Mod/Import/App/StepShape.h",
Namespace="Import",
FatherInclude="Base/PyObjectBase.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class StepShapePy(PyObjectBase):
class StepShape(PyObjectBase):
"""
StepShape in Import
This class gives a interface to retrieve TopoShapes out of an loaded STEP file of any kind.

View File

@@ -1,30 +0,0 @@
<?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="StepShapePy"
Twin="StepShape"
TwinPointer="StepShape"
Include="Mod/Import/App/StepShape.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Import"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<DeveloperDocu>StepShape in a Import</DeveloperDocu>
<UserDocu>StepShape in Import
This class gives a interface to retrieve TopoShapes out of an loaded STEP file of any kind.
</UserDocu>
</Documentation>
<Methode Name="read">
<Documentation>
<UserDocu>method read()
Read a STEP file into memory and make it accessible
</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -10,16 +10,13 @@ set(Measure_LIBS
FreeCADApp
)
generate_from_xml(MeasurementPy)
generate_from_xml(MeasureBasePy)
generate_from_py_(MeasurementPy)
generate_from_py_(MeasureBasePy)
generate_from_py(Measurement)
generate_from_py(MeasureBase)
SET(Python_SRCS
MeasurementPy.xml
Measurement.pyi
MeasurementPyImp.cpp
MeasureBasePy.xml
MeasureBase.pyi
MeasureBasePyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -3,17 +3,11 @@ from Base.Metadata import export
from App.DocumentObject import DocumentObject
@export(
Father="DocumentObjectPy",
Name="MeasureBasePy",
Twin="MeasureBase",
TwinPointer="MeasureBase",
Include="Mod/Measure/App/MeasureBase.h",
Namespace="Measure",
FatherInclude="App/DocumentObjectPy.h",
FatherNamespace="App",
Constructor=True,
)
class MeasureBasePy(DocumentObject):
class MeasureBase(DocumentObject):
"""
User documentation here
"""

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="DocumentObjectPy"
Name="MeasureBasePy"
Twin="MeasureBase"
TwinPointer="MeasureBase"
Include="Mod/Measure/App/MeasureBase.h"
Namespace="Measure"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="David Friedli(hlorus)" EMail="david@friedli-be.ch" />
<UserDocu>User documentation here
</UserDocu>
<DeveloperDocu>Developer documentation here</DeveloperDocu>
</Documentation>
</PythonExport>
</GenerateModel>

View File

@@ -4,17 +4,11 @@ from Base.BaseClass import BaseClass
from Base.Metadata import export
@export(
Father="BaseClassPy",
Name="MeasurementPy",
Twin="Measurement",
TwinPointer="Measurement",
Include="Mod/Measure/App/Measurement.h",
Namespace="Measure",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Constructor=True,
)
class MeasurementPy(BaseClass):
class Measurement(BaseClass):
"""
Make a measurement
"""

View File

@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- this creates the bindings for the original measurement objects & methods. it is not part of unified measurement facility -->
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="BaseClassPy"
Name="MeasurementPy"
Twin="Measurement"
TwinPointer="Measurement"
Include="Mod/Measure/App/Measurement.h"
Namespace="Measure"
FatherInclude="Base/BaseClassPy.h"
Constructor="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
<UserDocu>Make a measurement</UserDocu>
</Documentation>
<Methode Name="addReference3D">
<Documentation>
<UserDocu>add a geometric reference</UserDocu>
</Documentation>
</Methode>
<Methode Name="has3DReferences">
<Documentation>
<UserDocu>does Measurement have links to 3D geometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="clear">
<Documentation>
<UserDocu>measure the difference between references to obtain resultant vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="delta">
<Documentation>
<UserDocu>measure the difference between references to obtain resultant vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="length">
<Documentation>
<UserDocu>measure the length of the references</UserDocu>
</Documentation>
</Methode>
<Methode Name="volume">
<Documentation>
<UserDocu>measure the volume of the references</UserDocu>
</Documentation>
</Methode>
<Methode Name="area">
<Documentation>
<UserDocu>measure the area of the references</UserDocu>
</Documentation>
</Methode>
<Methode Name="lineLineDistance">
<Documentation>
<UserDocu>measure the line-Line Distance of the references. Returns 0 if references are not 2 lines.</UserDocu>
</Documentation>
</Methode>
<Methode Name="planePlaneDistance">
<Documentation>
<UserDocu>measure the plane-plane distance of the references. Returns 0 if references are not 2 planes.</UserDocu>
</Documentation>
</Methode>
<Methode Name="angle">
<Documentation>
<UserDocu>measure the angle between two edges</UserDocu>
</Documentation>
</Methode>
<Methode Name="radius">
<Documentation>
<UserDocu>measure the radius of an arc or circle edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="com">
<Documentation>
<UserDocu>measure the center of mass for selected volumes</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -28,8 +28,7 @@ SET(MeasureGui_UIC_SRCS
DlgPrefsMeasureAppearanceImp.ui
)
generate_from_xml(QuickMeasurePy)
generate_from_py_(QuickMeasurePy)
generate_from_py(QuickMeasure)
SET(MeasureGui_SRCS
${CMAKE_SOURCE_DIR}/src/Mod/Measure/InitGui.py
@@ -39,7 +38,7 @@ SET(MeasureGui_SRCS
Resources/Measure.qrc
PreCompiled.cpp
PreCompiled.h
QuickMeasurePy.xml
QuickMeasure.pyi
QuickMeasurePyImp.cpp
QuickMeasure.cpp
QuickMeasure.h

View File

@@ -2,18 +2,12 @@ from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
@export(
Father="PyObjectBase",
Name="QuickMeasurePy",
Twin="QuickMeasure",
TwinPointer="QuickMeasure",
Include="Mod/Measure/Gui/QuickMeasure.h",
Namespace="MeasureGui",
FatherInclude="Base/PyObjectBase.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class QuickMeasurePy(PyObjectBase):
class QuickMeasure(PyObjectBase):
"""
Selection Observer for the QuickMeasure label.
"""

View File

@@ -1,19 +0,0 @@
<?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="QuickMeasurePy"
Twin="QuickMeasure"
TwinPointer="QuickMeasure"
Include="Mod/Measure/Gui/QuickMeasure.h"
Namespace="MeasureGui"
FatherInclude="Base/PyObjectBase.h"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>Selection Observer for the QuickMeasure label.</UserDocu>
</Documentation>
</PythonExport>
</GenerateModel>

View File

@@ -30,24 +30,18 @@ list(APPEND Mesh_LIBS
${QtConcurrent_LIBRARIES}
)
generate_from_xml(EdgePy)
generate_from_xml(FacetPy)
generate_from_xml(MeshFeaturePy)
generate_from_xml(MeshPointPy)
generate_from_xml(MeshPy)
generate_from_py_(EdgePy)
generate_from_py_(FacetPy)
generate_from_py_(MeshFeaturePy)
generate_from_py_(MeshPointPy)
generate_from_py_(MeshPy)
generate_from_py(Edge)
generate_from_py(Facet)
generate_from_py(MeshFeature)
generate_from_py(MeshPoint)
generate_from_py(Mesh)
SET(Mesh_XML_SRCS
EdgePy.xml
FacetPy.xml
MeshFeaturePy.xml
MeshPointPy.xml
MeshPy.xml
Edge.pyi
Facet.pyi
MeshFeature.pyi
MeshPoint.pyi
Mesh.pyi
)
SOURCE_GROUP("XML" FILES ${Mesh_XML_SRCS})

View File

@@ -4,18 +4,12 @@ from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
@export(
Father="PyObjectBase",
Name="EdgePy",
Twin="Edge",
TwinPointer="Edge",
Include="Mod/Mesh/App/Edge.h",
Namespace="Mesh",
FatherInclude="Base/PyObjectBase.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class EdgePy(PyObjectBase):
class Edge(PyObjectBase):
"""
Edge in mesh
This is an edge of a facet in a MeshObject. You can get it by e.g. iterating over the facets of a

View File

@@ -1,90 +0,0 @@
<?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="EdgePy"
Twin="Edge"
TwinPointer="Edge"
Include="Mod/Mesh/App/Edge.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Mesh"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer[at]users.sourceforge.net" />
<DeveloperDocu>Edge in a Mesh</DeveloperDocu>
<UserDocu>Edge in mesh
This is an edge of a facet in a MeshObject. You can get it by e.g. iterating over the facets of a
mesh and calling getEdge(index).
</UserDocu>
</Documentation>
<Methode Name="intersectWithEdge">
<Documentation>
<UserDocu>intersectWithEdge(Edge) -> list
Get a list of intersection points with another edge.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isParallel">
<Documentation>
<UserDocu>isParallel(Edge) -> bool
Checks if the two edges are parallel.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isCollinear">
<Documentation>
<UserDocu>isCollinear(Edge) -> bool
Checks if the two edges are collinear.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="unbound">
<Documentation>
<UserDocu>method unbound()
Cut the connection to a MeshObject. The edge becomes
free and is more or less a simple edge.
After calling unbound() no topological operation will
work!
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>The index of this edge of the facet</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Points" ReadOnly="true">
<Documentation>
<UserDocu>A list of points of the edge</UserDocu>
</Documentation>
<Parameter Name="Points" Type="List"/>
</Attribute>
<Attribute Name="PointIndices" ReadOnly="true">
<Documentation>
<UserDocu>The index tuple of point vertices of the mesh this edge is built of</UserDocu>
</Documentation>
<Parameter Name="PointIndices" Type="Tuple"/>
</Attribute>
<Attribute Name="NeighbourIndices" ReadOnly="true">
<Documentation>
<UserDocu>The index tuple of neighbour facets of the mesh this edge is adjacent with</UserDocu>
</Documentation>
<Parameter Name="NeighbourIndices" Type="Tuple"/>
</Attribute>
<Attribute Name="Length" ReadOnly="true">
<Documentation>
<UserDocu>The length of the edge</UserDocu>
</Documentation>
<Parameter Name="Length" Type="Float"/>
</Attribute>
<Attribute Name="Bound" ReadOnly="true">
<Documentation>
<UserDocu>Bound state of the edge</UserDocu>
</Documentation>
<Parameter Name="Bound" Type="Boolean"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -4,18 +4,12 @@ from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
@export(
Father="PyObjectBase",
Name="FacetPy",
Twin="Facet",
TwinPointer="Facet",
Include="Mod/Mesh/App/Facet.h",
Namespace="Mesh",
FatherInclude="Base/PyObjectBase.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class FacetPy(PyObjectBase):
class Facet(PyObjectBase):
"""
Facet in mesh
This is a facet in a MeshObject. You can get it by e.g. iterating a

View File

@@ -1,139 +0,0 @@
<?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="FacetPy"
Twin="Facet"
TwinPointer="Facet"
Include="Mod/Mesh/App/Facet.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Mesh"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<DeveloperDocu>Facet in a Mesh</DeveloperDocu>
<UserDocu>Facet in mesh
This is a facet in a MeshObject. You can get it by e.g. iterating a
mesh. The facet has a connection to its mesh and allows therefore
topological operations. It is also possible to create an unbounded facet e.g. to create
a mesh. In this case the topological operations will fail. The same is
when you cut the bound to the mesh by calling unbound().
</UserDocu>
</Documentation>
<Methode Name="unbound">
<Documentation>
<UserDocu>method unbound()
Cut the connection to a MeshObject. The facet becomes
free and is more or less a simple facet.
After calling unbound() no topological operation will
work!
</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersect">
<Documentation>
<UserDocu>intersect(Facet) -> list
Get a list of intersection points with another triangle.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isDegenerated">
<Documentation>
<UserDocu>isDegenerated([float]) -> boolean
Returns true if the facet is degenerated, otherwise false.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isDeformed">
<Documentation>
<UserDocu>isDegenerated(MinAngle, MaxAngle) -> boolean
Returns true if the facet is deformed, otherwise false.
A triangle is considered deformed if an angle is less than MinAngle
or higher than MaxAngle.
The two angles are given in radian.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getEdge">
<Documentation>
<UserDocu>getEdge(int) -> Edge
Returns the edge of the facet.
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>The index of this facet in the MeshObject</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Bound" ReadOnly="true">
<Documentation>
<UserDocu>Bound state of the facet</UserDocu>
</Documentation>
<Parameter Name="Bound" Type="Boolean"/>
</Attribute>
<Attribute Name="Normal" ReadOnly="true">
<Documentation>
<UserDocu>Normal vector of the facet.</UserDocu>
</Documentation>
<Parameter Name="Normal" Type="Object"/>
</Attribute>
<Attribute Name="Points" ReadOnly="true">
<Documentation>
<UserDocu>A list of points of the facet</UserDocu>
</Documentation>
<Parameter Name="Points" Type="List"/>
</Attribute>
<Attribute Name="PointIndices" ReadOnly="true">
<Documentation>
<UserDocu>The index tuple of point vertices of the mesh this facet is built of</UserDocu>
</Documentation>
<Parameter Name="PointIndices" Type="Tuple"/>
</Attribute>
<Attribute Name="NeighbourIndices" ReadOnly="true">
<Documentation>
<UserDocu>The index tuple of neighbour facets of the mesh this facet is adjacent with</UserDocu>
</Documentation>
<Parameter Name="NeighbourIndices" Type="Tuple"/>
</Attribute>
<Attribute Name="Area" ReadOnly="true">
<Documentation>
<UserDocu>The area of the facet</UserDocu>
</Documentation>
<Parameter Name="Area" Type="Float"/>
</Attribute>
<Attribute Name="AspectRatio" ReadOnly="true">
<Documentation>
<UserDocu>The aspect ratio of the facet computed by longest edge and its height</UserDocu>
</Documentation>
<Parameter Name="AspectRatio" Type="Float"/>
</Attribute>
<Attribute Name="AspectRatio2" ReadOnly="true">
<Documentation>
<UserDocu>The aspect ratio of the facet computed by radius of circum-circle and in-circle</UserDocu>
</Documentation>
<Parameter Name="AspectRatio2" Type="Float"/>
</Attribute>
<Attribute Name="Roundness" ReadOnly="true">
<Documentation>
<UserDocu>The roundness of the facet</UserDocu>
</Documentation>
<Parameter Name="Roundness" Type="Float"/>
</Attribute>
<Attribute Name="CircumCircle" ReadOnly="true">
<Documentation>
<UserDocu>The center and radius of the circum-circle</UserDocu>
</Documentation>
<Parameter Name="CircumCircle" Type="Tuple"/>
</Attribute>
<Attribute Name="InCircle" ReadOnly="true">
<Documentation>
<UserDocu>The center and radius of the in-circle</UserDocu>
</Documentation>
<Parameter Name="InCircle" Type="Tuple"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,8 +5,6 @@ from Base.Metadata import constmethod, export
from App.ComplexGeoData import ComplexGeoData
@export(
Father="ComplexGeoDataPy",
Name="MeshPy",
Twin="MeshObject",
TwinPointer="MeshObject",
Include="Mod/Mesh/App/Mesh.h",
@@ -21,7 +19,7 @@ from App.ComplexGeoData import ComplexGeoData
friend class PropertyMeshKernel;
class PropertyMeshKernel* parentProperty = nullptr;"""
)
class MeshPy(ComplexGeoData):
class Mesh(ComplexGeoData):
"""Mesh() -- Create an empty mesh object.
This class allows one to manipulate the mesh object by adding new facets, deleting facets, importing from an STL file,

View File

@@ -5,16 +5,13 @@ from Base.Metadata import export
from App.GeoFeature import GeoFeature
@export(
Father="GeoFeaturePy",
Name="MeshFeaturePy",
Twin="Feature",
TwinPointer="Feature",
Include="Mod/Mesh/App/MeshFeature.h",
Namespace="Mesh",
FatherInclude="App/GeoFeaturePy.h",
FatherNamespace="App",
)
class MeshFeaturePy(GeoFeature):
class MeshFeature(GeoFeature):
"""
The Mesh::Feature class handles meshes.
The Mesh.MeshFeature() function is for internal use only and cannot be used to create instances of this class.

View File

@@ -1,104 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="GeoFeaturePy"
Name="MeshFeaturePy"
Twin="Feature"
TwinPointer="Feature"
Include="Mod/Mesh/App/MeshFeature.h"
Namespace="Mesh"
FatherInclude="App/GeoFeaturePy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
<UserDocu>The Mesh::Feature class handles meshes.
The Mesh.MeshFeature() function is for internal use only and cannot be used to create instances of this class.
Therefore you must have a reference to a document, e.g. 'd' then you can create an instance with
d.addObject("Mesh::Feature").
</UserDocu>
</Documentation>
<Methode Name="countPoints">
<Documentation>
<UserDocu>Return the number of vertices of the mesh object</UserDocu>
</Documentation>
</Methode>
<Methode Name="countFacets">
<Documentation>
<UserDocu>Return the number of facets of the mesh object</UserDocu>
</Documentation>
</Methode>
<Methode Name="harmonizeNormals">
<Documentation>
<UserDocu>Adjust wrong oriented facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="smooth">
<Documentation>
<UserDocu>Smooth the mesh data</UserDocu>
</Documentation>
</Methode>
<Methode Name="decimate">
<Documentation>
<UserDocu>
Decimate the mesh
decimate(tolerance(Float), reduction(Float))
tolerance: maximum error
reduction: reduction factor must be in the range [0.0,1.0]
Example:
mesh.decimate(0.5, 0.1) # reduction by up to 10 percent
mesh.decimate(0.5, 0.9) # reduction by up to 90 percent
or
decimate(targwt size(int))
mesh.decimate(mesh.CountFacets/2)
</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeNonManifolds">
<Documentation>
<UserDocu>Remove non-manifolds</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeNonManifoldPoints">
<Documentation>
<UserDocu>Remove non-manifold points</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixIndices">
<Documentation>
<UserDocu>Repair any invalid indices</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixDegenerations">
<Documentation>
<UserDocu>Remove degenerated facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeDuplicatedFacets">
<Documentation>
<UserDocu>Remove duplicated facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeDuplicatedPoints">
<Documentation>
<UserDocu>Remove duplicated points</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixSelfIntersections">
<Documentation>
<UserDocu>Repair self-intersections</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeFoldsOnSurface">
<Documentation>
<UserDocu>Remove folds on surfaces</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeInvalidPoints">
<Documentation>
<UserDocu>Remove points with invalid coordinates (NaN)</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -4,18 +4,12 @@ from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
@export(
Father="PyObjectBase",
Name="MeshPointPy",
Twin="MeshPoint",
TwinPointer="MeshPoint",
Include="Mod/Mesh/App/MeshPoint.h",
Namespace="Mesh",
FatherInclude="Base/PyObjectBase.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class MeshPointPy(PyObjectBase):
class MeshPoint(PyObjectBase):
"""
Point in mesh
This is a point in a MeshObject. You can get it by e.g. iterating a

View File

@@ -1,78 +0,0 @@
<?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="MeshPointPy"
Twin="MeshPoint"
TwinPointer="MeshPoint"
Include="Mod/Mesh/App/MeshPoint.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Mesh"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>Point in a Mesh</DeveloperDocu>
<UserDocu> Point in mesh
This is a point in a MeshObject. You can get it by e.g. iterating a
mesh. The point has a connection to its mesh and allows therefore
topological operations. It is also possible to create an unbounded mesh point e.g. to create
a mesh. In this case the topological operations will fail. The same is
when you cut the bound to the mesh by calling unbound().
</UserDocu>
</Documentation>
<Methode Name="unbound">
<Documentation>
<UserDocu> method unbound()
Cut the connection to a MeshObject. The point becomes
free and is more or less a simple vector/point.
After calling unbound() no topological operation will
work!
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>The index of this point in the MeshObject</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Bound" ReadOnly="true">
<Documentation>
<UserDocu>Bound state of the point</UserDocu>
</Documentation>
<Parameter Name="Bound" Type="Boolean"/>
</Attribute>
<Attribute Name="Normal" ReadOnly="true">
<Documentation>
<UserDocu>Normal vector of the point computed by the surrounding mesh.</UserDocu>
</Documentation>
<Parameter Name="Normal" Type="Object"/>
</Attribute>
<Attribute Name="Vector" ReadOnly="true">
<Documentation>
<UserDocu>Vector of the point.</UserDocu>
</Documentation>
<Parameter Name="Normal" Type="Object"/>
</Attribute>
<Attribute Name="x" ReadOnly="true">
<Documentation>
<UserDocu>The X component of the point.</UserDocu>
</Documentation>
<Parameter Name="x" Type="Float"/>
</Attribute>
<Attribute Name="y" ReadOnly="true">
<Documentation>
<UserDocu>The Y component of the point.</UserDocu>
</Documentation>
<Parameter Name="y" Type="Float"/>
</Attribute>
<Attribute Name="z" ReadOnly="true">
<Documentation>
<UserDocu>The Z component of the point.</UserDocu>
</Documentation>
<Parameter Name="z" Type="Float"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,621 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="ComplexGeoDataPy"
Include="Mod/Mesh/App/Mesh.h"
Name="MeshPy"
Twin="MeshObject"
TwinPointer="MeshObject"
Namespace="Mesh"
FatherInclude="App/ComplexGeoDataPy.h"
FatherNamespace="Data"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<UserDocu>Mesh() -- Create an empty mesh object.
This class allows one to manipulate the mesh object by adding new facets, deleting facets, importing from an STL file,
transforming the mesh and much more.
For a complete overview of what can be done see also the documentation of mesh.
A mesh object cannot be added to an existing document directly. Therefore the document must create an object
with a property class that supports meshes.
Example:
m = Mesh.Mesh()
... # Manipulate the mesh
d = FreeCAD.activeDocument() # Get a reference to the actie document
f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature
f.Mesh = m # Assign the mesh object to the internal property
d.recompute()</UserDocu>
</Documentation>
<Methode Name="read" Keyword="true">
<Documentation>
<UserDocu>Read in a mesh object from file.
mesh.read(Filename='mymesh.stl')
mesh.read(Stream=file,Format='STL')</UserDocu>
</Documentation>
</Methode>
<Methode Name="write" Const="true" Keyword="true">
<Documentation>
<UserDocu>Write the mesh object into file.
mesh.write(Filename='mymesh.stl',[Format='STL',Name='Object name',Material=colors])
mesh.write(Stream=file,Format='STL',[Name='Object name',Material=colors])</UserDocu>
</Documentation>
</Methode>
<Methode Name="writeInventor" Const="true">
<Documentation>
<UserDocu>Write the mesh in OpenInventor format to a string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>Create a copy of this mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="offset">
<Documentation>
<UserDocu>Move the point along their normals</UserDocu>
</Documentation>
</Methode>
<Methode Name="offsetSpecial">
<Documentation>
<UserDocu>Move the point along their normals</UserDocu>
</Documentation>
</Methode>
<Methode Name="crossSections" Const="true">
<Documentation>
<UserDocu>Get cross-sections of the mesh through several planes</UserDocu>
</Documentation>
</Methode>
<Methode Name="unite" Const="true">
<Documentation>
<UserDocu>Union of this and the given mesh object.</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersect" Const="true">
<Documentation>
<UserDocu>Intersection of this and the given mesh object.</UserDocu>
</Documentation>
</Methode>
<Methode Name="difference" Const="true">
<Documentation>
<UserDocu>Difference of this and the given mesh object.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inner" Const="true">
<Documentation>
<UserDocu>Get the part inside of the intersection</UserDocu>
</Documentation>
</Methode>
<Methode Name="outer" Const="true">
<Documentation>
<UserDocu>Get the part outside the intersection</UserDocu>
</Documentation>
</Methode>
<Methode Name="section" Const="true" Keyword="true">
<Documentation>
<UserDocu>Get the section curves of this and the given mesh object.
lines = mesh.section(mesh2, [ConnectLines=True, MinDist=0.0001])
</UserDocu>
</Documentation>
</Methode>
<Methode Name="translate">
<Documentation>
<UserDocu>Apply a translation to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotate">
<Documentation>
<UserDocu>Apply a rotation to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="transform">
<Documentation>
<UserDocu>Apply a transformation to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="transformToEigen">
<Documentation>
<UserDocu>Transform the mesh to its eigenbase</UserDocu>
</Documentation>
</Methode>
<Methode Name="getEigenSystem" Const="true">
<Documentation>
<UserDocu>Get Eigen base of the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="addFacet">
<Documentation>
<UserDocu>Add a facet to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="addFacets">
<Documentation>
<UserDocu>Add a list of facets to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeFacets">
<Documentation>
<UserDocu>Remove a list of facet indices from the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeNeedles">
<Documentation>
<UserDocu>Remove all edges that are smaller than a given length</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeFullBoundaryFacets">
<Documentation>
<UserDocu>Remove facets whose all three points are on the boundary</UserDocu>
</Documentation>
</Methode>
<Methode Name="getInternalFacets" Const="true">
<Documentation>
<UserDocu>Builds a list of facet indices with triangles that are inside a volume mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="rebuildNeighbourHood">
<Documentation>
<UserDocu>Repairs the neighbourhood which might be broken</UserDocu>
</Documentation>
</Methode>
<Methode Name="addMesh">
<Documentation>
<UserDocu>Combine this mesh with another mesh.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setPoint">
<Documentation>
<UserDocu>
setPoint(int, Vector)
Sets the point at index.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="movePoint">
<Documentation>
<UserDocu>
movePoint(int, Vector)
This method moves the point in the mesh along the
given vector. This affects the geometry of the mesh.
Be aware that moving points may cause self-intersections.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPointNormals" Const="true">
<Documentation>
<UserDocu>
getPointNormals()
Get the normals of the points.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="addSegment">
<Documentation>
<UserDocu>Add a list of facet indices that describes a segment to the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="countSegments" Const="true">
<Documentation>
<UserDocu>Get the number of segments which may also be 0</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegment" Const="true">
<Documentation>
<UserDocu>Get a list of facet indices that describes a segment</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSeparateComponents" Const="true">
<Documentation>
<UserDocu>
Returns a list containing the different
components (separated areas) of the mesh as separate meshes
import Mesh
for c in mesh.getSeparatecomponents():
Mesh.show(c)
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getFacetSelection" Const="true">
<Documentation>
<UserDocu>Get a list of the indices of selected facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPointSelection" Const="true">
<Documentation>
<UserDocu>Get a list of the indices of selected points</UserDocu>
</Documentation>
</Methode>
<Methode Name="meshFromSegment" Const="true">
<Documentation>
<UserDocu>Create a mesh from segment</UserDocu>
</Documentation>
</Methode>
<Methode Name="clear">
<Documentation>
<UserDocu>Clear the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="isSolid" Const="true">
<Documentation>
<UserDocu>Check if the mesh is a solid</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasNonManifolds" Const="true">
<Documentation>
<UserDocu>Check if the mesh has non-manifolds</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeNonManifolds">
<Documentation>
<UserDocu>Remove non-manifolds</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeNonManifoldPoints">
<Documentation>
<UserDocu>Remove non-manifold points</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasSelfIntersections" Const="true">
<Documentation>
<UserDocu>Check if the mesh intersects itself</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSelfIntersections" Const="true">
<Documentation>
<UserDocu>Returns a tuple of indices of intersecting triangles</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixSelfIntersections">
<Documentation>
<UserDocu>Repair self-intersections</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeFoldsOnSurface">
<Documentation>
<UserDocu>Remove folds on surfaces</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasNonUniformOrientedFacets" Const="true">
<Documentation>
<UserDocu>Check if the mesh has facets with inconsistent orientation</UserDocu>
</Documentation>
</Methode>
<Methode Name="countNonUniformOrientedFacets" Const="true">
<Documentation>
<UserDocu>Get the number of wrong oriented facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNonUniformOrientedFacets" Const="true">
<Documentation>
<UserDocu>Get a tuple of wrong oriented facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasInvalidPoints" Const="true">
<Documentation>
<UserDocu>Check if the mesh has points with invalid coordinates (NaN)</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeInvalidPoints">
<Documentation>
<UserDocu>Remove points with invalid coordinates (NaN)</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasPointsOnEdge" Const="true">
<Documentation>
<UserDocu>Check if points lie on edges</UserDocu>
</Documentation>
</Methode>
<Methode Name="removePointsOnEdge" Keyword="true">
<Documentation>
<UserDocu>removePointsOnEdge(FillBoundary=False)
Remove points that lie on edges.
If FillBoundary is True then the holes by removing the affected facets
will be re-filled.</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasInvalidNeighbourhood" Const="true">
<Documentation>
<UserDocu>Check if the mesh has invalid neighbourhood indices</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasPointsOutOfRange" Const="true">
<Documentation>
<UserDocu>Check if the mesh has point indices that are out of range</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasFacetsOutOfRange" Const="true">
<Documentation>
<UserDocu>Check if the mesh has facet indices that are out of range</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasCorruptedFacets" Const="true">
<Documentation>
<UserDocu>Check if the mesh has corrupted facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="countComponents" Const="true">
<Documentation>
<UserDocu>Get the number of topologic independent areas</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeComponents">
<Documentation>
<UserDocu>Remove components with less or equal to number of given facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixIndices">
<Documentation>
<UserDocu>Repair any invalid indices</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixCaps">
<Documentation>
<UserDocu>Repair caps by swapping the edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixDeformations">
<Documentation>
<UserDocu>Repair deformed facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="fixDegenerations">
<Documentation>
<UserDocu>Remove degenerated facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeDuplicatedPoints">
<Documentation>
<UserDocu>Remove duplicated points</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeDuplicatedFacets">
<Documentation>
<UserDocu>Remove duplicated facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="refine">
<Documentation>
<UserDocu>Refine the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="splitEdges">
<Documentation>
<UserDocu>Split all edges</UserDocu>
</Documentation>
</Methode>
<Methode Name="splitEdge">
<Documentation>
<UserDocu>Split edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="splitFacet">
<Documentation>
<UserDocu>Split facet</UserDocu>
</Documentation>
</Methode>
<Methode Name="swapEdge">
<Documentation>
<UserDocu>Swap the common edge with the neighbour</UserDocu>
</Documentation>
</Methode>
<Methode Name="collapseEdge">
<Documentation>
<UserDocu>Remove an edge and both facets that share this edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="collapseFacet">
<Documentation>
<UserDocu>Remove a facet</UserDocu>
</Documentation>
</Methode>
<Methode Name="collapseFacets">
<Documentation>
<UserDocu>Remove a list of facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="insertVertex">
<Documentation>
<UserDocu>Insert a vertex into a facet</UserDocu>
</Documentation>
</Methode>
<Methode Name="snapVertex">
<Documentation>
<UserDocu>Insert a new facet at the border</UserDocu>
</Documentation>
</Methode>
<Methode Name="printInfo" Const="true">
<Documentation>
<UserDocu>Get detailed information about the mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="foraminate" Const="true">
<Documentation>
<UserDocu>Get a list of facet indices and intersection points</UserDocu>
</Documentation>
</Methode>
<Methode Name="cut">
<Documentation>
<UserDocu>Cuts the mesh with a given closed polygon
cut(list, int) -> None
The argument list is an array of points, a polygon
The argument int is the mode: 0=inner, 1=outer
</UserDocu>
</Documentation>
</Methode>
<Methode Name="trim">
<Documentation>
<UserDocu>Trims the mesh with a given closed polygon
trim(list, int) -> None
The argument list is an array of points, a polygon
The argument int is the mode: 0=inner, 1=outer
</UserDocu>
</Documentation>
</Methode>
<Methode Name="trimByPlane">
<Documentation>
<UserDocu>Trims the mesh with a given plane
trimByPlane(Vector, Vector) -> None
The plane is defined by a base and normal vector. Depending on the
direction of the normal the part above or below will be kept.
</UserDocu>
</Documentation>
</Methode>
<!-- The Const here is just a hack -->
<Methode Name="harmonizeNormals" Const="true">
<Documentation>
<UserDocu>Adjust wrong oriented facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="flipNormals" Const="true">
<Documentation>
<UserDocu>Flip the mesh normals</UserDocu>
</Documentation>
</Methode>
<Methode Name="fillupHoles" Const="true">
<Documentation>
<UserDocu>Fillup holes</UserDocu>
</Documentation>
</Methode>
<Methode Name="smooth" Const="true" Keyword="true">
<Documentation>
<UserDocu>Smooth the mesh
smooth([iteration=1,maxError=FLT_MAX])</UserDocu>
</Documentation>
</Methode>
<Methode Name="decimate">
<Documentation>
<UserDocu>
Decimate the mesh
decimate(tolerance(Float), reduction(Float))
tolerance: maximum error
reduction: reduction factor must be in the range [0.0,1.0]
Example:
mesh.decimate(0.5, 0.1) # reduction by up to 10 percent
mesh.decimate(0.5, 0.9) # reduction by up to 90 percent
</UserDocu>
</Documentation>
</Methode>
<Methode Name="mergeFacets">
<Documentation>
<UserDocu>Merge facets to optimize topology</UserDocu>
</Documentation>
</Methode>
<Methode Name="optimizeTopology" Const="true">
<Documentation>
<UserDocu>Optimize the edges to get nicer facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="optimizeEdges" Const="true">
<Documentation>
<UserDocu>Optimize the edges to get nicer facets</UserDocu>
</Documentation>
</Methode>
<!-- End of hack -->
<Methode Name="nearestFacetOnRay" Const="true">
<Documentation>
<UserDocu>nearestFacetOnRay(tuple, tuple) -> dict
Get the index and intersection point of the nearest facet to a ray.
The first parameter is a tuple of three floats the base point of the ray,
the second parameter is ut uple of three floats for the direction.
The result is a dictionary with an index and the intersection point or
an empty dictionary if there is no intersection.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPlanarSegments" Const="true">
<Documentation>
<UserDocu>getPlanarSegments(dev,[min faces=0]) -> list
Get all planes of the mesh as segment.
In the worst case each triangle can be regarded as single
plane if none of its neighbours is coplanar.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegmentsOfType" Const="true">
<Documentation>
<UserDocu>getSegmentsOfType(type, dev,[min faces=0]) -> list
Get all segments of type.
Type can be Plane, Cylinder or Sphere</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegmentsByCurvature" Const="true">
<Documentation>
<UserDocu>getSegmentsByCurvature(list) -> list
The argument list gives a list if tuples where it defines the preferred maximum curvature,
the preferred minimum curvature, the tolerances and the number of minimum faces for the segment.
Example:
c=(1.0, 0.0, 0.1, 0.1, 500) # search for a cylinder with radius 1.0
p=(0.0, 0.0, 0.1, 0.1, 500) # search for a plane
mesh.getSegmentsByCurvature([c,p])
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getCurvaturePerVertex" Const="true">
<Documentation>
<UserDocu>
getCurvaturePerVertex() -> list
The items in the list contains minimum and maximum curvature with their directions
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Points" ReadOnly="true">
<Documentation>
<UserDocu>A collection of the mesh points
With this attribute it is possible to get access to the points of the mesh
for p in mesh.Points:
print p.x, p.y, p.z</UserDocu>
</Documentation>
<Parameter Name="Points" Type="List" />
</Attribute>
<Attribute Name="CountPoints" ReadOnly="true">
<Documentation>
<UserDocu>Return the number of vertices of the mesh object.</UserDocu>
</Documentation>
<Parameter Name="CountPoints" Type="Long" />
</Attribute>
<Attribute Name="CountEdges" ReadOnly="true">
<Documentation>
<UserDocu>Return the number of edges of the mesh object.</UserDocu>
</Documentation>
<Parameter Name="CountEdges" Type="Long" />
</Attribute>
<Attribute Name="Facets" ReadOnly="true">
<Documentation>
<UserDocu>A collection of facets
With this attribute it is possible to get access to the facets of the mesh
for p in mesh.Facets:
print p</UserDocu>
</Documentation>
<Parameter Name="Facets" Type="List" />
</Attribute>
<Attribute Name="CountFacets" ReadOnly="true">
<Documentation>
<UserDocu>Return the number of facets of the mesh object.</UserDocu>
</Documentation>
<Parameter Name="CountFacets" Type="Long" />
</Attribute>
<Attribute Name="Topology" ReadOnly="true">
<Documentation>
<UserDocu>Return the points and face indices as tuple.</UserDocu>
</Documentation>
<Parameter Name="Topology" Type="Tuple" />
</Attribute>
<Attribute Name="Area" ReadOnly="true">
<Documentation>
<UserDocu>Return the area of the mesh object.</UserDocu>
</Documentation>
<Parameter Name="Area" Type="Float" />
</Attribute>
<Attribute Name="Volume" ReadOnly="true">
<Documentation>
<UserDocu>Return the volume of the mesh object.</UserDocu>
</Documentation>
<Parameter Name="Volume" Type="Float" />
</Attribute>
<ClassDeclarations>
private:
friend class PropertyMeshKernel;
class PropertyMeshKernel* parentProperty = nullptr;</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -15,11 +15,10 @@ set(MeshGui_LIBS
FreeCADGui
)
generate_from_xml(ViewProviderMeshPy)
generate_from_py_(ViewProviderMeshPy)
generate_from_py(ViewProviderMesh)
SET(MeshGui_XML_SRCS
ViewProviderMeshPy.xml
ViewProviderMesh.pyi
)
SOURCE_GROUP("XML" FILES ${MeshGui_XML_SRCS})

View File

@@ -3,16 +3,10 @@ from Gui.ViewProviderGeometryObject import ViewProviderGeometryObject
from Base.Metadata import export
@export(
Father="ViewProviderGeometryObjectPy",
Name="ViewProviderMeshPy",
Twin="ViewProviderMesh",
TwinPointer="ViewProviderMesh",
Include="Mod/Mesh/Gui/ViewProvider.h",
Namespace="MeshGui",
FatherInclude="Gui/ViewProviderGeometryObjectPy.h",
FatherNamespace="Gui",
)
class ViewProviderMeshPy(ViewProviderGeometryObject):
class ViewProviderMesh(ViewProviderGeometryObject):
"""
This is the ViewProvider base class
"""

View File

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="ViewProviderGeometryObjectPy"
Name="ViewProviderMeshPy"
Twin="ViewProviderMesh"
TwinPointer="ViewProviderMesh"
Include="Mod/Mesh/Gui/ViewProvider.h"
Namespace="MeshGui"
FatherInclude="Gui/ViewProviderGeometryObjectPy.h"
FatherNamespace="Gui">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
<UserDocu>This is the ViewProvider base class</UserDocu>
</Documentation>
<Methode Name="setSelection">
<Documentation>
<UserDocu>Select list of facets</UserDocu>
</Documentation>
</Methode>
<Methode Name="addSelection">
<Documentation>
<UserDocu>Add list of facets to selection</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeSelection">
<Documentation>
<UserDocu>Remove list of facets from selection</UserDocu>
</Documentation>
</Methode>
<Methode Name="invertSelection">
<Documentation>
<UserDocu>Invert the selection</UserDocu>
</Documentation>
</Methode>
<Methode Name="clearSelection">
<Documentation>
<UserDocu>Clear the selection</UserDocu>
</Documentation>
</Methode>
<Methode Name="highlightSegments">
<Documentation>
<UserDocu>Highlights the segments of a mesh with a given list of colors.
The number of elements of this list must be equal to the number of mesh segments.
</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -38,15 +38,14 @@ list(APPEND Points_LIBS
${QtConcurrent_LIBRARIES}
)
generate_from_xml(PointsPy)
generate_from_py_(PointsPy)
generate_from_py(Points)
SET(Points_SRCS
AppPoints.cpp
AppPointsPy.cpp
Points.cpp
Points.h
PointsPy.xml
Points.pyi
PointsPyImp.cpp
PointsAlgos.cpp
PointsAlgos.h

View File

@@ -5,7 +5,6 @@ from Data import object
@export(
Father="ComplexGeoDataPy",
Name="PointsPy",
Twin="PointKernel",
TwinPointer="PointKernel",
Include="Mod/Points/App/Points.h",
@@ -14,7 +13,7 @@ from Data import object
FatherNamespace="Data",
Constructor=True,
)
class PointsPy(object):
class Points(object):
"""
Points() -- Create an empty points object.

View File

@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="ComplexGeoDataPy"
Include="Mod/Points/App/Points.h"
Name="PointsPy"
Twin="PointKernel"
TwinPointer="PointKernel"
Namespace="Points"
FatherInclude="App/ComplexGeoDataPy.h"
FatherNamespace="Data"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<UserDocu>Points() -- Create an empty points object.
This class allows one to manipulate the Points object by adding new points, deleting facets, importing from an STL file,
transforming and much more.
</UserDocu>
</Documentation>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>Create a copy of this points object</UserDocu>
</Documentation>
</Methode>
<Methode Name="read">
<Documentation>
<UserDocu>Read in a points object from file.</UserDocu>
</Documentation>
</Methode>
<Methode Name="write" Const="true">
<Documentation>
<UserDocu>Write the points object into file.</UserDocu>
</Documentation>
</Methode>
<Methode Name="writeInventor" Const="true">
<Documentation>
<UserDocu>Write the points in OpenInventor format to a string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addPoints" >
<Documentation>
<UserDocu>add one or more (list of) points to the object</UserDocu>
</Documentation>
</Methode>
<Methode Name="fromSegment" Const="true">
<Documentation>
<UserDocu>Get a new point object from a given segment</UserDocu>
</Documentation>
</Methode>
<Methode Name="fromValid" Const="true">
<Documentation>
<UserDocu>Get a new point object from points with valid coordinates (i.e. that are not NaN)</UserDocu>
</Documentation>
</Methode>
<Attribute Name="CountPoints" ReadOnly="true">
<Documentation>
<UserDocu>Return the number of vertices of the points object.</UserDocu>
</Documentation>
<Parameter Name="CountPoints" Type="Long" />
</Attribute>
<Attribute Name="Points" ReadOnly="true">
<Documentation>
<UserDocu>A collection of points
With this attribute it is possible to get access to the points of the object
for p in pnt.Points:
print p
</UserDocu>
</Documentation>
<Parameter Name="Points" Type="List" />
</Attribute>
</PythonExport>
</GenerateModel>