Merge pull request #23521 from z0r0/python-interface-bindings-final

Core: Python interface bindings cleanup
This commit is contained in:
Chris Hennes
2025-09-08 10:58:15 -05:00
committed by GitHub
179 changed files with 528 additions and 5899 deletions

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from App.Part import Part
@export(
Father="PartPy",
Name="AssemblyLinkPy",
Twin="AssemblyLink",
TwinPointer="AssemblyLink",
Include="Mod/Assembly/App/AssemblyLink.h",
Namespace="Assembly",
FatherInclude="App/PartPy.h",
FatherNamespace="App",
)
class AssemblyLinkPy(Part):
class AssemblyLink(Part):
"""
This class handles document objects in Assembly
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""
Joints: Final[list]

View File

@@ -1,24 +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="PartPy"
Name="AssemblyLinkPy"
Twin="AssemblyLink"
TwinPointer="AssemblyLink"
Include="Mod/Assembly/App/AssemblyLink.h"
Namespace="Assembly"
FatherInclude="App/PartPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class handles document objects in Assembly</UserDocu>
</Documentation>
<Attribute Name="Joints" ReadOnly="true">
<Documentation>
<UserDocu>A list of all joints this assembly link has.</UserDocu>
</Documentation>
<Parameter Name="Joints" Type="List"/>
</Attribute>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -4,19 +4,13 @@ from Base.Metadata import constmethod, export
from App.Part import Part
@export(
Father="PartPy",
Name="AssemblyObjectPy",
Twin="AssemblyObject",
TwinPointer="AssemblyObject",
Include="Mod/Assembly/App/AssemblyObject.h",
Namespace="Assembly",
FatherInclude="App/PartPy.h",
FatherNamespace="App",
)
class AssemblyObjectPy(Part):
@export(Include="Mod/Assembly/App/AssemblyObject.h", Namespace="Assembly")
class AssemblyObject(Part):
"""
This class handles document objects in Assembly
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""
@constmethod

View File

