diff --git a/src/Mod/Sketcher/App/CMakeLists.txt b/src/Mod/Sketcher/App/CMakeLists.txt index 09ae7ff1d0..36f8dababb 100644 --- a/src/Mod/Sketcher/App/CMakeLists.txt +++ b/src/Mod/Sketcher/App/CMakeLists.txt @@ -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}) diff --git a/src/Mod/Sketcher/App/ConstraintPy.xml b/src/Mod/Sketcher/App/ConstraintPy.xml deleted file mode 100644 index 34b1c75ec9..0000000000 --- a/src/Mod/Sketcher/App/ConstraintPy.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - With this object you can handle sketches - - - - Get the constraint type - - - - - - First geometry index the Constraint refers to - - - - - - Position of first geometry index the Constraint refers to - - - - - - Second geometry index the Constraint refers to - - - - - - Position of second geometry index the Constraint refers to - - - - - - Third geometry index the Constraint refers to - - - - - - Position of third geometry index the Constraint refers to - - - - - - Value of the Constraint - - - - - - Name of the constraint - - - - - - Driving Constraint - - - - - - Constraint in virtual space - - - - - - Returns whether the constraint active (enforced) or not - - - - - - Label distance - - - - - - Label position - - - - - diff --git a/src/Mod/Sketcher/App/ExternalGeometryExtensionPy.xml b/src/Mod/Sketcher/App/ExternalGeometryExtensionPy.xml deleted file mode 100644 index eb001465ff..0000000000 --- a/src/Mod/Sketcher/App/ExternalGeometryExtensionPy.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Describes a ExternalGeometryExtension - - - - Returns a boolean indicating whether the given bit is set. - - - - - Sets the given bit to true/false. - - - - - -Returns the reference string of this external geometry. - - - - - - diff --git a/src/Mod/Sketcher/App/ExternalGeometryFacadePy.xml b/src/Mod/Sketcher/App/ExternalGeometryFacadePy.xml deleted file mode 100644 index e9592ebdfd..0000000000 --- a/src/Mod/Sketcher/App/ExternalGeometryFacadePy.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - Describes a GeometryFacade - - - - Returns a boolean indicating whether the given bit is set. - - - - - Sets the given bit to true/false. - - - - - -Returns the reference string of this external geometry. - - - - - - - -Sets/returns the Internal Alignment Type of the Geometry. - - - - - - - Sets/returns this geometry as a construction one, which will not be part of a later built shape. - - - - - - -Returns the Id of the geometry Layer in which the geometry is located. - - - - - - - - Sets/returns the Internal Alignment Type of the Geometry. - - - - - - - -Sets/returns whether the geometry is blocked or not. - - - - - - - Performs the symmetrical transformation of this geometric object - - - - - Rotates this geometric object at angle Ang (in radians) about axis - - - - - Applies a scaling transformation on this geometric object with a center and scaling factor - - - - - Applies a transformation to this geometric object - - - - - Translates this geometric object - - - - - Returns a boolean indicating whether a geometry extension of the type indicated as a string exists. - - - - - Returns a boolean indicating whether a geometry extension with the name indicated as a string exists. - - - - - Gets the first geometry extension of the type indicated by the string. - - - - - Gets the first geometry extension of the name indicated by the string. - - - - - Sets a geometry extension of the indicated type. - - - - - Deletes all extensions of the indicated type. - - - - - Deletes all extensions of the indicated name. - - - - - Returns a list with information about the geometry extensions. - - - - - Gives the tag of the geometry as string. - - - - - - Returns the underlying geometry object. - - - - - diff --git a/src/Mod/Sketcher/App/GeometryFacadePy.xml b/src/Mod/Sketcher/App/GeometryFacadePy.xml deleted file mode 100644 index 83ce9bf4cd..0000000000 --- a/src/Mod/Sketcher/App/GeometryFacadePy.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - Describes a GeometryFacade - - - - Returns a boolean indicating whether the given bit is set. - - - - - Sets the given bit to true/false. - - - - - -Sets/returns the Id of the SketchGeometryExtension. - - - - - - - -Sets/returns the Internal Alignment Type of the Geometry. - - - - - - - -Sets/returns whether the geometry is blocked or not. - - - - - - - Sets/returns this geometry as a construction one, which will not be part of a later built shape. - - - - - - -Returns the Id of the geometry Layer in which the geometry is located. - - - - - - - Performs the symmetrical transformation of this geometric object - - - - - Rotates this geometric object at angle Ang (in radians) about axis - - - - - Applies a scaling transformation on this geometric object with a center and scaling factor - - - - - Applies a transformation to this geometric object - - - - - Translates this geometric object - - - - - Returns a boolean indicating whether a geometry extension of the type indicated as a string exists. - - - - - Returns a boolean indicating whether a geometry extension with the name indicated as a string exists. - - - - - Gets the first geometry extension of the type indicated by the string. - - - - - Gets the first geometry extension of the name indicated by the string. - - - - - Sets a geometry extension of the indicated type. - - - - - Deletes all extensions of the indicated type. - - - - - Deletes all extensions of the indicated name. - - - - - Returns a list with information about the geometry extensions. - - - - - Gives the tag of the geometry as string. - - - - - - Returns the underlying geometry object. - - - - - diff --git a/src/Mod/Sketcher/App/SketchGeometryExtensionPy.xml b/src/Mod/Sketcher/App/SketchGeometryExtensionPy.xml deleted file mode 100644 index 4c946d1a76..0000000000 --- a/src/Mod/Sketcher/App/SketchGeometryExtensionPy.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - Describes a SketchGeometryExtension - - - - Returns a boolean indicating whether the given bit is set. - - - - - Sets the given bit to true/false. - - - - - - Returns the Id of the SketchGeometryExtension. - - - - - - - - Returns the Id of the SketchGeometryExtension. - - - - - - - - Sets/returns whether the geometry is blocked or not. - - - - - - - Sets/returns this geometry as a construction one, which will not be part of a later built shape. - - - - - - - Returns the Id of the geometry Layer in which the geometry is located. - - - - - - diff --git a/src/Mod/Sketcher/App/SketchObjectPy.xml b/src/Mod/Sketcher/App/SketchObjectPy.xml deleted file mode 100644 index 70701700c6..0000000000 --- a/src/Mod/Sketcher/App/SketchObjectPy.xml +++ /dev/null @@ -1,933 +0,0 @@ - - - - - - Represents a sketch object - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -Delete all the geometry objects from the sketch, except external geometry. - -deleteAllGeometry() - - - - - - -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. - - - - - - -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. - - - - - - -Delete all the constraints from the sketch. - -deleteAllConstraints() - - - - - - -Toggles a geometry between regular and construction. - -toggleConstruction(geoId:int) - - Args: - geoId: The zero-based index of the geometry to toggle. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -Delete a constraint from the sketch. - -delConstraint(constraintIndex:int) - - Args: - constraintIndex: The zero-based index of the constraint to delete. - - - - - - -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. - - - - - - -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. - - - - - - -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". - - - - - - -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? - - - - - - -Delete an external geometry link from the sketch. - -delExternal(extGeoId:int) - - Args: - extGeoId: The zero-based index of the external geometry to remove. - - - - - - -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. - - - - - - Deletes all constraints referencing an external geometry. - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -Toggle the Driving status of a datum constraint. - -toggleDriving(constraintIndex:int) - - Args: - constraintIndex: The zero-based index of the constraint to toggle. - - - - - - Set the VirtualSpace status of a constraint - - - - - Get the VirtualSpace status of a constraint - - - - - Toggle the VirtualSpace status of a constraint - - - - - -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. - - - - - - -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. - - - - - - -Toggle the constraint between active (enforced) and inactive. - -toggleActive(constraintIndex:int) - - Args: - constraintIndex: The zero-based index of the constraint to toggle. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -Retrieve the vector of a point in the sketch. - -getPoint(GeoIndex,PointPos) - - - - - - -Retrieve the GeoId and PosId of a point in the sketch. - -(geoId, posId) = getGeoVertexIndex(index) - - - - - - -Return an axis based on the corresponding construction line - - - - - - Create a fillet between two edges or at a point - - - - - Trim a curve with a given id at a given reference point - - - - - Extend a curve to new start and end positions - - - - - Split a curve with a given id at a given reference point - - - - - Join two curves at the given end points - - - - - Add symmetric geometric objects to the sketch with respect to a reference point or line - - - - - Add a copy of geometric objects to the sketch displaced by a vector3d - - - - - Move the geometric objects in the sketch displaced by a vector3d - - - - - 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 - - - - - Modifies constraints so that the shape is not forced to be aligned with axes. - - - - - Deprecated -- use exposeInternalGeometry - - - - - Deprecated -- use deleteUnusedInternalGeometry - - - - - Exposes all internal geometry of an object supporting internal geometry - - - - - Deletes all unused (not further constrained) internal geometry - - - - - Approximates the given geometry with a B-spline - - - - - Increases the given B-spline Degree by a number of degrees - - - - - Decreases the given B-spline Degree by a number of degrees by approximating this curve - - - - - Increases or reduces the given BSpline knot multiplicity - - - - - 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. - - - - - -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. - - - - - - -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. - - - - - - -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). - - - - - - -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. - - - - - - -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. - - - - - - -Automatic sketch constraining algorithm. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -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. - - - - - - -Applies the detected / set Vertical/Horizontal constraints. If the argument is True, then solving and redundant removal is done after each individual addition. - - - - - - -Applies the detected / set Equality constraints. If the argument is True, then solving and redundant removal is done after each individual addition. - - - - - - -Check for constraints with invalid indexes. Returns True if invalid constraints are found, False otherwise. - - - - - - -Removes constraints with invalid indexes. - - - - - - -Removes constraints currently detected as redundant by the solver. If the argument is True, then the geometry is updated after solving. - - - - - - -Prints the commands that should be executed to recreate the Geometry and Constraints of the present sketch (excluding any External Geometry). - - - - - - -Returns a list of (First FirstPos Second SecondPos Type) tuples with all the detected endpoint constraints. - - - - - - - -Returns a list of (First FirstPos Second SecondPos Type) tuples with all the detected vertical/horizontal constraints. - - - - - - - -Returns a list of (First FirstPos Second SecondPos) tuples with all the detected line segment equality constraints. - - - - - - - -Returns a list of (First FirstPos Second SecondPos) tuples with all the detected radius constraints. - - - - - - - -Returns a list of vertices positions. - - - - - - - Number of Constraints in this sketch - - - - - - Number of geometric objects in this sketch - - - - - - - Return the number of construction lines in the sketch which can be used as axes - - - - - - - - Return a list of GeometryFacade objects corresponding to the PropertyGeometryList - - - - - - - - Return the DoFs of the current solved sketch - - - - - - - - Return a list of integers indicating the constraints detected as conflicting - - - - - - - - Return a list of integers indicating the constraints detected as redundant - - - - - - - - Return a list of integers indicating the constraints detected as partially redundant - - - - - - - - Return a list of integers indicating the constraints detected as malformed - - - - - - - Sets the GeometryId of the SketchGeometryExtension of the geometry with the provided GeoId - - - - - Gets the GeometryId of the SketchGeometryExtension of the geometry with the provided GeoId - - - - diff --git a/src/Mod/Sketcher/App/SketchObjectSF.pyi b/src/Mod/Sketcher/App/SketchObjectSF.pyi index 7766381e87..5af77c2a15 100644 --- a/src/Mod/Sketcher/App/SketchObjectSF.pyi +++ b/src/Mod/Sketcher/App/SketchObjectSF.pyi @@ -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", diff --git a/src/Mod/Sketcher/App/SketchObjectSFPy.xml b/src/Mod/Sketcher/App/SketchObjectSFPy.xml deleted file mode 100644 index db7f521fa3..0000000000 --- a/src/Mod/Sketcher/App/SketchObjectSFPy.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - With this objects you can handle sketches - - - diff --git a/src/Mod/Sketcher/App/SketchPy.xml b/src/Mod/Sketcher/App/SketchPy.xml deleted file mode 100644 index 6fd4a9f2a2..0000000000 --- a/src/Mod/Sketcher/App/SketchPy.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - With this objects you can handle constraint sketches - - - - Solve the actual set of geometry and constraints - - - - - Add a geometric object to the sketch - - - - - Add an constraint object to the sketch - - - - - Clear the sketch - - - - - -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. - - - - - - 0: exactly constraint, -1 under-constraint, 1 over-constraint - - - - - - Tuple of conflicting constraints - - - - - - Tuple of redundant constraints - - - - - - Tuple of all geometric elements in this sketch - - - - - - Resulting shape from the sketch geometry - - - - - - diff --git a/src/Mod/Sketcher/Gui/CMakeLists.txt b/src/Mod/Sketcher/Gui/CMakeLists.txt index 38ab21d39f..2128149650 100644 --- a/src/Mod/Sketcher/Gui/CMakeLists.txt +++ b/src/Mod/Sketcher/Gui/CMakeLists.txt @@ -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}) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPy.xml b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPy.xml deleted file mode 100644 index eff215edac..0000000000 --- a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPy.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Describes a ViewProviderSketchGeometryExtension - - - - - Sets/returns this geometry's Visual Layer Id. - - - - - - diff --git a/src/Tools/bindings/templates/templateClassPyExport.py b/src/Tools/bindings/templates/templateClassPyExport.py index 9dc65a8e42..a094cef5de 100644 --- a/src/Tools/bindings/templates/templateClassPyExport.py +++ b/src/Tools/bindings/templates/templateClassPyExport.py @@ -44,6 +44,7 @@ class TemplateClassPyExport(template.ModelTemplate): "Part", "PartDesign", "Material", + "Sketcher", ]: root, ext = os.path.splitext(path) return f"{root}_{ext}"