Sketcher: Remove XML binding files.

These are not needed anyore with the Python bindings conversion.
This commit is contained in:
tritao
2025-04-05 12:59:19 +01:00
committed by Benjamin Nauck
parent c4f32edd65
commit 66e6ca415c
13 changed files with 20 additions and 1595 deletions

View File

@@ -30,22 +30,14 @@ set(Sketcher_LIBS
FreeCADApp
)
generate_from_xml(SketchObjectSFPy)
generate_from_py_(SketchObjectSF)
generate_from_xml(SketchObjectPy)
generate_from_py_(SketchObject)
generate_from_xml(SketchGeometryExtensionPy)
generate_from_py_(SketchGeometryExtension)
generate_from_xml(ExternalGeometryExtensionPy)
generate_from_py_(ExternalGeometryExtension)
generate_from_xml(GeometryFacadePy)
generate_from_py_(GeometryFacade)
generate_from_xml(ExternalGeometryFacadePy)
generate_from_py_(ExternalGeometryFacade)
generate_from_xml(ConstraintPy)
generate_from_py_(Constraint)
generate_from_xml(SketchPy)
generate_from_py_(Sketch)
generate_from_py(SketchObjectSF)
generate_from_py(SketchObject)
generate_from_py(SketchGeometryExtension)
generate_from_py(ExternalGeometryExtension)
generate_from_py(GeometryFacade)
generate_from_py(ExternalGeometryFacade)
generate_from_py(Constraint)
generate_from_py(Sketch)
SET(Properties_SRCS
@@ -91,21 +83,21 @@ SET(Datatypes_SRCS
SOURCE_GROUP("Datatypes" FILES ${Datatypes_SRCS})
SET(Python_SRCS
SketchObjectSFPy.xml
SketchObjectSF.pyi
SketchObjectSFPyImp.cpp
SketchObjectPy.xml
SketchObject.pyi
SketchObjectPyImp.cpp
SketchGeometryExtensionPy.xml
SketchGeometryExtension.pyi
SketchGeometryExtensionPyImp.cpp
ExternalGeometryExtensionPy.xml
ExternalGeometryExtension.pyi
ExternalGeometryExtensionPyImp.cpp
GeometryFacadePy.xml
GeometryFacade.pyi
GeometryFacadePyImp.cpp
ExternalGeometryFacadePy.xml
ExternalGeometryFacade.pyi
ExternalGeometryFacadePyImp.cpp
ConstraintPyImp.cpp
ConstraintPy.xml
SketchPy.xml
Constraint.pyi
Sketch.pyi
SketchPyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

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="PersistencePy"
Name="ConstraintPy"
Twin="Constraint"
TwinPointer="Constraint"
Include="Mod/Sketcher/App/Constraint.h"
Namespace="Sketcher"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>With this object you can handle sketches</UserDocu>
</Documentation>
<Attribute Name="Type" ReadOnly="true">
<Documentation>
<UserDocu>Get the constraint type</UserDocu>
</Documentation>
<Parameter Name="Type" Type="String"/>
</Attribute>
<Attribute Name="First" ReadOnly="false">
<Documentation>
<UserDocu>First geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="First" Type="Long"/>
</Attribute>
<Attribute Name="FirstPos" ReadOnly="false">
<Documentation>
<UserDocu>Position of first geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="FirstPos" Type="Long"/>
</Attribute>
<Attribute Name="Second" ReadOnly="false">
<Documentation>
<UserDocu>Second geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="Second" Type="Long"/>
</Attribute>
<Attribute Name="SecondPos" ReadOnly="false">
<Documentation>
<UserDocu>Position of second geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="SecondPos" Type="Long"/>
</Attribute>
<Attribute Name="Third" ReadOnly="false">
<Documentation>
<UserDocu>Third geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="Third" Type="Long"/>
</Attribute>
<Attribute Name="ThirdPos" ReadOnly="false">
<Documentation>
<UserDocu>Position of third geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="ThirdPos" Type="Long"/>
</Attribute>
<Attribute Name="Value" ReadOnly="true">
<Documentation>
<UserDocu>Value of the Constraint</UserDocu>
</Documentation>
<Parameter Name="Value" Type="Float"/>
</Attribute>
<Attribute Name="Name" ReadOnly="false">
<Documentation>
<UserDocu>Name of the constraint</UserDocu>
</Documentation>
<Parameter Name="Name" Type="String"/>
</Attribute>
<Attribute Name="Driving" ReadOnly="true">
<Documentation>
<UserDocu>Driving Constraint</UserDocu>
</Documentation>
<Parameter Name="Driving" Type="Boolean"/>
</Attribute>
<Attribute Name="InVirtualSpace" ReadOnly="true">
<Documentation>
<UserDocu>Constraint in virtual space</UserDocu>
</Documentation>
<Parameter Name="InVirtualSpace" Type="Boolean"/>
</Attribute>
<Attribute Name="IsActive" ReadOnly="true">
<Documentation>
<UserDocu>Returns whether the constraint active (enforced) or not</UserDocu>
</Documentation>
<Parameter Name="IsActive" Type="Boolean"/>
</Attribute>
<Attribute Name="LabelDistance" ReadOnly="true">
<Documentation>
<UserDocu>Label distance</UserDocu>
</Documentation>
<Parameter Name="LabelDistance" Type="Float"/>
</Attribute>
<Attribute Name="LabelPosition" ReadOnly="true">
<Documentation>
<UserDocu>Label position</UserDocu>
</Documentation>
<Parameter Name="LabelPosition" Type="Float"/>
</Attribute>
</PythonExport>
</GenerateModel>

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="GeometryExtensionPy"
Name="ExternalGeometryExtensionPy"
PythonName="Sketcher.ExternalGeometryExtension"
Twin="ExternalGeometryExtension"
TwinPointer="ExternalGeometryExtension"
Include="Mod/Sketcher/App/ExternalGeometryExtension.h"
Namespace="Sketcher"
FatherInclude="Mod/Part/App/GeometryExtensionPy.h"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a ExternalGeometryExtension</UserDocu>
</Documentation>
<Methode Name="testFlag" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether the given bit is set.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setFlag" Const="false">
<Documentation>
<UserDocu>Sets the given bit to true/false.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Ref" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the reference string of this external geometry.
</UserDocu>
</Documentation>
<Parameter Name="Ref" Type="String"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,152 +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="ExternalGeometryFacadePy"
PythonName="Sketcher.ExternalGeometryFacade"
Twin="ExternalGeometryFacade"
TwinPointer="ExternalGeometryFacade"
Include="Mod/Sketcher/App/ExternalGeometryFacade.h"
Namespace="Sketcher"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a GeometryFacade</UserDocu>
</Documentation>
<Methode Name="testFlag" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether the given bit is set.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setFlag" Const="false">
<Documentation>
<UserDocu>Sets the given bit to true/false.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Ref" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the reference string of this external geometry.
</UserDocu>
</Documentation>
<Parameter Name="Ref" Type="String"/>
</Attribute>
<Attribute Name="Id" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns the Internal Alignment Type of the Geometry.
</UserDocu>
</Documentation>
<Parameter Name="Id" Type="Long"/>
</Attribute>
<Attribute Name="Construction" ReadOnly="false">
<Documentation>
<UserDocu>Sets/returns this geometry as a construction one, which will not be part of a later built shape.</UserDocu>
</Documentation>
<Parameter Name="Construction" Type="Boolean"/>
</Attribute>
<Attribute Name="GeometryLayerId" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the Id of the geometry Layer in which the geometry is located.
</UserDocu>
</Documentation>
<Parameter Name="GeometryLayerId" Type="Long"/>
</Attribute>
<Attribute Name="InternalType" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns the Internal Alignment Type of the Geometry.
</UserDocu>
</Documentation>
<Parameter Name="InternalType" Type="String"/>
</Attribute>
<Attribute Name="Blocked" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns whether the geometry is blocked or not.
</UserDocu>
</Documentation>
<Parameter Name="Blocked" Type="Boolean"/>
</Attribute>
<Methode Name="mirror">
<Documentation>
<UserDocu>Performs the symmetrical transformation of this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotate">
<Documentation>
<UserDocu>Rotates this geometric object at angle Ang (in radians) about axis</UserDocu>
</Documentation>
</Methode>
<Methode Name="scale">
<Documentation>
<UserDocu>Applies a scaling transformation on this geometric object with a center and scaling factor</UserDocu>
</Documentation>
</Methode>
<Methode Name="transform">
<Documentation>
<UserDocu>Applies a transformation to this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="translate">
<Documentation>
<UserDocu>Translates this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasExtensionOfType" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether a geometry extension of the type indicated as a string exists.</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasExtensionOfName" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether a geometry extension with the name indicated as a string exists.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensionOfType" Const="true">
<Documentation>
<UserDocu>Gets the first geometry extension of the type indicated by the string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensionOfName" Const="true">
<Documentation>
<UserDocu>Gets the first geometry extension of the name indicated by the string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setExtension" Const="false">
<Documentation>
<UserDocu>Sets a geometry extension of the indicated type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteExtensionOfType" Const="false">
<Documentation>
<UserDocu>Deletes all extensions of the indicated type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteExtensionOfName" Const="false">
<Documentation>
<UserDocu>Deletes all extensions of the indicated name.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensions" Const="true">
<Documentation>
<UserDocu>Returns a list with information about the geometry extensions.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Tag" ReadOnly="true">
<Documentation>
<UserDocu>Gives the tag of the geometry as string.</UserDocu>
</Documentation>
<Parameter Name="Tag" Type="String"/>
</Attribute>
<Attribute Name="Geometry" ReadOnly="false">
<Documentation>
<UserDocu>Returns the underlying geometry object.</UserDocu>
</Documentation>
<Parameter Name="Geometry" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,145 +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="GeometryFacadePy"
PythonName="Sketcher.GeometryFacade"
Twin="GeometryFacade"
TwinPointer="GeometryFacade"
Include="Mod/Sketcher/App/GeometryFacade.h"
Namespace="Sketcher"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"
Constructor="true"
Delete="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a GeometryFacade</UserDocu>
</Documentation>
<Methode Name="testGeometryMode" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether the given bit is set.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setGeometryMode" Const="false">
<Documentation>
<UserDocu>Sets the given bit to true/false.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Id" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns the Id of the SketchGeometryExtension.
</UserDocu>
</Documentation>
<Parameter Name="Id" Type="Long"/>
</Attribute>
<Attribute Name="InternalType" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns the Internal Alignment Type of the Geometry.
</UserDocu>
</Documentation>
<Parameter Name="InternalType" Type="String"/>
</Attribute>
<Attribute Name="Blocked" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns whether the geometry is blocked or not.
</UserDocu>
</Documentation>
<Parameter Name="Blocked" Type="Boolean"/>
</Attribute>
<Attribute Name="Construction" ReadOnly="false">
<Documentation>
<UserDocu>Sets/returns this geometry as a construction one, which will not be part of a later built shape.</UserDocu>
</Documentation>
<Parameter Name="Construction" Type="Boolean"/>
</Attribute>
<Attribute Name="GeometryLayerId" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the Id of the geometry Layer in which the geometry is located.
</UserDocu>
</Documentation>
<Parameter Name="GeometryLayerId" Type="Long"/>
</Attribute>
<Methode Name="mirror">
<Documentation>
<UserDocu>Performs the symmetrical transformation of this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotate">
<Documentation>
<UserDocu>Rotates this geometric object at angle Ang (in radians) about axis</UserDocu>
</Documentation>
</Methode>
<Methode Name="scale">
<Documentation>
<UserDocu>Applies a scaling transformation on this geometric object with a center and scaling factor</UserDocu>
</Documentation>
</Methode>
<Methode Name="transform">
<Documentation>
<UserDocu>Applies a transformation to this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="translate">
<Documentation>
<UserDocu>Translates this geometric object</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasExtensionOfType" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether a geometry extension of the type indicated as a string exists.</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasExtensionOfName" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether a geometry extension with the name indicated as a string exists.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensionOfType" Const="true">
<Documentation>
<UserDocu>Gets the first geometry extension of the type indicated by the string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensionOfName" Const="true">
<Documentation>
<UserDocu>Gets the first geometry extension of the name indicated by the string.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setExtension" Const="false">
<Documentation>
<UserDocu>Sets a geometry extension of the indicated type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteExtensionOfType" Const="false">
<Documentation>
<UserDocu>Deletes all extensions of the indicated type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteExtensionOfName" Const="false">
<Documentation>
<UserDocu>Deletes all extensions of the indicated name.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getExtensions" Const="true">
<Documentation>
<UserDocu>Returns a list with information about the geometry extensions.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Tag" ReadOnly="true">
<Documentation>
<UserDocu>Gives the tag of the geometry as string.</UserDocu>
</Documentation>
<Parameter Name="Tag" Type="String"/>
</Attribute>
<Attribute Name="Geometry" ReadOnly="false">
<Documentation>
<UserDocu>Returns the underlying geometry object.</UserDocu>
</Documentation>
<Parameter Name="Geometry" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,67 +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="GeometryExtensionPy"
Name="SketchGeometryExtensionPy"
PythonName="Sketcher.SketchGeometryExtension"
Twin="SketchGeometryExtension"
TwinPointer="SketchGeometryExtension"
Include="Mod/Sketcher/App/SketchGeometryExtension.h"
Namespace="Sketcher"
FatherInclude="Mod/Part/App/GeometryExtensionPy.h"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a SketchGeometryExtension</UserDocu>
</Documentation>
<Methode Name="testGeometryMode" Const="true">
<Documentation>
<UserDocu>Returns a boolean indicating whether the given bit is set.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setGeometryMode" Const="false">
<Documentation>
<UserDocu>Sets the given bit to true/false.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Id" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the Id of the SketchGeometryExtension.
</UserDocu>
</Documentation>
<Parameter Name="Id" Type="Long"/>
</Attribute>
<Attribute Name="InternalType" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the Id of the SketchGeometryExtension.
</UserDocu>
</Documentation>
<Parameter Name="InternalType" Type="String"/>
</Attribute>
<Attribute Name="Blocked" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns whether the geometry is blocked or not.
</UserDocu>
</Documentation>
<Parameter Name="Blocked" Type="Boolean"/>
</Attribute>
<Attribute Name="Construction" ReadOnly="false">
<Documentation>
<UserDocu>Sets/returns this geometry as a construction one, which will not be part of a later built shape.</UserDocu>
</Documentation>
<Parameter Name="Construction" Type="Boolean"/>
</Attribute>
<Attribute Name="GeometryLayerId" ReadOnly="false">
<Documentation>
<UserDocu>
Returns the Id of the geometry Layer in which the geometry is located.
</UserDocu>
</Documentation>
<Parameter Name="GeometryLayerId" Type="Long"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,933 +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="Part2DObjectPy"
Name="SketchObjectPy"
Twin="SketchObject"
TwinPointer="SketchObject"
Include="Mod/Sketcher/App/SketchObject.h"
Namespace="Sketcher"
FatherInclude="Mod/Part/App/Part2DObjectPy.h"
FatherNamespace="Part">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Represents a sketch object</UserDocu>
</Documentation>
<Methode Name="solve">
<Documentation>
<UserDocu>
Solve the sketch and update the geometry.
solve()
Returns:
0 in case of success, otherwise the following codes in this order of
priority:
-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="addGeometry">
<Documentation>
<UserDocu>
Add geometric objects to the sketch.
addGeometry(geo:Geometry, isConstruction=False) -> int
Add a single geometric object to the sketch.
Args:
geo: The geometry to add. e.g. a Part.LineSegement
isConstruction: Whether the added geometry is a "construction geometry".
Defaults to `False`, i.e. by omitting, a regular geometry is added.
Returns:
The zero-based index of the newly added geometry.
addGeometry(geo:List(Geometry), isConstruction=False) -> Tuple(int)
Add many geometric objects to the sketch.
Args:
geo: The geometry to add.
isConstruction: see above.
Returns:
A tuple of zero-based indices of all newly added geometry.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delGeometry">
<Documentation>
<UserDocu>
Delete a geometric object from the sketch.
delGeometry(geoId:int)
Args:
geoId: The zero-based index of the geometry to delete.
Any internal alignment geometry thereof will be deleted, too.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delGeometries">
<Documentation>
<UserDocu>
Delete a list of geometric objects from the sketch.
delGeometries(geoIds:List(int))
Args:
geoId: A list of zero-based indices of the geometry to delete.
Any internal alignment geometry thereof will be deleted, too.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteAllGeometry">
<Documentation>
<UserDocu>
Delete all the geometry objects from the sketch, except external geometry.
deleteAllGeometry()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="detectDegeneratedGeometries">
<Documentation>
<UserDocu>
Detect degenerated geometries. A curve geometry is considered degenerated
if the parameter range is less than the tolerance.
detectDegeneratedGeometries(tolerance:float)
Args:
tolerance: The tolerance to check the parameter range of a curve.
Returns:
The number of degenerated geometries.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeDegeneratedGeometries">
<Documentation>
<UserDocu>
Remove degenerated geometries. A curve geometry is considered degenerated
if the parameter range is less than the tolerance.
removeDegeneratedGeometries(tolerance:float)
Args:
tolerance: The tolerance to check the parameter range of a curve.
Returns:
The number of degenerated geometries.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteAllConstraints">
<Documentation>
<UserDocu>
Delete all the constraints from the sketch.
deleteAllConstraints()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toggleConstruction">
<Documentation>
<UserDocu>
Toggles a geometry between regular and construction.
toggleConstruction(geoId:int)
Args:
geoId: The zero-based index of the geometry to toggle.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setConstruction">
<Documentation>
<UserDocu>
Set construction mode of a geometry.
setConstruction(geoId:int, state:bool)
Args:
geoId: The zero-based index of the geometry to configure.
state: `True` configures the geometry to "construction geometry",
`False` configures it to regular geometry.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getConstruction">
<Documentation>
<UserDocu>
Determine whether the given geometry is a "construction geometry".
getConstruction(geoId:int)
Args:
geoId: The zero-based index of the geometry to query.
Returns:
`True` if the geometry is "construction geometry" and
`False` if it s a regular geometry.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="addConstraint">
<Documentation>
<UserDocu>
Add constraints to the sketch.
addConstraint(constraint:Constraint) -> int
Add a single constraint to the sketch and solves it.
Returns:
The zero-based index of the newly added constraint.
addConstraint(constraints:List(Constraint)) -> Tuple(int)
Add many constraints to the sketch without solving.
Returns:
A tuple of zero-based indices of all newly added constraints.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delConstraint">
<Documentation>
<UserDocu>
Delete a constraint from the sketch.
delConstraint(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to delete.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="renameConstraint">
<Documentation>
<UserDocu>
Rename a constraint in the sketch.
renameConstraint(constraintIndex:int, name:str)
Args:
constraintIndex: The zero-based index of the constraint to rename.
name: The new name for the constraint.
An empty string makes the constraint "unnamed" again.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getIndexByName" Const="true">
<Documentation>
<UserDocu>
Get the index of a constraint by name.
getIndexByName(name:str)
Args:
name: The name for the constraint to look up.
If there is no such constraint an exception is raised.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="carbonCopy">
<Documentation>
<UserDocu>
Copy another sketch's geometry and constraints into this sketch.
carbonCopy(objName:str, asConstruction=True)
Args:
ObjName: The name of the sketch object to copy from.
asConstruction: Whether to copy the geometry as "construction geometry".
</UserDocu>
</Documentation>
</Methode>
<Methode Name="addExternal">
<Documentation>
<UserDocu>
Add a link to an external geometry.
addExternal(objName:str, subName:str, defining:bool=False, intersection:bool=False)
Args:
objName: The name of the document object to reference.
subName: The name of the sub-element of the object's shape to link as
"external geometry".
defining: Should the external edges be defining or construction?
intersection: Should the external edges be projections or intersections?
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delExternal">
<Documentation>
<UserDocu>
Delete an external geometry link from the sketch.
delExternal(extGeoId:int)
Args:
extGeoId: The zero-based index of the external geometry to remove.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delConstraintOnPoint">
<Documentation>
<UserDocu>
Delete coincident constraints associated with a sketch point.
delConstraintOnPoint(vertexId:int)
Args:
vertexId: A zero-based index of the shape's vertices.
delConstraintOnPoint(geoId:int, pointPos:int)
Args:
geoId: The zero-based index of the geometry that contains the point.
pointPos: Enum denoting which point on the geometry is meant:
1: the start of a line or bounded curve.
2: the end of a line or bounded curve.
3: the center of a circle or ellipse.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="delConstraintsToExternal" NoArgs="true">
<Documentation>
<UserDocu>Deletes all constraints referencing an external geometry.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDatum">
<Documentation>
<UserDocu>
Set the value of a datum constraint (e.g. Distance or Angle)
setDatum(constraint, value)
Args:
constraint (int or str): The index or name of the constraint to set.
value (float or Quantity): The value to set for the constraint. When
using floats, values for linear dimensions are interpreted as
millimeter, angular ones as radians.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDatum" Const="true">
<Documentation>
<UserDocu>
Get the value of a datum constraint (e.g. Distance or Angle)
getDatum(constraint) -> Quantity
Args:
constraint (int or str): The index or name of the constraint to query.
Returns:
The value of the constraint.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDriving">
<Documentation>
<UserDocu>
Set the Driving status of a datum constraint.
setDriving(constraintIndex:int, state:bool)
Args:
constraintIndex: The zero-based index of the constraint to configure.
state: `True` sets the constraint to driving,
`False` configures it as non-driving, i.e. reference.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDatumsDriving">
<Documentation>
<UserDocu>
Set the Driving status of all datum constraints.
setDatumsDriving(state:bool)
Args:
state: `True` set all datum constraints to driving,
`False` configures them as non-driving, i.e. reference.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="moveDatumsToEnd">
<Documentation>
<UserDocu>
Moves all datum constraints to the end of the constraint list.
moveDatumsToEnd()
Warning: This method reorders the constraint indices. Previously held
numeric references to constraints may reference different constraints
after this operation.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDriving" Const="true">
<Documentation>
<UserDocu>
Get the Driving status of a datum constraint.
getDriving(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to query.
Returns:
`True` if the constraint is driving,
`False` if it is non-driving, i.e. reference.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toggleDriving">
<Documentation>
<UserDocu>
Toggle the Driving status of a datum constraint.
toggleDriving(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to toggle.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setVirtualSpace">
<Documentation>
<UserDocu>Set the VirtualSpace status of a constraint</UserDocu>
</Documentation>
</Methode>
<Methode Name="getVirtualSpace">
<Documentation>
<UserDocu>Get the VirtualSpace status of a constraint</UserDocu>
</Documentation>
</Methode>
<Methode Name="toggleVirtualSpace">
<Documentation>
<UserDocu>Toggle the VirtualSpace status of a constraint</UserDocu>
</Documentation>
</Methode>
<Methode Name="setActive">
<Documentation>
<UserDocu>
Activates or deactivates a constraint (enforce it or not).
setActive(constraintIndex:int, state:bool)
Args:
constraintIndex: The zero-based index of the constraint to configure.
state: `True` sets the constraint to active i.e. enforced,
`False` configures it as inactive, i.e. not enforced.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getActive" Const="true">
<Documentation>
<UserDocu>
Get whether a constraint is active, i.e. enforced, or not.
getActive(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to query.
Returns:
`True` if the constraint is active, i.e. enforced,
`False` if it is inactive, i.e. not enforced.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toggleActive">
<Documentation>
<UserDocu>
Toggle the constraint between active (enforced) and inactive.
toggleActive(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to toggle.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getLabelPosition" Const="true">
<Documentation>
<UserDocu>
Get label position of the constraint.
getLabelPosition(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to query.
Returns:
float with the current value.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setLabelPosition">
<Documentation>
<UserDocu>
Set label position of the constraint.
setLabelPosition(constraintIndex:int, value:float)
Args:
constraintIndex: The zero-based index of the constraint to query.
value: Value of the label position.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getLabelDistance" Const="true">
<Documentation>
<UserDocu>
Get label distance of the constraint.
getLabelDistance(constraintIndex:int)
Args:
constraintIndex: The zero-based index of the constraint to query.
Returns:
float with the current value.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setLabelDistance">
<Documentation>
<UserDocu>
Set label distance of the constraint.
setLabelDistance(constraintIndex:int, value:float)
Args:
constraintIndex: The zero-based index of the constraint to query.
value: Value of the label position.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="moveGeometry">
<Documentation>
<UserDocu>
Move a given point (or curve) to another location.
moveGeometry(GeoIndex,PointPos,Vector,[relative])
It moves the specified point (or curve) to the given location by adding some
temporary weak constraints and solving the sketch.
This method is mostly used to allow the user to drag some portions of the sketch
in real time by e.g. the mouse and it works only for underconstrained portions of
the sketch.
The argument 'relative', if present, states if the new location is given
relatively to the current one.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="moveGeometries">
<Documentation>
<UserDocu>
Move given points and curves to another location.
moveGeometries(Geos,Vector,[relative])
It moves the specified points and curves to the given location by adding some
temporary weak constraints and solving the sketch.
This method is mostly used to allow the user to drag some portions of the sketch
in real time by e.g. the mouse and it works only for underconstrained portions of
the sketch.
The argument 'relative', if present, states if the new location is given
relatively to the current one. For group dragging this is enforced.
Geos is a vector of pairs of geoId and posId.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPoint" Const="true">
<Documentation>
<UserDocu>
Retrieve the vector of a point in the sketch.
getPoint(GeoIndex,PointPos)
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGeoVertexIndex" Const="true">
<Documentation>
<UserDocu>
Retrieve the GeoId and PosId of a point in the sketch.
(geoId, posId) = getGeoVertexIndex(index)
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAxis" Const="true">
<Documentation>
<UserDocu>
Return an axis based on the corresponding construction line
</UserDocu>
</Documentation>
</Methode>
<Methode Name="fillet">
<Documentation>
<UserDocu>Create a fillet between two edges or at a point</UserDocu>
</Documentation>
</Methode>
<Methode Name="trim">
<Documentation>
<UserDocu>Trim a curve with a given id at a given reference point</UserDocu>
</Documentation>
</Methode>
<Methode Name="extend">
<Documentation>
<UserDocu>Extend a curve to new start and end positions</UserDocu>
</Documentation>
</Methode>
<Methode Name="split">
<Documentation>
<UserDocu>Split a curve with a given id at a given reference point</UserDocu>
</Documentation>
</Methode>
<Methode Name="join">
<Documentation>
<UserDocu>Join two curves at the given end points</UserDocu>
</Documentation>
</Methode>
<Methode Name="addSymmetric">
<Documentation>
<UserDocu>Add symmetric geometric objects to the sketch with respect to a reference point or line</UserDocu>
</Documentation>
</Methode>
<Methode Name="addCopy">
<Documentation>
<UserDocu>Add a copy of geometric objects to the sketch displaced by a vector3d</UserDocu>
</Documentation>
</Methode>
<Methode Name="addMove">
<Documentation>
<UserDocu>Move the geometric objects in the sketch displaced by a vector3d</UserDocu>
</Documentation>
</Methode>
<Methode Name="addRectangularArray">
<Documentation>
<UserDocu>Add an array of size cols by rows where each element is a copy of the selected geometric objects displaced by a vector3d in the cols direction and by a vector perpendicular to it in the rows direction</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeAxesAlignment">
<Documentation>
<UserDocu>Modifies constraints so that the shape is not forced to be aligned with axes.</UserDocu>
</Documentation>
</Methode>
<Methode Name="ExposeInternalGeometry">
<Documentation>
<UserDocu>Deprecated -- use exposeInternalGeometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="DeleteUnusedInternalGeometry">
<Documentation>
<UserDocu>Deprecated -- use deleteUnusedInternalGeometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="exposeInternalGeometry">
<Documentation>
<UserDocu>Exposes all internal geometry of an object supporting internal geometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="deleteUnusedInternalGeometry">
<Documentation>
<UserDocu>Deletes all unused (not further constrained) internal geometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="convertToNURBS">
<Documentation>
<UserDocu>Approximates the given geometry with a B-spline</UserDocu>
</Documentation>
</Methode>
<Methode Name="increaseBSplineDegree">
<Documentation>
<UserDocu>Increases the given B-spline Degree by a number of degrees</UserDocu>
</Documentation>
</Methode>
<Methode Name="decreaseBSplineDegree">
<Documentation>
<UserDocu>Decreases the given B-spline Degree by a number of degrees by approximating this curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="modifyBSplineKnotMultiplicity">
<Documentation>
<UserDocu>Increases or reduces the given BSpline knot multiplicity</UserDocu>
</Documentation>
</Methode>
<Methode Name="insertBSplineKnot">
<Documentation>
<UserDocu>Inserts a knot into the BSpline at the given param with given multiplicity. If the knot already exists, this increases the knot multiplicity by the given multiplicity.</UserDocu>
</Documentation>
</Methode>
<Methode Name="calculateAngleViaPoint">
<Documentation>
<UserDocu>
calculateAngleViaPoint(GeoId1, GeoId2, px, py) - calculates angle between
curves identified by GeoId1 and GeoId2 at point (x,y). The point must be
on intersection of the curves, otherwise the result may be useless (except
line-to-line, where (0,0) is OK). Returned value is in radians.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPointOnCurve">
<Documentation>
<UserDocu>
isPointOnCurve(GeoIdCurve, float x, float y) -> bool - tests if the point (x,y)
geometrically lies on a curve (e.g. ellipse). It treats lines as infinite,
arcs as full circles/ellipses/etc.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="calculateConstraintError">
<Documentation>
<UserDocu>
calculateConstraintError(index) - calculates the error function of the
constraint identified by its index and returns the signed error value.
The error value roughly corresponds to by how much the constraint is
violated. If the constraint internally has more than one error function,
the returned value is RMS of all errors (sign is lost in this case).
</UserDocu>
</Documentation>
</Methode>
<Methode Name="changeConstraintsLocking">
<Documentation>
<UserDocu>
changeConstraintsLocking(bLock) - locks or unlocks all tangent and
perpendicular constraints. (Constraint locking prevents it from
flipping to another valid configuration, when e.g. external geometry
is updated from outside.) The sketch solve is not triggered by the
function, but the SketchObject is touched (a recompute will be
necessary). The geometry should not be affected by the function.
The bLock argument specifies, what to do. If true, all constraints
are unlocked and locked again. If false, all tangent and perp.
constraints are unlocked.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGeometryWithDependentParameters">
<Documentation>
<UserDocu>
getGeometryWithDependentParameters - returns a list of geoid posid pairs
with all the geometry element edges and vertices which the solver regards
as being dependent on other parameters.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="autoconstraint">
<Documentation>
<UserDocu>
Automatic sketch constraining algorithm.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="detectMissingPointOnPointConstraints">
<Documentation>
<UserDocu>
Detects missing Point On Point Constraints. The detect step just identifies possible missing constraints.
The result may be retrieved or applied using the corresponding Get / Make methods.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="analyseMissingPointOnPointCoincident">
<Documentation>
<UserDocu>
Analyses the already detected missing Point On Point Constraints to detect endpoint tangency/perpendicular.
The result may be retrieved or applied using the corresponding Get / Make methods.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="detectMissingVerticalHorizontalConstraints">
<Documentation>
<UserDocu>
Detects missing Horizontal/Vertical Constraints. The detect step just identifies possible missing constraints.
The result may be retrieved or applied using the corresponding Get / Make methods.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="detectMissingEqualityConstraints">
<Documentation>
<UserDocu>
Detects missing Equality Constraints. The detect step just identifies possible missing constraints.
The result may be retrieved or applied using the corresponding Get / Make methods.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeMissingPointOnPointCoincident">
<Documentation>
<UserDocu>
Applies the detected / set Point On Point coincident constraints. If the argument is True, then solving and redundant removal is done after each individual addition.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeMissingVerticalHorizontal">
<Documentation>
<UserDocu>
Applies the detected / set Vertical/Horizontal constraints. If the argument is True, then solving and redundant removal is done after each individual addition.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeMissingEquality">
<Documentation>
<UserDocu>
Applies the detected / set Equality constraints. If the argument is True, then solving and redundant removal is done after each individual addition.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="evaluateConstraints" Const="true" NoArgs="true">
<Documentation>
<UserDocu>
Check for constraints with invalid indexes. Returns True if invalid constraints are found, False otherwise.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="validateConstraints" NoArgs="true">
<Documentation>
<UserDocu>
Removes constraints with invalid indexes.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="autoRemoveRedundants">
<Documentation>
<UserDocu>
Removes constraints currently detected as redundant by the solver. If the argument is True, then the geometry is updated after solving.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toPythonCommands">
<Documentation>
<UserDocu>
Prints the commands that should be executed to recreate the Geometry and Constraints of the present sketch (excluding any External Geometry).
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="MissingPointOnPointConstraints" ReadOnly="false">
<Documentation>
<UserDocu>
Returns a list of (First FirstPos Second SecondPos Type) tuples with all the detected endpoint constraints.
</UserDocu>
</Documentation>
<Parameter Name="MissingPointOnPointConstraints" Type="List"/>
</Attribute>
<Attribute Name="MissingVerticalHorizontalConstraints" ReadOnly="false">
<Documentation>
<UserDocu>
Returns a list of (First FirstPos Second SecondPos Type) tuples with all the detected vertical/horizontal constraints.
</UserDocu>
</Documentation>
<Parameter Name="MissingVerticalHorizontalConstraints" Type="List"/>
</Attribute>
<Attribute Name="MissingLineEqualityConstraints" ReadOnly="false">
<Documentation>
<UserDocu>
Returns a list of (First FirstPos Second SecondPos) tuples with all the detected line segment equality constraints.
</UserDocu>
</Documentation>
<Parameter Name="MissingLineEqualityConstraints" Type="List"/>
</Attribute>
<Attribute Name="MissingRadiusConstraints" ReadOnly="false">
<Documentation>
<UserDocu>
Returns a list of (First FirstPos Second SecondPos) tuples with all the detected radius constraints.
</UserDocu>
</Documentation>
<Parameter Name="MissingRadiusConstraints" Type="List"/>
</Attribute>
<Attribute Name="OpenVertices" ReadOnly="true">
<Documentation>
<UserDocu>
Returns a list of vertices positions.
</UserDocu>
</Documentation>
<Parameter Name="OpenVertices" Type="List"/>
</Attribute>
<Attribute Name="ConstraintCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Constraints in this sketch</UserDocu>
</Documentation>
<Parameter Name="ConstraintCount" Type="Long"/>
</Attribute>
<Attribute Name="GeometryCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of geometric objects in this sketch</UserDocu>
</Documentation>
<Parameter Name="GeometryCount" Type="Long"/>
</Attribute>
<Attribute Name="AxisCount" ReadOnly="true">
<Documentation>
<UserDocu>
Return the number of construction lines in the sketch which can be used as axes
</UserDocu>
</Documentation>
<Parameter Name="AxisCount" Type="Long"/>
</Attribute>
<Attribute Name="GeometryFacadeList" ReadOnly="false">
<Documentation>
<UserDocu>
Return a list of GeometryFacade objects corresponding to the PropertyGeometryList
</UserDocu>
</Documentation>
<Parameter Name="GeometryFacadeList" Type="List"/>
</Attribute>
<Attribute Name="DoF" ReadOnly="true">
<Documentation>
<UserDocu>
Return the DoFs of the current solved sketch
</UserDocu>
</Documentation>
<Parameter Name="DoF" Type="Long"/>
</Attribute>
<Attribute Name="ConflictingConstraints" ReadOnly="true">
<Documentation>
<UserDocu>
Return a list of integers indicating the constraints detected as conflicting
</UserDocu>
</Documentation>
<Parameter Name="ConflictingConstraints" Type="List"/>
</Attribute>
<Attribute Name="RedundantConstraints" ReadOnly="true">
<Documentation>
<UserDocu>
Return a list of integers indicating the constraints detected as redundant
</UserDocu>
</Documentation>
<Parameter Name="RedundantConstraints" Type="List"/>
</Attribute>
<Attribute Name="PartiallyRedundantConstraints" ReadOnly="true">
<Documentation>
<UserDocu>
Return a list of integers indicating the constraints detected as partially redundant
</UserDocu>
</Documentation>
<Parameter Name="PartiallyRedundantConstraints" Type="List"/>
</Attribute>
<Attribute Name="MalformedConstraints" ReadOnly="true">
<Documentation>
<UserDocu>
Return a list of integers indicating the constraints detected as malformed
</UserDocu>
</Documentation>
<Parameter Name="MalformedConstraints" Type="List"/>
</Attribute>
<Methode Name="setGeometryId">
<Documentation>
<UserDocu>Sets the GeometryId of the SketchGeometryExtension of the geometry with the provided GeoId</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGeometryId">
<Documentation>
<UserDocu>Gets the GeometryId of the SketchGeometryExtension of the geometry with the provided GeoId</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -1,5 +1,5 @@
from Base.Metadata import export
from Part.Part2DObject import Part2DObject
from Part.App.Part2DObject import Part2DObject
@export(
Include="Mod/Sketcher/App/SketchObjectSF.h",

View File

@@ -1,17 +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="Part2DObjectPy"
Name="SketchObjectSFPy"
Twin="SketchObjectSF"
TwinPointer="SketchObjectSF"
Include="Mod/Sketcher/App/SketchObjectSF.h"
Namespace="Sketcher"
FatherInclude="Mod/Part/App/Part2DObjectPy.h"
FatherNamespace="Part">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>With this objects you can handle sketches</UserDocu>
</Documentation>
</PythonExport>
</GenerateModel>

View File

@@ -1,85 +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="SketchPy"
Twin="Sketch"
TwinPointer="Sketch"
Include="Mod/Sketcher/App/Sketch.h"
Namespace="Sketcher"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>With this objects you can handle constraint sketches</UserDocu>
</Documentation>
<Methode Name="solve">
<Documentation>
<UserDocu>Solve the actual set of geometry and constraints</UserDocu>
</Documentation>
</Methode>
<Methode Name="addGeometry">
<Documentation>
<UserDocu>Add a geometric object to the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="addConstraint">
<Documentation>
<UserDocu>Add an constraint object to the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="clear">
<Documentation>
<UserDocu>Clear the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="moveGeometry">
<Documentation>
<UserDocu>
moveGeometry(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve)
to another location.
It moves the specified point (or curve) to the given location by adding some
temporary weak constraints and solve the sketch.
This method is mostly used to allow the user to drag some portions of the sketch
in real time by e.g. the mouse and it works only for underconstrained portions of
the sketch.
The argument 'relative', if present, states if the new location is given
relatively to the current one.
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Constraint" ReadOnly="true">
<Documentation>
<UserDocu>0: exactly constraint, -1 under-constraint, 1 over-constraint</UserDocu>
</Documentation>
<Parameter Name="Constraint" Type="Long"/>
</Attribute>
<Attribute Name="Conflicts" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of conflicting constraints</UserDocu>
</Documentation>
<Parameter Name="Conflicts" Type="Tuple"/>
</Attribute>
<Attribute Name="Redundancies" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of redundant constraints</UserDocu>
</Documentation>
<Parameter Name="Redundancies" Type="Tuple"/>
</Attribute>
<Attribute Name="Geometries" ReadOnly="true">
<Documentation>
<UserDocu>Tuple of all geometric elements in this sketch</UserDocu>
</Documentation>
<Parameter Name="Geometries" Type="Tuple"/>
</Attribute>
<Attribute Name="Shape" ReadOnly="true">
<Documentation>
<UserDocu>Resulting shape from the sketch geometry</UserDocu>
</Documentation>
<Parameter Name="Shape" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -17,8 +17,7 @@ qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
qt_create_resource_file(${Sketcher_TR_QRC} ${QM_SRCS})
qt_add_resources(SketcherGui_SRCS Resources/Sketcher.qrc ${Sketcher_TR_QRC})
generate_from_xml(ViewProviderSketchGeometryExtensionPy)
generate_from_py_(ViewProviderSketchGeometryExtension)
generate_from_py(ViewProviderSketchGeometryExtension)
set(SketcherGui_UIC_SRCS
TaskSketcherConstraints.ui
@@ -166,7 +165,7 @@ SET(SketcherGui_SRCS
)
SET(Python_SRCS
ViewProviderSketchGeometryExtensionPy.xml
ViewProviderSketchGeometryExtension.pyi
ViewProviderSketchGeometryExtensionPyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})

View File

@@ -1,27 +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="GeometryExtensionPy"
Name="ViewProviderSketchGeometryExtensionPy"
PythonName="SketcherGui.ViewProviderSketchGeometryExtension"
Twin="ViewProviderSketchGeometryExtension"
TwinPointer="ViewProviderSketchGeometryExtension"
Include="Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h"
Namespace="SketcherGui"
FatherInclude="Mod/Part/App/GeometryExtensionPy.h"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a ViewProviderSketchGeometryExtension</UserDocu>
</Documentation>
<Attribute Name="VisualLayerId" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns this geometry's Visual Layer Id.
</UserDocu>
</Documentation>
<Parameter Name="VisualLayerId" Type="Long"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -44,6 +44,7 @@ class TemplateClassPyExport(template.ModelTemplate):
"Part",
"PartDesign",
"Material",
"Sketcher",
]:
root, ext = os.path.splitext(path)
return f"{root}_{ext}"