@@ -1,182 +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="PartPy"
Name="AssemblyObjectPy"
Twin="AssemblyObject"
TwinPointer="AssemblyObject"
Include="Mod/Assembly/App/AssemblyObject.h"
Namespace="Assembly"
FatherInclude="App/PartPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class handles document objects in Assembly</UserDocu>
</Documentation>
<Methode Name="solve" Const="true">
<Documentation>
<UserDocu>
Solve the assembly and update part placements.
solve(enableRedo=False) -> int
Args:
enableRedo: Whether the solve save the initial position of parts
to enable undoing it even without a transaction.
Defaults to `False` ie the solve cannot be undone if called
outside of a transaction.
Returns:
0 in case of success, otherwise the following codes in this order of
priority:
-6 if no parts are fixed.
-4 if over-constrained,
-3 if conflicting constraints,
-5 if malformed constraints
-1 if solver error,
-2 if redundant constraints.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="generateSimulation" Const="true">
<Documentation>
<UserDocu>
Generate the simulation.
solve(simulationObject) -> int
Args:
simulationObject: The simulation Object.
Returns:
0 in case of success, otherwise the following codes in this order of
priority:
-6 if no parts are fixed.
-4 if over-constrained,
-3 if conflicting constraints,
-5 if malformed constraints
-1 if solver error,
-2 if redundant constraints.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="updateForFrame" Const="true">
<Documentation>
<UserDocu>
Update entire assembly to frame number specified.
updateForFrame(index)
Args: index of frame.
Returns: None
</UserDocu>
</Documentation>
</Methode>
<Methode Name="numberOfFrames" Const="true">
<Documentation>
<UserDocu>
numberOfFrames()
Args: None
Returns: Number of frames
</UserDocu>
</Documentation>
</Methode>
<Methode Name="undoSolve" Const="true">
<Documentation>
<UserDocu>
Undo the last solve of the assembly and return part placements to their initial position.
undoSolve()
Returns: None
</UserDocu>
</Documentation>
</Methode>
<Methode Name="ensureIdentityPlacements" Const="true">
<Documentation>
<UserDocu>
Makes sure that LinkGroups or sub-assemblies have identity placements.
ensureIdentityPlacements()
Returns: None
</UserDocu>
</Documentation>
</Methode>
<Methode Name="clearUndo" Const="true">
<Documentation>
<UserDocu>
Clear the registered undo positions.
clearUndo()
Returns: None
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPartConnected" Const="true">
<Documentation>
<UserDocu>
Check if a part is connected to the ground through joints.
isPartConnected(obj) -> bool
Args: document object to check.
Returns: True if part is connected to ground
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isJointConnectingPartToGround" Const="true">
<Documentation>
<UserDocu>
Check if a joint is connecting a part to the ground.
isJointConnectingPartToGround(joint, propName) -> bool
Args:
- joint: document object of the joint to check.
- propName: string 'Part1' or 'Part2' of the joint.
Returns: True if part is connected to ground
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPartGrounded" Const="true">
<Documentation>
<UserDocu>
Check if a part has a grounded joint.
isPartGrounded(obj) -> bool
Args:
- obj: document object of the part to check.
Returns: True if part has grounded joint
</UserDocu>
</Documentation>
</Methode>
<Methode Name="exportAsASMT" Const="true">
<Documentation>
<UserDocu>
Export the assembly in a text format called ASMT.
exportAsASMT(fileName:str)
Args:
fileName: The name of the file where the ASMT will be exported.
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Joints" ReadOnly="true">
<Documentation>
<UserDocu>A list of all joints this assembly has.</UserDocu>
</Documentation>
<Parameter Name="Joints" Type="List"/>
</Attribute>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -0,0 +1,12 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(Include="Mod/Assembly/App/BomGroup.h", Namespace="Assembly")
class BomGroup(DocumentObjectGroup):
"""
This class is a group subclass for boms.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

View File

@@ -1,18 +0,0 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(
Father="DocumentObjectGroupPy",
Name="BomGroupPy",
Twin="BomGroup",
TwinPointer="BomGroup",
Include="Mod/Assembly/App/BomGroup.h",
Namespace="Assembly",
FatherInclude="App/DocumentObjectGroupPy.h",
FatherNamespace="App",
)
class BomGroupPy(DocumentObjectGroup):
"""
This class is a group subclass for boms.
"""

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="DocumentObjectGroupPy"
Name="BomGroupPy"
Twin="BomGroup"
TwinPointer="BomGroup"
Include="Mod/Assembly/App/BomGroup.h"
Namespace="Assembly"
FatherInclude="App/DocumentObjectGroupPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class is a group subclass for boms.</UserDocu>
</Documentation>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -2,16 +2,14 @@ from Base.Metadata import export
from Spreadsheet.Sheet import Sheet
@export(
Father="SheetPy",
Name="BomObjectPy",
Twin="BomObject",
TwinPointer="BomObject",
Include="Mod/Assembly/App/BomObject.h",
Namespace="Assembly",
FatherInclude="Mod/Spreadsheet/App/SheetPy.h",
FatherNamespace="Spreadsheet",
Namespace="Assembly",
)
class BomObjectPy(Sheet):
class BomObject(Sheet):
"""
This class is the BOM object of assemblies, it derives from Spreadsheet::Sheet.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

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="SheetPy"
Name="BomObjectPy"
Twin="BomObject"
TwinPointer="BomObject"
Include="Mod/Assembly/App/BomObject.h"
Namespace="Assembly"
FatherInclude="Mod/Spreadsheet/App/SheetPy.h"
FatherNamespace="Spreadsheet">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class is the BOM object of assemblies, it derives from Spreadsheet::Sheet.</UserDocu>
</Documentation>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -14,37 +14,29 @@ set(Assembly_LIBS
OndselSolver
)
generate_from_xml(AssemblyObjectPy)
generate_from_xml(AssemblyLinkPy)
generate_from_xml(BomObjectPy)
generate_from_xml(BomGroupPy)
generate_from_xml(JointGroupPy)
generate_from_xml(ViewGroupPy)
generate_from_xml(SimulationGroupPy)
generate_from_py_(AssemblyObjectPy)
generate_from_py_(AssemblyLinkPy)
generate_from_py_(BomObjectPy)
generate_from_py_(BomGroupPy)
generate_from_py_(JointGroupPy)
generate_from_py_(ViewGroupPy)
generate_from_py_(SimulationGroupPy)
generate_from_py(AssemblyObject)
generate_from_py(AssemblyLink)
generate_from_py(BomObject)
generate_from_py(BomGroup)
generate_from_py(JointGroup)
generate_from_py(ViewGroup)
generate_from_py(SimulationGroup)
SET(Python_SRCS
AssemblyObjectPy.xml
AssemblyObject.pyi
AssemblyObjectPyImp.cpp
AssemblyLinkPy.xml
AssemblyLink.pyi
AssemblyLinkPyImp.cpp
BomObjectPy.xml
BomObject.pyi
BomObjectPyImp.cpp
BomGroupPy.xml
BomGroup.pyi
BomGroupPyImp.cpp
JointGroupPy.xml
JointGroup.pyi
JointGroupPyImp.cpp
ViewGroupPy.xml
ViewGroup.pyi
ViewGroupPyImp.cpp
SimulationGroupPy.xml
SimulationGroup.pyi
SimulationGroupPyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -0,0 +1,12 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(Include="Mod/Assembly/App/JointGroup.h", Namespace="Assembly")
class JointGroup(DocumentObjectGroup):
"""
This class is a group subclass for joints.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

View File

@@ -1,18 +0,0 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(
Father="DocumentObjectGroupPy",
Name="JointGroupPy",
Twin="JointGroup",
TwinPointer="JointGroup",
Include="Mod/Assembly/App/JointGroup.h",
Namespace="Assembly",
FatherInclude="App/DocumentObjectGroupPy.h",
FatherNamespace="App",
)
class JointGroupPy(DocumentObjectGroup):
"""
This class is a group subclass for joints.
"""

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="DocumentObjectGroupPy"
Name="JointGroupPy"
Twin="JointGroup"
TwinPointer="JointGroup"
Include="Mod/Assembly/App/JointGroup.h"
Namespace="Assembly"
FatherInclude="App/DocumentObjectGroupPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class is a group subclass for joints.</UserDocu>
</Documentation>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -0,0 +1,12 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(Include="Mod/Assembly/App/SimulationGroup.h", Namespace="Assembly")
class SimulationGroup(DocumentObjectGroup):
"""
This class is a group subclass for joints.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

View File

@@ -1,18 +0,0 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(
Father="DocumentObjectGroupPy",
Name="SimulationGroupPy",
Twin="SimulationGroup",
TwinPointer="SimulationGroup",
Include="Mod/Assembly/App/SimulationGroup.h",
Namespace="Assembly",
FatherInclude="App/DocumentObjectGroupPy.h",
FatherNamespace="App",
)
class SimulationGroupPy(DocumentObjectGroup):
"""
This class is a group subclass for joints.
"""

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="DocumentObjectGroupPy"
Name="SimulationGroupPy"
Twin="SimulationGroup"
TwinPointer="SimulationGroup"
Include="Mod/Assembly/App/SimulationGroup.h"
Namespace="Assembly"
FatherInclude="App/DocumentObjectGroupPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class is a group subclass for joints.</UserDocu>
</Documentation>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -0,0 +1,12 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(Include="Mod/Assembly/App/ViewGroup.h", Namespace="Assembly")
class ViewGroup(DocumentObjectGroup):
"""
This class is a group subclass for joints.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

View File

@@ -1,18 +0,0 @@
from Base.Metadata import export
from App.DocumentObjectGroup import DocumentObjectGroup
@export(
Father="DocumentObjectGroupPy",
Name="ViewGroupPy",
Twin="ViewGroup",
TwinPointer="ViewGroup",
Include="Mod/Assembly/App/ViewGroup.h",
Namespace="Assembly",
FatherInclude="App/DocumentObjectGroupPy.h",
FatherNamespace="App",
)
class ViewGroupPy(DocumentObjectGroup):
"""
This class is a group subclass for joints.
"""

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="DocumentObjectGroupPy"
Name="ViewGroupPy"
Twin="ViewGroup"
TwinPointer="ViewGroup"
Include="Mod/Assembly/App/ViewGroup.h"
Namespace="Assembly"
FatherInclude="App/DocumentObjectGroupPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This class is a group subclass for joints.</UserDocu>
</Documentation>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -22,8 +22,7 @@ qt_add_resources(AssemblyResource_SRCS Resources/Assembly.qrc ${Assembly_TR_QRC}
SOURCE_GROUP("Resources" FILES ${AssemblyResource_SRCS})
generate_from_xml(ViewProviderAssemblyPy)
generate_from_py_(ViewProviderAssemblyPy)
generate_from_py(ViewProviderAssembly)
set(AssemblyGui_UIC_SRCS
TaskAssemblyCreateBom.ui
@@ -35,7 +34,7 @@ set(AssemblyGui_UIC_SRCS
)
SET(Python_SRCS
ViewProviderAssemblyPy.xml
ViewProviderAssembly.pyi
ViewProviderAssemblyPyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -4,19 +4,13 @@ from Base.Metadata import export
from Gui.ViewProvider import ViewProvider
@export(
Father="ViewProviderPy",
Name="ViewProviderAssemblyPy",
Twin="ViewProviderAssembly",
TwinPointer="ViewProviderAssembly",
Include="Mod/Assembly/Gui/ViewProviderAssembly.h",
Namespace="AssemblyGui",
FatherInclude="Gui/ViewProviderPy.h",
FatherNamespace="Gui",
)
class ViewProviderAssemblyPy(ViewProvider):
@export(Include="Mod/Assembly/Gui/ViewProviderAssembly.h", Namespace="AssemblyGui")
class ViewProviderAssembly(ViewProvider):
"""
This is the ViewProviderAssembly class
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""
def isInEditMode(self) -> Any:

View File

@@ -1,68 +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="ViewProviderPy"
Name="ViewProviderAssemblyPy"
Twin="ViewProviderAssembly"
TwinPointer="ViewProviderAssembly"
Include="Mod/Assembly/Gui/ViewProviderAssembly.h"
Namespace="AssemblyGui"
FatherInclude="Gui/ViewProviderPy.h"
FatherNamespace="Gui">
<Documentation>
<Author Licence="LGPL" Name="Ondsel" EMail="development@ondsel.com" />
<UserDocu>This is the ViewProviderAssembly class</UserDocu>
</Documentation>
<Methode Name="isInEditMode">
<Documentation>
<UserDocu>
Return true if the assembly object is currently in edit mode.
isInEditMode() -> bool
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDragger">
<Documentation>
<UserDocu>
Return the assembly dragger coin object.
getDragger() -> SoTransformDragger
Returns: dragger coin object of the assembly
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="EnableMovement">
<Documentation>
<UserDocu>Enable moving the parts by clicking and dragging.</UserDocu>
</Documentation>
<Parameter Name="EnableMoving" Type="Boolean" />
</Attribute>
<Attribute Name="MoveOnlyPreselected">
<Documentation>
<UserDocu>If enabled, only the preselected object will move.</UserDocu>
</Documentation>
<Parameter Name="MoveOnlyPreselected" Type="Boolean" />
</Attribute>
<Attribute Name="MoveInCommand">
<Documentation>
<UserDocu>If enabled, each move will be wrapped in a command.</UserDocu>
</Documentation>
<Parameter Name="MoveInCommand" Type="Boolean" />
</Attribute>
<Attribute Name="DraggerVisibility">
<Documentation>
<UserDocu>Show or hide the assembly dragger.</UserDocu>
</Documentation>
<Parameter Name="DraggerVisibility" Type="Boolean" />
</Attribute>
<Attribute Name="DraggerPlacement" ReadOnly="false">
<Documentation>
<UserDocu>Placement of the assembly dragger object.</UserDocu>
</Documentation>
<Parameter Name="Placement" Type="Object" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -4,19 +4,12 @@ from Base.BaseClass import BaseClass
from Base.Metadata import export
@export(
Father="BaseClassPy",
Name="AreaPy",
Twin="Area",
TwinPointer="Area",
Include="Mod/CAM/App/Area.h",
Namespace="Path",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
ReadOnly=["Sections", "Shapes"],
Constructor=True,
Delete=True,
)
class AreaPy(BaseClass):
class Area(BaseClass):
"""
FreeCAD python wrapper of libarea
@@ -24,6 +17,9 @@ class AreaPy(BaseClass):
The constructor accepts the same parameters as setParams(...) to configure the object
All arguments are optional.
Author: Zheng, Lei (realthunder.dev@gmail.com)
License: LGPL-2.1-or-later
"""
def add(self, **kwargs) -> Any:

View File

@@ -1,131 +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="BaseClassPy"
Name="AreaPy"
Twin="Area"
TwinPointer="Area"
Include="Mod/CAM/App/Area.h"
Namespace="Path"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Zheng, Lei" EMail="realthunder.dev@gmail.com" />
<UserDocu>
FreeCAD python wrapper of libarea
Path.Area(key=value ...)
The constructor accepts the same parameters as setParams(...) to configure the object
All arguments are optional.
</UserDocu>
</Documentation>
<Methode Name="add" Keyword='true'>
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="setPlane">
<Documentation>
<UserDocu>setPlane(shape): Set the working plane.
The supplied shape does not need to be planar. Area will try to find planar
sub-shape (face, wire or edge). If more than one planar sub-shape is found, it
will prefer the top plane parallel to XY0 plane. If no working plane are set,
Area will try to find a working plane from the added children shape using the
same algorithm</UserDocu>
</Documentation>
</Methode>
<Methode Name="getShape" Keyword='true'>
<Documentation>
<UserDocu>getShape(index=-1,rebuild=False): Return the resulting shape
* index (-1): the index of the section. -1 means all sections. No effect on planar shape.
* rebuild: clean the internal cache and rebuild</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeOffset" Keyword='true'>
<Documentation>
<UserDocu>Make an offset of the shape.</UserDocu>
</Documentation>
</Methode>
<Methode Name="makePocket" Keyword='true'>
<Documentation>
<UserDocu>Generate pocket toolpath of the shape.</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeSections" Keyword="true">
<Documentation>
<UserDocu>Make a list of area holding the sectioned children shapes on given heights.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getClearedArea">
<Documentation>
<UserDocu>Gets the area cleared when a tool of the specified diameter follows the gcode represented in the path, ignoring cleared space above zmax and path segments that don't affect space within the x/y space of bbox.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getRestArea">
<Documentation>
<UserDocu>Rest machining: Gets the area left to be machined, assuming some of this area has already been cleared by previous tool paths.</UserDocu>
</Documentation>
</Methode>
<Methode Name="toTopoShape">
<Documentation>
<UserDocu>Convert the Area object to a TopoShape.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setParams" Keyword="true">
<Documentation>
<UserDocu>Set algorithm parameters.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDefaultParams" Keyword="true">
<Documentation>
<UserDocu>Static method to set the default parameters of all following Path.Area, plus the following additional parameters.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDefaultParams">
<Documentation>
<UserDocu>Static method to return the current default parameters.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getParamsDesc" Keyword="true">
<Documentation>
<UserDocu>Returns a list of supported parameters and their descriptions.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getParams">
<Documentation>
<UserDocu>Get current algorithm parameters as a dictionary.</UserDocu>
</Documentation>
</Methode>
<Methode Name="abort" Keyword="true">
<Documentation>
<UserDocu>Abort the current operation.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Sections" ReadOnly="true">
<Documentation>
<UserDocu>List of sections in this area.</UserDocu>
</Documentation>
<Parameter Name="Sections" Type="List"/>
</Attribute>
<Attribute Name="Workplane" ReadOnly="false">
<Documentation>
<UserDocu>The current workplane. If no plane is set, it is derived from the added shapes.</UserDocu>
</Documentation>
<Parameter Name="Workplane" Type="Object"/>
</Attribute>
<Attribute Name="Shapes" ReadOnly="true">
<Documentation>
<UserDocu>A list of tuple: [(shape,op), ...] containing the added shapes together with their operation code</UserDocu>
</Documentation>
<Parameter Name="Shapes" Type="List"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -21,44 +21,34 @@ set(Path_LIBS
FreeCADApp
)
generate_from_xml(CommandPy)
generate_from_xml(PathPy)
generate_from_xml(FeaturePathCompoundPy)
generate_from_xml(AreaPy)
generate_from_xml(FeatureAreaPy)
generate_from_xml(VoronoiPy)
generate_from_xml(VoronoiCellPy)
generate_from_xml(VoronoiEdgePy)
generate_from_xml(VoronoiVertexPy)
generate_from_py_(CommandPy)
generate_from_py_(PathPy)
generate_from_py_(FeaturePathCompoundPy)
generate_from_py_(AreaPy)
generate_from_py_(FeatureAreaPy)
generate_from_py_(VoronoiPy)
generate_from_py_(VoronoiCellPy)
generate_from_py_(VoronoiEdgePy)
generate_from_py_(VoronoiVertexPy)
generate_from_py(Command)
generate_from_py(Path)
generate_from_py(FeaturePathCompound)
generate_from_py(Area)
generate_from_py(FeatureArea)
generate_from_py(Voronoi)
generate_from_py(VoronoiCell)
generate_from_py(VoronoiEdge)
generate_from_py(VoronoiVertex)
SET(Python_SRCS
CommandPy.xml
Command.pyi
CommandPyImp.cpp
PathPy.xml
Path.pyi
PathPyImp.cpp
FeaturePathCompoundPy.xml
FeaturePathCompound.pyi
FeaturePathCompoundPyImp.cpp
AreaPy.xml
Area.pyi
AreaPyImp.cpp
FeatureAreaPy.xml
FeatureArea.pyi
FeatureAreaPyImp.cpp
VoronoiPy.xml
Voronoi.pyi
VoronoiPyImp.cpp
VoronoiCellPy.xml
VoronoiCell.pyi
VoronoiCellPyImp.cpp
VoronoiEdgePy.xml
VoronoiEdge.pyi
VoronoiEdgePyImp.cpp
VoronoiVertexPy.xml
VoronoiVertex.pyi
VoronoiVertexPyImp.cpp
)

View File

@@ -3,19 +3,13 @@ from Base.Persistence import Persistence
from Base.Placement import Placement
@export(
Father="PersistencePy",
Name="CommandPy",
Twin="Command",
TwinPointer="Command",
Include="Mod/CAM/App/Command.h",
Namespace="Path",
FatherInclude="Base/PersistencePy.h",
FatherNamespace="Base",
Delete=True,
Constructor=True,
)
@class_declarations("mutable Py::Dict parameters_copy_dict;")
class CommandPy(Persistence):
class Command(Persistence):
"""
Command([name],[parameters]): Represents a basic Gcode command
name (optional) is the name of the command, ex. G1

View File

@@ -1,56 +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="PersistencePy"
Name="CommandPy"
Twin="Command"
TwinPointer="Command"
Include="Mod/CAM/App/Command.h"
Namespace="Path"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Yorik van Havre" EMail="yorik@uncreated.net" />
<UserDocu>Command([name],[parameters]): Represents a basic Gcode command
name (optional) is the name of the command, ex. G1
parameters (optional) is a dictionary containing string:number
pairs, or a placement, or a vector</UserDocu>
</Documentation>
<Attribute Name="Name" ReadOnly="false">
<Documentation>
<UserDocu>The name of the command</UserDocu>
</Documentation>
<Parameter Name="Name" Type="String"/>
</Attribute>
<Attribute Name="Parameters" ReadOnly="false">
<Documentation>
<UserDocu>The parameters of the command</UserDocu>
</Documentation>
<Parameter Name="Parameters" Type="Dict"/>
</Attribute>
<Attribute Name="Placement" ReadOnly="false">
<Documentation>
<UserDocu>The coordinates of the endpoint of the command</UserDocu>
</Documentation>
<Parameter Name="Placement" Type="Object"/>
</Attribute>
<Methode Name="toGCode" Const="true">
<Documentation>
<UserDocu>toGCode(): returns a GCode representation of the command</UserDocu>
</Documentation>
</Methode>
<Methode Name="setFromGCode">
<Documentation>
<UserDocu>setFromGCode(): sets the path from the contents of the given GCode string</UserDocu>
</Documentation>
</Methode>
<Methode Name="transform">
<Documentation>
<UserDocu>transform(Placement): returns a copy of this command transformed by the given placement</UserDocu>
</Documentation>
</Methode>
<ClassDeclarations>mutable Py::Dict parameters_copy_dict;</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from App.DocumentObject import DocumentObject
@export(
Father="DocumentObjectPy",
Name="FeatureAreaPy",
Twin="FeatureArea",
TwinPointer="FeatureArea",
Include="Mod/CAM/App/FeatureArea.h",
Namespace="Path",
FatherInclude="App/DocumentObjectPy.h",
FatherNamespace="App",
)
class FeatureAreaPy(DocumentObject):
class FeatureArea(DocumentObject):
"""
This class handles Path Area features
Author: Zheng, Lei (realthunder.dev@gmail.com)
License: LGPL-2.1-or-later
"""
def getArea(self) -> Any:

View File

@@ -1,36 +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="FeatureAreaPy"
Twin="FeatureArea"
TwinPointer="FeatureArea"
Include="Mod/CAM/App/FeatureArea.h"
Namespace="Path"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Zheng, Lei" EMail="realthunder.dev@gmail.com" />
<UserDocu>This class handles Path Area features</UserDocu>
</Documentation>
<Methode Name="getArea">
<Documentation>
<UserDocu>Return a copy of the encapsulated Python Area object.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setParams" Keyword="true">
<Documentation>
<UserDocu>setParams(key=value...): Convenient function to configure this feature.
Same usage as Path.Area.setParams(). This function stores the parameters in the properties.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="WorkPlane" ReadOnly="false">
<Documentation>
<UserDocu>The current workplane. If no plane is set, it is derived from the added shapes.</UserDocu>
</Documentation>
<Parameter Name="WorkPlane" Type="Object"/>
</Attribute>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,16 @@ from Base.Metadata import export
from App.DocumentObject import DocumentObject
@export(
Father="DocumentObjectPy",
Name="FeaturePathCompoundPy",
Twin="FeaturePathCompound",
TwinPointer="FeatureCompound",
Include="Mod/CAM/App/FeaturePathCompound.h",
TwinPointer="FeatureCompound",
Namespace="Path",
FatherInclude="App/DocumentObjectPy.h",
FatherNamespace="App",
)
class FeaturePathCompoundPy(DocumentObject):
class FeaturePathCompound(DocumentObject):
"""
This class handles Path Compound features
Author: Yorik van Havre (yorik@uncreated.net)
License: LGPL-2.1-or-later
"""
def addObject(self) -> Any:

View File

@@ -1,28 +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="FeaturePathCompoundPy"
Twin="FeaturePathCompound"
TwinPointer="FeatureCompound"
Include="Mod/CAM/App/FeaturePathCompound.h"
Namespace="Path"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Yorik van Havre" EMail="yorik@uncreated.net" />
<UserDocu>This class handles Path Compound features</UserDocu>
</Documentation>
<Methode Name="addObject">
<Documentation>
<UserDocu>Add an object to the group</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeObject">
<Documentation>
<UserDocu>Remove an object from the group</UserDocu>
</Documentation>
</Methode>
<CustomAttributes />
</PythonExport>
</GenerateModel>

View File

@@ -4,22 +4,20 @@ from Base.Metadata import constmethod, export
from Base.Persistence import Persistence
@export(
Father="PersistencePy",
Name="PathPy",
Include="Mod/CAM/App/Path.h",
Twin="Toolpath",
TwinPointer="Toolpath",
Include="Mod/CAM/App/Path.h",
Namespace="Path",
FatherInclude="Base/PersistencePy.h",
FatherNamespace="Base",
ReadOnly=["Length", "Size", "BoundBox"],
Delete=True,
Constructor=True,
)
class PathPy(Persistence):
class Path(Persistence):
"""
Path([commands]): Represents a basic Gcode path
commands (optional) is a list of Path commands
Author: Yorik van Havre (yorik@uncreated.net)
License: LGPL-2.1-or-later
"""
def addCommands(self) -> Any:

View File

@@ -1,91 +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="PersistencePy"
Name="PathPy"
Twin="Toolpath"
TwinPointer="Toolpath"
Include="Mod/CAM/App/Path.h"
Namespace="Path"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Yorik van Havre" EMail="yorik@uncreated.net" />
<UserDocu>Path([commands]): Represents a basic Gcode path
commands (optional) is a list of Path commands</UserDocu>
</Documentation>
<Attribute Name="Length" ReadOnly="true">
<Documentation>
<UserDocu>the total length of this path in mm</UserDocu>
</Documentation>
<Parameter Name="Length" Type="Float"/>
</Attribute>
<Attribute Name="Size" ReadOnly="true">
<Documentation>
<UserDocu>the number of commands in this path</UserDocu>
</Documentation>
<Parameter Name="Size" Type="Long"/>
</Attribute>
<Attribute Name="Commands" ReadOnly="false">
<Documentation>
<UserDocu>the list of commands of this path</UserDocu>
</Documentation>
<Parameter Name="Commands" Type="List"/>
</Attribute>
<Attribute Name="Center" ReadOnly="false">
<Documentation>
<UserDocu>the center position for all rotational parameters</UserDocu>
</Documentation>
<Parameter Name="Center" Type="Object"/>
</Attribute>
<Attribute Name="BoundBox" ReadOnly="true">
<Documentation>
<UserDocu>the extent of this path</UserDocu>
</Documentation>
<Parameter Name="BoundBox" Type="Object"/>
</Attribute>
<Methode Name="addCommands">
<Documentation>
<UserDocu>adds a command or a list of commands at the end of the path</UserDocu>
</Documentation>
</Methode>
<Methode Name="insertCommand">
<Documentation>
<UserDocu>insertCommand(Command,[int]):
adds a command at the given position or at the end of the path</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteCommand">
<Documentation>
<UserDocu>deleteCommand([int]):
deletes the command found at the given position or from the end of the path</UserDocu>
</Documentation>
</Methode>
<Methode Name="setFromGCode">
<Documentation>
<UserDocu>sets the contents of the path from a gcode string</UserDocu>
</Documentation>
</Methode>
<Methode Name="toGCode" Const="true">
<Documentation>
<UserDocu>returns a gcode string representing the path</UserDocu>
</Documentation>
</Methode>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>returns a copy of this path</UserDocu>
</Documentation>
</Methode>
<Methode Name="getCycleTime" Const="true">
<Documentation>
<UserDocu>return the cycle time estimation for this path in s</UserDocu>
</Documentation>
</Methode>
<!--<ClassDeclarations>
bool touched;
</ClassDeclarations>-->
</PythonExport>
</GenerateModel>

View File

@@ -4,21 +4,17 @@ from Base.BaseClass import BaseClass
from Base.Metadata import constmethod, export
@export(
Father="BaseClassPy",
Name="VoronoiPy",
PythonName="Path.Voronoi.Diagram",
Twin="Voronoi",
TwinPointer="Voronoi",
Include="Mod/CAM/App/Voronoi.h",
Namespace="Path",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class VoronoiPy(BaseClass):
class Voronoi(BaseClass):
"""
Voronoi([segments]): Create voronoi for given collection of line segments
Author: sliptonic (shopinthewoods@gmail.com)
License: LGPL-2.1-or-later
"""
@constmethod

View File

@@ -4,22 +4,18 @@ from Base.BaseClass import BaseClass
from Base.Metadata import constmethod, export
@export(
Father="BaseClassPy",
Name="VoronoiCellPy",
Twin="VoronoiCell",
PythonName="Path.Voronoi.Cell",
TwinPointer="VoronoiCell",
Include="Mod/CAM/App/VoronoiCell.h",
Namespace="Path",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Constructor=True,
RichCompare=True,
Delete=True,
)
class VoronoiCellPy(BaseClass):
class VoronoiCell(BaseClass):
"""
Cell of a Voronoi diagram
Author: sliptonic (shopinthewoods@gmail.com)
License: LGPL-2.1-or-later
"""
@constmethod

View File

@@ -1,77 +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="BaseClassPy"
Name="VoronoiCellPy"
PythonName="Path.Voronoi.Cell"
Twin="VoronoiCell"
TwinPointer="VoronoiCell"
Include="Mod/CAM/App/VoronoiCell.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"
Constructor="true"
RichCompare="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="sliptonic" EMail="shopinthewoods@gmail.com" />
<UserDocu>Cell of a Voronoi diagram</UserDocu>
</Documentation>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="SourceIndex" ReadOnly="true">
<Documentation>
<UserDocu>Returns the index of the cell's source</UserDocu>
</Documentation>
<Parameter Name="SourceIndex" Type="Long"/>
</Attribute>
<Attribute Name="SourceCategory" ReadOnly="true">
<Documentation>
<UserDocu>Returns the cell's category as an integer</UserDocu>
</Documentation>
<Parameter Name="SourceCategory" Type="Long"/>
</Attribute>
<Attribute Name="SourceCategoryName" ReadOnly="true">
<Documentation>
<UserDocu>Returns the cell's category as a string</UserDocu>
</Documentation>
<Parameter Name="SourceCategory" Type="String"/>
</Attribute>
<Attribute Name="IncidentEdge" ReadOnly="true">
<Documentation>
<UserDocu>Incident edge of the cell - if exists</UserDocu>
</Documentation>
<Parameter Name="IncidentEdge" Type="Object"/>
</Attribute>
<Methode Name="containsPoint" Const="true">
<Documentation>
<UserDocu>Returns true if the cell contains a point site</UserDocu>
</Documentation>
</Methode>
<Methode Name="containsSegment" Const="true">
<Documentation>
<UserDocu>Returns true if the cell contains a segment site</UserDocu>
</Documentation>
</Methode>
<Methode Name="isDegenerate" Const="true">
<Documentation>
<UserDocu>Returns true if the cell doesn't have an incident edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSource" Const="true">
<Documentation>
<UserDocu>Returns the Source for the cell</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -4,22 +4,18 @@ from Base.BaseClass import BaseClass
from Base.Metadata import constmethod, export
@export(
Father="BaseClassPy",
Name="VoronoiEdgePy",
Twin="VoronoiEdge",
TwinPointer="VoronoiEdge",
PythonName="Path.Voronoi.Edge",
Include="Mod/CAM/App/VoronoiEdge.h",
Namespace="Path",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
RichCompare=True,
Constructor=True,
Delete=True,
)
class VoronoiEdgePy(BaseClass):
class VoronoiEdge(BaseClass):
"""
Edge of a Voronoi diagram
Author: sliptonic (shopinthewoods@gmail.com)
License: LGPL-2.1-or-later
"""
@constmethod

View File

@@ -1,125 +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="BaseClassPy"
Name="VoronoiEdgePy"
PythonName="Path.Voronoi.Edge"
Twin="VoronoiEdge"
TwinPointer="VoronoiEdge"
Include="Mod/CAM/App/VoronoiEdge.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"
Constructor="true"
RichCompare="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="sliptonic" EMail="shopinthewoods@gmail.com" />
<UserDocu>Edge of a Voronoi diagram</UserDocu>
</Documentation>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="Cell" ReadOnly="true">
<Documentation>
<UserDocu>cell the edge belongs to</UserDocu>
</Documentation>
<Parameter Name="Cell" Type="Object"/>
</Attribute>
<Attribute Name="Vertices" ReadOnly="true">
<Documentation>
<UserDocu>Begin and End voronoi vertex</UserDocu>
</Documentation>
<Parameter Name="Vertices" Type="List"/>
</Attribute>
<Attribute Name="Next" ReadOnly="true">
<Documentation>
<UserDocu>CCW next edge within voronoi cell</UserDocu>
</Documentation>
<Parameter Name="Next" Type="Object"/>
</Attribute>
<Attribute Name="Prev" ReadOnly="true">
<Documentation>
<UserDocu>CCW previous edge within voronoi cell</UserDocu>
</Documentation>
<Parameter Name="Prev" Type="Object"/>
</Attribute>
<Attribute Name="RotNext" ReadOnly="true">
<Documentation>
<UserDocu>Rotated CCW next edge within voronoi cell</UserDocu>
</Documentation>
<Parameter Name="RotNext" Type="Object"/>
</Attribute>
<Attribute Name="RotPrev" ReadOnly="true">
<Documentation>
<UserDocu>Rotated CCW previous edge within voronoi cell</UserDocu>
</Documentation>
<Parameter Name="RotPrev" Type="Object"/>
</Attribute>
<Attribute Name="Twin" ReadOnly="true">
<Documentation>
<UserDocu>Twin edge</UserDocu>
</Documentation>
<Parameter Name="Twin" Type="Object"/>
</Attribute>
<Methode Name="isFinite" Const="true">
<Documentation>
<UserDocu>Returns true if both vertices are finite</UserDocu>
</Documentation>
</Methode>
<Methode Name="isInfinite" Const="true">
<Documentation>
<UserDocu>Returns true if the end vertex is infinite</UserDocu>
</Documentation>
</Methode>
<Methode Name="isLinear" Const="true">
<Documentation>
<UserDocu>Returns true if edge is straight</UserDocu>
</Documentation>
</Methode>
<Methode Name="isCurved" Const="true">
<Documentation>
<UserDocu>Returns true if edge is curved</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPrimary" Const="true">
<Documentation>
<UserDocu>Returns false if edge goes through endpoint of the segment site</UserDocu>
</Documentation>
</Methode>
<Methode Name="isSecondary" Const="true">
<Documentation>
<UserDocu>Returns true if edge goes through endpoint of the segment site</UserDocu>
</Documentation>
</Methode>
<Methode Name="isBorderline" Const="true">
<Documentation>
<UserDocu>Returns true if the point is on the segment</UserDocu>
</Documentation>
</Methode>
<Methode Name="toShape" Const="true">
<Documentation>
<UserDocu>Returns a shape for the edge</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDistances" Const="true">
<Documentation>
<UserDocu>Returns the distance of the vertices to the input source</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegmentAngle" Const="true">
<Documentation>
<UserDocu>Returns the angle (in degree) of the segments if the edge was formed by two segments</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -1,108 +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="BaseClassPy"
Name="VoronoiPy"
PythonName="Path.Voronoi.Diagram"
Twin="Voronoi"
TwinPointer="Voronoi"
Include="Mod/CAM/App/Voronoi.h"
Namespace="Path"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="sliptonic" EMail="shopinthewoods@gmail.com" />
<UserDocu>Voronoi([segments]): Create voronoi for given collection of line segments</UserDocu>
</Documentation>
<Attribute Name="Cells" ReadOnly="true">
<Documentation>
<UserDocu>List of all cells of the voronoi diagram</UserDocu>
</Documentation>
<Parameter Name="Cells" Type="List"/>
</Attribute>
<Attribute Name="Edges" ReadOnly="true">
<Documentation>
<UserDocu>List of all edges of the voronoi diagram</UserDocu>
</Documentation>
<Parameter Name="Edges" Type="List"/>
</Attribute>
<Attribute Name="Vertices" ReadOnly="true">
<Documentation>
<UserDocu>List of all vertices of the voronoi diagram</UserDocu>
</Documentation>
<Parameter Name="Vertices" Type="List"/>
</Attribute>
<Methode Name="numCells" Const="true">
<Documentation>
<UserDocu>Return number of cells</UserDocu>
</Documentation>
</Methode>
<Methode Name="numEdges" Const="true">
<Documentation>
<UserDocu>Return number of edges</UserDocu>
</Documentation>
</Methode>
<Methode Name="numVertices" Const="true">
<Documentation>
<UserDocu>Return number of vertices</UserDocu>
</Documentation>
</Methode>
<Methode Name="addPoint">
<Documentation>
<UserDocu>addPoint(vector|vector2d) add given point to input collection</UserDocu>
</Documentation>
</Methode>
<Methode Name="addSegment">
<Documentation>
<UserDocu>addSegment(vector|vector2d, vector|vector2d) add given segment to input collection</UserDocu>
</Documentation>
</Methode>
<Methode Name="construct">
<Documentation>
<UserDocu>constructs the voronoi diagram from the input collections</UserDocu>
</Documentation>
</Methode>
<Methode Name="colorExterior">
<Documentation>
<UserDocu>assign given color to all exterior edges and vertices</UserDocu>
</Documentation>
</Methode>
<Methode Name="colorTwins">
<Documentation>
<UserDocu>assign given color to all twins of edges (which one is considered a twin is arbitrary)</UserDocu>
</Documentation>
</Methode>
<Methode Name="colorColinear">
<Documentation>
<UserDocu>assign given color to all edges sourced by two segments almost in line with each other (optional angle in degrees)</UserDocu>
</Documentation>
</Methode>
<Methode Name="resetColor">
<Documentation>
<UserDocu>assign color 0 to all elements with the given color</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPoints" Const="true">
<Documentation>
<UserDocu>Get list of all input points.</UserDocu>
</Documentation>
</Methode>
<Methode Name="numPoints" Const="true">
<Documentation>
<UserDocu>Return number of input points</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegments" Const="true">
<Documentation>
<UserDocu>Get list of all input segments.</UserDocu>
</Documentation>
</Methode>
<Methode Name="numSegments" Const="true">
<Documentation>
<UserDocu>Return number of input segments</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -4,22 +4,18 @@ from Base.BaseClass import BaseClass
from Base.Metadata import constmethod, export
@export(
Father="BaseClassPy",
Name="VoronoiVertexPy",
PythonName="Path.Voronoi.Vertex",
Twin="VoronoiVertex",
TwinPointer="VoronoiVertex",
Include="Mod/CAM/App/VoronoiVertex.h",
Namespace="Path",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Constructor=True,
RichCompare=True,
Delete=True,
)
class VoronoiVertexPy(BaseClass):
class VoronoiVertex(BaseClass):
"""
Vertex of a Voronoi diagram
Author: sliptonic (shopinthewoods@gmail.com)
License: LGPL-2.1-or-later
"""
@constmethod

View File

@@ -1,56 +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="BaseClassPy"
Name="VoronoiVertexPy"
PythonName="Path.Voronoi.Vertex"
Twin="VoronoiVertex"
TwinPointer="VoronoiVertex"
Include="Mod/CAM/App/VoronoiVertex.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"
Constructor="true"
RichCompare="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="sliptonic" EMail="shopinthewoods@gmail.com" />
<UserDocu>Vertex of a Voronoi diagram</UserDocu>
</Documentation>
<Attribute Name="Index" ReadOnly="true">
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="X" ReadOnly="true">
<Documentation>
<UserDocu>X position</UserDocu>
</Documentation>
<Parameter Name="X" Type="Float"/>
</Attribute>
<Attribute Name="Y" ReadOnly="true">
<Documentation>
<UserDocu>Y position</UserDocu>
</Documentation>
<Parameter Name="Y" Type="Float"/>
</Attribute>
<Attribute Name="IncidentEdge" ReadOnly="true">
<Documentation>
<UserDocu>Y position</UserDocu>
</Documentation>
<Parameter Name="IncidentEdge" Type="Object"/>
</Attribute>
<Methode Name="toPoint" Const="true">
<Documentation>
<UserDocu>Returns a Vector - or None if not possible</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -14,7 +14,7 @@ set(PathSimulator_LIBS
)
SET(Python_SRCS
PathSimPy.xml
PathSim.pyi
PathSimPyImp.cpp
)
@@ -30,8 +30,7 @@ SET(PathSimulator_SRCS
${Python_SRCS}
)
generate_from_xml(PathSimPy)
generate_from_py_(PathSimPy)
generate_from_py(PathSim)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -4,25 +4,22 @@ from Base.BaseClass import BaseClass
from Base.Metadata import export
@export(
Father="BaseClassPy",
Name="PathSimPy",
Twin="PathSim",
TwinPointer="PathSim",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Include="Mod/CAM/PathSimulator/App/PathSim.h",
Namespace="PathSimulator",
ReadOnly=["Tool"],
Constructor=True,
Delete=True,
)
class PathSimPy(BaseClass):
class PathSim(BaseClass):
"""
FreeCAD python wrapper of PathSimulator
PathSimulator.PathSim():
Create a path simulator object
Author: Shai Seger (shaise_at_g-mail)
License: LGPL-2.1-or-later
"""
def BeginSimulation(self, **kwargs) -> Any:

View File

@@ -1,66 +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="BaseClassPy"
Name="PathSimPy"
Twin="PathSim"
TwinPointer="PathSim"
Include="Mod/CAM/PathSimulator/App/PathSim.h"
Namespace="PathSimulator"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Shai Seger" EMail="shaise_at_g-mail" />
<UserDocu>FreeCAD python wrapper of PathSimulator
PathSimulator.PathSim():
Create a path simulator object
</UserDocu>
</Documentation>
<Methode Name="BeginSimulation" Keyword='true'>
<Documentation>
<UserDocu>BeginSimulation(stock, resolution):
Start a simulation process on a box shape stock with given resolution
</UserDocu>
</Documentation>
</Methode>
<Methode Name="SetToolShape">
<Documentation>
<UserDocu>SetToolShape(shape):
Set the shape of the tool to be used for simulation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="GetResultMesh">
<Documentation>
<UserDocu>
GetResultMesh():
Return the current mesh result of the simulation.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="ApplyCommand" Keyword='true'>
<Documentation>
<UserDocu>
ApplyCommand(placement, command):
Apply a single path command on the stock starting from placement.
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Tool" ReadOnly="true">
<Documentation>
<UserDocu>Return current simulation tool.</UserDocu>
</Documentation>
<Parameter Name="Tool" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,24 +5,22 @@ from Base.Metadata import export
from Metadata import no_args
@export(
Father="BaseClassPy",
Name="CAMSimPy",
Twin="CAMSim",
TwinPointer="CAMSim",
Include="Mod/CAM/PathSimulator/AppGL/CAMSim.h",
FatherInclude="Base/BaseClassPy.h",
FatherNamespace="Base",
Namespace="CAMSimulator",
Constructor=True,
Delete=True,
)
class CAMSimPy(BaseClass):
class CAMSim(BaseClass):
"""
FreeCAD python wrapper of CAMSimulator
CAMSimulator.CAMSim():
Create a path simulator object
Author: Shai Seger (shaise_at_g-mail)
License: LGPL-2.1-or-later
"""
def BeginSimulation(self, **kwargs) -> Any:

View File

@@ -1,70 +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="BaseClassPy"
Name="CAMSimPy"
Twin="CAMSim"
TwinPointer="CAMSim"
Include="Mod/CAM/PathSimulator/AppGL/CAMSim.h"
Namespace="CAMSimulator"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Shai Seger" EMail="shaise_at_g-mail" />
<UserDocu>
FreeCAD python wrapper of CAMSimulator
CAMSimulator.CAMSim():
Create a path simulator object
</UserDocu>
</Documentation>
<Methode Name="BeginSimulation" Keyword='true'>
<Documentation>
<UserDocu>
BeginSimulation(stock, resolution):
Start a simulation process on a box shape stock with given resolution
</UserDocu>
</Documentation>
</Methode>
<Methode Name="ResetSimulation" NoArgs="true">
<Documentation>
<UserDocu>
ResetSimulation():
Clear the simulation and all gcode commands
</UserDocu>
</Documentation>
</Methode>
<Methode Name="AddTool" Keyword='true'>
<Documentation>
<UserDocu>
AddTool(shape, toolnumber, diameter, resolution):
Set the shape of the tool to be used for simulation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="SetBaseShape" Keyword='true'>
<Documentation>
<UserDocu>
SetBaseShape(shape, resolution):
Set the shape of the base object of the job
</UserDocu>
</Documentation>
</Methode>
<Methode Name="AddCommand">
<Documentation>
<UserDocu>
AddCommand(command):
Add a path command to the simulation.
</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -16,7 +16,7 @@ set(CAMSimulator_LIBS
)
SET(CAMSimulator_SRCS_Python
CAMSimPy.xml
CAMSim.pyi
CAMSimPyImp.cpp
)
@@ -66,9 +66,7 @@ SET(CAMSimulator_SRCS_Core
TextureLoader.h
)
generate_from_xml(CAMSimPy)
generate_from_py_(CAMSimPy)
generate_from_py(CAMSim)
SOURCE_GROUP("Module" FILES ${CAMSimulator_SRCS_Module})
SOURCE_GROUP("Python" FILES ${CAMSimulator_SRCS_Python})

View File

@@ -49,12 +49,11 @@ else()
endif()
generate_from_xml(FemMeshPy)
generate_from_py_(FemMeshPy)
generate_from_py(FemMesh)
SET(Python_SRCS
FemMeshPy.xml
FemMesh.pyi
FemMeshPyImp.cpp
HypothesisPy.cpp
HypothesisPy.h
@@ -64,24 +63,19 @@ SET(Python_SRCS
if(BUILD_FEM_VTK)
SET(Python_SRCS
${Python_SRCS}
FemPostObjectPy.xml
FemPostObject.pyi
FemPostObjectPyImp.cpp
FemPostPipelinePy.xml
FemPostPipeline.pyi
FemPostPipelinePyImp.cpp
FemPostFilterPy.xml
FemPostFilter.pyi
FemPostFilterPyImp.cpp
FemPostBranchFilterPy.xml
FemPostBranchFilter.pyi
FemPostBranchFilterPyImp.cpp
)
generate_from_xml(FemPostObjectPy)
generate_from_xml(FemPostPipelinePy)
generate_from_xml(FemPostFilterPy)
generate_from_xml(FemPostBranchFilterPy)
generate_from_py_(FemPostObjectPy)
generate_from_py_(FemPostPipelinePy)
generate_from_py_(FemPostFilterPy)
generate_from_py_(FemPostBranchFilterPy)
generate_from_py(FemPostObject)
generate_from_py(FemPostPipeline)
generate_from_py(FemPostFilter)
generate_from_py(FemPostBranchFilter)
endif(BUILD_FEM_VTK)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -5,19 +5,18 @@ from Base.Metadata import constmethod, export
from App.ComplexGeoData import ComplexGeoData
@export(
Father="ComplexGeoDataPy",
Name="FemMeshPy",
Twin="FemMesh",
TwinPointer="FemMesh",
Include="Mod/Fem/App/FemMesh.h",
Namespace="Fem",
FatherInclude="App/ComplexGeoDataPy.h",
FatherNamespace="Data",
Constructor=True,
)
class FemMeshPy(ComplexGeoData):
class FemMesh(ComplexGeoData):
"""
FemMesh class
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def setShape(self) -> Any:

View File

@@ -1,391 +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"
Name="FemMeshPy"
Twin="FemMesh"
TwinPointer="FemMesh"
Include="Mod/Fem/App/FemMesh.h"
Namespace="Fem"
FatherInclude="App/ComplexGeoDataPy.h"
FatherNamespace="Data"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<UserDocu>FemMesh class</UserDocu>
</Documentation>
<Methode Name="setShape">
<Documentation>
<UserDocu>Set the Part shape to mesh</UserDocu>
</Documentation>
</Methode>
<Methode Name="compute">
<Documentation>
<UserDocu>Update the internal mesh structure</UserDocu>
</Documentation>
</Methode>
<Methode Name="addHypothesis">
<Documentation>
<UserDocu>Add hypothesis</UserDocu>
</Documentation>
</Methode>
<Methode Name="setStandardHypotheses">
<Documentation>
<UserDocu>Set some standard hypotheses for the whole shape</UserDocu>
</Documentation>
</Methode>
<Methode Name="addNode">
<Documentation>
<UserDocu>Add a node by setting (x,y,z).</UserDocu>
</Documentation>
</Methode>
<Methode Name="addEdge">
<Documentation>
<UserDocu>Add an edge by setting two node indices.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addEdgeList">
<Documentation>
<UserDocu>Add list of edges by list of node indices and list of nodes per edge.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addFace">
<Documentation>
<UserDocu>Add a face by setting three node indices.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addFaceList">
<Documentation>
<UserDocu>Add list of faces by list of node indices and list of nodes per face.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addQuad">
<Documentation>
<UserDocu>Add a quad by setting four node indices.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addVolume">
<Documentation>
<UserDocu>Add a volume by setting an arbitrary number of node indices.</UserDocu>
</Documentation>
</Methode>
<Methode Name="addVolumeList">
<Documentation>
<UserDocu>Add list of volumes by list of node indices and list of nodes per volume.</UserDocu>
</Documentation>
</Methode>
<Methode Name="read">
<Documentation>
<UserDocu>Read in a various FEM mesh file formats.
read(file.endingToExportTo)
supported formats: DAT, INP, MED, STL, UNV, VTK, Z88</UserDocu>
</Documentation>
</Methode>
<Methode Name="write" Const="true">
<Documentation>
<UserDocu>Write out various FEM mesh file formats.
write(file.endingToExportTo)
supported formats: BDF, DAT, INP, MED, STL, UNV, VTK, Z88
</UserDocu>
</Documentation>
</Methode>
<Methode Name="writeABAQUS" Const="true" Keyword="true">
<Documentation>
<UserDocu>Write out as ABAQUS inp
writeABAQUS(file, int elemParam, bool groupParam, str volVariant, str faceVariant, str edgeVariant)
elemParam:
0: All elements
1: Highest elements only
2: FEM elements only (only edges not belonging to faces and faces not belonging to volumes)
groupParam:
True: Write group data
False: Do not write group data
volVariant: Volume elements
"standard": Tetra4 -> C3D4, Penta6 -> C3D6, Hexa8 -> C3D8, Tetra10 -> C3D10, Penta15 -> C3D15, Hexa20 -> C3D20
"reduced": Hexa8 -> C3D8R, Hexa20 -> C3D20R
"incompatible": Hexa8 -> C3D8I
"modified": Tetra10 -> C3D10T
"fluid": Tetra4 -> F3D4, Penta6 -> F3D6, Hexa8 -> F3D8
faceVariant: Face elements
"shell": Tria3 -> S3, Quad4 -> S4, Tria6 -> S6, Quad8 -> S8
"shell reduced": Tria3 -> S3, Quad4 -> S4R, Tria6 -> S6, Quad8 -> S8R
"membrane": Tria3 -> M3D3, Quad4 -> M3D4, Tria6 -> M3D6, Quad8 -> M3D8
"membrane reduced": Tria3 -> M3D3, Quad4 -> M3D4R, Tria6 -> M3D6, Quad8 -> M3D8R
"stress": Tria3 -> CPS3, Quad4 -> CPS4, Tria6 -> CPS6, Quad8 -> CPS8
"stress reduced": Tria3 -> CPS3, Quad4 -> CPS4R, Tria6 -> CPS6, Quad8 -> CPS8R
"strain": Tria3 -> CPE3, Quad4 -> CPE4, Tria6 -> CPE6, Quad8 -> CPE8
"strain reduced": Tria3 -> CPE3, Quad4 -> CPE4R, Tria6 -> CPE6, Quad8 -> CPE8R
"axisymmetric": Tria3 -> CAX3, Quad4 -> CAX4, Tria6 -> CAX6, Quad8 -> CAX8
"axisymmetric reduced": Tria3 -> CAX3, Quad4 -> CAX4R, Tria6 -> CAX6, Quad8 -> CAX8R
edgeVariant: Edge elements
"beam": Seg2 -> B31, Seg3 -> B32
"beam reduced": Seg2 -> B31R, Seg3 -> B32R
"truss": Seg2 -> T3D2, eg3 -> T3D3
"network": Seg3 -> D
Elements are selected according to CalculiX availability.
For example if volume variant "modified" is selected, Tetra10 mesh
elements are assigned to C3D10T and remain elements uses "standard".
Axisymmetric, plane strain and plane stress elements expect nodes in the plane z=0.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setTransform">
<Documentation>
<UserDocu>Use a Placement object to perform a translation or rotation</UserDocu>
</Documentation>
</Methode>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>Make a copy of this FEM mesh.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getFacesByFace" Const="true">
<Documentation>
<UserDocu>Return a list of face IDs which belong to a TopoFace</UserDocu>
</Documentation>
</Methode>
<Methode Name="getEdgesByEdge" Const="true">
<Documentation>
<UserDocu>Return a list of edge IDs which belong to a TopoEdge</UserDocu>
</Documentation>
</Methode>
<Methode Name="getVolumesByFace" Const="true">
<Documentation>
<UserDocu>Return a dict of volume IDs and face IDs which belong to a TopoFace</UserDocu>
</Documentation>
</Methode>
<Methode Name="getccxVolumesByFace" Const="true">
<Documentation>
<UserDocu>Return a dict of volume IDs and ccx face numbers which belong to a TopoFace</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodeById" Const="true">
<Documentation>
<UserDocu>Get the node position vector by a Node-ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodesBySolid" Const="true">
<Documentation>
<UserDocu>Return a list of node IDs which belong to a TopoSolid</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodesByFace" Const="true">
<Documentation>
<UserDocu>Return a list of node IDs which belong to a TopoFace</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodesByEdge" Const="true">
<Documentation>
<UserDocu>Return a list of node IDs which belong to a TopoEdge</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodesByVertex" Const="true">
<Documentation>
<UserDocu>Return a list of node IDs which belong to a TopoVertex</UserDocu>
</Documentation>
</Methode>
<Methode Name="getElementNodes" Const="true">
<Documentation>
<UserDocu>Return a tuple of node IDs to a given element ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNodeElements" Const="true">
<Documentation>
<UserDocu>Return a tuple of specific element IDs associated to a given node ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGroupName" Const="true">
<Documentation>
<UserDocu>Return a string of group name to a given group ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGroupElementType" Const="true">
<Documentation>
<UserDocu>Return a string of group element type to a given group ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGroupElements" Const="true">
<Documentation>
<UserDocu>Return a tuple of ElementIDs to a given group ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="addGroup" Const="true">
<Documentation>
<UserDocu>Add a group to mesh with specific name and type
addGroup(name, typestring, [id])
name: string
typestring: "All", "Node", "Edge", "Face", "Volume", "0DElement", "Ball"
id: int
Optional id is used to force specific id for group, but does
not work, yet.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="addGroupElements" Const="true">
<Documentation>
<UserDocu>Add a tuple of ElementIDs to a given group ID
addGroupElements(groupid, list_of_elements)
groupid: int
list_of_elements: list of int
Notice that the elements have to be in the mesh.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeGroup" Const="true">
<Documentation>
<UserDocu>Remove a group with a given group ID
removeGroup(groupid)
groupid: int
Returns boolean.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getElementType" Const="true">
<Documentation>
<UserDocu>Return the element type of a given ID</UserDocu>
</Documentation>
</Methode>
<Methode Name="getIdByElementType" Const="true">
<Documentation>
<UserDocu>Return a tuple of IDs to a given element type</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Nodes" ReadOnly="true">
<Documentation>
<UserDocu>Dictionary of Nodes by ID (int ID:Vector())</UserDocu>
</Documentation>
<Parameter Name="Nodes" Type="Dict"/>
</Attribute>
<Attribute Name="NodeCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of nodes in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="NodeCount" Type="Long"/>
</Attribute>
<Attribute Name="Edges" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of edge IDs</UserDocu>
</Documentation>
<Parameter Name="Edges" Type="Tuple"/>
</Attribute>
<Attribute Name="EdgesOnly" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of edge IDs which does not belong to any face (and thus not belong to any volume too)</UserDocu>
</Documentation>
<Parameter Name="EdgesOnly" Type="Tuple"/>
</Attribute>
<Attribute Name="EdgeCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of edges in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="EdgeCount" Type="Long"/>
</Attribute>
<Attribute Name="Faces" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of face IDs</UserDocu>
</Documentation>
<Parameter Name="Faces" Type="Tuple"/>
</Attribute>
<Attribute Name="FacesOnly" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of face IDs which does not belong to any volume</UserDocu>
</Documentation>
<Parameter Name="FacesOnly" Type="Tuple"/>
</Attribute>
<Attribute Name="FaceCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Faces in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="FaceCount" Type="Long"/>
</Attribute>
<Attribute Name="TriangleCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Triangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="TriangleCount" Type="Long"/>
</Attribute>
<Attribute Name="QuadrangleCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="QuadrangleCount" Type="Long"/>
</Attribute>
<Attribute Name="PolygonCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PolygonCount" Type="Long"/>
</Attribute>
<Attribute Name="Volumes" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of volume IDs</UserDocu>
</Documentation>
<Parameter Name="Volumes" Type="Tuple"/>
</Attribute>
<Attribute Name="VolumeCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Volumes in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="VolumeCount" Type="Long"/>
</Attribute>
<Attribute Name="TetraCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Tetras in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="TetraCount" Type="Long"/>
</Attribute>
<Attribute Name="HexaCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Hexas in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="HexaCount" Type="Long"/>
</Attribute>
<Attribute Name="PyramidCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Pyramids in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PyramidCount" Type="Long"/>
</Attribute>
<Attribute Name="PrismCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Prisms in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PrismCount" Type="Long"/>
</Attribute>
<Attribute Name="PolyhedronCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Polyhedrons in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PolyhedronCount" Type="Long"/>
</Attribute>
<Attribute Name="SubMeshCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of SubMeshs in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="SubMeshCount" Type="Long"/>
</Attribute>
<Attribute Name="GroupCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Groups in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="GroupCount" Type="Long"/>
</Attribute>
<Attribute Name="Groups" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of Group IDs.</UserDocu>
</Documentation>
<Parameter Name="Groups" Type="Tuple"/>
</Attribute>
<Attribute Name="Volume" ReadOnly="true">
<Documentation>
<UserDocu>Volume of the mesh.</UserDocu>
</Documentation>
<Parameter Name="Volume" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,17 @@ from Base.Metadata import export
from Fem.FemPostFilter import FemPostFilter
@export(
Father="FemPostFilterPy",
Name="FemPostBranchFilterPy",
Twin="FemPostBranchFilter",
TwinPointer="FemPostBranchFilter",
Include="Mod/Fem/App/FemPostBranchFilter.h",
Namespace="Fem",
FatherInclude="Mod/Fem/App/FemPostFilterPy.h",
FatherNamespace="Fem",
)
class FemPostBranchFilterPy(FemPostFilter):
class FemPostBranchFilter(FemPostFilter):
"""
The FemPostBranch class.
Author: Stefan Tröger (stefantroeger@gmx.net)
License: LGPL-2.1-or-later
"""
def getFilter(self) -> Any:

View File

@@ -1,37 +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="FemPostFilterPy"
Name="FemPostBranchFilterPy"
Twin="FemPostBranchFilter"
TwinPointer="FemPostBranchFilter"
Include="Mod/Fem/App/FemPostBranchFilter.h"
Namespace="Fem"
FatherInclude="Mod/Fem/App/FemPostFilterPy.h"
FatherNamespace="Fem">
<Documentation>
<Author Licence="LGPL" Name="Stefan Tröger" EMail="stefantroeger@gmx.net" />
<UserDocu>The FemPostBranch class.</UserDocu>
</Documentation>
<Methode Name="getFilter">
<Documentation>
<UserDocu>Returns all filters, that this pipeline uses (non recursive, result does not contain branch child filters)</UserDocu>
</Documentation>
</Methode>
<Methode Name="recomputeChildren">
<Documentation>
<UserDocu>Recomputes all children of the pipeline</UserDocu>
</Documentation>
</Methode>
<Methode Name="getLastPostObject">
<Documentation>
<UserDocu>Get the last post-processing object</UserDocu>
</Documentation>
</Methode>
<Methode Name="holdsPostObject">
<Documentation>
<UserDocu>Check if this pipeline holds a given post-processing object</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,17 @@ from Base.Metadata import export
from Fem.FemPostObject import FemPostObject
@export(
Father="FemPostObjectPy",
Name="FemPostFilterPy",
Twin="FemPostFilter",
TwinPointer="FemPostFilter",
Include="Mod/Fem/App/FemPostFilter.h",
Namespace="Fem",
FatherInclude="Mod/Fem/App/FemPostObjectPy.h",
FatherNamespace="Fem",
)
class FemPostFilterPy(FemPostObject):
class FemPostFilter(FemPostObject):
"""
The FemPostFilter class.
Author: Stefan Tröger (stefantroeger@gmx.net)
License: LGPL-2.1-or-later
"""
def addFilterPipeline(self) -> Any:

View File

@@ -1,63 +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="FemPostObjectPy"
Name="FemPostFilterPy"
Twin="FemPostFilter"
TwinPointer="FemPostFilter"
Include="Mod/Fem/App/FemPostFilter.h"
Namespace="Fem"
FatherInclude="Mod/Fem/App/FemPostObjectPy.h"
FatherNamespace="Fem">
<Documentation>
<Author Licence="LGPL" Name="Stefan Tröger" EMail="stefantroeger@gmx.net" />
<UserDocu>The FemPostFilter class.</UserDocu>
</Documentation>
<Methode Name="addFilterPipeline">
<Documentation>
<UserDocu>Registers a new vtk filter pipeline for data processing. Arguments are (name, source algorithm, target algorithm).</UserDocu>
</Documentation>
</Methode>
<Methode Name="setActiveFilterPipeline">
<Documentation>
<UserDocu>Sets the filter pipeline that shall be used for data processing. Argument is the name of the filter pipeline to activate.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getParentPostGroup">
<Documentation>
<UserDocu>Returns the postprocessing group the filter is in (e.g. a pipeline or branch object). None is returned if not in any.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getInputData">
<Documentation>
<UserDocu>
Returns the dataset available at the filter's input.
Note: Can lead to a full recompute of the whole pipeline, hence best to call this only in "execute", where the user expects long calculation cycles.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getInputVectorFields">
<Documentation>
<UserDocu>
Returns the names of all vector fields available on this filter's input.
Note: Can lead to a full recompute of the whole pipeline, hence best to call this only in "execute", where the user expects long calculation cycles.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getInputScalarFields">
<Documentation>
<UserDocu>
Returns the names of all scalar fields available on this filter's input.
Note: Can lead to a full recompute of the whole pipeline, hence best to call this only in "execute", where the user expects long calculation cycles.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getOutputAlgorithm">
<Documentation>
<UserDocu>
Returns the filters vtk algorithm currently used as output (the one generating the Data field). Note that the output algorithm may change depending on filter settings.
</UserDocu>
</Documentation>
</Methode>"
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,17 @@ from Base.Metadata import export
from App.GeoFeature import GeoFeature
@export(
Father="GeoFeaturePy",
Name="FemPostObjectPy",
Twin="FemPostObject",
TwinPointer="FemPostObject",
Include="Mod/Fem/App/FemPostObject.h",
Namespace="Fem",
FatherInclude="App/GeoFeaturePy.h",
FatherNamespace="App",
FatherInclude="App/GeoFeaturePy.h",
)
class FemPostObjectPy(GeoFeature):
class FemPostObject(GeoFeature):
"""
The FemPostObject class.
Author: Mario Passaglia (mpassaglia@cbc.uba.ar)
License: LGPL-2.1-or-later
"""
def writeVTK(self) -> Any:

View File

@@ -1,35 +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="FemPostObjectPy"
Twin="FemPostObject"
TwinPointer="FemPostObject"
Include="Mod/Fem/App/FemPostObject.h"
Namespace="Fem"
FatherInclude="App/GeoFeaturePy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Mario Passaglia" EMail="mpassaglia@cbc.uba.ar" />
<UserDocu>The FemPostObject class.</UserDocu>
</Documentation>
<Methode Name="writeVTK">
<Documentation>
<UserDocu>writeVTK(filename) -> None
Write data object to VTK file.
filename: str
File extension is automatically detected from data type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDataSet">
<Documentation>
<UserDocu>getDataset() -> vtkDataSet
Returns the current output dataset. For normal filters this is equal to the objects Data property output. However, a pipelines Data property could store multiple frames, and hence Data can be of type vtkCompositeData, which is not a vtkDataset. To simplify implementations this function always returns a vtkDataSet, and for a pipeline it will be the dataset of the currently selected frame. Note that the returned value could be None, if no data is set at all.</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,17 @@ from Base.Metadata import export
from Fem.FemPostObject import FemPostObject
@export(
Father="FemPostObjectPy",
Name="FemPostPipelinePy",
Twin="FemPostPipeline",
TwinPointer="FemPostPipeline",
Include="Mod/Fem/App/FemPostPipeline.h",
Namespace="Fem",
FatherInclude="Mod/Fem/App/FemPostObjectPy.h",
FatherNamespace="Fem",
)
class FemPostPipelinePy(FemPostObject):
class FemPostPipeline(FemPostObject):
"""
The FemPostPipeline class.
Author: Stefan Tröger (stefantroeger@gmx.net)
License: LGPL-2.1-or-later
"""
def read(self) -> Any:

View File

@@ -1,82 +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="FemPostObjectPy"
Name="FemPostPipelinePy"
Twin="FemPostPipeline"
TwinPointer="FemPostPipeline"
Include="Mod/Fem/App/FemPostPipeline.h"
Namespace="Fem"
FatherInclude="Mod/Fem/App/FemPostObjectPy.h"
FatherNamespace="Fem">
<Documentation>
<Author Licence="LGPL" Name="Stefan Tröger" EMail="stefantroeger@gmx.net" />
<UserDocu>The FemPostPipeline class.</UserDocu>
</Documentation>
<Methode Name="read">
<Documentation>
<UserDocu>
read(filepath)
read([filepaths], [values], unit, frame_type)
Reads in a single vtk file or creates a multiframe result by reading in multiple result files. If multiframe is wanted, 4 argumenhts are needed:
1. List of result files each being one frame,
2. List of values valid for each frame (e.g. [s] if time data),
3. the unit of the value as FreeCAD.Units.Unit,
4. the Description of the frame type
</UserDocu>
</Documentation>
</Methode>
<Methode Name="scale">
<Documentation>
<UserDocu>scale the points of a loaded vtk file</UserDocu>
</Documentation>
</Methode>
<Methode Name="load">
<Documentation>
<UserDocu>
load(result_object)
load([result_objects], [values], unit, frame_type)
Load a single result object or create a multiframe result by loading multiple result frames. If multiframe is wanted, 4 argumenhts are needed:
1. List of result files each being one frame,
2. List of values valid for each frame (e.g. [s] if time data),
3. the unit of the value as FreeCAD.Units.Unit,
4. the Description of the frame type
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getFilter">
<Documentation>
<UserDocu>Returns all filters, that this pipeline uses (non recursive, result does not contain branch child filters)</UserDocu>
</Documentation>
</Methode>
<Methode Name="recomputeChildren">
<Documentation>
<UserDocu>Recomputes all children of the pipeline</UserDocu>
</Documentation>
</Methode>
<Methode Name="getLastPostObject">
<Documentation>
<UserDocu>Get the last post-processing object</UserDocu>
</Documentation>
</Methode>
<Methode Name="holdsPostObject">
<Documentation>
<UserDocu>Check if this pipeline holds a given post-processing object</UserDocu>
</Documentation>
</Methode>
<Methode Name="renameArrays">
<Documentation>
<UserDocu>Change name of data arrays</UserDocu>
</Documentation>
</Methode>
<Methode Name="getOutputAlgorithm">
<Documentation>
<UserDocu>
Returns the pipeline vtk algorithm, which generates the data passed to the pipelines filters. Note that the output algorithm may change depending on pipeline settings.
</UserDocu>
</Documentation>
</Methode>"
</PythonExport>
</GenerateModel>

View File

@@ -33,28 +33,23 @@ set(FemGui_LIBS
PartGui
)
generate_from_xml(ViewProviderFemConstraintPy)
generate_from_xml(ViewProviderFemMeshPy)
generate_from_xml(ViewProviderFemPostPipelinePy)
generate_from_xml(ViewProviderFemPostFilterPy)
generate_from_py_(ViewProviderFemConstraintPy)
generate_from_py_(ViewProviderFemMeshPy)
generate_from_py_(ViewProviderFemPostPipelinePy)
generate_from_py_(ViewProviderFemPostFilterPy)
generate_from_py(ViewProviderFemConstraint)
generate_from_py(ViewProviderFemMesh)
generate_from_py(ViewProviderFemPostPipeline)
generate_from_py(ViewProviderFemPostFilter)
SET(Python_SRCS
ViewProviderFemConstraintPy.xml
ViewProviderFemConstraint.pyi
ViewProviderFemConstraintPyImp.cpp
ViewProviderFemMeshPy.xml
ViewProviderFemMesh.pyi
ViewProviderFemMeshPyImp.cpp
)
if(BUILD_FEM_VTK)
set(Python_SRCS
${Python_SRCS}
ViewProviderFemPostPipelinePy.xml
ViewProviderFemPostPipeline.pyi
ViewProviderFemPostPipelinePyImp.cpp
ViewProviderFemPostFilterPy.xml
ViewProviderFemPostFilter.pyi
ViewProviderFemPostFilterPyImp.cpp
)
endif(BUILD_FEM_VTK)

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from Gui.ViewProviderGeometryObject import ViewProviderGeometryObject
@export(
Father="ViewProviderGeometryObjectPy",
Name="ViewProviderFemConstraintPy",
Twin="ViewProviderFemConstraint",
TwinPointer="ViewProviderFemConstraint",
Include="Mod/Fem/Gui/ViewProviderFemConstraint.h",
Namespace="FemGui",
FatherInclude="Gui/ViewProviderGeometryObjectPy.h",
FatherNamespace="Gui",
)
class ViewProviderFemConstraintPy(ViewProviderGeometryObject):
class ViewProviderFemConstraint(ViewProviderGeometryObject):
"""
This is the ViewProviderFemConstraint class
Author: Mario Passaglia (mpassaglia@cbc.uba.ar)
License: LGPL-2.1-or-later
"""
def loadSymbol(self) -> Any:

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="ViewProviderFemConstraintPy"
Twin="ViewProviderFemConstraint"
TwinPointer="ViewProviderFemConstraint"
Include="Mod/Fem/Gui/ViewProviderFemConstraint.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderGeometryObjectPy.h"
FatherNamespace="Gui">
<Documentation>
<Author Licence="LGPL" Name="Mario Passaglia" EMail="mpassaglia@cbc.uba.ar" />
<UserDocu>This is the ViewProviderFemConstraint class</UserDocu>
</Documentation>
<Methode Name="loadSymbol">
<Documentation>
<UserDocu>loadSymbol(filename) -> None
Load constraint symbol from Open Inventor file.
The file structure should be as follows:
A separator containing a separator with the symbol used in
multiple copies at points on the surface and an optional
separator with a symbol excluded from multiple copies.
filename : str
Open Inventor file.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="SymbolNode" ReadOnly="true">
<Documentation>
<UserDocu>A pivy SoSeparator with the nodes of the constraint symbols</UserDocu>
</Documentation>
<Parameter Name="SymbolNode" Type="Object" />
</Attribute>
<Attribute Name="ExtraSymbolNode" ReadOnly="true">
<Documentation>
<UserDocu>A pivy SoSeparator with the nodes of the constraint extra symbols</UserDocu>
</Documentation>
<Parameter Name="ExtraSymbolNode" Type="Object" />
</Attribute>
<Attribute Name="RotateSymbol">
<Documentation>
<UserDocu>Apply rotation on copies of the constraint symbol</UserDocu>
</Documentation>
<Parameter Name="SymbolNode" Type="Boolean" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from Gui.ViewProviderGeometryObject import ViewProviderGeometryObject
@export(
Father="ViewProviderGeometryObjectPy",
Name="ViewProviderFemMeshPy",
Twin="ViewProviderFemMesh",
TwinPointer="ViewProviderFemMesh",
Include="Mod/Fem/Gui/ViewProviderFemMesh.h",
Namespace="FemGui",
FatherInclude="Gui/ViewProviderGeometryObjectPy.h",
FatherNamespace="Gui",
)
class ViewProviderFemMeshPy(ViewProviderGeometryObject):
class ViewProviderFemMesh(ViewProviderGeometryObject):
"""
ViewProviderFemMesh class
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def applyDisplacement(self) -> Any:

View File

@@ -1,79 +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="ViewProviderFemMeshPy"
Twin="ViewProviderFemMesh"
TwinPointer="ViewProviderFemMesh"
Include="Mod/Fem/Gui/ViewProviderFemMesh.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderGeometryObjectPy.h"
FatherNamespace="Gui"
Constructor="false"
Delete="false">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<UserDocu>ViewProviderFemMesh class</UserDocu>
</Documentation>
<Methode Name="applyDisplacement">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Methode Name="resetNodeColor">
<Documentation>
<UserDocu>Reset color set by method setNodeColorByScalars.</UserDocu>
</Documentation>
</Methode>
<Methode Name="resetNodeDisplacement">
<Documentation>
<UserDocu>Reset displacements set by method setNodeDisplacementByVectors.</UserDocu>
</Documentation>
</Methode>
<Methode Name="resetHighlightedNodes">
<Documentation>
<UserDocu>Reset highlighted nodes.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setNodeColorByScalars">
<Documentation>
<UserDocu>Sets mesh node colors using element list and value list.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setNodeDisplacementByVectors">
<Documentation>
<UserDocu></UserDocu>
</Documentation>
</Methode>
<Attribute Name="NodeColor" ReadOnly="false">
<Documentation>
<UserDocu>Postprocessing color of the nodes. The faces between the nodes get interpolated.</UserDocu>
</Documentation>
<Parameter Name="NodeColor" Type="Dict"/>
</Attribute>
<Attribute Name="ElementColor" ReadOnly="false">
<Documentation>
<UserDocu>Postprocessing color of the elements. All faces of the element get the same color.</UserDocu>
</Documentation>
<Parameter Name="ElementColor" Type="Dict"/>
</Attribute>
<Attribute Name="NodeDisplacement" ReadOnly="false">
<Documentation>
<UserDocu>Postprocessing color of the nodes. The faces between the nodes get interpolated.</UserDocu>
</Documentation>
<Parameter Name="NodeDisplacement" Type="Dict"/>
</Attribute>
<Attribute Name="HighlightedNodes" ReadOnly="false">
<Documentation>
<UserDocu>List of nodes which get highlighted.</UserDocu>
</Documentation>
<Parameter Name="HighlightedNodes" Type="List"/>
</Attribute>
<Attribute Name="VisibleElementFaces" ReadOnly="true">
<Documentation>
<UserDocu>List of elements and faces which are actually shown. These are all surface faces of the mesh.</UserDocu>
</Documentation>
<Parameter Name="VisibleElementFaces" Type="List"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,18 @@ from Base.Metadata import export
from Gui.ViewProviderDocumentObject import ViewProviderDocumentObject
@export(
Father="ViewProviderDocumentObjectPy",
Name="ViewProviderFemPostFilterPy",
Twin="ViewProviderFemPostObject",
TwinPointer="ViewProviderFemPostObject",
Include="Mod/Fem/Gui/ViewProviderFemPostObject.h",
Namespace="FemGui",
FatherInclude="Gui/ViewProviderDocumentObjectPy.h",
FatherNamespace="Gui",
)
class ViewProviderFemPostFilterPy(ViewProviderDocumentObject):
class ViewProviderFemPostFilter(ViewProviderDocumentObject):
"""
ViewProviderFemPostPipeline class
Author: Stefan Tröger (stefantroeger@gmx.net)
License: LGPL-2.1-or-later
"""
def createDisplayTaskWidget(self) -> Any:

View File

@@ -1,29 +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="ViewProviderDocumentObjectPy"
Name="ViewProviderFemPostFilterPy"
Twin="ViewProviderFemPostObject"
TwinPointer="ViewProviderFemPostObject"
Include="Mod/Fem/Gui/ViewProviderFemPostObject.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderDocumentObjectPy.h"
FatherNamespace="Gui"
Constructor="false"
Delete="false">
<Documentation>
<Author Licence="LGPL" Name="Stefan Tröger" EMail="stefantroeger@gmx.net" />
<UserDocu>ViewProviderFemPostPipeline class</UserDocu>
</Documentation>
<Methode Name="createDisplayTaskWidget">
<Documentation>
<UserDocu>Returns the display option task panel for a post processing edit task dialog.</UserDocu>
</Documentation>
</Methode>
<Methode Name="createExtractionTaskWidget">
<Documentation>
<UserDocu>Returns the data extraction task panel for a post processing edit task dialog.</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from Gui.ViewProviderDocumentObject import ViewProviderDocumentObject
@export(
Father="ViewProviderDocumentObjectPy",
Name="ViewProviderFemPostPipelinePy",
Twin="ViewProviderFemPostPipeline",
TwinPointer="ViewProviderFemPostPipeline",
Include="Mod/Fem/Gui/ViewProviderFemPostPipeline.h",
Namespace="FemGui",
FatherInclude="Gui/ViewProviderDocumentObjectPy.h",
FatherNamespace="Gui",
)
class ViewProviderFemPostPipelinePy(ViewProviderDocumentObject):
class ViewProviderFemPostPipeline(ViewProviderDocumentObject):
"""
ViewProviderFemPostPipeline class
Author: Uwe Stöhr (uwestoehr@lyx.org)
License: LGPL-2.1-or-later
"""
def transformField(self) -> Any:

View File

@@ -1,29 +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="ViewProviderDocumentObjectPy"
Name="ViewProviderFemPostPipelinePy"
Twin="ViewProviderFemPostPipeline"
TwinPointer="ViewProviderFemPostPipeline"
Include="Mod/Fem/Gui/ViewProviderFemPostPipeline.h"
Namespace="FemGui"
FatherInclude="Gui/ViewProviderDocumentObjectPy.h"
FatherNamespace="Gui"
Constructor="false"
Delete="false">
<Documentation>
<Author Licence="LGPL" Name="Uwe Stöhr" EMail="uwestoehr@lyx.org" />
<UserDocu>ViewProviderFemPostPipeline class</UserDocu>
</Documentation>
<Methode Name="transformField">
<Documentation>
<UserDocu>Scales values of given result mesh field by given factor</UserDocu>
</Documentation>
</Methode>
<Methode Name="updateColorBars">
<Documentation>
<UserDocu>Update coloring of pipeline and its childs</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

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,21 +4,18 @@ 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.
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def read(self) -> Any:

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,14 @@ 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
Author: David Friedli(hlorus) (david@friedli-be.ch)
License: LGPL-2.1-or-later
"""

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,19 +4,16 @@ 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
Author: Luke Parry (l.parry@warwick.ac.uk)
License: LGPL-2.1-or-later
"""
def addReference3D(self) -> Any:

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,15 @@ 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.
Author: Ondsel (development@ondsel.com)
License: LGPL-2.1-or-later
"""

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,22 +4,19 @@ 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
mesh and calling getEdge(index).
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
License: LGPL-2.1-or-later
"""
def intersectWithEdge(self) -> Any:

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
@@ -23,6 +17,9 @@ class FacetPy(PyObjectBase):
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().
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def unbound(self) -> Any:

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,8 +19,9 @@ from App.ComplexGeoData import ComplexGeoData
friend class PropertyMeshKernel;
class PropertyMeshKernel* parentProperty = nullptr;"""
)
class MeshPy(ComplexGeoData):
"""Mesh() -- Create an empty mesh object.
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,
transforming the mesh and much more.
@@ -36,6 +35,9 @@ class MeshPy(ComplexGeoData):
f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature
f.Mesh = m # Assign the mesh object to the internal property
d.recompute()
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def read(self, **kwargs) -> Any:

View File

@@ -5,21 +5,21 @@ 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.
Therefore you must have a reference to a document, e.g. 'd' then you can create an instance with
d.addObject("Mesh::Feature").
Author: Werner Mayer (wmayer@users.sourceforge.net)
License: LGPL-2.1-or-later
"""
def countPoints(self) -> Any:

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
@@ -23,6 +17,9 @@ class MeshPointPy(PyObjectBase):
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().
Author: Juergen Riegel (FreeCAD@juergen-riegel.net)
License: LGPL-2.1-or-later
"""
def unbound(self) -> Any:

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,18 +3,15 @@ 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
Author: Werner Mayer (wmayer@users.sourceforge.net)
License: LGPL-2.1-or-later
"""
def setSelection(self) -> Any:

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,12 +13,15 @@ from Data import object
FatherNamespace="Data",
Constructor=True,
)
class PointsPy(object):
class Points(object):
"""
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.
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
@constmethod

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>

View File

@@ -20,26 +20,21 @@ set(Robot_LIBS
FreeCADApp
)
generate_from_xml(Robot6AxisPy)
generate_from_xml(TrajectoryPy)
generate_from_xml(WaypointPy)
generate_from_xml(RobotObjectPy)
generate_from_py_(Robot6AxisPy)
generate_from_py_(TrajectoryPy)
generate_from_py_(WaypointPy)
generate_from_py_(RobotObjectPy)
generate_from_py(Robot6Axis)
generate_from_py(Trajectory)
generate_from_py(Waypoint)
generate_from_py(RobotObject)
SET(Python_SRCS
Robot6AxisPy.xml
Robot6Axis.pyi
Robot6AxisPyImp.cpp
TrajectoryPy.xml
Trajectory.pyi
TrajectoryPyImp.cpp
RobotObjectPy.xml
RobotObject.pyi
RobotObjectPyImp.cpp
WaypointPy.xml
Waypoint.pyi
WaypointPyImp.cpp
)

View File

@@ -4,20 +4,17 @@ from Base.Metadata import export
from Base.Persistence import Persistence
@export(
Father="PersistencePy",
Name="Robot6AxisPy",
Twin="Robot6Axis",
TwinPointer="Robot6Axis",
Include="Mod/Robot/App/Robot6Axis.h",
Namespace="Robot",
FatherInclude="Base/PersistencePy.h",
FatherNamespace="Base",
Constructor=True,
Delete=True,
)
class Robot6AxisPy(Persistence):
class Robot6Axis(Persistence):
"""
Robot6Axis class
Author: Juergen Riegel (Juergen.Riegel@web.de)
License: LGPL-2.1-or-later
"""
def check(self) -> Any:

View File

@@ -1,73 +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="PersistencePy"
Name="Robot6AxisPy"
Twin="Robot6Axis"
TwinPointer="Robot6Axis"
Include="Mod/Robot/App/Robot6Axis.h"
Namespace="Robot"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
<UserDocu>Robot6Axis class</UserDocu>
</Documentation>
<Methode Name="check">
<Documentation>
<UserDocu>Checks the shape and report errors in the shape structure.
This is a more detailed check as done in isValid().</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Axis1" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 1 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis1" Type="Float"/>
</Attribute>
<Attribute Name="Axis2" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 2 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis2" Type="Float"/>
</Attribute>
<Attribute Name="Axis3" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 3 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis3" Type="Float"/>
</Attribute>
<Attribute Name="Axis4" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 4 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis4" Type="Float"/>
</Attribute>
<Attribute Name="Axis5" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 5 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis5" Type="Float"/>
</Attribute>
<Attribute Name="Axis6" ReadOnly="false">
<Documentation>
<UserDocu>Pose of Axis 6 in degrees</UserDocu>
</Documentation>
<Parameter Name="Axis6" Type="Float"/>
</Attribute>
<Attribute Name="Tcp" ReadOnly="false">
<Documentation>
<UserDocu>Tool center point frame. Where the tool of the robot is</UserDocu>
</Documentation>
<Parameter Name="Tcp" Type="Object"/>
</Attribute>
<Attribute Name="Base" ReadOnly="false">
<Documentation>
<UserDocu>Actual Base system in respect to the robot world system</UserDocu>
</Documentation>
<Parameter Name="Base" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -5,18 +5,15 @@ from Base.Metadata import export
from App.DocumentObject import DocumentObject
@export(
Father="DocumentObjectPy",
Name="RobotObjectPy",
Twin="RobotObject",
TwinPointer="RobotObject",
Include="Mod/Robot/App/RobotObject.h",
Namespace="Robot",
FatherInclude="App/DocumentObjectPy.h",
FatherNamespace="App",
)
class RobotObjectPy(DocumentObject):
class RobotObject(DocumentObject):
"""
Robot document object
Author: Juergen Riegel (FreeCAD@juergen-riegel.net)
License: LGPL-2.1-or-later
"""
def getRobot(self) -> Any:

View File

@@ -1,25 +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="RobotObjectPy"
Twin="RobotObject"
TwinPointer="RobotObject"
Include="Mod/Robot/App/RobotObject.h"
Namespace="Robot"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Robot document object</UserDocu>
</Documentation>
<Methode Name="getRobot">
<Documentation>
<UserDocu>
Returns a copy of the robot. Be aware, the robot behaves the same
like the robot of the object but is a copy!
</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

Some files were not shown because too many files have changed in this diff Show More