Part: Convert XML bindings to Python (Part 2)
This commit is contained in:
committed by
Benjamin Nauck
parent
56bcc0fc55
commit
6083315b04
99
src/Mod/Part/App/BRepFeat/MakePrism.pyi
Normal file
99
src/Mod/Part/App/BRepFeat/MakePrism.pyi
Normal file
@@ -0,0 +1,99 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import List
|
||||
|
||||
@export(
|
||||
PythonName="Part.BRepFeat.MakePrism",
|
||||
Twin="BRepFeat_MakePrism",
|
||||
TwinPointer="BRepFeat_MakePrism",
|
||||
Include="BRepFeat_MakePrism.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class MakePrism(PyObjectBase):
|
||||
"""
|
||||
Describes functions to build prism features.
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self, **kwargs) -> None:
|
||||
"""
|
||||
Initializes this algorithm for building prisms along surfaces.
|
||||
A face Pbase is selected in the shape Sbase
|
||||
to serve as the basis for the prism. The orientation
|
||||
of the prism will be defined by the vector Direction.
|
||||
|
||||
Fuse offers a choice between:
|
||||
- removing matter with a Boolean cut using the setting 0
|
||||
- adding matter with Boolean fusion using the setting 1.
|
||||
The sketch face Skface serves to determine
|
||||
the type of operation. If it is inside the basis
|
||||
shape, a local operation such as glueing can be performed.
|
||||
"""
|
||||
...
|
||||
|
||||
def add(self, **kwargs) -> None:
|
||||
"""
|
||||
Indicates that the edge will slide on the face.
|
||||
Raises ConstructionError if the face does not belong to the
|
||||
basis shape, or the edge to the prismed shape.
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self, **kwargs) -> None:
|
||||
"""
|
||||
Assigns one of the following semantics.
|
||||
1. to a height Length
|
||||
2. to a face Until
|
||||
3. from a face From to a height Until. Reconstructs the feature topologically according to the semantic option chosen.
|
||||
"""
|
||||
...
|
||||
|
||||
def performUntilEnd(self) -> None:
|
||||
"""
|
||||
Realizes a semi-infinite prism, limited by the
|
||||
position of the prism base. All other faces extend infinitely.
|
||||
"""
|
||||
...
|
||||
|
||||
def performFromEnd(self) -> None:
|
||||
"""
|
||||
Realizes a semi-infinite prism, limited by the face Funtil.
|
||||
"""
|
||||
...
|
||||
|
||||
def performThruAll(self) -> None:
|
||||
"""
|
||||
Builds an infinite prism. The infinite descendants will not be kept in the result.
|
||||
"""
|
||||
...
|
||||
|
||||
def performUntilHeight(self) -> None:
|
||||
"""
|
||||
Assigns both a limiting shape, Until from TopoDS_Shape
|
||||
and a height, Length at which to stop generation of the prism feature.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def curves(self) -> List:
|
||||
"""
|
||||
Returns the list of curves S parallel to the axis of the prism.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def barycCurve(self) -> object:
|
||||
"""
|
||||
Generates a curve along the center of mass of the primitive.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def shape(self) -> object:
|
||||
"""
|
||||
Returns a shape built by the shape construction algorithm.
|
||||
"""
|
||||
...
|
||||
@@ -1,157 +1,139 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Base.Vector import Vector
|
||||
from TopoShape import TopoShape
|
||||
from typing import overload
|
||||
from Part.App.Point import Point
|
||||
from Part.App.TopoShape import TopoShape
|
||||
from Part.App.TopoShapeEdge import TopoShapeEdge
|
||||
from Part.App.TopoShapeFace import TopoShapeFace
|
||||
from typing import overload, Final
|
||||
|
||||
|
||||
@export(
|
||||
FatherInclude="Base/PyObjectBase.h",
|
||||
Include="BRepOffsetAPI_MakePipeShell.hxx",
|
||||
Father="PyObjectBase",
|
||||
FatherNamespace="Base",
|
||||
PythonName="Part.BRepOffsetAPI_MakeFilling",
|
||||
Include="BRepOffsetAPI_MakeFilling.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class BRepOffsetAPI_MakePipeShell(PyObjectBase):
|
||||
class BRepOffsetAPI_MakeFilling(PyObjectBase):
|
||||
"""
|
||||
Low level API to create a PipeShell using OCC API
|
||||
|
||||
Ref: https://dev.opencascade.org/doc/refman/html/class_b_rep_offset_a_p_i___make_pipe_shell.html
|
||||
N-Side Filling
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def setFrenetMode(self, mode: bool) -> None:
|
||||
def setConstrParam(self, *, Tol2d: float = 0.00001, Tol3d: float = 0.0001, TolAng: float = 0.01, TolCurv: float = 0.1) -> None:
|
||||
"""
|
||||
setFrenetMode(True|False)
|
||||
Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping.
|
||||
True = Frenet
|
||||
False = CorrectedFrenet
|
||||
setConstrParam(Tol2d=0.00001, Tol3d=0.0001, TolAng=0.01, TolCurv=0.1)
|
||||
Sets the values of Tolerances used to control the constraint.
|
||||
"""
|
||||
...
|
||||
|
||||
def setTrihedronMode(self, point: Vector, direction: Vector) -> None:
|
||||
def setResolParam(self, *, Degree: int = 3, NbPtsOnCur: int = 15, NbIter: int = 2, Anisotropy: bool = False) -> None:
|
||||
"""
|
||||
setTrihedronMode(point,direction)
|
||||
Sets a fixed trihedron to perform the sweeping.
|
||||
All sections will be parallel.
|
||||
setResolParam(Degree=3, NbPtsOnCur=15, NbIter=2, Anisotropy=False)
|
||||
Sets the parameters used for resolution.
|
||||
"""
|
||||
...
|
||||
|
||||
def setBiNormalMode(self, direction: Vector) -> None:
|
||||
def setApproxParam(self, *, MaxDeg: int = 8, MaxSegments: int = 9) -> None:
|
||||
"""
|
||||
setBiNormalMode(direction)
|
||||
Sets a fixed BiNormal direction to perform the sweeping.
|
||||
Angular relations between the section(s) and the BiNormal direction will be constant.
|
||||
setApproxParam(MaxDeg=8, MaxSegments=9)
|
||||
Sets the parameters used to approximate the filling the surface
|
||||
"""
|
||||
...
|
||||
|
||||
def setSpineSupport(self, shape: TopoShape) -> None:
|
||||
def loadInitSurface(self, face: TopoShapeFace) -> None:
|
||||
"""
|
||||
setSpineSupport(shape)
|
||||
Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces.
|
||||
Warning: To be effective, Each edge of the spine must have an representation on one face of SpineSupport.
|
||||
"""
|
||||
...
|
||||
|
||||
def setAuxiliarySpine(self, wire: TopoShape, CurvilinearEquivalence: bool, TypeOfContact: int) -> None:
|
||||
"""
|
||||
setAuxiliarySpine(wire, CurvilinearEquivalence, TypeOfContact)
|
||||
Sets an auxiliary spine to define the Normal.
|
||||
|
||||
CurvilinearEquivalence = bool
|
||||
For each Point of the Spine P, an Point Q is evalued on AuxiliarySpine.
|
||||
If CurvilinearEquivalence=True Q split AuxiliarySpine with the same length ratio than P split Spine.
|
||||
|
||||
* OCC >= 6.7
|
||||
TypeOfContact = long
|
||||
0: No contact
|
||||
1: Contact
|
||||
2: Contact On Border (The auxiliary spine becomes a boundary of the swept surface)
|
||||
loadInitSurface(face)
|
||||
Loads the initial surface.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, Profile: TopoShape, *, WithContact: bool = False, WithCorrection: bool = False) -> None: ...
|
||||
|
||||
def add(self, Edge: TopoShapeEdge, Order: int, *, IsBound: bool = True) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, Profile: TopoShape, Location: TopoShape, *, WithContact: bool = False, WithCorrection: bool = False) -> None: ...
|
||||
|
||||
def add(self, Edge: TopoShapeEdge, Support: TopoShapeFace, Order: int, *, IsBound: bool = True) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, Support: TopoShapeFace, Order: int) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, Point: Point) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, U: float, V: float, Support: TopoShapeFace, Order: int) -> None:
|
||||
...
|
||||
|
||||
def add(self, **kwargs) -> None:
|
||||
"""
|
||||
add(shape Profile, bool WithContact=False, bool WithCorrection=False)
|
||||
add(shape Profile, vertex Location, bool WithContact=False, bool WithCorrection=False)
|
||||
Adds the section Profile to this framework.
|
||||
First and last sections may be punctual, so the shape Profile may be both wire and vertex.
|
||||
If WithContact is true, the section is translated to be in contact with the spine.
|
||||
If WithCorrection is true, the section is rotated to be orthogonal to the spine tangent in the correspondent point.
|
||||
"""
|
||||
...
|
||||
|
||||
def remove(self, Profile: TopoShape) -> None:
|
||||
"""
|
||||
remove(shape Profile)
|
||||
Removes the section Profile from this framework.
|
||||
"""
|
||||
...
|
||||
|
||||
def isReady(self) -> bool:
|
||||
"""
|
||||
isReady()
|
||||
Returns true if this tool object is ready to build the shape.
|
||||
"""
|
||||
...
|
||||
|
||||
def getStatus(self) -> int:
|
||||
"""
|
||||
getStatus()
|
||||
Get a status, when Simulate or Build failed.
|
||||
"""
|
||||
...
|
||||
|
||||
def makeSolid(self) -> bool:
|
||||
"""
|
||||
makeSolid()
|
||||
Transforms the sweeping Shell in Solid. If a propfile is not closed returns False.
|
||||
"""
|
||||
...
|
||||
|
||||
def setTolerance(self, tol3d: float, boundTol: float, tolAngular: float) -> None:
|
||||
"""
|
||||
setTolerance( tol3d, boundTol, tolAngular)
|
||||
Tol3d = 3D tolerance
|
||||
BoundTol = boundary tolerance
|
||||
TolAngular = angular tolerance
|
||||
"""
|
||||
...
|
||||
|
||||
def setTransitionMode(self, mode: int) -> None:
|
||||
"""
|
||||
0: BRepBuilderAPI_Transformed
|
||||
1: BRepBuilderAPI_RightCorner
|
||||
2: BRepBuilderAPI_RoundCorner
|
||||
"""
|
||||
...
|
||||
|
||||
def firstShape(self) -> TopoShape:
|
||||
"""
|
||||
firstShape()
|
||||
Returns the Shape of the bottom of the sweep.
|
||||
"""
|
||||
...
|
||||
|
||||
def lastShape(self) -> TopoShape:
|
||||
"""
|
||||
lastShape()
|
||||
Returns the Shape of the top of the sweep.
|
||||
add(Edge, Order, IsBound=True)
|
||||
add(Edge, Support, Order, IsBound=True)
|
||||
add(Support, Order)
|
||||
add(Point)
|
||||
add(U, V, Support, Order)
|
||||
Adds a new constraint.
|
||||
"""
|
||||
...
|
||||
|
||||
def build(self) -> None:
|
||||
"""
|
||||
build()
|
||||
Builds the resulting shape.
|
||||
Builds the resulting faces.
|
||||
"""
|
||||
...
|
||||
|
||||
def isDone(self) -> bool:
|
||||
"""
|
||||
Tests whether computation of the filling plate has been completed.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def G0Error(self) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def G0Error(self, arg: int) -> float:
|
||||
...
|
||||
|
||||
def G0Error(self, arg: int = 0) -> float:
|
||||
"""
|
||||
G0Error([int])
|
||||
Returns the maximum distance between the result and the constraints.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def G1Error(self) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def G1Error(self, arg: int) -> float:
|
||||
...
|
||||
|
||||
def G1Error(self, arg: int = 0) -> float:
|
||||
"""
|
||||
G1Error([int])
|
||||
Returns the maximum angle between the result and the constraints.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def G2Error(self) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def G2Error(self, arg: int) -> float:
|
||||
...
|
||||
|
||||
def G2Error(self, arg: int = 0) -> float:
|
||||
"""
|
||||
G2Error([int])
|
||||
Returns the greatest difference in curvature between the result and the constraints.
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -161,38 +143,3 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
|
||||
Returns the resulting shape.
|
||||
"""
|
||||
...
|
||||
|
||||
def generated(self, S: TopoShape) -> list[TopoShape]:
|
||||
"""
|
||||
generated(shape S)
|
||||
Returns a list of new shapes generated from the shape S by the shell-generating algorithm.
|
||||
"""
|
||||
...
|
||||
|
||||
def setMaxDegree(self, degree: int) -> None:
|
||||
"""
|
||||
setMaxDegree(int degree)
|
||||
Define the maximum V degree of resulting surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def setMaxSegments(self, num: int) -> None:
|
||||
"""
|
||||
setMaxSegments(int num)
|
||||
Define the maximum number of spans in V-direction on resulting surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def setForceApproxC1(self, flag: bool) -> None:
|
||||
"""
|
||||
setForceApproxC1(bool)
|
||||
Set the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0.
|
||||
"""
|
||||
...
|
||||
|
||||
def simulate(self, nbsec: int) -> None:
|
||||
"""
|
||||
simulate(int nbsec)
|
||||
Simulates the resulting shape by calculating the given number of cross-sections.
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -6,7 +6,6 @@ from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.BRepOffsetAPI_MakePipeShell",
|
||||
FatherInclude="Base/PyObjectBase.h",
|
||||
Include="BRepOffsetAPI_MakePipeShell.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
|
||||
@@ -158,58 +158,105 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ShapeFix)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ShapeUpgrade)
|
||||
|
||||
generate_from_xml(BRepFeat/MakePrismPy)
|
||||
generate_from_py(BRepFeat/MakePrism)
|
||||
|
||||
generate_from_xml(ChFi2d/ChFi2d_AnaFilletAlgoPy)
|
||||
generate_from_py(ChFi2d/ChFi2d_AnaFilletAlgo)
|
||||
generate_from_xml(ChFi2d/ChFi2d_FilletAlgoPy)
|
||||
generate_from_py(ChFi2d/ChFi2d_FilletAlgo)
|
||||
generate_from_xml(ChFi2d/ChFi2d_ChamferAPIPy)
|
||||
generate_from_py(ChFi2d/ChFi2d_ChamferAPI)
|
||||
generate_from_xml(ChFi2d/ChFi2d_FilletAPIPy)
|
||||
generate_from_py(ChFi2d/ChFi2d_FilletAPI)
|
||||
|
||||
generate_from_xml(Geom2d/ArcOfCircle2dPy)
|
||||
generate_from_py(Geom2d/ArcOfCircle2d)
|
||||
generate_from_xml(Geom2d/ArcOfConic2dPy)
|
||||
generate_from_py(Geom2d/ArcOfConic2d)
|
||||
generate_from_xml(Geom2d/ArcOfEllipse2dPy)
|
||||
generate_from_py(Geom2d/ArcOfEllipse2d)
|
||||
generate_from_xml(Geom2d/ArcOfHyperbola2dPy)
|
||||
generate_from_py(Geom2d/ArcOfHyperbola2d)
|
||||
generate_from_xml(Geom2d/ArcOfParabola2dPy)
|
||||
generate_from_py(Geom2d/ArcOfParabola2d)
|
||||
generate_from_xml(Geom2d/BezierCurve2dPy)
|
||||
generate_from_py(Geom2d/BezierCurve2d)
|
||||
generate_from_xml(Geom2d/BSplineCurve2dPy)
|
||||
generate_from_py(Geom2d/BSplineCurve2d)
|
||||
generate_from_xml(Geom2d/Circle2dPy)
|
||||
generate_from_py(Geom2d/Circle2d)
|
||||
generate_from_xml(Geom2d/Conic2dPy)
|
||||
generate_from_py(Geom2d/Conic2d)
|
||||
generate_from_xml(Geom2d/Ellipse2dPy)
|
||||
generate_from_py(Geom2d/Ellipse2d)
|
||||
generate_from_xml(Geom2d/Geometry2dPy)
|
||||
generate_from_py(Geom2d/Geometry2d)
|
||||
generate_from_xml(Geom2d/Hyperbola2dPy)
|
||||
generate_from_py(Geom2d/Hyperbola2d)
|
||||
generate_from_xml(Geom2d/Curve2dPy)
|
||||
generate_from_py(Geom2d/Curve2d)
|
||||
generate_from_xml(Geom2d/Line2dSegmentPy)
|
||||
generate_from_py(Geom2d/Line2dSegment)
|
||||
generate_from_xml(Geom2d/Line2dPy)
|
||||
generate_from_py(Geom2d/Line2d)
|
||||
generate_from_xml(Geom2d/OffsetCurve2dPy)
|
||||
generate_from_py(Geom2d/OffsetCurve2d)
|
||||
generate_from_xml(Geom2d/Parabola2dPy)
|
||||
generate_from_py(Geom2d/Parabola2d)
|
||||
|
||||
generate_from_xml(GeomPlate/BuildPlateSurfacePy)
|
||||
generate_from_py(GeomPlate/BuildPlateSurface)
|
||||
generate_from_xml(GeomPlate/CurveConstraintPy)
|
||||
generate_from_py(GeomPlate/CurveConstraint)
|
||||
generate_from_xml(GeomPlate/PointConstraintPy)
|
||||
generate_from_py(GeomPlate/PointConstraint)
|
||||
|
||||
generate_from_xml(HLRBRep/HLRBRep_AlgoPy)
|
||||
generate_from_py(HLRBRep/HLRBRep_Algo)
|
||||
generate_from_xml(HLRBRep/HLRToShapePy)
|
||||
generate_from_py(HLRBRep/HLRToShape)
|
||||
generate_from_xml(HLRBRep/HLRBRep_PolyAlgoPy)
|
||||
generate_from_py(HLRBRep/HLRBRep_PolyAlgo)
|
||||
generate_from_xml(HLRBRep/PolyHLRToShapePy)
|
||||
generate_from_py(HLRBRep/PolyHLRToShape)
|
||||
|
||||
generate_from_xml(ShapeFix/ShapeFix_RootPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Root)
|
||||
generate_from_xml(ShapeFix/ShapeFix_EdgePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Edge)
|
||||
generate_from_xml(ShapeFix/ShapeFix_FacePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Face)
|
||||
generate_from_xml(ShapeFix/ShapeFix_ShapePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Shape)
|
||||
generate_from_xml(ShapeFix/ShapeFix_ShellPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Shell)
|
||||
generate_from_xml(ShapeFix/ShapeFix_SolidPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Solid)
|
||||
generate_from_xml(ShapeFix/ShapeFix_WirePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Wire)
|
||||
generate_from_xml(ShapeFix/ShapeFix_WireframePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_Wireframe)
|
||||
generate_from_xml(ShapeFix/ShapeFix_WireVertexPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_WireVertex)
|
||||
generate_from_xml(ShapeFix/ShapeFix_EdgeConnectPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_EdgeConnect)
|
||||
generate_from_xml(ShapeFix/ShapeFix_FaceConnectPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_FaceConnect)
|
||||
generate_from_xml(ShapeFix/ShapeFix_FixSmallFacePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_FixSmallFace)
|
||||
generate_from_xml(ShapeFix/ShapeFix_FixSmallSolidPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_FixSmallSolid)
|
||||
generate_from_xml(ShapeFix/ShapeFix_FreeBoundsPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_FreeBounds)
|
||||
generate_from_xml(ShapeFix/ShapeFix_ShapeTolerancePy)
|
||||
generate_from_py(ShapeFix/ShapeFix_ShapeTolerance)
|
||||
generate_from_xml(ShapeFix/ShapeFix_SplitCommonVertexPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_SplitCommonVertex)
|
||||
generate_from_xml(ShapeFix/ShapeFix_SplitToolPy)
|
||||
generate_from_py(ShapeFix/ShapeFix_SplitTool)
|
||||
|
||||
generate_from_xml(ShapeUpgrade/UnifySameDomainPy)
|
||||
generate_from_py(ShapeUpgrade/UnifySameDomain)
|
||||
|
||||
SET(Features_SRCS
|
||||
FeaturePartBoolean.cpp
|
||||
|
||||
40
src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgo.pyi
Normal file
40
src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgo.pyi
Normal file
@@ -0,0 +1,40 @@
|
||||
from Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Tuple
|
||||
|
||||
@export(
|
||||
Name="ChFi2d_AnaFilletAlgoPy",
|
||||
PythonName="Part.ChFi2d.AnaFilletAlgo",
|
||||
Twin="ChFi2d_AnaFilletAlgo",
|
||||
TwinPointer="ChFi2d_AnaFilletAlgo",
|
||||
Include="ChFi2d_AnaFilletAlgo.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class AnaFilletAlgo(PyObjectBase):
|
||||
"""
|
||||
An analytical algorithm for calculation of the fillets.
|
||||
It is implemented for segments and arcs of circle only.
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self, radius: float) -> bool:
|
||||
"""
|
||||
perform(radius) -> bool
|
||||
|
||||
Constructs a fillet edge
|
||||
"""
|
||||
...
|
||||
|
||||
def result(self) -> Tuple[PyObjectBase, PyObjectBase, PyObjectBase]:
|
||||
"""
|
||||
result()
|
||||
|
||||
Returns result (fillet edge, modified edge1, modified edge2)
|
||||
"""
|
||||
...
|
||||
42
src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPI.pyi
Normal file
42
src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPI.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from typing import Tuple, overload
|
||||
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
@export(
|
||||
PythonName="Part.ChFi2d.ChamferAPI",
|
||||
Twin="ChFi2d_ChamferAPI",
|
||||
TwinPointer="ChFi2d_ChamferAPI",
|
||||
Include="ChFi2d_ChamferAPI.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ChFi2d_ChamferAPI(PyObjectBase):
|
||||
"""
|
||||
Algorithm that creates a chamfer between two linear edges
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes a chamfer algorithm: accepts a wire consisting of two edges in a plane
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self, radius: float) -> bool:
|
||||
"""
|
||||
perform(radius) -> bool
|
||||
|
||||
Constructs a chamfer edge
|
||||
"""
|
||||
...
|
||||
|
||||
def result(self, point: object, solution: int = -1) -> Tuple[object, object, object]:
|
||||
"""
|
||||
result(point, solution=-1)
|
||||
|
||||
Returns result (chamfer edge, modified edge1, modified edge2)
|
||||
"""
|
||||
...
|
||||
50
src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPI.pyi
Normal file
50
src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPI.pyi
Normal file
@@ -0,0 +1,50 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import overload
|
||||
from Part.TopoShapeEdgePy import TopoShapeEdge
|
||||
from Part.PointPy import Point
|
||||
|
||||
|
||||
@export(
|
||||
PythonName="Part.ChFi2d.FilletAPI",
|
||||
Twin="ChFi2d_FilletAPI",
|
||||
TwinPointer="ChFi2d_FilletAPI",
|
||||
Include="ChFi2d_FilletAPI.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ChFi2d_FilletAPI(PyObjectBase):
|
||||
"""
|
||||
Algorithm that creates fillet edge
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self, radius: float) -> bool:
|
||||
"""
|
||||
perform(radius) -> bool
|
||||
|
||||
Constructs a fillet edge
|
||||
"""
|
||||
...
|
||||
|
||||
def numberOfResults(self) -> int:
|
||||
"""
|
||||
Returns number of possible solutions
|
||||
"""
|
||||
...
|
||||
|
||||
def result(self, point: Point, solution: int = -1) -> tuple[TopoShapeEdge, TopoShapeEdge, TopoShapeEdge]:
|
||||
"""
|
||||
result(point, solution=-1)
|
||||
|
||||
Returns result (fillet edge, modified edge1, modified edge2)
|
||||
"""
|
||||
...
|
||||
50
src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgo.pyi
Normal file
50
src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgo.pyi
Normal file
@@ -0,0 +1,50 @@
|
||||
from Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Base.Vector import Vector
|
||||
from typing import Final
|
||||
|
||||
|
||||
@export(
|
||||
Name="ChFi2d_FilletAlgoPy",
|
||||
PythonName="Part.ChFi2d.FilletAlgo",
|
||||
Twin="ChFi2d_FilletAlgo",
|
||||
TwinPointer="ChFi2d_FilletAlgo",
|
||||
Include="ChFi2d_FilletAlgo.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class FilletAlgo(PyObjectBase):
|
||||
"""
|
||||
Algorithm that creates fillet edge
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self, radius: float) -> bool:
|
||||
"""
|
||||
perform(radius) -> bool
|
||||
|
||||
Constructs a fillet edge
|
||||
"""
|
||||
...
|
||||
|
||||
def numberOfResults(self) -> int:
|
||||
"""
|
||||
Returns number of possible solutions
|
||||
"""
|
||||
...
|
||||
|
||||
def result(self, point: Vector, solution: int = -1) -> tuple[object, object, object]:
|
||||
"""
|
||||
result(point, solution=-1)
|
||||
|
||||
Returns result (fillet edge, modified edge1, modified edge2)
|
||||
"""
|
||||
...
|
||||
40
src/Mod/Part/App/Geom2d/ArcOfCircle2d.pyi
Normal file
40
src/Mod/Part/App/Geom2d/ArcOfCircle2d.pyi
Normal file
@@ -0,0 +1,40 @@
|
||||
from Metadata import export, constmethod
|
||||
from typing import Final, overload
|
||||
from Part.Geom2d import ArcOfConic2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.ArcOfCircle2d",
|
||||
Twin="Geom2dArcOfCircle",
|
||||
TwinPointer="Geom2dArcOfCircle",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ArcOfCircle2d(ArcOfConic2d):
|
||||
"""
|
||||
Describes a portion of a circle
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Radius: float = ...
|
||||
"""The radius of the circle."""
|
||||
|
||||
Circle: Final[object] = ...
|
||||
"""The internal circle representation"""
|
||||
|
||||
@overload
|
||||
def __init__(self, Radius: float, Circle: object) -> None: ...
|
||||
"""
|
||||
ArcOfCircle2d(Radius, Circle) -> None
|
||||
|
||||
Constructor for ArcOfCircle2d.
|
||||
|
||||
Parameters:
|
||||
Radius : float
|
||||
The radius of the circle.
|
||||
Circle : object
|
||||
The internal circle representation.
|
||||
"""
|
||||
...
|
||||
38
src/Mod/Part/App/Geom2d/ArcOfConic2d.pyi
Normal file
38
src/Mod/Part/App/Geom2d/ArcOfConic2d.pyi
Normal file
@@ -0,0 +1,38 @@
|
||||
from Base.Metadata import export, constmethod, overload
|
||||
from typing import Final
|
||||
from Part.Geom2d import Curve2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.ArcOfConic2d",
|
||||
Twin="Geom2dArcOfConic",
|
||||
TwinPointer="Geom2dArcOfConic",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Namespace="Part",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ArcOfConic2d(Curve2d):
|
||||
"""
|
||||
Describes an abstract arc of conic in 2d space.
|
||||
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Location: object = ...
|
||||
"""Location of the conic."""
|
||||
|
||||
Eccentricity: Final[float] = ...
|
||||
"""
|
||||
returns the eccentricity value of the conic e.
|
||||
e = 0 for a circle
|
||||
0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
|
||||
e > 1 for a hyperbola
|
||||
e = 1 for a parabola
|
||||
"""
|
||||
|
||||
XAxis: object = ...
|
||||
"""The X axis direction of the circle."""
|
||||
|
||||
YAxis: object = ...
|
||||
"""The Y axis direction of the circle."""
|
||||
31
src/Mod/Part/App/Geom2d/ArcOfEllipse2d.pyi
Normal file
31
src/Mod/Part/App/Geom2d/ArcOfEllipse2d.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
from Metadata import export, constmethod
|
||||
from typing import Final, overload
|
||||
from Part import ArcOfConic2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.ArcOfEllipse2d",
|
||||
Twin="Geom2dArcOfEllipse",
|
||||
TwinPointer="Geom2dArcOfEllipse",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ArcOfEllipse2d(ArcOfConic2d):
|
||||
"""
|
||||
Describes a portion of an ellipse
|
||||
Author: Werner Mayer (wmayer[at]users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
MajorRadius: float = ...
|
||||
"""The major radius of the ellipse."""
|
||||
|
||||
MinorRadius: float = ...
|
||||
"""The minor radius of the ellipse."""
|
||||
|
||||
Ellipse: Final[object] = ...
|
||||
"""The internal ellipse representation"""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
30
src/Mod/Part/App/Geom2d/ArcOfHyperbola2d.pyi
Normal file
30
src/Mod/Part/App/Geom2d/ArcOfHyperbola2d.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from Base.Metadata import export, constmethod, overload
|
||||
from typing import Final
|
||||
from Part.Geom2d import ArcOfConic2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.ArcOfHyperbola2d",
|
||||
Twin="Geom2dArcOfHyperbola",
|
||||
TwinPointer="Geom2dArcOfHyperbola",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ArcOfHyperbola2d(ArcOfConic2d):
|
||||
"""
|
||||
Describes a portion of an hyperbola
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net) Licence: LGPL
|
||||
"""
|
||||
|
||||
MajorRadius: float = ...
|
||||
"""The major radius of the hyperbola."""
|
||||
|
||||
MinorRadius: float = ...
|
||||
"""The minor radius of the hyperbola."""
|
||||
|
||||
Hyperbola: Final[object] = ...
|
||||
"""The internal hyperbola representation"""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
29
src/Mod/Part/App/Geom2d/ArcOfParabola2d.pyi
Normal file
29
src/Mod/Part/App/Geom2d/ArcOfParabola2d.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from Metadata import export, constmethod, overload
|
||||
from typing import Final
|
||||
from Part.Geom2d import ArcOfConic2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.ArcOfParabola2d",
|
||||
Twin="Geom2dArcOfParabola",
|
||||
TwinPointer="Geom2dArcOfParabola",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ArcOfParabola2d(ArcOfConic2d):
|
||||
"""
|
||||
Describes a portion of a parabola.
|
||||
|
||||
Author: Werner Mayer
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Focal: float = ...
|
||||
"""The focal length of the parabola."""
|
||||
|
||||
Parabola: Final[object] = ...
|
||||
"""The internal parabola representation."""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
437
src/Mod/Part/App/Geom2d/BSplineCurve2d.pyi
Normal file
437
src/Mod/Part/App/Geom2d/BSplineCurve2d.pyi
Normal file
@@ -0,0 +1,437 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from typing import Final, overload
|
||||
from Part.Curve2d import Curve2d
|
||||
from Base.Vector import Vector
|
||||
|
||||
@export(
|
||||
Twin="Geom2dBSplineCurve",
|
||||
TwinPointer="Geom2dBSplineCurve",
|
||||
PythonName="Part.Geom2d.BSplineCurve2d",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class BSplineCurve2d(Curve2d):
|
||||
"""
|
||||
Describes a B-Spline curve in 3D space
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Degree: Final[int] = ...
|
||||
"""Returns the polynomial degree of this B-Spline curve."""
|
||||
|
||||
MaxDegree: Final[int] = ...
|
||||
"""Returns the value of the maximum polynomial degree of any
|
||||
B-Spline curve curve. This value is 25."""
|
||||
|
||||
NbPoles: Final[int] = ...
|
||||
"""Returns the number of poles of this B-Spline curve."""
|
||||
|
||||
NbKnots: Final[int] = ...
|
||||
"""Returns the number of knots of this B-Spline curve."""
|
||||
|
||||
StartPoint: Final[object] = ...
|
||||
"""Returns the start point of this B-Spline curve."""
|
||||
|
||||
EndPoint: Final[object] = ...
|
||||
"""Returns the end point of this B-Spline curve."""
|
||||
|
||||
FirstUKnotIndex: Final[object] = ...
|
||||
"""Returns the index in the knot array of the knot
|
||||
corresponding to the first or last parameter
|
||||
of this B-Spline curve."""
|
||||
|
||||
LastUKnotIndex: Final[object] = ...
|
||||
"""Returns the index in the knot array of the knot
|
||||
corresponding to the first or last parameter
|
||||
of this B-Spline curve."""
|
||||
|
||||
KnotSequence: Final[list] = ...
|
||||
"""Returns the knots sequence of this B-Spline curve."""
|
||||
|
||||
def isRational(self) -> bool:
|
||||
"""
|
||||
Returns true if this B-Spline curve is rational.
|
||||
A B-Spline curve is rational if, at the time of construction, the weight table has been initialized.
|
||||
"""
|
||||
...
|
||||
|
||||
def isPeriodic(self) -> bool:
|
||||
"""
|
||||
Returns true if this BSpline curve is periodic.
|
||||
"""
|
||||
...
|
||||
|
||||
def isClosed(self) -> bool:
|
||||
"""
|
||||
Returns true if the distance between the start point and end point of
|
||||
this B-Spline curve is less than or equal to gp::Resolution().
|
||||
"""
|
||||
...
|
||||
|
||||
def increaseDegree(self, Degree: int) -> None:
|
||||
"""
|
||||
increaseDegree(Int=Degree)
|
||||
|
||||
Increases the degree of this B-Spline curve to Degree.
|
||||
As a result, the poles, weights and multiplicities tables
|
||||
are modified; the knots table is not changed. Nothing is
|
||||
done if Degree is less than or equal to the current degree.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def increaseMultiplicity(self, index: int, mult: int) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def increaseMultiplicity(self, start: int, end: int, mult: int) -> None:
|
||||
...
|
||||
|
||||
def increaseMultiplicity(self, *args, **kwargs) -> None:
|
||||
"""
|
||||
increaseMultiplicity(int index, int mult)
|
||||
increaseMultiplicity(int start, int end, int mult)
|
||||
Increases multiplicity of knots up to mult.
|
||||
|
||||
index: the index of a knot to modify (1-based)
|
||||
start, end: index range of knots to modify.
|
||||
If mult is lower or equal to the current multiplicity nothing is done.
|
||||
If mult is higher than the degree the degree is used.
|
||||
"""
|
||||
...
|
||||
|
||||
def incrementMultiplicity(self, start: int, end: int, mult: int) -> None:
|
||||
"""
|
||||
incrementMultiplicity(int start, int end, int mult)
|
||||
Raises multiplicity of knots by mult.
|
||||
|
||||
start, end: index range of knots to modify.
|
||||
"""
|
||||
...
|
||||
|
||||
def insertKnot(self, u: float, mult: int = 1, tol: float = 0.0) -> None:
|
||||
"""
|
||||
insertKnot(u, mult = 1, tol = 0.0)
|
||||
|
||||
Inserts a knot value in the sequence of knots. If u is an existing knot the multiplicity is increased by mult.
|
||||
"""
|
||||
...
|
||||
|
||||
def insertKnots(self, list_of_floats: list[float], list_of_ints: list[int], tol: float = 0.0, bool_add: bool = True) -> None:
|
||||
"""
|
||||
insertKnots(list_of_floats, list_of_ints, tol = 0.0, bool_add = True)
|
||||
|
||||
Inserts a set of knots values in the sequence of knots.
|
||||
|
||||
For each u = list_of_floats[i], mult = list_of_ints[i]
|
||||
|
||||
If u is an existing knot the multiplicity is increased by mult if bool_add is
|
||||
True, otherwise increased to mult.
|
||||
|
||||
If u is not on the parameter range nothing is done.
|
||||
|
||||
If the multiplicity is negative or null nothing is done. The new multiplicity
|
||||
is limited to the degree.
|
||||
|
||||
The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
|
||||
"""
|
||||
...
|
||||
|
||||
def removeKnot(self, Index: int, M: int, tol: float) -> None:
|
||||
"""
|
||||
removeKnot(Index, M, tol)
|
||||
|
||||
Reduces the multiplicity of the knot of index Index to M.
|
||||
If M is equal to 0, the knot is removed.
|
||||
With a modification of this type, the array of poles is also modified.
|
||||
Two different algorithms are systematically used to compute the new
|
||||
poles of the curve. If, for each pole, the distance between the pole
|
||||
calculated using the first algorithm and the same pole calculated using
|
||||
the second algorithm, is less than Tolerance, this ensures that the curve
|
||||
is not modified by more than Tolerance. Under these conditions, true is
|
||||
returned; otherwise, false is returned.
|
||||
|
||||
A low tolerance is used to prevent modification of the curve.
|
||||
A high tolerance is used to 'smooth' the curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def segment(self, u1: float, u2: float) -> None:
|
||||
"""
|
||||
segment(u1,u2)
|
||||
Modifies this B-Spline curve by segmenting it.
|
||||
"""
|
||||
...
|
||||
|
||||
def setKnot(self, value: float) -> None:
|
||||
"""
|
||||
Set a knot of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getKnot(self, index: int) -> float:
|
||||
"""
|
||||
Get a knot of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setKnots(self, knots: list[float]) -> None:
|
||||
"""
|
||||
Set knots of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getKnots(self) -> list[float]:
|
||||
"""
|
||||
Get all knots of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setPole(self, P: Vector, Index: int) -> None:
|
||||
"""
|
||||
Modifies this B-Spline curve by assigning P to the pole of index Index in the poles table.
|
||||
"""
|
||||
...
|
||||
|
||||
def getPole(self, Index: int) -> Vector:
|
||||
"""
|
||||
Get a pole of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getPoles(self) -> list[Vector]:
|
||||
"""
|
||||
Get all poles of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setWeight(self, weight: float, Index: int) -> None:
|
||||
"""
|
||||
Set a weight of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getWeight(self, Index: int) -> float:
|
||||
"""
|
||||
Get a weight of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getWeights(self) -> list[float]:
|
||||
"""
|
||||
Get all weights of the B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getPolesAndWeights(self) -> tuple[list[Vector], list[float]]:
|
||||
"""
|
||||
Returns the table of poles and weights in homogeneous coordinates.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getResolution(self) -> float:
|
||||
"""
|
||||
Computes for this B-Spline curve the parametric tolerance (UTolerance)
|
||||
for a given 3D tolerance (Tolerance3D).
|
||||
If f(t) is the equation of this B-Spline curve, the parametric tolerance ensures that:
|
||||
|t1-t0| < UTolerance =""==> |f(t1)-f(t0)| < Tolerance3D
|
||||
"""
|
||||
...
|
||||
|
||||
def movePoint(self, U: float, P: Vector, Index1: int, Index2: int) -> tuple[int, int]:
|
||||
"""
|
||||
movePoint(U, P, Index1, Index2)
|
||||
|
||||
Moves the point of parameter U of this B-Spline curve to P.
|
||||
Index1 and Index2 are the indexes in the table of poles of this B-Spline curve
|
||||
of the first and last poles designated to be moved.
|
||||
|
||||
Returns: (FirstModifiedPole, LastModifiedPole). They are the indexes of the
|
||||
first and last poles which are effectively modified.
|
||||
"""
|
||||
...
|
||||
|
||||
def setNotPeriodic(self) -> None:
|
||||
"""
|
||||
Changes this B-Spline curve into a non-periodic curve.
|
||||
If this curve is already non-periodic, it is not modified.
|
||||
"""
|
||||
...
|
||||
|
||||
def setPeriodic(self) -> None:
|
||||
"""
|
||||
Changes this B-Spline curve into a periodic curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setOrigin(self, Index: int) -> None:
|
||||
"""
|
||||
Assigns the knot of index Index in the knots table as the origin of this periodic B-Spline curve.
|
||||
As a consequence, the knots and poles tables are modified.
|
||||
"""
|
||||
...
|
||||
|
||||
def getMultiplicity(self, index: int) -> int:
|
||||
"""
|
||||
Returns the multiplicity of the knot of index from the knots table of this B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getMultiplicities(self) -> list[int]:
|
||||
"""
|
||||
Returns the multiplicities table M of the knots of this B-Spline curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def approximate(self, **kwargs) -> None:
|
||||
"""
|
||||
Replaces this B-Spline curve by approximating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
|
||||
approximate2(Points = list_of_points)
|
||||
|
||||
Optional arguments :
|
||||
|
||||
DegMin = integer (3) : Minimum degree of the curve.
|
||||
DegMax = integer (8) : Maximum degree of the curve.
|
||||
Tolerance = float (1e-3) : approximating tolerance.
|
||||
Continuity = string ('C2') : Desired continuity of the curve.
|
||||
Possible values : 'C0','G1','C1','G2','C2','C3','CN'
|
||||
|
||||
LengthWeight = float, CurvatureWeight = float, TorsionWeight = float
|
||||
If one of these arguments is not null, the functions approximates the
|
||||
points using variational smoothing algorithm, which tries to minimize
|
||||
additional criterium:
|
||||
LengthWeight*CurveLength + CurvatureWeight*Curvature + TorsionWeight*Torsion
|
||||
Continuity must be C0, C1 or C2, else defaults to C2.
|
||||
|
||||
Parameters = list of floats : knot sequence of the approximated points.
|
||||
This argument is only used if the weights above are all null.
|
||||
|
||||
ParamType = string ('Uniform','Centripetal' or 'ChordLength')
|
||||
Parameterization type. Only used if weights and Parameters above aren't specified.
|
||||
|
||||
Note : Continuity of the spline defaults to C2. However, it may not be applied if
|
||||
it conflicts with other parameters ( especially DegMax ).
|
||||
"""
|
||||
...
|
||||
|
||||
def getCardinalSplineTangents(self, **kwargs) -> None:
|
||||
"""
|
||||
Compute the tangents for a Cardinal spline
|
||||
"""
|
||||
...
|
||||
|
||||
def interpolate(self, **kwargs) -> None:
|
||||
"""
|
||||
Replaces this B-Spline curve by interpolating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
|
||||
interpolate(Points = list_of_points)
|
||||
|
||||
Optional arguments :
|
||||
|
||||
PeriodicFlag = bool (False) : Sets the curve closed or opened.
|
||||
Tolerance = float (1e-6) : interpolating tolerance
|
||||
|
||||
Parameters : knot sequence of the interpolated points.
|
||||
If not supplied, the function defaults to chord-length parameterization.
|
||||
If PeriodicFlag == True, one extra parameter must be appended.
|
||||
|
||||
EndPoint Tangent constraints :
|
||||
|
||||
InitialTangent = vector, FinalTangent = vector
|
||||
specify tangent vectors for starting and ending points
|
||||
of the BSpline. Either none, or both must be specified.
|
||||
|
||||
Full Tangent constraints :
|
||||
|
||||
Tangents = list_of_vectors, TangentFlags = list_of_bools
|
||||
Both lists must have the same length as Points list.
|
||||
Tangents specifies the tangent vector of each point in Points list.
|
||||
TangentFlags (bool) activates or deactivates the corresponding tangent.
|
||||
These arguments will be ignored if EndPoint Tangents (above) are also defined.
|
||||
|
||||
Note : Continuity of the spline defaults to C2. However, if periodic, or tangents
|
||||
are supplied, the continuity will drop to C1.
|
||||
"""
|
||||
...
|
||||
|
||||
def buildFromPoles(self, poles: list[Vector]) -> None:
|
||||
"""
|
||||
Builds a B-Spline by a list of poles.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def buildFromPolesMultsKnots(self, poles: list[Vector], mults: tuple[int, ...], knots: tuple[float, ...], periodic: bool, degree: int) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def buildFromPolesMultsKnots(self, poles: list[Vector], mults: tuple[int, ...], knots: tuple[float, ...], periodic: bool, degree: int, weights: tuple[float, ...], CheckRational: bool) -> None:
|
||||
...
|
||||
|
||||
def buildFromPolesMultsKnots(self, **kwargs) -> None:
|
||||
"""
|
||||
Builds a B-Spline by a lists of Poles, Mults, Knots.
|
||||
arguments: poles (sequence of Base.Vector),
|
||||
[mults , knots, periodic, degree, weights (sequence of float), CheckRational]
|
||||
|
||||
Examples:
|
||||
from FreeCAD import Base
|
||||
import Part
|
||||
V=Base.Vector
|
||||
poles=[V(-10,-10),V(10,-10),V(10,10),V(-10,10)]
|
||||
|
||||
# non-periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPolesMultsKnots(poles,(3,1,3),(0,0.5,1),False,2)
|
||||
Part.show(n.toShape())
|
||||
|
||||
# periodic spline
|
||||
p=Part.BSplineCurve()
|
||||
p.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2)
|
||||
Part.show(p.toShape())
|
||||
|
||||
# periodic and rational spline
|
||||
r=Part.BSplineCurve()
|
||||
r.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2,(1,0.8,0.7,0.2))
|
||||
Part.show(r.toShape())
|
||||
"""
|
||||
...
|
||||
|
||||
def toBezier(self) -> list:
|
||||
"""
|
||||
Build a list of Bezier splines.
|
||||
"""
|
||||
...
|
||||
|
||||
def toBiArcs(self, tolerance: float) -> list:
|
||||
"""
|
||||
toBiArcs(tolerance) -> list.
|
||||
Build a list of arcs and lines to approximate the B-spline.
|
||||
"""
|
||||
...
|
||||
|
||||
def join(self, other: "BSplineCurve2d") -> "BSplineCurve2d":
|
||||
"""
|
||||
Build a new spline by joining this and a second spline.
|
||||
"""
|
||||
...
|
||||
|
||||
def makeC1Continuous(self, tol: float = 1e-6, ang_tol: float = 1e-7) -> "BSplineCurve2d":
|
||||
"""
|
||||
makeC1Continuous(tol = 1e-6, ang_tol = 1e-7)
|
||||
|
||||
Reduces as far as possible the multiplicities of the knots of this BSpline
|
||||
(keeping the geometry). It returns a new BSpline, which could still be C0.
|
||||
tol is a geometrical tolerance.
|
||||
The tol_ang is angular tolerance, in radians. It sets tolerable angle mismatch
|
||||
of the tangents on the left and on the right to decide if the curve is G1 or
|
||||
not at a given point.
|
||||
"""
|
||||
...
|
||||
141
src/Mod/Part/App/Geom2d/BezierCurve2d.pyi
Normal file
141
src/Mod/Part/App/Geom2d/BezierCurve2d.pyi
Normal file
@@ -0,0 +1,141 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.Curve2d import Curve2d
|
||||
from typing import Final, List
|
||||
|
||||
@export(
|
||||
Twin="Geom2dBezierCurve",
|
||||
TwinPointer="Geom2dBezierCurve",
|
||||
PythonName="Part.Geom2d.BezierCurve2d",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class BezierCurve2d(Curve2d):
|
||||
"""
|
||||
Describes a rational or non-rational Bezier curve in 2d space:
|
||||
-- a non-rational Bezier curve is defined by a table of poles (also called control points)
|
||||
-- a rational Bezier curve is defined by a table of poles with varying weights
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Degree: Final[int] = ...
|
||||
"""Returns the polynomial degree of this Bezier curve, which is equal to the number of poles minus 1."""
|
||||
|
||||
MaxDegree: Final[int] = ...
|
||||
"""Returns the value of the maximum polynomial degree of any Bezier curve curve. This value is 25."""
|
||||
|
||||
NbPoles: Final[int] = ...
|
||||
"""Returns the number of poles of this Bezier curve."""
|
||||
|
||||
StartPoint: Final[object] = ...
|
||||
"""Returns the start point of this Bezier curve."""
|
||||
|
||||
EndPoint: Final[object] = ...
|
||||
"""Returns the end point of this Bezier curve."""
|
||||
|
||||
def isRational(self) -> bool:
|
||||
"""
|
||||
Returns false if the weights of all the poles of this Bezier curve are equal.
|
||||
"""
|
||||
...
|
||||
|
||||
def isPeriodic(self) -> bool:
|
||||
"""
|
||||
Returns false.
|
||||
"""
|
||||
...
|
||||
|
||||
def isClosed(self) -> bool:
|
||||
"""
|
||||
Returns true if the distance between the start point and end point of this Bezier curve
|
||||
is less than or equal to gp::Resolution().
|
||||
"""
|
||||
...
|
||||
|
||||
def increase(self, Degree: int) -> None:
|
||||
"""
|
||||
increase(Int=Degree)
|
||||
Increases the degree of this Bezier curve to Degree.
|
||||
As a result, the poles and weights tables are modified.
|
||||
"""
|
||||
...
|
||||
|
||||
def insertPoleAfter(self, index: int) -> None:
|
||||
"""
|
||||
Inserts after the pole of index.
|
||||
"""
|
||||
...
|
||||
|
||||
def insertPoleBefore(self, index: int) -> None:
|
||||
"""
|
||||
Inserts before the pole of index.
|
||||
"""
|
||||
...
|
||||
|
||||
def removePole(self, index: int) -> None:
|
||||
"""
|
||||
Removes the pole of index Index from the table of poles of this Bezier curve.
|
||||
If this Bezier curve is rational, it can become non-rational.
|
||||
"""
|
||||
...
|
||||
|
||||
def segment(self) -> None:
|
||||
"""
|
||||
Modifies this Bezier curve by segmenting it.
|
||||
"""
|
||||
...
|
||||
|
||||
def setPole(self, index: int, pole: object) -> None:
|
||||
"""
|
||||
Set a pole of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getPole(self, index: int) -> object:
|
||||
"""
|
||||
Get a pole of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getPoles(self) -> List[object]:
|
||||
"""
|
||||
Get all poles of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setPoles(self, poles: List[object]) -> None:
|
||||
"""
|
||||
Set the poles of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def setWeight(self, index: int, weight: float) -> None:
|
||||
"""
|
||||
Set a weight of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getWeight(self, index: int) -> float:
|
||||
"""
|
||||
Get a weight of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
def getWeights(self) -> List[float]:
|
||||
"""
|
||||
Get all weights of the Bezier curve.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getResolution(self, Tolerance3D: float) -> float:
|
||||
"""
|
||||
Computes for this Bezier curve the parametric tolerance (UTolerance)
|
||||
for a given 3D tolerance (Tolerance3D).
|
||||
If f(t) is the equation of this Bezier curve,
|
||||
the parametric tolerance ensures that:
|
||||
|t1-t0| < UTolerance =\"\"==> |f(t1)-f(t0)| < Tolerance3D
|
||||
"""
|
||||
...
|
||||
81
src/Mod/Part/App/Geom2d/Circle2d.pyi
Normal file
81
src/Mod/Part/App/Geom2d/Circle2d.pyi
Normal file
@@ -0,0 +1,81 @@
|
||||
from Metadata import export, constmethod
|
||||
from typing import Final, overload, Tuple
|
||||
from Part.Geom2d import Conic2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.Circle2d",
|
||||
Twin="Geom2dCircle",
|
||||
TwinPointer="Geom2dCircle",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class Circle2d(Conic2d):
|
||||
"""
|
||||
Describes a circle in 3D space
|
||||
To create a circle there are several ways:
|
||||
Part.Geom2d.Circle2d()
|
||||
Creates a default circle with center (0,0) and radius 1
|
||||
|
||||
Part.Geom2d.Circle2d(circle)
|
||||
Creates a copy of the given circle
|
||||
|
||||
Part.Geom2d.Circle2d(circle, Distance)
|
||||
Creates a circle parallel to given circle at a certain distance
|
||||
|
||||
Part.Geom2d.Circle2d(Center,Radius)
|
||||
Creates a circle defined by center and radius
|
||||
|
||||
Part.Geom2d.Circle2d(Point1,Point2,Point3)
|
||||
Creates a circle defined by three non-linear points
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Radius: float = ...
|
||||
"""The radius of the circle."""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, circle: "Circle2d") -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, circle: "Circle2d", Distance: float) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Center: Tuple[float, float], Radius: float) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Point1: Tuple[float, float], Point2: Tuple[float, float], Point3: Tuple[float, float]) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
"""
|
||||
Describes a circle in 3D space
|
||||
To create a circle there are several ways:
|
||||
Part.Geom2d.Circle2d()
|
||||
Creates a default circle with center (0,0) and radius 1
|
||||
|
||||
Part.Geom2d.Circle2d(circle)
|
||||
Creates a copy of the given circle
|
||||
|
||||
Part.Geom2d.Circle2d(circle, Distance)
|
||||
Creates a circle parallel to given circle at a certain distance
|
||||
|
||||
Part.Geom2d.Circle2d(Center,Radius)
|
||||
Creates a circle defined by center and radius
|
||||
|
||||
Part.Geom2d.Circle2d(Point1,Point2,Point3)
|
||||
Creates a circle defined by three non-linear points
|
||||
"""
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def getCircleCenter() -> Tuple[float, float]:
|
||||
"""
|
||||
Get the circle center defined by three points
|
||||
"""
|
||||
...
|
||||
37
src/Mod/Part/App/Geom2d/Conic2d.pyi
Normal file
37
src/Mod/Part/App/Geom2d/Conic2d.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
from Base.Metadata import export
|
||||
from typing import Final
|
||||
from Part.Geom2d import Curve2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.Conic2d",
|
||||
Twin="Geom2dConic",
|
||||
TwinPointer="Geom2dConic",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class Conic2d(Curve2d):
|
||||
"""
|
||||
Describes an abstract conic in 2d space
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Location: object = ...
|
||||
"""Location of the conic."""
|
||||
|
||||
Eccentricity: Final[float] = ...
|
||||
"""
|
||||
returns the eccentricity value of the conic e.
|
||||
e = 0 for a circle
|
||||
0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
|
||||
e > 1 for a hyperbola
|
||||
e = 1 for a parabola
|
||||
"""
|
||||
|
||||
XAxis: object = ...
|
||||
"""The X axis direction of the circle"""
|
||||
|
||||
YAxis: object = ...
|
||||
"""The Y axis direction of the circle"""
|
||||
223
src/Mod/Part/App/Geom2d/Curve2d.pyi
Normal file
223
src/Mod/Part/App/Geom2d/Curve2d.pyi
Normal file
@@ -0,0 +1,223 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.Vector import Vector
|
||||
from Part.App.Geom2d.Geometry2d import Geometry2d
|
||||
from Part.App.Geom2d.BSplineCurve import BSplineCurve
|
||||
from typing import Final, overload, List
|
||||
|
||||
@export(
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Geometry2dPy.h",
|
||||
Twin="Geom2dCurve",
|
||||
TwinPointer="Geom2dCurve",
|
||||
PythonName="Part.Geom2d.Curve2d",
|
||||
Constructor=True,
|
||||
)
|
||||
class Curve2d(Geometry2d):
|
||||
"""
|
||||
The abstract class Geom2dCurve is the root class of all curve objects.
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Continuity: Final[str] = ...
|
||||
"""Returns the global continuity of the curve."""
|
||||
|
||||
Closed: Final[bool] = ...
|
||||
"""Returns true if the curve is closed."""
|
||||
|
||||
Periodic: Final[bool] = ...
|
||||
"""Returns true if the curve is periodic."""
|
||||
|
||||
FirstParameter: Final[float] = ...
|
||||
"""Returns the value of the first parameter."""
|
||||
|
||||
LastParameter: Final[float] = ...
|
||||
"""Returns the value of the last parameter."""
|
||||
|
||||
def reverse(self) -> None:
|
||||
"""
|
||||
Changes the direction of parametrization of the curve.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def toShape(self) -> object:
|
||||
"""
|
||||
Return the shape for the geometry.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, Number: int) -> List[Vector]:
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, QuasiNumber: int) -> List[Vector]:
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, Distance: float) -> List[Vector]:
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, Deflection: float) -> List[Vector]:
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, QuasiDeflection: float) -> List[Vector]:
|
||||
...
|
||||
|
||||
@overload
|
||||
@constmethod
|
||||
def discretize(self, *, Angular: float, Curvature: float, Minimum: int = 2) -> List[Vector]:
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def discretize(self, **kwargs) -> List[Vector]:
|
||||
"""
|
||||
Discretizes the curve and returns a list of points.
|
||||
The function accepts keywords as argument:
|
||||
discretize(Number=n) => gives a list of 'n' equidistant points.
|
||||
discretize(QuasiNumber=n) => gives a list of 'n' quasi-equidistant points (is faster than the method above).
|
||||
discretize(Distance=d) => gives a list of equidistant points with distance 'd'.
|
||||
discretize(Deflection=d) => gives a list of points with a maximum deflection 'd' to the curve.
|
||||
discretize(QuasiDeflection=d) => gives a list of points with a maximum deflection 'd' to the curve (faster).
|
||||
discretize(Angular=a,Curvature=c,[Minimum=m]) => gives a list of points with an angular deflection of 'a'
|
||||
and a curvature deflection of 'c'. Optionally a minimum number of points
|
||||
can be set, which by default is set to 2.
|
||||
|
||||
Optionally you can set the keywords 'First' and 'Last' to define
|
||||
a sub-range of the parameter range of the curve.
|
||||
|
||||
If no keyword is given, then it depends on whether the argument is an int or float.
|
||||
If it's an int then the behaviour is as if using the keyword 'Number',
|
||||
if it's a float then the behaviour is as if using the keyword 'Distance'.
|
||||
|
||||
Example:
|
||||
|
||||
import Part
|
||||
c=PartGeom2d.Circle2d()
|
||||
c.Radius=5
|
||||
p=c.discretize(Number=50,First=3.14)
|
||||
s=Part.Compound([Part.Vertex(i) for i in p])
|
||||
Part.show(s)
|
||||
|
||||
|
||||
p=c.discretize(Angular=0.09,Curvature=0.01,Last=3.14,Minimum=100)
|
||||
s=Part.Compound([Part.Vertex(i) for i in p])
|
||||
Part.show(s)
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def length(self) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def length(self, uMin: float) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def length(self, uMin: float, uMax: float) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def length(self, uMin: float, uMax: float, Tol: float) -> float:
|
||||
...
|
||||
|
||||
def length(self, *args: float) -> float:
|
||||
"""
|
||||
Computes the length of a curve
|
||||
length([uMin,uMax,Tol]) -> Float
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def parameterAtDistance(self, abscissa: float) -> float:
|
||||
...
|
||||
|
||||
@overload
|
||||
def parameterAtDistance(self, abscissa: float, startingParameter: float) -> float:
|
||||
...
|
||||
|
||||
def parameterAtDistance(self, *args: float) -> float:
|
||||
"""
|
||||
Returns the parameter on the curve of a point at
|
||||
the given distance from a starting parameter.
|
||||
parameterAtDistance([abscissa, startingParameter]) -> Float
|
||||
"""
|
||||
...
|
||||
|
||||
def value(self, u: float) -> Vector:
|
||||
"""
|
||||
Computes the point of parameter u on this curve
|
||||
"""
|
||||
...
|
||||
|
||||
def tangent(self, u: float) -> Vector:
|
||||
"""
|
||||
Computes the tangent of parameter u on this curve
|
||||
"""
|
||||
...
|
||||
|
||||
def parameter(self, point: Vector) -> float:
|
||||
"""
|
||||
Returns the parameter on the curve of the
|
||||
nearest orthogonal projection of the point.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def normal(self, pos: float) -> Vector:
|
||||
"""
|
||||
Vector = normal(pos) - Get the normal vector at the given parameter [First|Last] if defined.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def curvature(self, pos: float) -> float:
|
||||
"""
|
||||
Float = curvature(pos) - Get the curvature at the given parameter [First|Last] if defined.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def centerOfCurvature(self, pos: float) -> Vector:
|
||||
"""
|
||||
Vector = centerOfCurvature(float pos) - Get the center of curvature at the given parameter [First|Last] if defined.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def intersectCC(self, other: "Curve2d") -> List[Vector]:
|
||||
"""
|
||||
Returns all intersection points between this curve and the given curve.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def toBSpline(self) -> BSplineCurve:
|
||||
...
|
||||
|
||||
@overload
|
||||
def toBSpline(self, First: float, Last: float) -> BSplineCurve:
|
||||
...
|
||||
|
||||
def toBSpline(self, *args: float) -> BSplineCurve:
|
||||
"""
|
||||
Converts a curve of any type (only part from First to Last)
|
||||
toBSpline([Float=First, Float=Last]) -> B-Spline curve
|
||||
"""
|
||||
...
|
||||
|
||||
def approximateBSpline(self, Tolerance: float, MaxSegments: int, MaxDegree: int, Order: str = "C2") -> BSplineCurve:
|
||||
"""
|
||||
Approximates a curve of any type to a B-Spline curve
|
||||
approximateBSpline(Tolerance, MaxSegments, MaxDegree, [Order='C2']) -> B-Spline curve
|
||||
"""
|
||||
...
|
||||
67
src/Mod/Part/App/Geom2d/Ellipse2d.pyi
Normal file
67
src/Mod/Part/App/Geom2d/Ellipse2d.pyi
Normal file
@@ -0,0 +1,67 @@
|
||||
from typing import Final, overload
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.Conic2d import Conic2d
|
||||
|
||||
@export(
|
||||
Twin="Geom2dEllipse",
|
||||
TwinPointer="Geom2dEllipse",
|
||||
PythonName="Part.Geom2d.Ellipse2d",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class Ellipse2d(Conic2d):
|
||||
"""
|
||||
Describes an ellipse in 2D space
|
||||
To create an ellipse there are several ways:
|
||||
Part.Geom2d.Ellipse2d()
|
||||
Creates an ellipse with major radius 2 and minor radius 1 with the
|
||||
center in (0,0)
|
||||
|
||||
Part.Geom2d.Ellipse2d(Ellipse)
|
||||
Create a copy of the given ellipse
|
||||
|
||||
Part.Geom2d.Ellipse2d(S1,S2,Center)
|
||||
Creates an ellipse centered on the point Center,
|
||||
its major axis is defined by Center and S1,
|
||||
its major radius is the distance between Center and S1, and
|
||||
its minor radius is the distance between S2 and the major axis.
|
||||
|
||||
Part.Geom2d.Ellipse2d(Center,MajorRadius,MinorRadius)
|
||||
Creates an ellipse with major and minor radii MajorRadius and
|
||||
MinorRadius
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
MajorRadius: float = ...
|
||||
"""The major radius of the ellipse."""
|
||||
|
||||
MinorRadius: float = ...
|
||||
"""The minor radius of the ellipse."""
|
||||
|
||||
Focal: Final[float] = ...
|
||||
"""The focal distance of the ellipse."""
|
||||
|
||||
Focus1: Final[object] = ...
|
||||
"""The first focus is on the positive side of the major axis of the ellipse."""
|
||||
|
||||
Focus2: Final[object] = ...
|
||||
"""The second focus is on the negative side of the major axis of the ellipse."""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Ellipse: "Ellipse2d") -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, S1: object, S2: object, Center: object) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Center: object, MajorRadius: float, MinorRadius: float) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
...
|
||||
59
src/Mod/Part/App/Geom2d/Geometry2d.pyi
Normal file
59
src/Mod/Part/App/Geom2d/Geometry2d.pyi
Normal file
@@ -0,0 +1,59 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
Twin="Geometry2d",
|
||||
TwinPointer="Geometry2d",
|
||||
PythonName="Part.Geom2d.Geometry2d",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class Geometry2d(PyObjectBase):
|
||||
"""
|
||||
The abstract class Geometry for 2D space is the root class of all geometric objects.
|
||||
It describes the common behavior of these objects when:
|
||||
- applying geometric transformations to objects, and
|
||||
- constructing objects by geometric transformation (including copying).
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def mirror(self) -> None:
|
||||
"""
|
||||
Performs the symmetrical transformation of this geometric object.
|
||||
"""
|
||||
...
|
||||
|
||||
def rotate(self) -> None:
|
||||
"""
|
||||
Rotates this geometric object at angle Ang (in radians) around a point.
|
||||
"""
|
||||
...
|
||||
|
||||
def scale(self) -> None:
|
||||
"""
|
||||
Applies a scaling transformation on this geometric object with a center and scaling factor.
|
||||
"""
|
||||
...
|
||||
|
||||
def transform(self) -> None:
|
||||
"""
|
||||
Applies a transformation to this geometric object.
|
||||
"""
|
||||
...
|
||||
|
||||
def translate(self) -> None:
|
||||
"""
|
||||
Translates this geometric object.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def copy(self) -> "Geometry2d":
|
||||
"""
|
||||
Create a copy of this geometry.
|
||||
"""
|
||||
...
|
||||
66
src/Mod/Part/App/Geom2d/Hyperbola2d.pyi
Normal file
66
src/Mod/Part/App/Geom2d/Hyperbola2d.pyi
Normal file
@@ -0,0 +1,66 @@
|
||||
from Base.Metadata import export
|
||||
from Part.Conic2d import Conic2d
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
Twin="Geom2dHyperbola",
|
||||
TwinPointer="Geom2dHyperbola",
|
||||
PythonName="Part.Geom2d.Hyperbola2d",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Constructor=True
|
||||
)
|
||||
class Hyperbola2d(Conic2d):
|
||||
"""
|
||||
Describes a hyperbola in 2D space
|
||||
To create a hyperbola there are several ways:
|
||||
Part.Geom2d.Hyperbola2d()
|
||||
Creates a hyperbola with major radius 2 and minor radius 1 with the
|
||||
center in (0,0)
|
||||
|
||||
Part.Geom2d.Hyperbola2d(Hyperbola)
|
||||
Create a copy of the given hyperbola
|
||||
|
||||
Part.Geom2d.Hyperbola2d(S1,S2,Center)
|
||||
Creates a hyperbola centered on the point Center, S1 and S2,
|
||||
its major axis is defined by Center and S1,
|
||||
its major radius is the distance between Center and S1, and
|
||||
its minor radius is the distance between S2 and the major axis.
|
||||
|
||||
Part.Geom2d.Hyperbola2d(Center,MajorRadius,MinorRadius)
|
||||
Creates a hyperbola with major and minor radii MajorRadius and
|
||||
MinorRadius and located at Center
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
MajorRadius: float = ...
|
||||
"""The major radius of the hyperbola."""
|
||||
|
||||
MinorRadius: float = ...
|
||||
"""The minor radius of the hyperbola."""
|
||||
|
||||
Focal: Final[float] = ...
|
||||
"""The focal distance of the hyperbola."""
|
||||
|
||||
Focus1: Final[object] = ...
|
||||
"""
|
||||
The first focus is on the positive side of the major axis of the hyperbola;
|
||||
the second focus is on the negative side.
|
||||
"""
|
||||
|
||||
Focus2: Final[object] = ...
|
||||
"""
|
||||
The first focus is on the positive side of the major axis of the hyperbola;
|
||||
the second focus is on the negative side.
|
||||
"""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(self, Hyperbola: "Hyperbola2d") -> None: ...
|
||||
@overload
|
||||
def __init__(self, S1: object, S2: object, Center: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, Center: object, MajorRadius: float, MinorRadius: float) -> None: ...
|
||||
34
src/Mod/Part/App/Geom2d/Line2d.pyi
Normal file
34
src/Mod/Part/App/Geom2d/Line2d.pyi
Normal file
@@ -0,0 +1,34 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.Geom2d.Curve2d import Curve2d
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.Line2d",
|
||||
Twin="Geom2dLine",
|
||||
TwinPointer="Geom2dLine",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class Line2d(Curve2d):
|
||||
"""
|
||||
Describes an infinite line in 2D space
|
||||
To create a line there are several ways:
|
||||
Part.Geom2d.Line2d()
|
||||
Creates a default line.
|
||||
|
||||
Part.Geom2d.Line2d(Line)
|
||||
Creates a copy of the given line.
|
||||
|
||||
Part.Geom2d.Line2d(Point,Dir)
|
||||
Creates a line that goes through two given points.
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Location: object = ...
|
||||
"""Returns the location of this line."""
|
||||
|
||||
Direction: object = ...
|
||||
"""Returns the direction of this line."""
|
||||
47
src/Mod/Part/App/Geom2d/Line2dSegment.pyi
Normal file
47
src/Mod/Part/App/Geom2d/Line2dSegment.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from typing import Final, overload
|
||||
from Part.Geom2d import Curve2d
|
||||
|
||||
@export(
|
||||
PythonName="Part.Geom2d.Line2dSegment",
|
||||
Twin="Geom2dLineSegment",
|
||||
TwinPointer="Geom2dLineSegment",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class Line2dSegment(Curve2d):
|
||||
"""
|
||||
Describes a line segment in 2D space.
|
||||
|
||||
To create a line there are several ways:
|
||||
Part.Geom2d.Line2dSegment()
|
||||
Creates a default line
|
||||
|
||||
Part.Geom2d.Line2dSegment(Line)
|
||||
Creates a copy of the given line
|
||||
|
||||
Part.Geom2d.Line2dSegment(Point1,Point2)
|
||||
Creates a line that goes through two given points.
|
||||
"""
|
||||
|
||||
StartPoint: object = ...
|
||||
"""Returns the start point of this line segment."""
|
||||
|
||||
EndPoint: object = ...
|
||||
"""Returns the end point of this line segment."""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Line: "Line2dSegment") -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, Point1: object, Point2: object) -> None: ...
|
||||
|
||||
def setParameterRange(self) -> None:
|
||||
"""
|
||||
Set the parameter range of the underlying line segment geometry.
|
||||
"""
|
||||
...
|
||||
27
src/Mod/Part/App/Geom2d/OffsetCurve2d.pyi
Normal file
27
src/Mod/Part/App/Geom2d/OffsetCurve2d.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from Metadata import export
|
||||
from typing import Final
|
||||
from Part.Geom2d import Curve2d
|
||||
|
||||
@export(
|
||||
Name="OffsetCurve2dPy",
|
||||
Namespace="Part",
|
||||
Twin="Geom2dOffsetCurve",
|
||||
TwinPointer="Geom2dOffsetCurve",
|
||||
PythonName="Part.Geom2d.OffsetCurve2d",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
Father="Curve2dPy",
|
||||
FatherNamespace="Part",
|
||||
Constructor=True,
|
||||
)
|
||||
class OffsetCurve2d(Curve2d):
|
||||
"""
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
OffsetValue: float = ...
|
||||
"""Sets or gets the offset value to offset the underlying curve."""
|
||||
|
||||
BasisCurve: object = ...
|
||||
"""Sets or gets the basic curve."""
|
||||
37
src/Mod/Part/App/Geom2d/Parabola2d.pyi
Normal file
37
src/Mod/Part/App/Geom2d/Parabola2d.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.App.Geom2d.Conic2d import Conic2d
|
||||
from typing import Final
|
||||
|
||||
|
||||
@export(
|
||||
Include="Mod/Part/App/Geometry2d.h",
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h",
|
||||
Twin="Geom2dParabola",
|
||||
TwinPointer="Geom2dParabola",
|
||||
PythonName="Part.Geom2d.Parabola2d",
|
||||
Constructor=True,
|
||||
)
|
||||
class Parabola2d(Conic2d):
|
||||
"""
|
||||
Describes a parabola in 2D space
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Focal: float = ...
|
||||
"""
|
||||
The focal distance is the distance between the apex and the focus of the parabola.
|
||||
"""
|
||||
|
||||
Focus: Final[object] = ...
|
||||
"""
|
||||
The focus is on the positive side of the
|
||||
'X Axis' of the local coordinate system of the parabola.
|
||||
"""
|
||||
|
||||
Parameter: Final[float] = ...
|
||||
"""
|
||||
Compute the parameter of this parabola which is the distance between its focus
|
||||
and its directrix. This distance is twice the focal length.
|
||||
"""
|
||||
139
src/Mod/Part/App/GeomPlate/BuildPlateSurface.pyi
Normal file
139
src/Mod/Part/App/GeomPlate/BuildPlateSurface.pyi
Normal file
@@ -0,0 +1,139 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import List
|
||||
|
||||
@export(
|
||||
PythonName="Part.GeomPlate.BuildPlateSurfacePy",
|
||||
Twin="GeomPlate_BuildPlateSurface",
|
||||
TwinPointer="GeomPlate_BuildPlateSurface",
|
||||
Include="GeomPlate_BuildPlateSurface.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class BuildPlateSurface(PyObjectBase):
|
||||
"""
|
||||
This class provides an algorithm for constructing such a plate surface.
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Resets all constraints
|
||||
"""
|
||||
...
|
||||
|
||||
def setNbBounds(self) -> None:
|
||||
"""
|
||||
Sets the number of bounds
|
||||
"""
|
||||
...
|
||||
|
||||
def loadInitSurface(self) -> None:
|
||||
"""
|
||||
Loads the initial surface
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def surfInit(self) -> object:
|
||||
"""
|
||||
Returns the initial surface
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def surface(self) -> object:
|
||||
"""
|
||||
Returns the plate surface
|
||||
"""
|
||||
...
|
||||
|
||||
def add(self) -> None:
|
||||
"""
|
||||
Adds a linear or point constraint
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Calls the algorithm and computes the plate surface
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isDone(self) -> bool:
|
||||
"""
|
||||
Tests whether computation of the plate has been completed
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def sense(self) -> object:
|
||||
"""
|
||||
Returns the orientation of the curves in the array returned by curves2d
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def order(self) -> int:
|
||||
"""
|
||||
Returns the order of the curves in the array returned by curves2d
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def curves2d(self) -> List[object]:
|
||||
"""
|
||||
Extracts the array of curves on the plate surface which
|
||||
correspond to the curve constraints set in add()
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def curveConstraint(self) -> object:
|
||||
"""
|
||||
Returns the curve constraint of order
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def pointConstraint(self) -> object:
|
||||
"""
|
||||
Returns the point constraint of order
|
||||
"""
|
||||
...
|
||||
|
||||
def disc2dContour(self) -> object:
|
||||
"""
|
||||
Returns the 2D contour of the plate surface
|
||||
"""
|
||||
...
|
||||
|
||||
def disc3dContour(self) -> object:
|
||||
"""
|
||||
Returns the 3D contour of the plate surface
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def G0Error(self) -> float:
|
||||
"""
|
||||
Returns the max distance between the result and the constraints
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def G1Error(self) -> float:
|
||||
"""
|
||||
Returns the max angle between the result and the constraints
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def G2Error(self) -> float:
|
||||
"""
|
||||
Returns the max difference of curvature between the result and the constraints
|
||||
"""
|
||||
...
|
||||
144
src/Mod/Part/App/GeomPlate/CurveConstraint.pyi
Normal file
144
src/Mod/Part/App/GeomPlate/CurveConstraint.pyi
Normal file
@@ -0,0 +1,144 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.GeomPlate.CurveConstraintPy",
|
||||
Twin="GeomPlate_CurveConstraint",
|
||||
TwinPointer="GeomPlate_CurveConstraint",
|
||||
Include="GeomPlate_CurveConstraint.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class CurveConstraint(PyObjectBase):
|
||||
"""
|
||||
Defines curves as constraints to be used to deform a surface
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
NbPoints: int = ...
|
||||
"""
|
||||
The number of points on the curve used as a
|
||||
constraint. The default setting is 10. This parameter
|
||||
affects computation time, which increases by the cube of
|
||||
the number of points.
|
||||
"""
|
||||
|
||||
FirstParameter: Final[float] = ...
|
||||
"""
|
||||
This function returns the first parameter of the curve.
|
||||
The first parameter is the lowest parametric value for the curve, which defines the starting point of the curve.
|
||||
"""
|
||||
|
||||
LastParameter: Final[float] = ...
|
||||
"""
|
||||
This function returns the last parameter of the curve.
|
||||
The last parameter is the highest parametric value for the curve, which defines the ending point of the curve.
|
||||
"""
|
||||
|
||||
Length: Final[float] = ...
|
||||
"""
|
||||
This function returns the length of the curve.
|
||||
The length of the curve is a geometric property that indicates how long the curve is in the space.
|
||||
"""
|
||||
|
||||
def setOrder(self) -> None:
|
||||
"""
|
||||
Allows you to set the order of continuity required for the constraints: G0, G1, and G2, controlled
|
||||
respectively by G0Criterion G1Criterion and G2Criterion.
|
||||
"""
|
||||
...
|
||||
|
||||
def order(self) -> None:
|
||||
"""
|
||||
Returns the order of constraint, one of G0, G1 or G2
|
||||
"""
|
||||
...
|
||||
|
||||
def G0Criterion(self) -> None:
|
||||
"""
|
||||
Returns the G0 criterion at the parametric point U on the curve.
|
||||
This is the greatest distance allowed between the constraint and the target surface at U.
|
||||
"""
|
||||
...
|
||||
|
||||
def G1Criterion(self) -> None:
|
||||
"""
|
||||
Returns the G1 criterion at the parametric point U on the curve.
|
||||
This is the greatest angle allowed between the constraint and the target surface at U.
|
||||
Raises an exception if the curve is not on a surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def G2Criterion(self) -> None:
|
||||
"""
|
||||
Returns the G2 criterion at the parametric point U on the curve.
|
||||
This is the greatest difference in curvature allowed between the constraint and the target surface at U.
|
||||
Raises an exception if the curve is not on a surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def setG0Criterion(self) -> None:
|
||||
"""
|
||||
Allows you to set the G0 criterion. This is the law
|
||||
defining the greatest distance allowed between the
|
||||
constraint and the target surface for each point of the
|
||||
constraint. If this criterion is not set, TolDist, the
|
||||
distance tolerance from the constructor, is used.
|
||||
"""
|
||||
...
|
||||
|
||||
def setG1Criterion(self) -> None:
|
||||
"""
|
||||
Allows you to set the G1 criterion. This is the law
|
||||
defining the greatest angle allowed between the
|
||||
constraint and the target surface. If this criterion is not
|
||||
set, TolAng, the angular tolerance from the constructor, is used.
|
||||
Raises an exception if the curve is not on a surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def setG2Criterion(self) -> None:
|
||||
"""
|
||||
Allows you to set the G2 criterion. This is the law
|
||||
defining the greatest difference in curvature allowed
|
||||
between the constraint and the target surface. If this
|
||||
criterion is not set, TolCurv, the curvature tolerance from
|
||||
the constructor, is used.
|
||||
Raises ConstructionError if the point is not on the surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def curve3d(self) -> None:
|
||||
"""
|
||||
Returns a 3d curve associated the surface resulting of the constraints
|
||||
"""
|
||||
...
|
||||
|
||||
def setCurve2dOnSurf(self) -> None:
|
||||
"""
|
||||
Loads a 2d curve associated the surface resulting of the constraints
|
||||
"""
|
||||
...
|
||||
|
||||
def curve2dOnSurf(self) -> None:
|
||||
"""
|
||||
Returns a 2d curve associated the surface resulting of the constraints
|
||||
"""
|
||||
...
|
||||
|
||||
def setProjectedCurve(self) -> None:
|
||||
"""
|
||||
Loads a 2d curve resulting from the normal projection of
|
||||
the curve on the initial surface
|
||||
"""
|
||||
...
|
||||
|
||||
def projectedCurve(self) -> None:
|
||||
"""
|
||||
Returns the projected curve resulting from the normal projection of the
|
||||
curve on the initial surface
|
||||
"""
|
||||
...
|
||||
107
src/Mod/Part/App/GeomPlate/PointConstraint.pyi
Normal file
107
src/Mod/Part/App/GeomPlate/PointConstraint.pyi
Normal file
@@ -0,0 +1,107 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.GeomPlate.PointConstraintPy",
|
||||
Twin="GeomPlate_PointConstraint",
|
||||
TwinPointer="GeomPlate_PointConstraint",
|
||||
Include="GeomPlate_PointConstraint.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class PointConstraint(PyObjectBase):
|
||||
"""
|
||||
Defines points as constraints to be used to deform a surface
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def setOrder(self, order: str) -> None:
|
||||
"""
|
||||
Allows you to set the order of continuity required for
|
||||
the constraints: G0, G1, and G2, controlled
|
||||
respectively by G0Criterion G1Criterion and G2Criterion.
|
||||
"""
|
||||
...
|
||||
|
||||
def order(self) -> str:
|
||||
"""
|
||||
Returns the order of constraint, one of G0, G1 or G2
|
||||
"""
|
||||
...
|
||||
|
||||
def G0Criterion(self, U: float) -> float:
|
||||
"""
|
||||
Returns the G0 criterion at the parametric point U on
|
||||
the curve. This is the greatest distance allowed between
|
||||
the constraint and the target surface at U.
|
||||
"""
|
||||
...
|
||||
|
||||
def G1Criterion(self, U: float) -> float:
|
||||
"""
|
||||
Returns the G1 criterion at the parametric point U on
|
||||
the curve. This is the greatest angle allowed between
|
||||
the constraint and the target surface at U.
|
||||
Raises an exception if the curve is not on a surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def G2Criterion(self, U: float) -> float:
|
||||
"""
|
||||
Returns the G2 criterion at the parametric point U on
|
||||
the curve. This is the greatest difference in curvature
|
||||
allowed between the constraint and the target surface at U.
|
||||
Raises an exception if the curve is not on a surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def setG0Criterion(self, value: float) -> None:
|
||||
"""
|
||||
Allows you to set the G0 criterion. This is the law
|
||||
defining the greatest distance allowed between the
|
||||
constraint and the target surface for each point of the
|
||||
constraint. If this criterion is not set, TolDist, the
|
||||
distance tolerance from the constructor, is used.
|
||||
"""
|
||||
...
|
||||
|
||||
def setG1Criterion(self, value: float) -> None:
|
||||
"""
|
||||
Allows you to set the G1 criterion. This is the law
|
||||
defining the greatest angle allowed between the
|
||||
constraint and the target surface. If this criterion is not
|
||||
set, TolAng, the angular tolerance from the constructor, is used.
|
||||
Raises an exception if the curve is not on a surface
|
||||
"""
|
||||
...
|
||||
|
||||
def setG2Criterion(self, value: float) -> None:
|
||||
"""
|
||||
Allows you to set the G2 criterion. This is the law
|
||||
defining the greatest difference in curvature allowed between the
|
||||
constraint and the target surface. If this criterion is not
|
||||
set, TolCurv, the curvature tolerance from the constructor, is used.
|
||||
Raises ConstructionError if the curve is not on a surface
|
||||
"""
|
||||
...
|
||||
|
||||
def hasPnt2dOnSurf(self) -> bool:
|
||||
"""
|
||||
Checks if there is a 2D point associated with the surface. It returns a boolean indicating whether such a point exists.
|
||||
"""
|
||||
...
|
||||
|
||||
def setPnt2dOnSurf(self, p: "gp_Pnt2d") -> None:
|
||||
"""
|
||||
Allows you to set a 2D point on the surface. It takes a gp_Pnt2d as an argument, representing the 2D point to be associated with the surface.
|
||||
"""
|
||||
...
|
||||
|
||||
def pnt2dOnSurf(self) -> "gp_Pnt2d":
|
||||
"""
|
||||
Returns the 2D point on the surface. It returns a gp_Pnt2d representing the associated 2D point.
|
||||
"""
|
||||
...
|
||||
198
src/Mod/Part/App/HLRBRep/HLRBRep_Algo.pyi
Normal file
198
src/Mod/Part/App/HLRBRep/HLRBRep_Algo.pyi
Normal file
@@ -0,0 +1,198 @@
|
||||
from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Final
|
||||
|
||||
@export(
|
||||
Twin="HLRBRep_Algo",
|
||||
TwinPointer="HLRBRep_Algo",
|
||||
Include="HLRBRep_Algo.hxx",
|
||||
Constructor=True,
|
||||
)
|
||||
@class_declarations("""
|
||||
private:
|
||||
Handle(HLRBRep_Algo) hAlgo;
|
||||
|
||||
public:
|
||||
Handle(HLRBRep_Algo) handle() {
|
||||
return hAlgo;
|
||||
}
|
||||
""")
|
||||
class HLRBRep_Algo(PyObjectBase):
|
||||
"""
|
||||
Algo() -> HLRBRep_Algo
|
||||
|
||||
A framework to compute a shape as seen in a projection
|
||||
plane. This is done by calculating the visible and the hidden parts
|
||||
of the shape. HLRBRep_Algo works with three types of entity:
|
||||
|
||||
- shapes to be visualized
|
||||
- edges in these shapes (these edges are the basic entities which will be
|
||||
visualized or hidden), and
|
||||
- faces in these shapes which hide the edges.
|
||||
|
||||
HLRBRep_Algo is based on the principle of comparing each edge of the shape to
|
||||
be visualized with each of its faces, and calculating the visible and the
|
||||
hidden parts of each edge. For a given projection, HLRBRep_Algo calculates a
|
||||
set of lines characteristic of the object being represented. It is also used in
|
||||
conjunction with the HLRBRep_HLRToShape extraction utilities, which reconstruct
|
||||
a new, simplified shape from a selection of calculation results. This new shape
|
||||
is made up of edges, which represent the shape visualized in the
|
||||
projection. HLRBRep_Algo takes the shape itself into account whereas
|
||||
HLRBRep_PolyAlgo works with a polyhedral simplification of the shape. When you
|
||||
use HLRBRep_Algo, you obtain an exact result, whereas, when you use
|
||||
HLRBRep_PolyAlgo, you reduce computation time but obtain polygonal segments. In
|
||||
the case of complicated shapes, HLRBRep_Algo may be time-consuming. An
|
||||
HLRBRep_Algo object provides a framework for:
|
||||
|
||||
- defining the point of view
|
||||
- identifying the shape or shapes to be visualized
|
||||
- calculating the outlines
|
||||
- calculating the visible and hidden lines of the shape. Warning
|
||||
- Superimposed lines are not eliminated by this algorithm.
|
||||
- There must be no unfinished objects inside the shape you wish to visualize.
|
||||
- Points are not treated.
|
||||
- Note that this is not the sort of algorithm used in generating shading, which
|
||||
calculates the visible and hidden parts of each face in a shape to be
|
||||
visualized by comparing each face in the shape with every other face in the
|
||||
same shape.
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def add(self, S, nbIso: int = 0) -> None:
|
||||
"""
|
||||
add(S, nbIso=0)
|
||||
|
||||
Adds the shape S to this framework, and specifies the number of isoparameters
|
||||
nbiso desired in visualizing S. You may add as many shapes as you wish. Use
|
||||
the function add once for each shape.
|
||||
"""
|
||||
...
|
||||
|
||||
def remove(self, i: int) -> None:
|
||||
"""
|
||||
remove(i)
|
||||
|
||||
Remove the shape of index i from this framework.
|
||||
"""
|
||||
...
|
||||
|
||||
def index(self, S) -> int:
|
||||
"""
|
||||
index(S) -> int
|
||||
|
||||
Return the index of the Shape S and return 0 if the Shape S is not found.
|
||||
"""
|
||||
...
|
||||
|
||||
def outLinedShapeNullify(self) -> None:
|
||||
"""
|
||||
outlinedShapeNullify()
|
||||
|
||||
Nullify all the results of OutLiner from HLRTopoBRep.
|
||||
"""
|
||||
...
|
||||
|
||||
def setProjector(
|
||||
self,
|
||||
*,
|
||||
Origin: tuple[float, float, float] = (0, 0, 0),
|
||||
ZDir: tuple[float, float, float] = (0, 0, 0),
|
||||
XDir: tuple[float, float, float] = (0, 0, 0),
|
||||
focus: float = float("nan"),
|
||||
) -> None:
|
||||
"""
|
||||
setProjector(Origin=(0, 0, 0), ZDir=(0,0,0), XDir=(0,0,0), focus=NaN)
|
||||
|
||||
Set the projector. With focus left to NaN, an axonometric projector is
|
||||
created. Otherwise, a perspective projector is created with focus focus.
|
||||
"""
|
||||
...
|
||||
|
||||
def nbShapes(self) -> int:
|
||||
"""
|
||||
nbShapes()
|
||||
|
||||
Returns the number of shapes in the collection. It does not modify the
|
||||
object's state and is used to retrieve the count of shapes.
|
||||
"""
|
||||
...
|
||||
|
||||
def showAll(self, i: int = -1) -> None:
|
||||
"""
|
||||
showAll(i=-1)
|
||||
|
||||
If i < 1, then set all the edges to visible.
|
||||
Otherwise, set to visible all the edges of the shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def hide(self, i: int = -1, j: int = -1) -> None:
|
||||
"""
|
||||
hide(i=-1, j=-1)
|
||||
|
||||
If i < 1, hide all of the datastructure.
|
||||
Otherwise, if j < 1, hide the shape of index i.
|
||||
Otherwise, hide the shape of index i by the shape of index j.
|
||||
"""
|
||||
...
|
||||
|
||||
def hideAll(self, i: int = -1) -> None:
|
||||
"""
|
||||
hideAll(i=-1)
|
||||
|
||||
If i < 1, hide all the edges.
|
||||
Otherwise, hide all the edges of shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def partialHide(self) -> None:
|
||||
"""
|
||||
partialHide()
|
||||
|
||||
Own hiding of all the shapes of the DataStructure without hiding by each other.
|
||||
"""
|
||||
...
|
||||
|
||||
def select(self, i: int = -1) -> None:
|
||||
"""
|
||||
select(i=-1)
|
||||
|
||||
If i < 1, select all the DataStructure.
|
||||
Otherwise, only select the shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def selectEdge(self, i: int) -> None:
|
||||
"""
|
||||
selectEdge(i)
|
||||
|
||||
Select only the edges of the shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def selectFace(self, i: int) -> None:
|
||||
"""
|
||||
selectFace(i)
|
||||
|
||||
Select only the faces of the shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def initEdgeStatus(self) -> None:
|
||||
"""
|
||||
initEdgeStatus()
|
||||
|
||||
Init the status of the selected edges depending of the back faces of a closed
|
||||
shell.
|
||||
"""
|
||||
...
|
||||
|
||||
def update(self) -> None:
|
||||
"""
|
||||
update()
|
||||
|
||||
Update the DataStructure.
|
||||
"""
|
||||
...
|
||||
172
src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgo.pyi
Normal file
172
src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgo.pyi
Normal file
@@ -0,0 +1,172 @@
|
||||
from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Part.TopoShapePy import TopoShape
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.HLRBRep_PolyAlgo",
|
||||
Twin="HLRBRep_PolyAlgo",
|
||||
TwinPointer="HLRBRep_PolyAlgo",
|
||||
Include="HLRBRep_PolyAlgo.hxx",
|
||||
Constructor=True,
|
||||
)
|
||||
@class_declarations("""
|
||||
private:
|
||||
Handle(HLRBRep_PolyAlgo) hAlgo;
|
||||
|
||||
public:
|
||||
Handle(HLRBRep_PolyAlgo) handle() {
|
||||
return hAlgo;
|
||||
}
|
||||
""")
|
||||
class HLRBRep_PolyAlgo(PyObjectBase):
|
||||
"""
|
||||
PolyAlgo() -> HLRBRep_PolyAlgo
|
||||
|
||||
A framework to compute the shape as seen in a projection
|
||||
plane. This is done by calculating the visible and the hidden parts of the
|
||||
shape. HLRBRep_PolyAlgo works with three types of entity:
|
||||
|
||||
- shapes to be visualized (these shapes must have already been triangulated.)
|
||||
- edges in these shapes (these edges are defined as polygonal lines on the
|
||||
triangulation of the shape, and are the basic entities which will be visualized
|
||||
or hidden), and
|
||||
- triangles in these shapes which hide the edges.
|
||||
|
||||
HLRBRep_PolyAlgo is based on the principle of comparing each edge of the shape
|
||||
to be visualized with each of the triangles produced by the triangulation of
|
||||
the shape, and calculating the visible and the hidden parts of each edge. For a
|
||||
given projection, HLRBRep_PolyAlgo calculates a set of lines characteristic of
|
||||
the object being represented. It is also used in conjunction with the
|
||||
HLRBRep_PolyHLRToShape extraction utilities, which reconstruct a new,
|
||||
simplified shape from a selection of calculation results. This new shape is
|
||||
made up of edges, which represent the shape visualized in the
|
||||
projection. HLRBRep_PolyAlgo works with a polyhedral simplification of the
|
||||
shape whereas HLRBRep_Algo takes the shape itself into account. When you use
|
||||
HLRBRep_Algo, you obtain an exact result, whereas, when you use
|
||||
HLRBRep_PolyAlgo, you reduce computation time but obtain polygonal segments. An
|
||||
HLRBRep_PolyAlgo object provides a framework for:
|
||||
|
||||
- defining the point of view
|
||||
- identifying the shape or shapes to be visualized
|
||||
- calculating the outlines
|
||||
- calculating the visible and hidden lines of the shape. Warning
|
||||
- Superimposed lines are not eliminated by this algorithm.
|
||||
- There must be no unfinished objects inside the shape you wish to visualize.
|
||||
- Points are not treated.
|
||||
- Note that this is not the sort of algorithm used in generating shading, which
|
||||
calculates the visible and hidden parts of each face in a shape to be
|
||||
visualized by comparing each face in the shape with every other face in the
|
||||
same shape.
|
||||
"""
|
||||
|
||||
def load(self, S: TopoShape) -> None:
|
||||
"""
|
||||
load(S)
|
||||
|
||||
Loads the shape S into this framework. Warning S must have already been triangulated.
|
||||
"""
|
||||
...
|
||||
|
||||
def remove(self, i: int) -> None:
|
||||
"""
|
||||
remove(i)
|
||||
|
||||
Remove the shape of index i from this framework.
|
||||
"""
|
||||
...
|
||||
|
||||
def nbShapes(self) -> int:
|
||||
"""
|
||||
nbShapes()
|
||||
|
||||
Returns the number of shapes in the collection. It does not modify the
|
||||
object's state and is used to retrieve the count of shapes.
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self, i: int) -> TopoShape:
|
||||
"""
|
||||
shape(i) -> TopoShape
|
||||
|
||||
Return the shape of index i.
|
||||
"""
|
||||
...
|
||||
|
||||
def index(self, S: TopoShape) -> int:
|
||||
"""
|
||||
index(S) -> int
|
||||
|
||||
Return the index of the Shape S.
|
||||
"""
|
||||
...
|
||||
|
||||
def setProjector(self, *, Origin: tuple[float, float, float] = (0.0, 0.0, 0.0),
|
||||
ZDir: tuple[float, float, float] = (0.0, 0.0, 0.0),
|
||||
XDir: tuple[float, float, float] = (0.0, 0.0, 0.0),
|
||||
focus: float = float("nan")) -> None:
|
||||
"""
|
||||
setProjector(Origin=(0, 0, 0), ZDir=(0,0,0), XDir=(0,0,0), focus=NaN)
|
||||
|
||||
Set the projector. With focus left to NaN, an axonometric projector is
|
||||
created. Otherwise, a perspective projector is created with focus focus.
|
||||
"""
|
||||
...
|
||||
|
||||
def update(self) -> None:
|
||||
"""
|
||||
update()
|
||||
|
||||
Launches calculation of outlines of the shape visualized by this
|
||||
framework. Used after setting the point of view and defining the shape or
|
||||
shapes to be visualized.
|
||||
"""
|
||||
...
|
||||
|
||||
def initHide(self) -> None:
|
||||
"""
|
||||
initHide()
|
||||
"""
|
||||
...
|
||||
|
||||
def moreHide(self) -> None:
|
||||
"""
|
||||
moreHide()
|
||||
"""
|
||||
...
|
||||
|
||||
def nextHide(self) -> None:
|
||||
"""
|
||||
nextHide()
|
||||
"""
|
||||
...
|
||||
|
||||
def initShow(self) -> None:
|
||||
"""
|
||||
initShow()
|
||||
"""
|
||||
...
|
||||
|
||||
def moreShow(self) -> None:
|
||||
"""
|
||||
moreShow()
|
||||
"""
|
||||
...
|
||||
|
||||
def nextShow(self) -> None:
|
||||
"""
|
||||
nextShow()
|
||||
"""
|
||||
...
|
||||
|
||||
def outLinedShape(self, S: TopoShape) -> TopoShape:
|
||||
"""
|
||||
outLinedShape(S) -> TopoShape
|
||||
|
||||
Make a shape with the internal outlines in each face of shape S.
|
||||
"""
|
||||
...
|
||||
|
||||
TolAngular: float = ...
|
||||
|
||||
TolCoef: float = ...
|
||||
151
src/Mod/Part/App/HLRBRep/HLRToShape.pyi
Normal file
151
src/Mod/Part/App/HLRBRep/HLRToShape.pyi
Normal file
@@ -0,0 +1,151 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.TopoShapePy import TopoShape
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Optional, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.HLRToShapePy",
|
||||
Twin="HLRBRep_HLRToShape",
|
||||
TwinPointer="HLRBRep_HLRToShape",
|
||||
Include="HLRBRep_HLRToShape.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class HLRToShape(PyObjectBase):
|
||||
"""
|
||||
HLRToShape(algo: HLRBRep_Algo) -> HLRBRep_HLRToShape
|
||||
|
||||
A framework for filtering the computation results of an HLRBRep_Algo algorithm
|
||||
by extraction. From the results calculated by the algorithm on a shape, a
|
||||
filter returns the type of edge you want to identify. You can choose any of the
|
||||
following types of output:
|
||||
- visible sharp edges
|
||||
- hidden sharp edges
|
||||
- visible smooth edges
|
||||
- hidden smooth edges
|
||||
- visible sewn edges
|
||||
- hidden sewn edges
|
||||
- visible outline edges
|
||||
- hidden outline edges
|
||||
- visible isoparameters and
|
||||
- hidden isoparameters.
|
||||
|
||||
Sharp edges present a C0 continuity (non G1). Smooth edges present a G1
|
||||
continuity (non G2). Sewn edges present a C2 continuity. The result is composed
|
||||
of 2D edges in the projection plane of the view which the algorithm has worked
|
||||
with. These 2D edges are not included in the data structure of the visualized
|
||||
shape. In order to obtain a complete image, you must combine the shapes given
|
||||
by each of the chosen filters. The construction of the shape does not call a
|
||||
new computation of the algorithm, but only reads its internal results. The
|
||||
methods of this shape are almost identic to those of the HLRBrep_PolyHLRToShape
|
||||
class.
|
||||
"""
|
||||
|
||||
def vCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
vCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible sharp edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
Rg1LineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible smooth edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
RgNLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible sewn edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def outLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
outLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible outline edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def outLineVCompound3d(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
outLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible outline edges in 3D for either shape
|
||||
Shape or for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def isoLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
isoLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible isoparameters for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def hCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
hCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden sharp edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
Rg1LineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden smooth edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
RgNLineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden sewn edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def outLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
outLineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden outline edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def isoLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
isoLineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden isoparameters for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def compoundOfEdges(self, Type: int, Visible: bool, In3D: bool, *, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
compoundOfEdges(Type: int, Visible: bool, In3D: bool, Shape=None) -> TopoShape
|
||||
|
||||
Returns compound of resulting edges of required type and visibility, taking
|
||||
into account the kind of space (2d or 3d). If Shape=None, return it for all
|
||||
added shapes, otherwise return it for shape Shape.
|
||||
"""
|
||||
...
|
||||
131
src/Mod/Part/App/HLRBRep/PolyHLRToShape.pyi
Normal file
131
src/Mod/Part/App/HLRBRep/PolyHLRToShape.pyi
Normal file
@@ -0,0 +1,131 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Part.HLRBRep_PolyAlgo import HLRBRep_PolyAlgo
|
||||
from Part.TopoShapePy import TopoShape
|
||||
from typing import Optional, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.PolyHLRToShapePy",
|
||||
Twin="HLRBRep_PolyHLRToShape",
|
||||
TwinPointer="HLRBRep_PolyHLRToShape",
|
||||
Include="HLRBRep_PolyHLRToShape.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class PolyHLRToShape(PyObjectBase):
|
||||
"""
|
||||
PolyHLRToShape(algo: HLRBRep_PolyAlgo) -> HLRBRep_PolyHLRToShape
|
||||
|
||||
A framework for filtering the computation results of an HLRBRep_PolyAlgo
|
||||
algorithm by extraction. From the results calculated by the algorithm on a
|
||||
shape, a filter returns the type of edge you want to identify. You can choose
|
||||
any of the following types of output:
|
||||
- visible sharp edges
|
||||
- hidden sharp edges
|
||||
- visible smooth edges
|
||||
- hidden smooth edges
|
||||
- visible sewn edges
|
||||
- hidden sewn edges
|
||||
- visible outline edges
|
||||
- hidden outline edges
|
||||
- visible isoparameters and
|
||||
- hidden isoparameters.
|
||||
|
||||
Sharp edges present a C0 continuity (non G1). Smooth edges present a G1
|
||||
continuity (non G2). Sewn edges present a C2 continuity. The result is composed
|
||||
of 2D edges in the projection plane of the view which the algorithm has worked
|
||||
with. These 2D edges are not included in the data structure of the visualized
|
||||
shape. In order to obtain a complete image, you must combine the shapes given
|
||||
by each of the chosen filters. The construction of the shape does not call a
|
||||
new computation of the algorithm, but only reads its internal results.
|
||||
"""
|
||||
|
||||
def update(self, algo: HLRBRep_PolyAlgo) -> None:
|
||||
"""
|
||||
update(algo: HLRBRep_PolyAlgo)
|
||||
"""
|
||||
...
|
||||
|
||||
def show(self) -> None:
|
||||
"""
|
||||
show()
|
||||
"""
|
||||
...
|
||||
|
||||
def hide(self) -> None:
|
||||
"""
|
||||
hide()
|
||||
"""
|
||||
...
|
||||
|
||||
def vCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
vCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible sharp edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
Rg1LineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible smooth edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
RgNLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible sewn edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def outLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
outLineVCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for visible outline edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def hCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
hCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden sharp edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
Rg1LineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden smooth edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
RgNLineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden sewn edges for either shape Shape or for
|
||||
all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
|
||||
def outLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
|
||||
"""
|
||||
outLineHCompound(Shape=None) -> TopoShape
|
||||
|
||||
Sets the extraction filter for hidden outline edges for either shape Shape or
|
||||
for all added shapes (Shape=None).
|
||||
"""
|
||||
...
|
||||
149
src/Mod/Part/App/ShapeFix/ShapeFix_Edge.pyi
Normal file
149
src/Mod/Part/App/ShapeFix/ShapeFix_Edge.pyi
Normal file
@@ -0,0 +1,149 @@
|
||||
from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Final
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Edge",
|
||||
Include="ShapeFix_Edge.hxx",
|
||||
Constructor=True,
|
||||
)
|
||||
@class_declarations("""
|
||||
private:
|
||||
Handle(ShapeFix_Edge) hEdge;
|
||||
|
||||
public:
|
||||
void setHandle(Handle(ShapeFix_Edge) handle) {
|
||||
setTwinPointer(handle.get());
|
||||
hEdge = handle;
|
||||
}
|
||||
""")
|
||||
class ShapeFix_Edge(PyObjectBase):
|
||||
"""
|
||||
Fixing invalid edge
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def fixRemovePCurve(self) -> bool:
|
||||
"""
|
||||
Removes the pcurve(s) of the edge if it does not match the
|
||||
vertices
|
||||
Check is done
|
||||
Use : It is to be called when pcurve of an edge can be wrong
|
||||
(e.g., after import from IGES)
|
||||
Returns: True, if does not match, removed (status DONE)
|
||||
False, (status OK) if matches or (status FAIL) if no pcurve,
|
||||
nothing done.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixRemoveCurve3d(self) -> bool:
|
||||
"""
|
||||
Removes 3d curve of the edge if it does not match the vertices
|
||||
Returns: True, if does not match, removed (status DONE)
|
||||
False, (status OK) if matches or (status FAIL) if no 3d curve,
|
||||
nothing done.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixAddPCurve(self) -> bool:
|
||||
"""
|
||||
Adds pcurve(s) of the edge if missing (by projecting 3d curve)
|
||||
Parameter isSeam indicates if the edge is a seam.
|
||||
The parameter 'prec' defines the precision for calculations.
|
||||
If it is 0 (default), the tolerance of the edge is taken.
|
||||
Remark : This method is rather for internal use since it accepts parameter
|
||||
'surfana' for optimization of computations
|
||||
Use : It is to be called after FixRemovePCurve (if removed) or in any
|
||||
case when edge can have no pcurve
|
||||
Returns: True if pcurve was added, else False
|
||||
Status :
|
||||
OK : Pcurve exists
|
||||
FAIL1: No 3d curve
|
||||
FAIL2: fail during projecting
|
||||
DONE1: Pcurve was added
|
||||
DONE2: specific case of pcurve going through degenerated point on
|
||||
sphere encountered during projection (see class
|
||||
ShapeConstruct_ProjectCurveOnSurface for more info).
|
||||
"""
|
||||
...
|
||||
|
||||
def fixAddCurve3d(self) -> bool:
|
||||
"""
|
||||
Tries to build 3d curve of the edge if missing
|
||||
Use : It is to be called after FixRemoveCurve3d (if removed) or in any
|
||||
case when edge can have no 3d curve
|
||||
Returns: True if 3d curve was added, else False
|
||||
Status :
|
||||
OK : 3d curve exists
|
||||
FAIL1: BRepLib::BuildCurve3d() has failed
|
||||
DONE1: 3d curve was added.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixVertexTolerance(self) -> bool:
|
||||
"""
|
||||
Increases the tolerances of the edge vertices to comprise
|
||||
the ends of 3d curve and pcurve on the given face
|
||||
(first method) or all pcurves stored in an edge (second one)
|
||||
Returns: True, if tolerances have been increased, otherwise False
|
||||
Status:
|
||||
OK : the original tolerances have not been changed
|
||||
DONE1: the tolerance of first vertex has been increased
|
||||
DONE2: the tolerance of last vertex has been increased.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixReversed2d(self) -> bool:
|
||||
"""
|
||||
Fixes edge if pcurve is directed opposite to 3d curve
|
||||
Check is done by call to the function
|
||||
ShapeAnalysis_Edge::CheckCurve3dWithPCurve()
|
||||
Warning: For seam edge this method will check and fix the pcurve in only
|
||||
one direction. Hence, it should be called twice for seam edge:
|
||||
once with edge orientation FORWARD and once with REVERSED.
|
||||
Returns: False if nothing done, True if reversed (status DONE)
|
||||
Status: OK - pcurve OK, nothing done
|
||||
FAIL1 - no pcurve
|
||||
FAIL2 - no 3d curve
|
||||
DONE1 - pcurve was reversed.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSameParameter(self) -> bool:
|
||||
"""
|
||||
Tries to make edge SameParameter and sets corresponding
|
||||
tolerance and SameParameter flag.
|
||||
First, it makes edge same range if SameRange flag is not set.
|
||||
If flag SameParameter is set, this method calls the
|
||||
function ShapeAnalysis_Edge::CheckSameParameter() that
|
||||
calculates the maximal deviation of pcurves of the edge from
|
||||
its 3d curve. If deviation > tolerance, the tolerance of edge
|
||||
is increased to a value of deviation. If deviation < tolerance
|
||||
nothing happens.
|
||||
|
||||
If flag SameParameter is not set, this method chooses the best
|
||||
variant (one that has minimal tolerance), either
|
||||
a. only after computing deviation (as above) or
|
||||
b. after calling standard procedure BRepLib::SameParameter
|
||||
and computing deviation (as above). If 'tolerance' > 0, it is
|
||||
used as parameter for BRepLib::SameParameter, otherwise,
|
||||
tolerance of the edge is used.
|
||||
|
||||
Use : Is to be called after all pcurves and 3d curve of the edge are
|
||||
correctly computed
|
||||
Remark : SameParameter flag is always set to True after this method
|
||||
Returns: True, if something done, else False
|
||||
Status : OK - edge was initially SameParameter, nothing is done
|
||||
FAIL1 - computation of deviation of pcurves from 3d curve has failed
|
||||
FAIL2 - BRepLib::SameParameter() has failed
|
||||
DONE1 - tolerance of the edge was increased
|
||||
DONE2 - flag SameParameter was set to True (only if
|
||||
BRepLib::SameParameter() did not set it)
|
||||
DONE3 - edge was modified by BRepLib::SameParameter() to SameParameter
|
||||
DONE4 - not used anymore
|
||||
DONE5 - if the edge resulting from BRepLib has been chosen, i.e. variant b. above
|
||||
(only for edges with not set SameParameter).
|
||||
"""
|
||||
...
|
||||
49
src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnect.pyi
Normal file
49
src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnect.pyi
Normal file
@@ -0,0 +1,49 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Part.App.TopoShapeEdge import TopoShapeEdge
|
||||
from Part.App.TopoShape import TopoShape
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.EdgeConnect",
|
||||
Include="ShapeFix_EdgeConnect.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_EdgeConnect(PyObjectBase):
|
||||
"""
|
||||
Root class for fixing operations
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
@overload
|
||||
def add(self, edge1: TopoShapeEdge, edge2: TopoShapeEdge) -> None: ...
|
||||
|
||||
@overload
|
||||
def add(self, shape: TopoShape) -> None: ...
|
||||
|
||||
def add(self, *args, **kwargs) -> None:
|
||||
"""
|
||||
add(edge, edge)
|
||||
Adds information on connectivity between start vertex
|
||||
of second edge and end vertex of first edge taking
|
||||
edges orientation into account
|
||||
|
||||
add(shape)
|
||||
Adds connectivity information for the whole shape.
|
||||
"""
|
||||
...
|
||||
|
||||
def build(self) -> None:
|
||||
"""
|
||||
Builds shared vertices, updates their positions and tolerances
|
||||
"""
|
||||
...
|
||||
|
||||
def clear(self) -> None:
|
||||
"""
|
||||
Clears internal data structure
|
||||
"""
|
||||
...
|
||||
174
src/Mod/Part/App/ShapeFix/ShapeFix_Face.pyi
Normal file
174
src/Mod/Part/App/ShapeFix/ShapeFix_Face.pyi
Normal file
@@ -0,0 +1,174 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.ShapeFix_Root import ShapeFix_Root
|
||||
from Part.TopoShapeFace import TopoShapeFace
|
||||
from Part.TopoShapeShell import TopoShapeShell
|
||||
from typing import Final, Union, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Face",
|
||||
Include="ShapeFix_Face.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Face(ShapeFix_Root):
|
||||
"""
|
||||
Class for fixing operations on faces
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
FixWireMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Wire"""
|
||||
|
||||
FixOrientationMode: bool = ...
|
||||
"""
|
||||
Mode for applying fixes of orientation
|
||||
If True, wires oriented to border limited square
|
||||
"""
|
||||
|
||||
FixAddNaturalBoundMode: bool = ...
|
||||
"""
|
||||
If true, natural boundary is added on faces that miss them.
|
||||
Default is False for faces with single wire (they are
|
||||
handled by FixOrientation in that case) and True for others.
|
||||
"""
|
||||
|
||||
FixMissingSeamMode: bool = ...
|
||||
"""If True, tries to insert seam if missing"""
|
||||
|
||||
FixSmallAreaWireMode: bool = ...
|
||||
"""If True, drops small wires"""
|
||||
|
||||
RemoveSmallAreaFaceMode: bool = ...
|
||||
"""If True, drops small wires"""
|
||||
|
||||
FixIntersectingWiresMode: bool = ...
|
||||
"""Mode for applying fixes of intersecting wires"""
|
||||
|
||||
FixLoopWiresMode: bool = ...
|
||||
"""Mode for applying fixes of loop wires"""
|
||||
|
||||
FixSplitFaceMode: bool = ...
|
||||
"""Mode for applying fixes of split face"""
|
||||
|
||||
AutoCorrectPrecisionMode: bool = ...
|
||||
"""Mode for applying auto-corrected precision"""
|
||||
|
||||
FixPeriodicDegeneratedMode: bool = ...
|
||||
"""Mode for applying periodic degeneration"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by face
|
||||
"""
|
||||
...
|
||||
|
||||
def fixWireTool(self):
|
||||
"""
|
||||
Returns tool for fixing wires
|
||||
"""
|
||||
...
|
||||
|
||||
def clearModes(self) -> None:
|
||||
"""
|
||||
Sets all modes to default
|
||||
"""
|
||||
...
|
||||
|
||||
def add(self) -> None:
|
||||
"""
|
||||
Add a wire to current face using BRep_Builder.
|
||||
Wire is added without taking into account orientation of face
|
||||
(as if face were FORWARD)
|
||||
"""
|
||||
...
|
||||
|
||||
def fixOrientation(self) -> bool:
|
||||
"""
|
||||
Fixes orientation of wires on the face
|
||||
It tries to make all wires lie outside all others (according
|
||||
to orientation) by reversing orientation of some of them.
|
||||
If face lying on sphere or torus has single wire and
|
||||
AddNaturalBoundMode is True, that wire is not reversed in
|
||||
any case (supposing that natural bound will be added).
|
||||
Returns True if wires were reversed
|
||||
"""
|
||||
...
|
||||
|
||||
def fixAddNaturalBound(self) -> bool:
|
||||
"""
|
||||
Adds natural boundary on face if it is missing.
|
||||
Two cases are supported:
|
||||
- face has no wires
|
||||
- face lies on geometrically double-closed surface
|
||||
(sphere or torus) and none of wires is left-oriented
|
||||
Returns True if natural boundary was added
|
||||
"""
|
||||
...
|
||||
|
||||
def fixMissingSeam(self) -> bool:
|
||||
"""
|
||||
Detects and fixes the special case when face on a closed
|
||||
surface is given by two wires closed in 3d but with gap in 2d.
|
||||
In that case it creates a new wire from the two, and adds a
|
||||
missing seam edge
|
||||
Returns True if missing seam was added
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSmallAreaWire(self) -> bool:
|
||||
"""
|
||||
Detects wires with small area (that is less than
|
||||
100*Precision.PConfusion(). Removes these wires if they are internal.
|
||||
Returns True if at least one small wire removed, False nothing is done.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixLoopWire(self) -> None:
|
||||
"""
|
||||
Detects if wire has a loop and fixes this situation by splitting on the few parts.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixIntersectingWires(self) -> None:
|
||||
"""
|
||||
Detects and fixes the special case when face has more than one wire
|
||||
and this wires have intersection point
|
||||
"""
|
||||
...
|
||||
|
||||
def fixWiresTwoCoincidentEdges(self) -> None:
|
||||
"""
|
||||
If wire contains two coincidence edges it must be removed
|
||||
"""
|
||||
...
|
||||
|
||||
def fixPeriodicDegenerated(self) -> None:
|
||||
"""
|
||||
Fixes topology for a specific case when face is composed
|
||||
by a single wire belting a periodic surface. In that case
|
||||
a degenerated edge is reconstructed in the degenerated pole
|
||||
of the surface. Initial wire gets consistent orientation.
|
||||
Must be used in couple and before FixMissingSeam routine
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on subshapes and performs fixes
|
||||
"""
|
||||
...
|
||||
|
||||
def face(self) -> TopoShapeFace:
|
||||
"""
|
||||
Returns a face which corresponds to the current state
|
||||
"""
|
||||
...
|
||||
|
||||
def result(self) -> Union[TopoShapeFace, TopoShapeShell]:
|
||||
"""
|
||||
Returns resulting shape (Face or Shell if split)
|
||||
To be used instead of face() if FixMissingSeam involved
|
||||
"""
|
||||
...
|
||||
35
src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnect.pyi
Normal file
35
src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnect.pyi
Normal file
@@ -0,0 +1,35 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.FaceConnect",
|
||||
Include="ShapeFix_FaceConnect.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_FaceConnect(PyObjectBase):
|
||||
"""
|
||||
Rebuilds connectivity between faces in shell
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def add(self, face) -> None:
|
||||
"""
|
||||
add(face, face)
|
||||
"""
|
||||
...
|
||||
|
||||
def build(self, shell, sewtolerance, fixtolerance) -> None:
|
||||
"""
|
||||
build(shell, sewtolerance, fixtolerance)
|
||||
"""
|
||||
...
|
||||
|
||||
def clear(self) -> None:
|
||||
"""
|
||||
Clears internal data structure
|
||||
"""
|
||||
...
|
||||
86
src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFace.pyi
Normal file
86
src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFace.pyi
Normal file
@@ -0,0 +1,86 @@
|
||||
from Base.Metadata import export
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from Part.App.TopoShape import TopoShape
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.FixSmallFace",
|
||||
Include="ShapeFix_FixSmallFace.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True
|
||||
)
|
||||
class ShapeFix_FixSmallFace(ShapeFix_Root):
|
||||
"""
|
||||
Class for fixing operations on faces
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by shape
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Fixing case of spot face
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSpotFace(self) -> None:
|
||||
"""
|
||||
Fixing case of spot face, if tol = -1 used local tolerance
|
||||
"""
|
||||
...
|
||||
|
||||
def replaceVerticesInCaseOfSpot(self) -> None:
|
||||
"""
|
||||
Compute average vertex and replacing vertices by new one
|
||||
"""
|
||||
...
|
||||
|
||||
def removeFacesInCaseOfSpot(self) -> None:
|
||||
"""
|
||||
Remove spot face from compound
|
||||
"""
|
||||
...
|
||||
|
||||
def fixStripFace(self) -> None:
|
||||
"""
|
||||
Fixing case of strip face, if tol = -1 used local tolerance
|
||||
"""
|
||||
...
|
||||
|
||||
def removeFacesInCaseOfStrip(self) -> None:
|
||||
"""
|
||||
Remove strip face from compound
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSplitFace(self) -> TopoShape:
|
||||
"""
|
||||
Fixes cases related to split faces within the given shape.
|
||||
It may return a modified shape after fixing the issues.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixFace(self) -> None:
|
||||
"""
|
||||
Fixes issues related to the specified face and returns the modified face.
|
||||
"""
|
||||
...
|
||||
|
||||
def fixShape(self) -> None:
|
||||
"""
|
||||
Fixes issues in the overall geometric shape.
|
||||
This function likely encapsulates higher-level fixes that involve multiple faces or elements.
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> TopoShape:
|
||||
"""
|
||||
Returns the current state of the geometric shape after potential modifications.
|
||||
"""
|
||||
...
|
||||
50
src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolid.pyi
Normal file
50
src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolid.pyi
Normal file
@@ -0,0 +1,50 @@
|
||||
from Base.Metadata import export
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.FixSmallSolid",
|
||||
Include="ShapeFix_FixSmallSolid.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_FixSmallSolid(ShapeFix_Root):
|
||||
"""
|
||||
Fixing solids with small size
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def setFixMode(self, theMode: int) -> None:
|
||||
"""
|
||||
Set working mode for operator:
|
||||
- theMode = 0 use both WidthFactorThreshold and VolumeThreshold parameters
|
||||
- theMode = 1 use only WidthFactorThreshold parameter
|
||||
- theMode = 2 use only VolumeThreshold parameter
|
||||
"""
|
||||
...
|
||||
|
||||
def setVolumeThreshold(self) -> None:
|
||||
"""
|
||||
Set or clear volume threshold for small solids
|
||||
"""
|
||||
...
|
||||
|
||||
def setWidthFactorThreshold(self) -> None:
|
||||
"""
|
||||
Set or clear width factor threshold for small solids
|
||||
"""
|
||||
...
|
||||
|
||||
def remove(self) -> None:
|
||||
"""
|
||||
Remove small solids from the given shape
|
||||
"""
|
||||
...
|
||||
|
||||
def merge(self) -> None:
|
||||
"""
|
||||
Merge small solids in the given shape to adjacent non-small ones
|
||||
"""
|
||||
...
|
||||
36
src/Mod/Part/App/ShapeFix/ShapeFix_FreeBounds.pyi
Normal file
36
src/Mod/Part/App/ShapeFix/ShapeFix_FreeBounds.pyi
Normal file
@@ -0,0 +1,36 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Part.App.TopoShapeCompound import TopoShapeCompound
|
||||
from Part.App.TopoShape import TopoShape
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.FreeBounds",
|
||||
Include="ShapeFix_FreeBounds.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_FreeBounds(PyObjectBase):
|
||||
"""
|
||||
This class is intended to output free bounds of the shape
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def closedWires(self) -> TopoShapeCompound:
|
||||
"""
|
||||
Returns compound of closed wires out of free edges
|
||||
"""
|
||||
...
|
||||
|
||||
def openWires(self) -> TopoShapeCompound:
|
||||
"""
|
||||
Returns compound of open wires out of free edges
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> TopoShape:
|
||||
"""
|
||||
Returns modified source shape
|
||||
"""
|
||||
...
|
||||
42
src/Mod/Part/App/ShapeFix/ShapeFix_Root.pyi
Normal file
42
src/Mod/Part/App/ShapeFix/ShapeFix_Root.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Root",
|
||||
Include="ShapeFix_Root.hxx",
|
||||
Constructor=True,
|
||||
)
|
||||
@class_declarations("""
|
||||
private:
|
||||
Handle(ShapeFix_Root) hRoot;
|
||||
|
||||
public:
|
||||
void setHandle(Handle(ShapeFix_Root) handle) {
|
||||
setTwinPointer(handle.get());
|
||||
hRoot = handle;
|
||||
}
|
||||
""")
|
||||
class ShapeFix_Root(PyObjectBase):
|
||||
"""
|
||||
Root class for fixing operations
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
Precision: float = ...
|
||||
"""Basic precision value"""
|
||||
|
||||
MinTolerance: float = ...
|
||||
"""Minimal allowed tolerance"""
|
||||
|
||||
MaxTolerance: float = ...
|
||||
"""Maximal allowed tolerance"""
|
||||
|
||||
@constmethod
|
||||
def limitTolerance(self) -> float:
|
||||
"""
|
||||
Returns tolerance limited by [MinTolerance,MaxTolerance]
|
||||
"""
|
||||
...
|
||||
88
src/Mod/Part/App/ShapeFix/ShapeFix_Shape.pyi
Normal file
88
src/Mod/Part/App/ShapeFix/ShapeFix_Shape.pyi
Normal file
@@ -0,0 +1,88 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from Part.TopoShape import TopoShape
|
||||
from typing import Final, overload
|
||||
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Shape",
|
||||
Include="ShapeFix_Shape.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Shape(ShapeFix_Root):
|
||||
"""
|
||||
Class for fixing operations on shapes
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
FixSolidMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Solid"""
|
||||
|
||||
FixFreeShellMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Shell"""
|
||||
|
||||
FixFreeFaceMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Face"""
|
||||
|
||||
FixFreeWireMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Wire"""
|
||||
|
||||
FixSameParameterMode: bool = ...
|
||||
"""Mode for applying ShapeFix::SameParameter after all fixes"""
|
||||
|
||||
FixVertexPositionMode: bool = ...
|
||||
"""Mode for applying ShapeFix::FixVertexPosition before all fixes"""
|
||||
|
||||
FixVertexTolMode: bool = ...
|
||||
"""Mode for fixing tolerances of vertices on whole shape"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by shape
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on sub- shape and performs fixes
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> TopoShape:
|
||||
"""
|
||||
Returns resulting shape
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSolidTool(self) -> object:
|
||||
"""
|
||||
Returns tool for fixing solids
|
||||
"""
|
||||
...
|
||||
|
||||
def fixShellTool(self) -> object:
|
||||
"""
|
||||
Returns tool for fixing shells
|
||||
"""
|
||||
...
|
||||
|
||||
def fixFaceTool(self) -> object:
|
||||
"""
|
||||
Returns tool for fixing faces
|
||||
"""
|
||||
...
|
||||
|
||||
def fixWireTool(self) -> object:
|
||||
"""
|
||||
Returns tool for fixing wires
|
||||
"""
|
||||
...
|
||||
|
||||
def fixEdgeTool(self) -> object:
|
||||
"""
|
||||
Returns tool for fixing edges
|
||||
"""
|
||||
...
|
||||
42
src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerance.pyi
Normal file
42
src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerance.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from Part.App.TopoShape import TopoShape
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.ShapeTolerance",
|
||||
Include="ShapeFix_ShapeTolerance.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_ShapeTolerance(PyObjectBase):
|
||||
"""
|
||||
Modifies tolerances of sub-shapes (vertices, edges, faces)
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
@overload
|
||||
def limitTolerance(self, shape: TopoShape, tmin: float) -> None: ...
|
||||
|
||||
@overload
|
||||
def limitTolerance(self, shape: TopoShape, tmin: float, tmax: float, ShapeEnum: str = None) -> None: ...
|
||||
|
||||
def limitTolerance(self, shape: TopoShape, tmin: float, tmax: float = 0, ShapeEnum: str = None) -> None:
|
||||
"""
|
||||
limitTolerance(shape, tmin, [tmax=0, ShapeEnum=SHAPE])
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def setTolerance(self, shape: TopoShape, precision: float) -> None: ...
|
||||
|
||||
@overload
|
||||
def setTolerance(self, shape: TopoShape, precision: float, ShapeEnum: str = None) -> None: ...
|
||||
|
||||
def setTolerance(self, shape: TopoShape, precision: float, ShapeEnum: str = None) -> None:
|
||||
"""
|
||||
setTolerance(shape, precision, [ShapeEnum=SHAPE])
|
||||
"""
|
||||
...
|
||||
92
src/Mod/Part/App/ShapeFix/ShapeFix_Shell.pyi
Normal file
92
src/Mod/Part/App/ShapeFix/ShapeFix_Shell.pyi
Normal file
@@ -0,0 +1,92 @@
|
||||
from Metadata import export, constmethod
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import Final, overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Shell",
|
||||
Twin="ShapeFix_Shell",
|
||||
TwinPointer="ShapeFix_Shell",
|
||||
Include="ShapeFix_Shell.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Shell(ShapeFix_Root):
|
||||
"""
|
||||
Root class for fixing operations
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
FixOrientationMode: bool = ...
|
||||
"""Mode for applying fixes of orientation of faces"""
|
||||
|
||||
FixFaceMode: bool = ...
|
||||
"""Mode for applying fixes using ShapeFix_Face"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by shell
|
||||
"""
|
||||
...
|
||||
|
||||
def fixFaceTool(self) -> None:
|
||||
"""
|
||||
Returns tool for fixing faces
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on subshapes and performs fixes
|
||||
"""
|
||||
...
|
||||
|
||||
def shell(self) -> None:
|
||||
"""
|
||||
Returns fixed shell (or subset of oriented faces)
|
||||
"""
|
||||
...
|
||||
|
||||
def numberOfShells(self) -> None:
|
||||
"""
|
||||
Returns the number of obtained shells
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> None:
|
||||
"""
|
||||
In case of multiconnexity returns compound of fixed shells and one shell otherwise
|
||||
"""
|
||||
...
|
||||
|
||||
def errorFaces(self) -> None:
|
||||
"""
|
||||
Returns not oriented subset of faces
|
||||
"""
|
||||
...
|
||||
|
||||
def fixFaceOrientation(self) -> None:
|
||||
"""
|
||||
Fixes orientation of faces in shell.
|
||||
Changes orientation of face in the shell, if it is oriented opposite
|
||||
to neighbouring faces. If it is not possible to orient all faces in the
|
||||
shell (like in case of mebious band), this method orients only subset
|
||||
of faces. Other faces are stored in Error compound.
|
||||
Modes :
|
||||
isAccountMultiConex - mode for account cases of multiconnexity.
|
||||
If this mode is equal to Standard_True, separate shells will be created
|
||||
in the cases of multiconnexity. If this mode is equal to Standard_False,
|
||||
one shell will be created without account of multiconnexity. By default - Standard_True;
|
||||
NonManifold - mode for creation of non-manifold shells.
|
||||
If this mode is equal to Standard_True one non-manifold will be created from shell
|
||||
contains multishared edges. Else if this mode is equal to Standard_False only
|
||||
manifold shells will be created. By default - Standard_False.
|
||||
"""
|
||||
...
|
||||
|
||||
def setNonManifoldFlag(self) -> None:
|
||||
"""
|
||||
Sets NonManifold flag
|
||||
"""
|
||||
...
|
||||
68
src/Mod/Part/App/ShapeFix/ShapeFix_Solid.pyi
Normal file
68
src/Mod/Part/App/ShapeFix/ShapeFix_Solid.pyi
Normal file
@@ -0,0 +1,68 @@
|
||||
from Base.Metadata import export
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import Final
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Solid",
|
||||
Twin="ShapeFix_Solid",
|
||||
TwinPointer="ShapeFix_Solid",
|
||||
Include="ShapeFix_Solid.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Solid(ShapeFix_Root):
|
||||
"""
|
||||
Root class for fixing operations
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
FixShellMode: bool = ...
|
||||
"""Mode for applying fixes of ShapeFix_Shell"""
|
||||
|
||||
FixShellOrientationMode: bool = ...
|
||||
"""
|
||||
Mode for applying analysis and fixes of
|
||||
orientation of shells in the solid
|
||||
"""
|
||||
|
||||
CreateOpenSolidMode: bool = ...
|
||||
"""Mode for creation of solids"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by solid
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on subshapes and performs fixes
|
||||
"""
|
||||
...
|
||||
|
||||
def solidFromShell(self) -> None:
|
||||
"""
|
||||
Calls MakeSolid and orients the solid to be not infinite
|
||||
"""
|
||||
...
|
||||
|
||||
def solid(self) -> None:
|
||||
"""
|
||||
Returns resulting solid
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> None:
|
||||
"""
|
||||
In case of multiconnexity returns compound of fixed solids
|
||||
else returns one solid
|
||||
"""
|
||||
...
|
||||
|
||||
def fixShellTool(self) -> None:
|
||||
"""
|
||||
Returns tool for fixing shells
|
||||
"""
|
||||
...
|
||||
35
src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertex.pyi
Normal file
35
src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertex.pyi
Normal file
@@ -0,0 +1,35 @@
|
||||
from Base.Metadata import export
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.SplitCommonVertex",
|
||||
Include="ShapeFix_SplitCommonVertex.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_SplitCommonVertex(ShapeFix_Root):
|
||||
"""
|
||||
Class for fixing operations on shapes
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by shape
|
||||
"""
|
||||
...
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on sub- shape and performs fixes
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> object:
|
||||
"""
|
||||
Returns resulting shape
|
||||
"""
|
||||
...
|
||||
31
src/Mod/Part/App/ShapeFix/ShapeFix_SplitTool.pyi
Normal file
31
src/Mod/Part/App/ShapeFix/ShapeFix_SplitTool.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import overload
|
||||
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.SplitTool",
|
||||
Include="ShapeFix_SplitTool.hxx",
|
||||
FatherInclude="Base/PyObjectBase.h",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_SplitTool(PyObjectBase):
|
||||
"""
|
||||
Tool for splitting and cutting edges
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def splitEdge(self) -> None:
|
||||
"""
|
||||
Split edge on two new edges using new vertex
|
||||
"""
|
||||
...
|
||||
|
||||
def cutEdge(self) -> None:
|
||||
"""
|
||||
Cut edge by parameters pend and cut
|
||||
"""
|
||||
...
|
||||
370
src/Mod/Part/App/ShapeFix/ShapeFix_Wire.pyi
Normal file
370
src/Mod/Part/App/ShapeFix/ShapeFix_Wire.pyi
Normal file
@@ -0,0 +1,370 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import Final
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Wire",
|
||||
Twin="ShapeFix_Wire",
|
||||
TwinPointer="ShapeFix_Wire",
|
||||
Include="ShapeFix_Wire.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Wire(ShapeFix_Root):
|
||||
"""
|
||||
Class for fixing operations on wires
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Initializes by wire, face, precision
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixEdgeTool(self) -> None:
|
||||
"""
|
||||
Returns tool for fixing wires
|
||||
"""
|
||||
pass
|
||||
|
||||
def clearModes(self) -> None:
|
||||
"""
|
||||
Sets all modes to default
|
||||
"""
|
||||
pass
|
||||
|
||||
def clearStatuses(self) -> None:
|
||||
"""
|
||||
Clears all statuses
|
||||
"""
|
||||
pass
|
||||
|
||||
def load(self) -> None:
|
||||
"""
|
||||
Load data for the wire, and drops all fixing statuses
|
||||
"""
|
||||
pass
|
||||
|
||||
def setFace(self) -> None:
|
||||
"""
|
||||
Set working face for the wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def setSurface(self, surface: object, Placement: object = ...) -> None:
|
||||
"""
|
||||
setSurface(surface, [Placement])
|
||||
Set surface for the wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def setMaxTailAngle(self) -> None:
|
||||
"""
|
||||
Sets the maximal allowed angle of the tails in radians
|
||||
"""
|
||||
pass
|
||||
|
||||
def setMaxTailWidth(self) -> None:
|
||||
"""
|
||||
Sets the maximal allowed width of the tails
|
||||
"""
|
||||
pass
|
||||
|
||||
def isLoaded(self) -> None:
|
||||
"""
|
||||
Tells if the wire is loaded
|
||||
"""
|
||||
pass
|
||||
|
||||
def isReady(self) -> None:
|
||||
"""
|
||||
Tells if the wire and face are loaded
|
||||
"""
|
||||
pass
|
||||
|
||||
def numberOfEdges(self) -> None:
|
||||
"""
|
||||
Returns number of edges in the working wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def wire(self) -> None:
|
||||
"""
|
||||
Makes the resulting Wire (by basic Brep_Builder)
|
||||
"""
|
||||
pass
|
||||
|
||||
def wireAPIMake(self) -> None:
|
||||
"""
|
||||
Makes the resulting Wire (by BRepAPI_MakeWire)
|
||||
"""
|
||||
pass
|
||||
|
||||
def face(self) -> None:
|
||||
"""
|
||||
Returns working face
|
||||
"""
|
||||
pass
|
||||
|
||||
def perform(self) -> None:
|
||||
"""
|
||||
Iterates on subshapes and performs fixes
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixReorder(self) -> None:
|
||||
"""
|
||||
Performs an analysis and reorders edges in the wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixSmall(self) -> None:
|
||||
"""
|
||||
Applies fixSmall(...) to all edges in the wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixConnected(self, num: int) -> None:
|
||||
"""
|
||||
Applies fixConnected(num) to all edges in the wire
|
||||
Connection between first and last edges is treated only if
|
||||
flag ClosedMode is True
|
||||
If prec is -1 then maxTolerance() is taken.
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixEdgeCurves(self) -> None:
|
||||
"""
|
||||
Groups the fixes dealing with 3d and pcurves of the edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixDegenerated(self) -> None:
|
||||
"""
|
||||
Applies fixDegenerated(...) to all edges in the wire
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixSelfIntersection(self) -> None:
|
||||
"""
|
||||
Applies FixSelfIntersectingEdge(num) and
|
||||
FixIntersectingEdges(num) to all edges in the wire and
|
||||
FixIntersectingEdges(num1, num2) for all pairs num1 and num2
|
||||
and removes wrong edges if any
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixLacking(self) -> None:
|
||||
"""
|
||||
Applies FixLacking(num) to all edges in the wire
|
||||
Connection between first and last edges is treated only if
|
||||
flag ClosedMode is True
|
||||
If 'force' is False (default), test for connectness is done with
|
||||
precision of vertex between edges, else it is done with minimal
|
||||
value of vertex tolerance and Analyzer.Precision().
|
||||
Hence, 'force' will lead to inserting lacking edges in replacement
|
||||
of vertices which have big tolerances.
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixClosed(self) -> None:
|
||||
"""
|
||||
Fixes a wire to be well closed
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixGaps3d(self, num: int) -> None:
|
||||
"""
|
||||
Fixes gaps between ends of 3d curves on adjacent edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixGaps2d(self, num: int) -> None:
|
||||
"""
|
||||
Fixes gaps between ends of pcurves on adjacent edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixSeam(self) -> None:
|
||||
"""
|
||||
Fixes seam edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixShifted(self) -> None:
|
||||
"""
|
||||
Fixes edges which have pcurves shifted by whole parameter
|
||||
range on the closed surface
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixNotchedEdges(self) -> None:
|
||||
"""
|
||||
Fixes Notch edges.Check if there are notch edges in 2d and fix it
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixGap3d(self, num: int) -> None:
|
||||
"""
|
||||
Fixes gap between ends of 3d curves on num-1 and num-th edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixGap2d(self, num: int) -> None:
|
||||
"""
|
||||
Fixes gap between ends of pcurves on num-1 and num-th edges
|
||||
"""
|
||||
pass
|
||||
|
||||
def fixTails(self) -> None:
|
||||
"""
|
||||
Fixes issues related to 'tails' in the geometry.
|
||||
Tails are typically small, undesired protrusions or deviations in the curves or edges that need correction.
|
||||
This method examines the geometry and applies corrective actions to eliminate or reduce the presence of tails.
|
||||
"""
|
||||
pass
|
||||
|
||||
ModifyTopologyMode: bool = ...
|
||||
"""Mode for modifying topology of the wire"""
|
||||
|
||||
ModifyGeometryMode: bool = ...
|
||||
"""Mode for modifying geometry of vertexes and edges"""
|
||||
|
||||
ModifyRemoveLoopMode: bool = ...
|
||||
"""Mode for modifying edges"""
|
||||
|
||||
ClosedWireMode: bool = ...
|
||||
"""
|
||||
Mode which defines whether the wire
|
||||
is to be closed (by calling methods like fixDegenerated()
|
||||
and fixConnected() for last and first edges)
|
||||
"""
|
||||
|
||||
PreferencePCurveMode: bool = ...
|
||||
"""
|
||||
Mode which defines whether the 2d 'True'
|
||||
representation of the wire is preferable over 3d one in the
|
||||
case of ambiguity in FixEdgeCurves
|
||||
"""
|
||||
|
||||
FixGapsByRangesMode: bool = ...
|
||||
"""
|
||||
Mode which defines whether tool
|
||||
tries to fix gaps first by changing curves ranges (i.e.
|
||||
using intersection, extrema, projections) or not
|
||||
"""
|
||||
|
||||
FixReorderMode: bool = ...
|
||||
"""
|
||||
Mode which performs an analysis and reorders edges in the wire using class WireOrder.
|
||||
Flag 'theModeBoth' determines the use of miscible mode if necessary.
|
||||
"""
|
||||
|
||||
FixSmallMode: bool = ...
|
||||
"""Mode which applies FixSmall(num) to all edges in the wire"""
|
||||
|
||||
FixConnectedMode: bool = ...
|
||||
"""
|
||||
Mode which applies FixConnected(num) to all edges in the wire
|
||||
Connection between first and last edges is treated only if
|
||||
flag ClosedMode is True
|
||||
If 'prec' is -1 then MaxTolerance() is taken.
|
||||
"""
|
||||
|
||||
FixEdgeCurvesMode: bool = ...
|
||||
"""
|
||||
Mode which groups the fixes dealing with 3d and pcurves of the edges.
|
||||
The order of the fixes and the default behaviour are:
|
||||
ShapeFix_Edge::FixReversed2d
|
||||
ShapeFix_Edge::FixRemovePCurve (only if forced)
|
||||
ShapeFix_Edge::FixAddPCurve
|
||||
ShapeFix_Edge::FixRemoveCurve3d (only if forced)
|
||||
ShapeFix_Edge::FixAddCurve3d
|
||||
FixSeam,
|
||||
FixShifted,
|
||||
ShapeFix_Edge::FixSameParameter
|
||||
"""
|
||||
|
||||
FixDegeneratedMode: bool = ...
|
||||
"""
|
||||
Mode which applies FixDegenerated(num) to all edges in the wire
|
||||
Connection between first and last edges is treated only if
|
||||
flag ClosedMode is True
|
||||
"""
|
||||
|
||||
FixSelfIntersectionMode: bool = ...
|
||||
"""
|
||||
Mode which applies FixSelfIntersectingEdge(num) and
|
||||
FixIntersectingEdges(num) to all edges in the wire and
|
||||
FixIntersectingEdges(num1, num2) for all pairs num1 and num2
|
||||
and removes wrong edges if any
|
||||
"""
|
||||
|
||||
FixLackingMode: bool = ...
|
||||
"""
|
||||
Mode which applies FixLacking(num) to all edges in the wire
|
||||
Connection between first and last edges is treated only if
|
||||
flag ClosedMode is True
|
||||
If 'force' is False (default), test for connectness is done with
|
||||
precision of vertex between edges, else it is done with minimal
|
||||
value of vertex tolerance and Analyzer.Precision().
|
||||
Hence, 'force' will lead to inserting lacking edges in replacement
|
||||
of vertices which have big tolerances.
|
||||
"""
|
||||
|
||||
FixGaps3dMode: bool = ...
|
||||
"""
|
||||
Mode which fixes gaps between ends of 3d curves on adjacent edges
|
||||
myPrecision is used to detect the gaps.
|
||||
"""
|
||||
|
||||
FixGaps2dMode: bool = ...
|
||||
"""
|
||||
Mode whixh fixes gaps between ends of pcurves on adjacent edges
|
||||
myPrecision is used to detect the gaps.
|
||||
"""
|
||||
|
||||
FixReversed2dMode: bool = ...
|
||||
"""Mode which fixes the reversed in 2d"""
|
||||
|
||||
FixRemovePCurveMode: bool = ...
|
||||
"""Mode which removePCurve in 2d"""
|
||||
|
||||
FixAddPCurveMode: bool = ...
|
||||
"""Mode which fixes addCurve in 2d"""
|
||||
|
||||
FixRemoveCurve3dMode: bool = ...
|
||||
"""Mode which fixes removeCurve in 3d """
|
||||
|
||||
FixAddCurve3dMode: bool = ...
|
||||
"""Mode which fixes addCurve in 3d"""
|
||||
|
||||
FixSeamMode: bool = ...
|
||||
"""Mode which fixes Seam """
|
||||
|
||||
FixShiftedMode: bool = ...
|
||||
"""Mode which fixes Shifted"""
|
||||
|
||||
FixSameParameterMode: bool = ...
|
||||
"""Mode which fixes sameParameter in 2d"""
|
||||
|
||||
FixVertexToleranceMode: bool = ...
|
||||
"""Mode which fixes VertexTolerence in 2d"""
|
||||
|
||||
FixNotchedEdgesMode: bool = ...
|
||||
"""Mode which fixes NotchedEdges in 2d"""
|
||||
|
||||
FixSelfIntersectingEdgeMode: bool = ...
|
||||
"""Mode which fixes SelfIntersectionEdge in 2d"""
|
||||
|
||||
FixIntersectingEdgesMode: bool = ...
|
||||
"""Mode which fixes IntersectingEdges in 2d"""
|
||||
|
||||
FixNonAdjacentIntersectingEdgesMode: bool = ...
|
||||
"""Mode which fixes NonAdjacentIntersectingEdges in 2d"""
|
||||
|
||||
FixTailMode: bool = ...
|
||||
"""Mode which fixes Tails in 2d"""
|
||||
42
src/Mod/Part/App/ShapeFix/ShapeFix_WireVertex.pyi
Normal file
42
src/Mod/Part/App/ShapeFix/ShapeFix_WireVertex.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.WireVertex",
|
||||
Include="ShapeFix_WireVertex.hxx",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class ShapeFix_WireVertex(PyObjectBase):
|
||||
"""
|
||||
Fixing disconnected edges in the wire
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def init(self) -> None:
|
||||
"""
|
||||
Loads the wire, ininializes internal analyzer with the given precision
|
||||
"""
|
||||
...
|
||||
|
||||
def wire(self) -> object:
|
||||
"""
|
||||
Returns resulting wire
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSame(self) -> int:
|
||||
"""
|
||||
Returns the count of fixed vertices, 0 if none
|
||||
"""
|
||||
...
|
||||
|
||||
def fix(self) -> int:
|
||||
"""
|
||||
Fixes all statuses except Disjoined, i.e. the cases in which a
|
||||
common value has been set, with or without changing parameters
|
||||
Returns the count of fixed vertices, 0 if none
|
||||
"""
|
||||
...
|
||||
52
src/Mod/Part/App/ShapeFix/ShapeFix_Wireframe.pyi
Normal file
52
src/Mod/Part/App/ShapeFix/ShapeFix_Wireframe.pyi
Normal file
@@ -0,0 +1,52 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
|
||||
from typing import Final
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeFix.Wireframe",
|
||||
Twin="ShapeFix_Wireframe",
|
||||
TwinPointer="ShapeFix_Wireframe",
|
||||
Include="ShapeFix_Wireframe.hxx",
|
||||
FatherInclude="Mod/Part/App/ShapeFix/ShapeFix_RootPy.h",
|
||||
Constructor=True,
|
||||
)
|
||||
class ShapeFix_Wireframe(ShapeFix_Root):
|
||||
"""
|
||||
Provides methods for fixing wireframe of shape
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
ModeDropSmallEdges: bool = ...
|
||||
"""Returns mode managing removing small edges"""
|
||||
|
||||
LimitAngle: float = ...
|
||||
"""Limit angle for merging edges"""
|
||||
|
||||
def clearStatuses(self) -> None:
|
||||
"""
|
||||
Clears all statuses
|
||||
"""
|
||||
...
|
||||
|
||||
def load(self) -> None:
|
||||
"""
|
||||
Loads a shape, resets statuses
|
||||
"""
|
||||
...
|
||||
|
||||
def fixWireGaps(self) -> None:
|
||||
"""
|
||||
Fixes gaps between ends of curves of adjacent edges
|
||||
"""
|
||||
...
|
||||
|
||||
def fixSmallEdges(self) -> None:
|
||||
"""
|
||||
Fixes small edges in shape by merging adjacent edges
|
||||
"""
|
||||
...
|
||||
|
||||
def shape(self) -> None:
|
||||
...
|
||||
80
src/Mod/Part/App/ShapeUpgrade/UnifySameDomain.pyi
Normal file
80
src/Mod/Part/App/ShapeUpgrade/UnifySameDomain.pyi
Normal file
@@ -0,0 +1,80 @@
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
PythonName="Part.ShapeUpgrade.UnifySameDomain",
|
||||
Include="ShapeUpgrade_UnifySameDomain.hxx",
|
||||
Twin="ShapeUpgrade_UnifySameDomain",
|
||||
TwinPointer="ShapeUpgrade_UnifySameDomain",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class UnifySameDomain(PyObjectBase):
|
||||
"""
|
||||
This tool tries to unify faces and edges of the shape which lie on the same geometry.
|
||||
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def initialize(self, **kwargs) -> None:
|
||||
"""
|
||||
Initializes with a shape and necessary flags
|
||||
"""
|
||||
...
|
||||
|
||||
def allowInternalEdges(self) -> None:
|
||||
"""
|
||||
Sets the flag defining whether it is allowed to create
|
||||
internal edges inside merged faces in the case of non-manifold
|
||||
topology. Without this flag merging through multi connected edge
|
||||
is forbidden. Default value is false.
|
||||
"""
|
||||
...
|
||||
|
||||
def keepShape(self) -> None:
|
||||
"""
|
||||
Sets the shape for avoid merging of the faces/edges.
|
||||
"""
|
||||
...
|
||||
|
||||
def keepShapes(self) -> None:
|
||||
"""
|
||||
Sets the map of shapes for avoid merging of the faces/edges.
|
||||
"""
|
||||
...
|
||||
|
||||
def setSafeInputMode(self) -> None:
|
||||
"""
|
||||
Sets the flag defining the behavior of the algorithm regarding
|
||||
modification of input shape.
|
||||
If this flag is equal to True then the input (original) shape can't be
|
||||
modified during modification process. Default value is true.
|
||||
"""
|
||||
...
|
||||
|
||||
def setLinearTolerance(self) -> None:
|
||||
"""
|
||||
Sets the linear tolerance
|
||||
"""
|
||||
...
|
||||
|
||||
def setAngularTolerance(self) -> None:
|
||||
"""
|
||||
Sets the angular tolerance
|
||||
"""
|
||||
...
|
||||
|
||||
def build(self) -> None:
|
||||
"""
|
||||
Performs unification and builds the resulting shape
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def shape(self) -> None:
|
||||
"""
|
||||
Gives the resulting shape
|
||||
"""
|
||||
...
|
||||
Reference in New Issue
Block a user