[bindings] fix signatures in pyi files

This commit is contained in:
Frank Martinez
2025-09-25 20:43:33 -05:00
parent 8c7f381416
commit 748004b4e4
247 changed files with 2001 additions and 897 deletions

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from TrimmedCurve import TrimmedCurve
from Geometry import Geom_Circle, Geom_Ellipse

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from ArcOfConic import ArcOfConic
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from TrimmedCurve import TrimmedCurve

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from ArcOfConic import ArcOfConic
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.ArcOfConic import ArcOfConic
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from ArcOfConic import ArcOfConic
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.BaseClass import BaseClass
from Base.Placement import Placement
@@ -46,31 +50,31 @@ class AttachEngine(BaseClass):
CompleteRefTypeList: Final[list] = []
"""List of all reference shape types recognized by AttachEngine."""
def getModeInfo(self, mode: str) -> dict:
def getModeInfo(self, mode: str, /) -> dict:
"""
getModeInfo(mode): returns supported reference combinations, user-friendly name, and so on.
"""
...
def getRefTypeOfShape(self, shape: str) -> str:
def getRefTypeOfShape(self, shape: str, /) -> str:
"""
getRefTypeOfShape(shape): returns shape type as interpreted by AttachEngine. Returns a string.
"""
...
def isFittingRefType(self, type_shape: str, type_needed: str) -> bool:
def isFittingRefType(self, type_shape: str, type_needed: str, /) -> bool:
"""
isFittingRefType(type_shape, type_needed): tests if shape type, specified by type_shape (string), fits a type required by attachment mode type_needed (string). e.g. 'Circle' fits a requirement of 'Edge', and 'Curve' doesn't fit if a 'Circle' is required.
"""
...
def downgradeRefType(self, type: str) -> str:
def downgradeRefType(self, type: str, /) -> str:
"""
downgradeRefType(type): returns next more general type. E.g. downgradeType('Circle') yields 'Curve'.
"""
...
def getRefTypeInfo(self, type: str) -> dict:
def getRefTypeInfo(self, type: str, /) -> dict:
"""
getRefTypeInfo(type): returns information (dict) on shape type. Keys:'UserFriendlyName', 'TypeIndex', 'Rank'. Rank is the number of times reftype can be downgraded, before it becomes 'Any'.
"""
@@ -84,7 +88,7 @@ class AttachEngine(BaseClass):
...
@constmethod
def calculateAttachedPlacement(self, orig_placement: Placement) -> Optional[Placement]:
def calculateAttachedPlacement(self, orig_placement: Placement, /) -> Optional[Placement]:
"""
calculateAttachedPlacement(orig_placement): returns result of attachment, based
on current Mode, References, etc. AttachmentOffset is included.
@@ -130,13 +134,13 @@ class AttachEngine(BaseClass):
"""
...
def readParametersFromFeature(self, document_object: DocumentObject) -> None:
def readParametersFromFeature(self, document_object: DocumentObject, /) -> None:
"""
readParametersFromFeature(document_object): sets AttachEngine parameters (References, Mode, etc.) by reading out properties of AttachableObject-derived feature.
"""
...
def writeParametersToFeature(self, document_object: DocumentObject) -> None:
def writeParametersToFeature(self, document_object: DocumentObject, /) -> None:
"""
writeParametersToFeature(document_object): updates properties of
AttachableObject-derived feature with current AttachEngine parameters

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from App.DocumentObjectExtension import DocumentObjectExtension
from typing import Any, Final
@@ -29,7 +33,7 @@ class AttachExtension(DocumentObjectExtension):
"""
...
def changeAttacherType(self, typename: str) -> None:
def changeAttacherType(self, typename: str, /) -> None:
"""
changeAttacherType(typename) -> None

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import List

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Part.App.Point import Point
@@ -50,7 +54,7 @@ class BRepOffsetAPI_MakeFilling(PyObjectBase):
"""
...
def loadInitSurface(self, face: TopoShapeFace) -> None:
def loadInitSurface(self, face: TopoShapeFace, /) -> None:
"""
loadInitSurface(face)
Loads the initial surface.
@@ -93,10 +97,14 @@ class BRepOffsetAPI_MakeFilling(PyObjectBase):
...
@overload
def G0Error(self) -> float: ...
def G0Error(self, /) -> float:
...
@overload
def G0Error(self, arg: int) -> float: ...
def G0Error(self, arg: int = 0) -> float:
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.
@@ -104,10 +112,14 @@ class BRepOffsetAPI_MakeFilling(PyObjectBase):
...
@overload
def G1Error(self) -> float: ...
def G1Error(self, /) -> float:
...
@overload
def G1Error(self, arg: int) -> float: ...
def G1Error(self, arg: int = 0) -> float:
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.
@@ -115,10 +127,14 @@ class BRepOffsetAPI_MakeFilling(PyObjectBase):
...
@overload
def G2Error(self) -> float: ...
def G2Error(self, /) -> float:
...
@overload
def G2Error(self, arg: int) -> float: ...
def G2Error(self, arg: int = 0) -> float:
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.

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Base.Vector import Vector
@@ -20,7 +24,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
Licence: LGPL
"""
def setFrenetMode(self, mode: bool) -> None:
def setFrenetMode(self, mode: bool, /) -> None:
"""
setFrenetMode(True|False)
Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping.
@@ -29,7 +33,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setTrihedronMode(self, point: Vector, direction: Vector) -> None:
def setTrihedronMode(self, point: Vector, direction: Vector, /) -> None:
"""
setTrihedronMode(point,direction)
Sets a fixed trihedron to perform the sweeping.
@@ -37,7 +41,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setBiNormalMode(self, direction: Vector) -> None:
def setBiNormalMode(self, direction: Vector, /) -> None:
"""
setBiNormalMode(direction)
Sets a fixed BiNormal direction to perform the sweeping.
@@ -45,7 +49,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setSpineSupport(self, shape: TopoShape) -> None:
def setSpineSupport(self, shape: TopoShape, /) -> None:
"""
setSpineSupport(shape)
Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces.
@@ -53,9 +57,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setAuxiliarySpine(
self, wire: TopoShape, CurvilinearEquivalence: bool, TypeOfContact: int
) -> None:
def setAuxiliarySpine(self, wire: TopoShape, CurvilinearEquivalence: bool, TypeOfContact: int, /) -> None:
"""
setAuxiliarySpine(wire, CurvilinearEquivalence, TypeOfContact)
Sets an auxiliary spine to define the Normal.
@@ -96,7 +98,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def remove(self, Profile: TopoShape) -> None:
def remove(self, Profile: TopoShape, /) -> None:
"""
remove(shape Profile)
Removes the section Profile from this framework.
@@ -124,7 +126,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setTolerance(self, tol3d: float, boundTol: float, tolAngular: float) -> None:
def setTolerance(self, tol3d: float, boundTol: float, tolAngular: float, /) -> None:
"""
setTolerance( tol3d, boundTol, tolAngular)
Tol3d = 3D tolerance
@@ -133,7 +135,7 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def setTransitionMode(self, mode: int) -> None:
def setTransitionMode(self, mode: int, /) -> None:
"""
0: BRepBuilderAPI_Transformed
1: BRepBuilderAPI_RightCorner
@@ -169,35 +171,35 @@ class BRepOffsetAPI_MakePipeShell(PyObjectBase):
"""
...
def generated(self, S: TopoShape) -> list[TopoShape]:
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:
def setMaxDegree(self, degree: int, /) -> None:
"""
setMaxDegree(int degree)
Define the maximum V degree of resulting surface.
"""
...
def setMaxSegments(self, num: int) -> None:
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:
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:
def simulate(self, nbsec: int, /) -> None:
"""
simulate(int nbsec)
Simulates the resulting shape by calculating the given number of cross-sections.

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from BoundedCurve import BoundedCurve
@@ -89,7 +93,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def increaseDegree(self, Degree: int = ...) -> None:
def increaseDegree(self, Degree: int = ..., /) -> None:
"""
increase(Int=Degree)
Increases the degree of this B-Spline curve to Degree.
@@ -100,9 +104,11 @@ class BSplineCurve(BoundedCurve):
...
@overload
def increaseMultiplicity(self, index: int, mult: int) -> None: ...
def increaseMultiplicity(self, index: int, mult: int, /) -> None: ...
@overload
def increaseMultiplicity(self, start: int, end: int, mult: int) -> None: ...
def increaseMultiplicity(self, start: int, end: int, mult: int, /) -> None: ...
def increaseMultiplicity(self, *args, **kwargs) -> None:
"""
increaseMultiplicity(int index, int mult)
@@ -116,7 +122,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def incrementMultiplicity(self, start: int, end: int, mult: int) -> None:
def incrementMultiplicity(self, start: int, end: int, mult: int, /) -> None:
"""
incrementMultiplicity(int start, int end, int mult)
@@ -126,7 +132,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def insertKnot(self, u: float, mult: int = 1, tol: float = 0.0) -> None:
def insertKnot(self, u: float, mult: int = 1, tol: float = 0.0, /) -> None:
"""
insertKnot(u, mult = 1, tol = 0.0)
@@ -141,7 +147,7 @@ class BSplineCurve(BoundedCurve):
list_of_ints: List[int],
tol: float = 0.0,
bool_add: bool = True,
) -> None:
/,) -> None:
"""
insertKnots(list_of_floats, list_of_ints, tol = 0.0, bool_add = True)
@@ -161,7 +167,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def removeKnot(self, Index: int, M: int, tol: float) -> bool:
def removeKnot(self, Index: int, M: int, tol: float, /) -> bool:
"""
removeKnot(Index, M, tol)
@@ -180,7 +186,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def segment(self, u1: float, u2: float) -> None:
def segment(self, u1: float, u2: float, /) -> None:
"""
segment(u1,u2)
@@ -188,20 +194,20 @@ class BSplineCurve(BoundedCurve):
"""
...
def setKnot(self, knot: float, index: int) -> None:
def setKnot(self, knot: float, index: int, /) -> None:
"""
Set a knot of the B-Spline curve.
"""
...
@constmethod
def getKnot(self, index: int) -> float:
def getKnot(self, index: int, /) -> float:
"""
Get a knot of the B-Spline curve.
"""
...
def setKnots(self, knots: List[float]) -> None:
def setKnots(self, knots: List[float], /) -> None:
"""
Set knots of the B-Spline curve.
"""
@@ -214,7 +220,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def setPole(self, P: Vector, Index: int) -> None:
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.
@@ -222,7 +228,7 @@ class BSplineCurve(BoundedCurve):
...
@constmethod
def getPole(self, Index: int) -> Vector:
def getPole(self, Index: int, /) -> Vector:
"""
Get a pole of the B-Spline curve.
"""
@@ -235,14 +241,14 @@ class BSplineCurve(BoundedCurve):
"""
...
def setWeight(self, weight: float, index: int) -> None:
def setWeight(self, weight: float, index: int, /) -> None:
"""
Set a weight of the B-Spline curve.
"""
...
@constmethod
def getWeight(self, index: int) -> float:
def getWeight(self, index: int, /) -> float:
"""
Get a weight of the B-Spline curve.
"""
@@ -263,7 +269,7 @@ class BSplineCurve(BoundedCurve):
...
@constmethod
def getResolution(self, Tolerance3D: float) -> float:
def getResolution(self, Tolerance3D: float, /) -> float:
"""
Computes for this B-Spline curve the parametric tolerance (UTolerance)
for a given 3D tolerance (Tolerance3D).
@@ -273,7 +279,8 @@ class BSplineCurve(BoundedCurve):
"""
...
def movePoint(self, U: float, P: Vector, Index1: int, Index2: int) -> tuple[int, int]:
def movePoint(
self, U: float, P: Vector, Index1: int, Index2: int, /) -> tuple[int, int]:
"""
movePoint(U, P, Index1, Index2)
@@ -299,7 +306,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def setOrigin(self, Index: int) -> None:
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,
@@ -308,7 +315,7 @@ class BSplineCurve(BoundedCurve):
...
@constmethod
def getMultiplicity(self, index: int) -> int:
def getMultiplicity(self, index: int, /) -> int:
"""
Returns the multiplicity of the knot of index
from the knots table of this B-Spline curve.
@@ -434,7 +441,7 @@ class BSplineCurve(BoundedCurve):
periodic: bool = False,
degree: int = 3,
interpolate: bool = False,
) -> None:
/,) -> None:
"""
Builds a B-Spline by a list of poles.
arguments: poles (sequence of Base.Vector), [periodic (default is False), degree (default is 3), interpolate (default is False)]
@@ -504,20 +511,21 @@ class BSplineCurve(BoundedCurve):
...
@constmethod
def toBiArcs(self, tolerance: float) -> List["Arc"]:
def toBiArcs(self, tolerance: float, /) -> List["Arc"]:
"""
Build a list of arcs and lines to approximate the B-spline.
toBiArcs(tolerance) -> list.
"""
...
def join(self, other: "BSplineCurve") -> None:
def join(self, other: "BSplineCurve", /) -> None:
"""
Build a new spline by joining this and a second spline.
"""
...
def makeC1Continuous(self, tol: float = 1e-6, ang_tol: float = 1e-7) -> "BSplineCurve":
def makeC1Continuous(
self, tol: float = 1e-6, ang_tol: float = 1e-7, /) -> "BSplineCurve":
"""
makeC1Continuous(tol = 1e-6, ang_tol = 1e-7)
Reduces as far as possible the multiplicities of the knots of this BSpline
@@ -529,7 +537,7 @@ class BSplineCurve(BoundedCurve):
"""
...
def scaleKnotsToBounds(self, u0: float = 0.0, u1: float = 1.0) -> None:
def scaleKnotsToBounds(self, u0: float = 0.0, u1: float = 1.0, /) -> None:
"""
Scales the knots list to fit the specified bounds.
The shape of the curve is not modified.

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from GeometrySurface import GeometrySurface
from typing import Final, List, Any
@@ -181,7 +185,7 @@ class BSplineSurface(GeometrySurface):
dX: float = ...,
Y0: float = ...,
dY: float = ...,
) -> None:
/,) -> None:
"""
increase(Int=UDegree, int=VDegree)
Increases the degrees of this B-Spline surface to UDegree and VDegree
@@ -218,31 +222,31 @@ class BSplineSurface(GeometrySurface):
"""
...
def insertUKnot(self, U: float, Index: int, Tolerance: float) -> None:
def insertUKnot(self, U: float, Index: int, Tolerance: float, /) -> None:
"""
insertUKnote(float U, int Index, float Tolerance) - Insert or override a knot
"""
...
def insertUKnots(self, U: List[float], Mult: List[float], Tolerance: float) -> None:
def insertUKnots(self, U: List[float], Mult: List[float], Tolerance: float, /) -> None:
"""
insertUKnote(List of float U, List of float Mult, float Tolerance) - Inserts knots.
"""
...
def insertVKnot(self, V: float, Index: int, Tolerance: float) -> None:
def insertVKnot(self, V: float, Index: int, Tolerance: float, /) -> None:
"""
insertUKnote(float V, int Index, float Tolerance) - Insert or override a knot.
"""
...
def insertVKnots(self, V: List[float], Mult: List[float], Tolerance: float) -> None:
def insertVKnots(self, V: List[float], Mult: List[float], Tolerance: float, /) -> None:
"""
insertUKnote(List of float V, List of float Mult, float Tolerance) - Inserts knots.
"""
...
def removeUKnot(self, M: int, Index: int, Tolerance: float) -> bool:
def removeUKnot(self, M: int, Index: int, Tolerance: float, /) -> bool:
"""
Reduces to M the multiplicity of the knot of index Index in the given
parametric direction. If M is 0, the knot is removed.
@@ -260,7 +264,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def removeVKnot(self, M: int, Index: int, Tolerance: float) -> bool:
def removeVKnot(self, M: int, Index: int, Tolerance: float, /) -> bool:
"""
Reduces to M the multiplicity of the knot of index Index in the given
parametric direction. If M is 0, the knot is removed.
@@ -278,7 +282,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def segment(self, U1: float, U2: float, V1: float, V2: float) -> None:
def segment(self, U1: float, U2: float, V1: float, V2: float, /) -> None:
"""
Modifies this B-Spline surface by segmenting it between U1 and U2 in the
u parametric direction and between V1 and V2 in the v parametric direction.
@@ -292,7 +296,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setUKnot(self, K: float, UIndex: int, M: int = ...) -> None:
def setUKnot(self, K: float, UIndex: int, M: int = ..., /) -> None:
"""
Modifies this B-Spline surface by assigning the value K to the knot of index
UIndex of the knots table corresponding to the u parametric direction.
@@ -304,7 +308,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setVKnot(self, K: float, VIndex: int, M: int = ...) -> None:
def setVKnot(self, K: float, VIndex: int, M: int = ..., /) -> None:
"""
Modifies this B-Spline surface by assigning the value K to the knot of index
VIndex of the knots table corresponding to the v parametric direction.
@@ -317,7 +321,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getUKnot(self, UIndex: int) -> Any:
def getUKnot(self, UIndex: int, /) -> Any:
"""
Returns, for this B-Spline surface, in the u parametric direction
the knot of index UIndex of the knots table.
@@ -325,21 +329,21 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getVKnot(self, VIndex: int) -> Any:
def getVKnot(self, VIndex: int, /) -> Any:
"""
Returns, for this B-Spline surface, in the v parametric direction
the knot of index VIndex of the knots table.
"""
...
def setUKnots(self, knots: List[Any]) -> None:
def setUKnots(self, knots: List[Any], /) -> None:
"""
Changes all knots of this B-Spline surface in the u parametric
direction. The multiplicity of the knots is not modified.
"""
...
def setVKnots(self, knots: List[Any]) -> None:
def setVKnots(self, knots: List[Any], /) -> None:
"""
Changes all knots of this B-Spline surface in the v parametric
direction. The multiplicity of the knots is not modified.
@@ -362,7 +366,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setPole(self, P: Any, UIndex: int, VIndex: int, Weight: float = ...) -> None:
def setPole(self, P: Any, UIndex: int, VIndex: int, Weight: float = ..., /) -> None:
"""
Modifies this B-Spline surface by assigning P to the pole of
index (UIndex, VIndex) in the poles table.
@@ -374,7 +378,8 @@ class BSplineSurface(GeometrySurface):
"""
...
def setPoleCol(self, VIndex: int, values: List[Any], CPoleWeights: List[float]) -> None:
def setPoleCol(
self, VIndex: int, values: List[Any], CPoleWeights: List[float], /) -> None:
"""
Modifies this B-Spline surface by assigning values to all or part
of the column of poles of index VIndex, of this B-Spline surface.
@@ -384,7 +389,8 @@ class BSplineSurface(GeometrySurface):
"""
...
def setPoleRow(self, UIndex: int, values: List[Any], CPoleWeights: List[float]) -> None:
def setPoleRow(
self, UIndex: int, values: List[Any], CPoleWeights: List[float], /) -> None:
"""
Modifies this B-Spline surface by assigning values to all or part
of the row of poles of index UIndex, of this B-Spline surface.
@@ -395,7 +401,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getPole(self, UIndex: int, VIndex: int) -> Any:
def getPole(self, UIndex: int, VIndex: int, /) -> Any:
"""
Returns the pole of index (UIndex,VIndex) of this B-Spline surface.
"""
@@ -408,7 +414,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setWeight(self, Weight: float, UIndex: int, VIndex: int) -> None:
def setWeight(self, Weight: float, UIndex: int, VIndex: int, /) -> None:
"""
Modifies this B-Spline surface by assigning the value Weight to the weight
of the pole of index (UIndex, VIndex) in the poles tables of this B-Spline
@@ -418,7 +424,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setWeightCol(self, VIndex: int, CPoleWeights: List[float]) -> None:
def setWeightCol(self, VIndex: int, CPoleWeights: List[float], /) -> None:
"""
Modifies this B-Spline surface by assigning values to all or part of the
weights of the column of poles of index VIndex of this B-Spline surface.
@@ -430,7 +436,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setWeightRow(self, UIndex: int, CPoleWeights: List[float]) -> None:
def setWeightRow(self, UIndex: int, CPoleWeights: List[float], /) -> None:
"""
Modifies this B-Spline surface by assigning values to all or part of the
weights of the row of poles of index UIndex of this B-Spline surface.
@@ -443,7 +449,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getWeight(self, UIndex: int, VIndex: int) -> float:
def getWeight(self, UIndex: int, VIndex: int, /) -> float:
"""
Return the weight of the pole of index (UIndex,VIndex)
in the poles table for this B-Spline surface.
@@ -465,7 +471,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getResolution(self, Tolerance3D: float) -> Any:
def getResolution(self, Tolerance3D: float, /) -> Any:
"""
Computes two tolerance values for this B-Spline surface, based on the
given tolerance in 3D space Tolerance3D. The tolerances computed are:
@@ -489,7 +495,7 @@ class BSplineSurface(GeometrySurface):
UIndex2: int = ...,
VIndex1: int = ...,
VIndex2: int = ...,
) -> Any:
/,) -> Any:
"""
Moves the point of parameters (U, V) of this B-Spline surface to P.
UIndex1, UIndex2, VIndex1 and VIndex2 are the indexes in the poles
@@ -538,7 +544,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setUPeriodic(self, I1: int, I2: int) -> None:
def setUPeriodic(self, I1: int, I2: int, /) -> None:
"""
Modifies this surface to be periodic in the u parametric direction.
To become periodic in a given parametric direction a surface must
@@ -556,7 +562,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setVPeriodic(self, I1: int, I2: int) -> None:
def setVPeriodic(self, I1: int, I2: int, /) -> None:
"""
Modifies this surface to be periodic in the v parametric direction.
To become periodic in a given parametric direction a surface must
@@ -574,7 +580,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setUOrigin(self, Index: int) -> None:
def setUOrigin(self, Index: int, /) -> None:
"""
Assigns the knot of index Index in the knots table
in the u parametric direction to be the origin of
@@ -583,7 +589,7 @@ class BSplineSurface(GeometrySurface):
"""
...
def setVOrigin(self, Index: int) -> None:
def setVOrigin(self, Index: int, /) -> None:
"""
Assigns the knot of index Index in the knots table
in the v parametric direction to be the origin of
@@ -593,7 +599,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getUMultiplicity(self, UIndex: int) -> Any:
def getUMultiplicity(self, UIndex: int, /) -> Any:
"""
Returns, for this B-Spline surface, the multiplicity of
the knot of index UIndex in the u parametric direction.
@@ -601,7 +607,7 @@ class BSplineSurface(GeometrySurface):
...
@constmethod
def getVMultiplicity(self, VIndex: int) -> Any:
def getVMultiplicity(self, VIndex: int, /) -> Any:
"""
Returns, for this B-Spline surface, the multiplicity of
the knot of index VIndex in the v parametric direction.
@@ -689,7 +695,7 @@ class BSplineSurface(GeometrySurface):
dX: float = ...,
Y0: float = ...,
dY: float = ...,
) -> None:
/,) -> None:
"""
interpolate(points)
interpolate(zpoints, X0, dX, Y0, dY)
@@ -726,13 +732,13 @@ class BSplineSurface(GeometrySurface):
"""
...
def buildFromNSections(self, control_curves: Any) -> None:
def buildFromNSections(self, control_curves: Any, /) -> None:
"""
Builds a B-Spline from a list of control curves
"""
...
def scaleKnotsToBounds(self, u0: float, u1: float, v0: float, v1: float) -> None:
def scaleKnotsToBounds(self, u0: float, u1: float, v0: float, v1: float, /) -> None:
"""
Scales the U and V knots lists to fit the specified bounds.
The shape of the surface is not modified.

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from BoundedCurve import BoundedCurve
@@ -73,26 +77,26 @@ class BezierCurve(BoundedCurve):
"""
...
def increase(self, Int: int = ...) -> None:
def increase(self, Int: int = ..., /) -> None:
"""
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:
def insertPoleAfter(self, index: int, /) -> None:
"""
Inserts after the pole of index.
"""
...
def insertPoleBefore(self, index: int) -> None:
def insertPoleBefore(self, index: int, /) -> None:
"""
Inserts before the pole of index.
"""
...
def removePole(self, Index: int) -> None:
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.
@@ -105,14 +109,14 @@ class BezierCurve(BoundedCurve):
"""
...
def setPole(self, pole: Vector) -> None:
def setPole(self, pole: Vector, /) -> None:
"""
Set a pole of the Bezier curve.
"""
...
@constmethod
def getPole(self, index: int) -> Vector:
def getPole(self, index: int, /) -> Vector:
"""
Get a pole of the Bezier curve.
"""
@@ -125,7 +129,7 @@ class BezierCurve(BoundedCurve):
"""
...
def setPoles(self, poles: List[Vector]) -> None:
def setPoles(self, poles: List[Vector], /) -> None:
"""
Set the poles of the Bezier curve.
@@ -133,14 +137,14 @@ class BezierCurve(BoundedCurve):
"""
...
def setWeight(self, id: int, weight: float) -> None:
def setWeight(self, id: int, weight: float, /) -> None:
"""
(id, weight) Set a weight of the Bezier curve.
"""
...
@constmethod
def getWeight(self, id: int) -> float:
def getWeight(self, id: int, /) -> float:
"""
Get a weight of the Bezier curve.
"""
@@ -154,7 +158,7 @@ class BezierCurve(BoundedCurve):
...
@constmethod
def getResolution(self, Tolerance3D: float) -> float:
def getResolution(self, Tolerance3D: float, /) -> float:
"""
Computes for this Bezier curve the parametric tolerance (UTolerance)
for a given 3D tolerance (Tolerance3D).
@@ -164,7 +168,8 @@ class BezierCurve(BoundedCurve):
"""
...
def interpolate(self, constraints: List[List], parameters: List[float] = ...) -> None:
def interpolate(
self, constraints: List[List], parameters: List[float] = ..., /) -> None:
"""
Interpolates a list of constraints.
Each constraint is a list of a point and some optional derivatives

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import (
export,
constmethod,
@@ -106,7 +110,7 @@ class BezierSurface(GeometrySurface):
"""
...
def increase(self, DegreeU: int, DegreeV: int) -> None:
def increase(self, DegreeU: int, DegreeV: int, /) -> None:
"""
increase(DegreeU: int, DegreeV: int)
Increases the degree of this Bezier surface in the two
@@ -114,7 +118,7 @@ class BezierSurface(GeometrySurface):
"""
...
def insertPoleColAfter(self, index: int) -> None:
def insertPoleColAfter(self, index: int, /) -> None:
"""
Inserts into the table of poles of this surface, after the column
of poles of index.
@@ -125,7 +129,7 @@ class BezierSurface(GeometrySurface):
"""
...
def insertPoleRowAfter(self, index: int) -> None:
def insertPoleRowAfter(self, index: int, /) -> None:
"""
Inserts into the table of poles of this surface, after the row
of poles of index.
@@ -136,7 +140,7 @@ class BezierSurface(GeometrySurface):
"""
...
def insertPoleColBefore(self, index: int) -> None:
def insertPoleColBefore(self, index: int, /) -> None:
"""
Inserts into the table of poles of this surface, before the column
of poles of index.
@@ -147,7 +151,7 @@ class BezierSurface(GeometrySurface):
"""
...
def insertPoleRowBefore(self, index: int) -> None:
def insertPoleRowBefore(self, index: int, /) -> None:
"""
Inserts into the table of poles of this surface, before the row
of poles of index.
@@ -158,7 +162,7 @@ class BezierSurface(GeometrySurface):
"""
...
def removePoleCol(self, VIndex: int) -> None:
def removePoleCol(self, VIndex: int, /) -> None:
"""
removePoleRow(VIndex: int)
Removes the column of poles of index VIndex from the table of
@@ -167,7 +171,7 @@ class BezierSurface(GeometrySurface):
"""
...
def removePoleRow(self, UIndex: int) -> None:
def removePoleRow(self, UIndex: int, /) -> None:
"""
removePoleRow(UIndex: int)
Removes the row of poles of index UIndex from the table of
@@ -176,7 +180,7 @@ class BezierSurface(GeometrySurface):
"""
...
def segment(self, U1: float, U2: float, V1: float, V2: float) -> None:
def segment(self, U1: float, U2: float, V1: float, V2: float, /) -> None:
"""
segment(U1: double, U2: double, V1: double, V2: double)
Modifies this Bezier surface by segmenting it between U1 and U2
@@ -200,26 +204,26 @@ class BezierSurface(GeometrySurface):
"""
...
def setPole(self, pole: Any) -> None:
def setPole(self, pole: Any, /) -> None:
"""
Set a pole of the Bezier surface.
"""
...
def setPoleCol(self, poles: Any) -> None:
def setPoleCol(self, poles: Any, /) -> None:
"""
Set the column of poles of the Bezier surface.
"""
...
def setPoleRow(self, poles: Any) -> None:
def setPoleRow(self, poles: Any, /) -> None:
"""
Set the row of poles of the Bezier surface.
"""
...
@constmethod
def getPole(self, UIndex: int, VIndex: int) -> Any:
def getPole(self, UIndex: int, VIndex: int, /) -> Any:
"""
Get a pole of index (UIndex, VIndex) of the Bezier surface.
"""
@@ -232,21 +236,21 @@ class BezierSurface(GeometrySurface):
"""
...
def setWeight(self, UIndex: int, VIndex: int, weight: float) -> None:
def setWeight(self, UIndex: int, VIndex: int, weight: float, /) -> None:
"""
Set the weight of pole of the index (UIndex, VIndex)
for the Bezier surface.
"""
...
def setWeightCol(self, VIndex: int, weights: Any) -> None:
def setWeightCol(self, VIndex: int, weights: Any, /) -> None:
"""
Set the weights of the poles in the column of poles
of index VIndex of the Bezier surface.
"""
...
def setWeightRow(self, UIndex: int, weights: Any) -> None:
def setWeightRow(self, UIndex: int, weights: Any, /) -> None:
"""
Set the weights of the poles in the row of poles
of index UIndex of the Bezier surface.
@@ -254,7 +258,7 @@ class BezierSurface(GeometrySurface):
...
@constmethod
def getWeight(self, UIndex: int, VIndex: int) -> float:
def getWeight(self, UIndex: int, VIndex: int, /) -> float:
"""
Get a weight of the pole of index (UIndex, VIndex)
of the Bezier surface.
@@ -269,7 +273,7 @@ class BezierSurface(GeometrySurface):
...
@constmethod
def getResolution(self, Tolerance3D: float) -> Tuple[float, float]:
def getResolution(self, Tolerance3D: float, /) -> Tuple[float, float]:
"""
Computes two tolerance values for this Bezier surface, based on the
given tolerance in 3D space Tolerance3D. The tolerances computed are:

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from PartFeature import PartFeature

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometryCurve import GeometryCurve
from typing import Any, Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import Tuple
@@ -23,7 +27,7 @@ class AnaFilletAlgo(PyObjectBase):
"""
...
def perform(self, radius: float) -> bool:
def perform(self, radius: float, /) -> bool:
"""
perform(radius) -> bool

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from typing import Tuple, overload
@@ -25,7 +29,7 @@ class ChFi2d_ChamferAPI(PyObjectBase):
"""
...
def perform(self, radius: float) -> bool:
def perform(self, radius: float, /) -> bool:
"""
perform(radius) -> bool
@@ -33,7 +37,7 @@ class ChFi2d_ChamferAPI(PyObjectBase):
"""
...
def result(self, point: object, solution: int = -1) -> Tuple[object, object, object]:
def result(self, point: object, solution: int = -1, /) -> Tuple[object, object, object]:
"""
result(point, solution=-1)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import overload
@@ -26,7 +30,7 @@ class ChFi2d_FilletAPI(PyObjectBase):
"""
...
def perform(self, radius: float) -> bool:
def perform(self, radius: float, /) -> bool:
"""
perform(radius) -> bool
@@ -40,9 +44,7 @@ class ChFi2d_FilletAPI(PyObjectBase):
"""
...
def result(
self, point: Point, solution: int = -1
) -> tuple[TopoShapeEdge, TopoShapeEdge, TopoShapeEdge]:
def result(self, point: Point, solution: int = -1, /) -> tuple[TopoShapeEdge, TopoShapeEdge, TopoShapeEdge]:
"""
result(point, solution=-1)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Base.Vector import Vector
@@ -26,7 +30,7 @@ class FilletAlgo(PyObjectBase):
"""
...
def perform(self, radius: float) -> bool:
def perform(self, radius: float, /) -> bool:
"""
perform(radius) -> bool
@@ -40,7 +44,7 @@ class FilletAlgo(PyObjectBase):
"""
...
def result(self, point: Vector, solution: int = -1) -> tuple[object, object, object]:
def result(self, point: Vector, solution: int = -1, /) -> tuple[object, object, object]:
"""
result(point, solution=-1)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from Conic import Conic

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from Base.Axis import Axis as AxisPy

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometryCurve import GeometryCurve
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from Circle import Circle

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from Conic import Conic

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from typing import Final, overload
from Part.Geom2d import ArcOfConic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod, overload
from typing import Final
from Part.Geom2d import Curve2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from typing import Final, overload
from Part import ArcOfConic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod, overload
from typing import Final
from Part.Geom2d import ArcOfConic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod, overload
from typing import Final
from Part.Geom2d import ArcOfConic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from typing import Final, overload
from Part.Curve2d import Curve2d
@@ -71,7 +75,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def increaseDegree(self, Degree: int) -> None:
def increaseDegree(self, Degree: int, /) -> None:
"""
increaseDegree(Int=Degree)
@@ -83,9 +87,13 @@ class BSplineCurve2d(Curve2d):
...
@overload
def increaseMultiplicity(self, index: int, mult: int) -> None: ...
def increaseMultiplicity(self, index: int, mult: int, /) -> None:
...
@overload
def increaseMultiplicity(self, start: int, end: int, mult: int) -> None: ...
def increaseMultiplicity(self, start: int, end: int, mult: int, /) -> None:
...
def increaseMultiplicity(self, *args, **kwargs) -> None:
"""
increaseMultiplicity(int index, int mult)
@@ -99,7 +107,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def incrementMultiplicity(self, start: int, end: int, mult: int) -> None:
def incrementMultiplicity(self, start: int, end: int, mult: int, /) -> None:
"""
incrementMultiplicity(int start, int end, int mult)
Raises multiplicity of knots by mult.
@@ -108,7 +116,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def insertKnot(self, u: float, mult: int = 1, tol: float = 0.0) -> None:
def insertKnot(self, u: float, mult: int = 1, tol: float = 0.0, /) -> None:
"""
insertKnot(u, mult = 1, tol = 0.0)
@@ -116,13 +124,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def insertKnots(
self,
list_of_floats: list[float],
list_of_ints: list[int],
tol: float = 0.0,
bool_add: bool = True,
) -> None:
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)
@@ -142,7 +144,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def removeKnot(self, Index: int, M: int, tol: float) -> None:
def removeKnot(self, Index: int, M: int, tol: float, /) -> None:
"""
removeKnot(Index, M, tol)
@@ -161,26 +163,26 @@ class BSplineCurve2d(Curve2d):
"""
...
def segment(self, u1: float, u2: float) -> None:
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:
def setKnot(self, value: float, /) -> None:
"""
Set a knot of the B-Spline curve.
"""
...
def getKnot(self, index: int) -> float:
def getKnot(self, index: int, /) -> float:
"""
Get a knot of the B-Spline curve.
"""
...
def setKnots(self, knots: list[float]) -> None:
def setKnots(self, knots: list[float], /) -> None:
"""
Set knots of the B-Spline curve.
"""
@@ -192,13 +194,13 @@ class BSplineCurve2d(Curve2d):
"""
...
def setPole(self, P: Vector, Index: int) -> None:
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:
def getPole(self, Index: int, /) -> Vector:
"""
Get a pole of the B-Spline curve.
"""
@@ -210,13 +212,13 @@ class BSplineCurve2d(Curve2d):
"""
...
def setWeight(self, weight: float, Index: int) -> None:
def setWeight(self, weight: float, Index: int, /) -> None:
"""
Set a weight of the B-Spline curve.
"""
...
def getWeight(self, Index: int) -> float:
def getWeight(self, Index: int, /) -> float:
"""
Get a weight of the B-Spline curve.
"""
@@ -244,7 +246,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def movePoint(self, U: float, P: Vector, Index1: int, Index2: int) -> tuple[int, int]:
def movePoint(self, U: float, P: Vector, Index1: int, Index2: int, /) -> tuple[int, int]:
"""
movePoint(U, P, Index1, Index2)
@@ -270,14 +272,14 @@ class BSplineCurve2d(Curve2d):
"""
...
def setOrigin(self, Index: int) -> None:
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:
def getMultiplicity(self, index: int, /) -> int:
"""
Returns the multiplicity of the knot of index from the knots table of this B-Spline curve.
"""
@@ -363,7 +365,7 @@ class BSplineCurve2d(Curve2d):
"""
...
def buildFromPoles(self, poles: list[Vector]) -> None:
def buildFromPoles(self, poles: list[Vector], /) -> None:
"""
Builds a B-Spline by a list of poles.
"""
@@ -424,20 +426,20 @@ class BSplineCurve2d(Curve2d):
"""
...
def toBiArcs(self, tolerance: float) -> list:
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":
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":
def makeC1Continuous(self, tol: float = 1e-6, ang_tol: float = 1e-7, /) -> "BSplineCurve2d":
"""
makeC1Continuous(tol = 1e-6, ang_tol = 1e-7)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.Curve2d import Curve2d
from typing import Final, List
@@ -54,7 +58,7 @@ class BezierCurve2d(Curve2d):
"""
...
def increase(self, Degree: int) -> None:
def increase(self, Degree: int, /) -> None:
"""
increase(Int=Degree)
Increases the degree of this Bezier curve to Degree.
@@ -62,19 +66,19 @@ class BezierCurve2d(Curve2d):
"""
...
def insertPoleAfter(self, index: int) -> None:
def insertPoleAfter(self, index: int, /) -> None:
"""
Inserts after the pole of index.
"""
...
def insertPoleBefore(self, index: int) -> None:
def insertPoleBefore(self, index: int, /) -> None:
"""
Inserts before the pole of index.
"""
...
def removePole(self, index: int) -> None:
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.
@@ -87,13 +91,13 @@ class BezierCurve2d(Curve2d):
"""
...
def setPole(self, index: int, pole: object) -> None:
def setPole(self, index: int, pole: object, /) -> None:
"""
Set a pole of the Bezier curve.
"""
...
def getPole(self, index: int) -> object:
def getPole(self, index: int, /) -> object:
"""
Get a pole of the Bezier curve.
"""
@@ -105,19 +109,19 @@ class BezierCurve2d(Curve2d):
"""
...
def setPoles(self, poles: List[object]) -> None:
def setPoles(self, poles: List[object], /) -> None:
"""
Set the poles of the Bezier curve.
"""
...
def setWeight(self, index: int, weight: float) -> None:
def setWeight(self, index: int, weight: float, /) -> None:
"""
Set a weight of the Bezier curve.
"""
...
def getWeight(self, index: int) -> float:
def getWeight(self, index: int, /) -> float:
"""
Get a weight of the Bezier curve.
"""
@@ -130,7 +134,7 @@ class BezierCurve2d(Curve2d):
...
@constmethod
def getResolution(self, Tolerance3D: float) -> float:
def getResolution(self, Tolerance3D: float, /) -> float:
"""
Computes for this Bezier curve the parametric tolerance (UTolerance)
for a given 3D tolerance (Tolerance3D).

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from typing import Final, overload, Tuple
from Part.Geom2d import Conic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from typing import Final
from Part.Geom2d import Curve2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Part.App.Geom2d.Geometry2d import Geometry2d
@@ -103,13 +107,21 @@ class Curve2d(Geometry2d):
...
@overload
def length(self) -> float: ...
def length(self, /) -> float:
...
@overload
def length(self, uMin: float) -> float: ...
def length(self, uMin: float, /) -> float:
...
@overload
def length(self, uMin: float, uMax: float) -> float: ...
def length(self, uMin: float, uMax: float, /) -> float:
...
@overload
def length(self, uMin: float, uMax: float, Tol: float) -> float: ...
def length(self, uMin: float, uMax: float, Tol: float, /) -> float:
...
def length(self, *args: float) -> float:
"""
Computes the length of a curve
@@ -118,9 +130,13 @@ class Curve2d(Geometry2d):
...
@overload
def parameterAtDistance(self, abscissa: float) -> float: ...
def parameterAtDistance(self, abscissa: float, /) -> float:
...
@overload
def parameterAtDistance(self, abscissa: float, startingParameter: float) -> float: ...
def parameterAtDistance(self, abscissa: float, startingParameter: float, /) -> float:
...
def parameterAtDistance(self, *args: float) -> float:
"""
Returns the parameter on the curve of a point at
@@ -129,19 +145,19 @@ class Curve2d(Geometry2d):
"""
...
def value(self, u: float) -> Vector:
def value(self, u: float, /) -> Vector:
"""
Computes the point of parameter u on this curve
"""
...
def tangent(self, u: float) -> Vector:
def tangent(self, u: float, /) -> Vector:
"""
Computes the tangent of parameter u on this curve
"""
...
def parameter(self, point: Vector) -> float:
def parameter(self, point: Vector, /) -> float:
"""
Returns the parameter on the curve of the
nearest orthogonal projection of the point.
@@ -149,37 +165,41 @@ class Curve2d(Geometry2d):
...
@constmethod
def normal(self, pos: float) -> Vector:
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:
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:
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]:
def intersectCC(self, other: "Curve2d", /) -> List[Vector]:
"""
Returns all intersection points between this curve and the given curve.
"""
...
@overload
def toBSpline(self) -> BSplineCurve: ...
def toBSpline(self, /) -> BSplineCurve:
...
@overload
def toBSpline(self, First: float, Last: float) -> BSplineCurve: ...
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)
@@ -187,9 +207,7 @@ class Curve2d(Geometry2d):
"""
...
def approximateBSpline(
self, Tolerance: float, MaxSegments: int, MaxDegree: int, Order: str = "C2"
) -> BSplineCurve:
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

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from typing import Final, overload
from Base.Metadata import export, constmethod
from Part.Conic2d import Conic2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.Conic2d import Conic2d
from typing import Final, overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.Geom2d.Curve2d import Curve2d
from typing import overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from typing import Final, overload
from Part.Geom2d import Curve2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export
from typing import Final
from Part.Geom2d import Curve2d

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.App.Geom2d.Conic2d import Conic2d
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import List

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import Final, overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import Final, overload
@@ -18,7 +22,7 @@ class PointConstraint(PyObjectBase):
Licence: LGPL
"""
def setOrder(self, order: str) -> None:
def setOrder(self, order: str, /) -> None:
"""
Allows you to set the order of continuity required for
the constraints: G0, G1, and G2, controlled
@@ -32,7 +36,7 @@ class PointConstraint(PyObjectBase):
"""
...
def G0Criterion(self, U: float) -> float:
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
@@ -40,7 +44,7 @@ class PointConstraint(PyObjectBase):
"""
...
def G1Criterion(self, U: float) -> float:
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
@@ -49,7 +53,7 @@ class PointConstraint(PyObjectBase):
"""
...
def G2Criterion(self, U: float) -> float:
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
@@ -58,7 +62,7 @@ class PointConstraint(PyObjectBase):
"""
...
def setG0Criterion(self, value: float) -> None:
def setG0Criterion(self, value: float, /) -> None:
"""
Allows you to set the G0 criterion. This is the law
defining the greatest distance allowed between the
@@ -68,7 +72,7 @@ class PointConstraint(PyObjectBase):
"""
...
def setG1Criterion(self, value: float) -> None:
def setG1Criterion(self, value: float, /) -> None:
"""
Allows you to set the G1 criterion. This is the law
defining the greatest angle allowed between the
@@ -78,7 +82,7 @@ class PointConstraint(PyObjectBase):
"""
...
def setG2Criterion(self, value: float) -> None:
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
@@ -94,7 +98,7 @@ class PointConstraint(PyObjectBase):
"""
...
def setPnt2dOnSurf(self, p: "gp_Pnt2d") -> None:
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.
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Persistence import Persistence
from App.Extension import Extension
@@ -21,31 +25,31 @@ class Geometry(Persistence):
Tag: Final[str]
"""Gives the tag of the geometry as string."""
def mirror(self, geometry: "Geometry") -> None:
def mirror(self, geometry: "Geometry", /) -> None:
"""
Performs the symmetrical transformation of this geometric object
"""
...
def rotate(self, angle: float, axis: Vector) -> None:
def rotate(self, angle: float, axis: Vector, /) -> None:
"""
Rotates this geometric object at angle Ang (in radians) about axis
"""
...
def scale(self, center: Vector, factor: float) -> None:
def scale(self, center: Vector, factor: float, /) -> None:
"""
Applies a scaling transformation on this geometric object with a center and scaling factor
"""
...
def transform(self, transformation: Matrix) -> None:
def transform(self, transformation: Matrix, /) -> None:
"""
Applies a transformation to this geometric object
"""
...
def translate(self, vector: Vector) -> None:
def translate(self, vector: Vector, /) -> None:
"""
Translates this geometric object
"""
@@ -66,7 +70,7 @@ class Geometry(Persistence):
...
@constmethod
def isSame(self, geom: "Geometry", tol: float, angulartol: float) -> bool:
def isSame(self, geom: "Geometry", tol: float, angulartol: float, /) -> bool:
"""
isSame(geom, tol, angulartol) -> boolean
@@ -75,46 +79,46 @@ class Geometry(Persistence):
...
@constmethod
def hasExtensionOfType(self, type_name: str) -> bool:
def hasExtensionOfType(self, type_name: str, /) -> bool:
"""
Returns a boolean indicating whether a geometry extension of the type indicated as a string exists.
"""
...
@constmethod
def hasExtensionOfName(self, name: str) -> bool:
def hasExtensionOfName(self, name: str, /) -> bool:
"""
Returns a boolean indicating whether a geometry extension with the name indicated as a string exists.
"""
...
@constmethod
def getExtensionOfType(self, type_name: str) -> Optional[Extension]:
def getExtensionOfType(self, type_name: str, /) -> Optional[Extension]:
"""
Gets the first geometry extension of the type indicated by the string.
"""
...
@constmethod
def getExtensionOfName(self, name: str) -> Optional[Extension]:
def getExtensionOfName(self, name: str, /) -> Optional[Extension]:
"""
Gets the first geometry extension of the name indicated by the string.
"""
...
def setExtension(self, extension: Extension) -> None:
def setExtension(self, extension: Extension, /) -> None:
"""
Sets a geometry extension of the indicated type.
"""
...
def deleteExtensionOfType(self, type_name: str) -> None:
def deleteExtensionOfType(self, type_name: str, /) -> None:
"""
Deletes all extensions of the indicated type.
"""
...
def deleteExtensionOfName(self, name: str) -> None:
def deleteExtensionOfName(self, name: str, /) -> None:
"""
Deletes all extensions of the indicated name.
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometryExtension import GeometryExtension

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Base.Rotation import Rotation as RotationPy
@@ -146,35 +150,35 @@ class GeometryCurve(Geometry):
...
@constmethod
def getD0(self, parameter: float) -> Vector:
def getD0(self, parameter: float, /) -> Vector:
"""
Returns the point of given parameter
"""
...
@constmethod
def getD1(self, parameter: float) -> Vector:
def getD1(self, parameter: float, /) -> Vector:
"""
Returns the point and first derivative of given parameter
"""
...
@constmethod
def getD2(self, parameter: float) -> Vector:
def getD2(self, parameter: float, /) -> Vector:
"""
Returns the point, first and second derivatives
"""
...
@constmethod
def getD3(self, parameter: float) -> Vector:
def getD3(self, parameter: float, /) -> Vector:
"""
Returns the point, first, second and third derivatives
"""
...
@constmethod
def getDN(self, n: int, parameter: float) -> Vector:
def getDN(self, n: int, parameter: float, /) -> Vector:
"""
Returns the n-th derivative
"""
@@ -186,7 +190,7 @@ class GeometryCurve(Geometry):
uMin: Optional[float] = None,
uMax: Optional[float] = None,
Tol: Optional[float] = None,
) -> float:
/,) -> float:
"""
Computes the length of a curve
length([uMin, uMax, Tol]) -> float
@@ -198,7 +202,7 @@ class GeometryCurve(Geometry):
self,
abscissa: Optional[float] = None,
startingParameter: Optional[float] = None,
) -> float:
/,) -> float:
"""
Returns the parameter on the curve of a point at the given distance from a starting parameter.
parameterAtDistance([abscissa, startingParameter]) -> float
@@ -206,49 +210,49 @@ class GeometryCurve(Geometry):
...
@constmethod
def value(self, u: float) -> Vector:
def value(self, u: float, /) -> Vector:
"""
Computes the point of parameter u on this curve
"""
...
@constmethod
def tangent(self, u: float) -> Vector:
def tangent(self, u: float, /) -> Vector:
"""
Computes the tangent of parameter u on this curve
"""
...
@constmethod
def makeRuledSurface(self, otherCurve: "GeometryCurve") -> object:
def makeRuledSurface(self, otherCurve: "GeometryCurve", /) -> object:
"""
Make a ruled surface of this and the given curves
"""
...
@constmethod
def intersect2d(self, otherCurve: "GeometryCurve") -> List[Vector]:
def intersect2d(self, otherCurve: "GeometryCurve", /) -> List[Vector]:
"""
Get intersection points with another curve lying on a plane.
"""
...
@constmethod
def continuityWith(self, otherCurve: "GeometryCurve") -> str:
def continuityWith(self, otherCurve: "GeometryCurve", /) -> str:
"""
Computes the continuity of two curves
"""
...
@constmethod
def parameter(self, point: Vector) -> float:
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:
def normal(self, pos: float, /) -> Vector:
"""
Vector = normal(pos) - Get the normal vector at the given parameter [First|Last] if defined
"""
@@ -318,21 +322,21 @@ class GeometryCurve(Geometry):
...
@constmethod
def curvature(self, pos: float) -> float:
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:
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 intersect(self, curve_or_surface: object, precision: float) -> object:
def intersect(self, curve_or_surface: object, precision: float, /) -> object:
"""
Returns all intersection points and curve segments between the curve and the curve/surface.
@@ -341,21 +345,21 @@ class GeometryCurve(Geometry):
...
@constmethod
def intersectCS(self, surface: object) -> object:
def intersectCS(self, surface: object, /) -> object:
"""
Returns all intersection points and curve segments between the curve and the surface.
"""
...
@constmethod
def intersectCC(self, otherCurve: "GeometryCurve") -> List[Vector]:
def intersectCC(self, otherCurve: "GeometryCurve", /) -> List[Vector]:
"""
Returns all intersection points between this curve and the given curve.
"""
...
@constmethod
def toBSpline(self, points: Tuple[float, float]) -> "BSplineCurve":
def toBSpline(self, points: Tuple[float, float], /) -> "BSplineCurve":
"""
Converts a curve of any type (only part from First to Last) to BSpline curve.
toBSpline((first: float, last: float)) -> BSplineCurve
@@ -363,7 +367,7 @@ class GeometryCurve(Geometry):
...
@constmethod
def toNurbs(self, points: Tuple[float, float]) -> "NurbsCurve":
def toNurbs(self, points: Tuple[float, float], /) -> "NurbsCurve":
"""
Converts a curve of any type (only part from First to Last) to NURBS curve.
toNurbs((first: float, last: float)) -> NurbsCurve
@@ -371,7 +375,7 @@ class GeometryCurve(Geometry):
...
@constmethod
def trim(self, points: Tuple[float, float]) -> "TrimmedCurve":
def trim(self, points: Tuple[float, float], /) -> "TrimmedCurve":
"""
Returns a trimmed curve defined in the given parameter range.
trim((first: float, last: float)) -> TrimmedCurve
@@ -380,8 +384,7 @@ class GeometryCurve(Geometry):
@constmethod
def approximateBSpline(
self, Tolerance: float, MaxSegments: int, MaxDegree: int, Order: str = "C2"
) -> "BSplineCurve":
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']) -> BSplineCurve
@@ -395,7 +398,7 @@ class GeometryCurve(Geometry):
...
@constmethod
def reversedParameter(self, U: float) -> float:
def reversedParameter(self, U: float, /) -> float:
"""
Returns the parameter on the reversed curve for the point of parameter U on this curve.
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometryExtension import GeometryExtension

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.GeometryExtension import GeometryExtension
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometryExtension import GeometryExtension

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Rotation import Rotation as RotationPy
from Base.Vector import Vector
@@ -43,21 +47,21 @@ class GeometrySurface(Geometry):
...
@constmethod
def getD0(self, param: float) -> Vector:
def getD0(self, param: float, /) -> Vector:
"""
Returns the point of given parameter
"""
...
@constmethod
def getDN(self, n: int) -> Any:
def getDN(self, n: int, /) -> Any:
"""
Returns the n-th derivative
"""
...
@constmethod
def value(self, u: float, v: float) -> Vector:
def value(self, u: float, v: float, /) -> Vector:
"""
value(u,v) -> Point
Computes the point of parameter (u,v) on this surface
@@ -65,7 +69,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def tangent(self, u: float, v: float) -> Tuple[Vector, Vector]:
def tangent(self, u: float, v: float, /) -> Tuple[Vector, Vector]:
"""
tangent(u,v) -> (Vector,Vector)
Computes the tangent of parameter (u,v) on this geometry
@@ -73,7 +77,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def normal(self, u: float, v: float) -> Vector:
def normal(self, u: float, v: float, /) -> Vector:
"""
normal(u,v) -> Vector
Computes the normal of parameter (u,v) on this geometry
@@ -114,7 +118,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def isUmbillic(self, u: float, v: float) -> bool:
def isUmbillic(self, u: float, v: float, /) -> bool:
"""
isUmbillic(u,v) -> bool
Check if the geometry on parameter is an umbillic point,
@@ -123,7 +127,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def curvature(self, u: float, v: float, type: str) -> float:
def curvature(self, u: float, v: float, type: str, /) -> float:
"""
curvature(u,v,type) -> float
The value of type must be one of this: Max, Min, Mean or Gauss
@@ -132,7 +136,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def curvatureDirections(self, u: float, v: float) -> Tuple[Vector, Vector]:
def curvatureDirections(self, u: float, v: float, /) -> Tuple[Vector, Vector]:
"""
curvatureDirections(u,v) -> (Vector,Vector)
Computes the directions of maximum and minimum curvature
@@ -150,7 +154,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def isPlanar(self, tolerance: float = 0.0) -> bool:
def isPlanar(self, tolerance: float = 0.0, /) -> bool:
"""
isPlanar([float]) -> Bool
Checks if the surface is planar within a certain tolerance.
@@ -158,14 +162,14 @@ class GeometrySurface(Geometry):
...
@constmethod
def uIso(self, u: Tuple) -> Union[GeometryCurve, Line]:
def uIso(self, u: Tuple, /) -> Union[GeometryCurve, Line]:
"""
Builds the U isoparametric curve
"""
...
@constmethod
def vIso(self, v: Tuple) -> Union[GeometryCurve, Line]:
def vIso(self, v: Tuple, /) -> Union[GeometryCurve, Line]:
"""
Builds the V isoparametric curve
"""
@@ -266,7 +270,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def intersectSS(self, SecondSurface: Any, precision_code: int = 0) -> Any:
def intersectSS(self, SecondSurface: Any, precision_code: int = 0, /) -> Any:
"""
Returns all intersection curves of this surface and the given surface.
The required arguments are:

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod, class_declarations
from Base.PyObjectBase import PyObjectBase
from typing import Final
@@ -62,7 +66,7 @@ class HLRBRep_Algo(PyObjectBase):
Licence: LGPL
"""
def add(self, S, nbIso: int = 0) -> None:
def add(self, S, nbIso: int = 0, /) -> None:
"""
add(S, nbIso=0)
@@ -72,7 +76,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def remove(self, i: int) -> None:
def remove(self, i: int, /) -> None:
"""
remove(i)
@@ -80,7 +84,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def index(self, S) -> int:
def index(self, S, /) -> int:
"""
index(S) -> int
@@ -121,7 +125,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def showAll(self, i: int = -1) -> None:
def showAll(self, i: int = -1, /) -> None:
"""
showAll(i=-1)
@@ -130,7 +134,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def hide(self, i: int = -1, j: int = -1) -> None:
def hide(self, i: int = -1, j: int = -1, /) -> None:
"""
hide(i=-1, j=-1)
@@ -140,7 +144,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def hideAll(self, i: int = -1) -> None:
def hideAll(self, i: int = -1, /) -> None:
"""
hideAll(i=-1)
@@ -157,7 +161,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def select(self, i: int = -1) -> None:
def select(self, i: int = -1, /) -> None:
"""
select(i=-1)
@@ -166,7 +170,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def selectEdge(self, i: int) -> None:
def selectEdge(self, i: int, /) -> None:
"""
selectEdge(i)
@@ -174,7 +178,7 @@ class HLRBRep_Algo(PyObjectBase):
"""
...
def selectFace(self, i: int) -> None:
def selectFace(self, i: int, /) -> None:
"""
selectFace(i)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod, class_declarations
from Base.PyObjectBase import PyObjectBase
from Part.TopoShapePy import TopoShape
@@ -62,7 +66,7 @@ class HLRBRep_PolyAlgo(PyObjectBase):
same shape.
"""
def load(self, S: TopoShape) -> None:
def load(self, S: TopoShape, /) -> None:
"""
load(S)
@@ -70,7 +74,7 @@ class HLRBRep_PolyAlgo(PyObjectBase):
"""
...
def remove(self, i: int) -> None:
def remove(self, i: int, /) -> None:
"""
remove(i)
@@ -87,7 +91,7 @@ class HLRBRep_PolyAlgo(PyObjectBase):
"""
...
def shape(self, i: int) -> TopoShape:
def shape(self, i: int, /) -> TopoShape:
"""
shape(i) -> TopoShape
@@ -95,7 +99,7 @@ class HLRBRep_PolyAlgo(PyObjectBase):
"""
...
def index(self, S: TopoShape) -> int:
def index(self, S: TopoShape, /) -> int:
"""
index(S) -> int
@@ -165,7 +169,7 @@ class HLRBRep_PolyAlgo(PyObjectBase):
"""
...
def outLinedShape(self, S: TopoShape) -> TopoShape:
def outLinedShape(self, S: TopoShape, /) -> TopoShape:
"""
outLinedShape(S) -> TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.TopoShapePy import TopoShape
from Base.PyObjectBase import PyObjectBase
@@ -41,7 +45,7 @@ class HLRToShape(PyObjectBase):
class.
"""
def vCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def vCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
vCompound(Shape=None) -> TopoShape
@@ -50,7 +54,7 @@ class HLRToShape(PyObjectBase):
"""
...
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
Rg1LineVCompound(Shape=None) -> TopoShape
@@ -59,7 +63,7 @@ class HLRToShape(PyObjectBase):
"""
...
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
RgNLineVCompound(Shape=None) -> TopoShape
@@ -68,7 +72,7 @@ class HLRToShape(PyObjectBase):
"""
...
def outLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def outLineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
outLineVCompound(Shape=None) -> TopoShape
@@ -77,7 +81,7 @@ class HLRToShape(PyObjectBase):
"""
...
def outLineVCompound3d(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def outLineVCompound3d(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
outLineVCompound(Shape=None) -> TopoShape
@@ -86,7 +90,7 @@ class HLRToShape(PyObjectBase):
"""
...
def isoLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def isoLineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
isoLineVCompound(Shape=None) -> TopoShape
@@ -95,7 +99,7 @@ class HLRToShape(PyObjectBase):
"""
...
def hCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def hCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
hCompound(Shape=None) -> TopoShape
@@ -104,7 +108,7 @@ class HLRToShape(PyObjectBase):
"""
...
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
Rg1LineHCompound(Shape=None) -> TopoShape
@@ -113,7 +117,7 @@ class HLRToShape(PyObjectBase):
"""
...
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
RgNLineHCompound(Shape=None) -> TopoShape
@@ -122,7 +126,7 @@ class HLRToShape(PyObjectBase):
"""
...
def outLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def outLineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
outLineHCompound(Shape=None) -> TopoShape
@@ -131,7 +135,7 @@ class HLRToShape(PyObjectBase):
"""
...
def isoLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def isoLineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
isoLineHCompound(Shape=None) -> TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Part.HLRBRep_PolyAlgo import HLRBRep_PolyAlgo
@@ -40,7 +44,7 @@ class PolyHLRToShape(PyObjectBase):
new computation of the algorithm, but only reads its internal results.
"""
def update(self, algo: HLRBRep_PolyAlgo) -> None:
def update(self, algo: HLRBRep_PolyAlgo, /) -> None:
"""
update(algo: HLRBRep_PolyAlgo)
"""
@@ -58,7 +62,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def vCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def vCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
vCompound(Shape=None) -> TopoShape
@@ -67,7 +71,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def Rg1LineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
Rg1LineVCompound(Shape=None) -> TopoShape
@@ -76,7 +80,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def RgNLineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
RgNLineVCompound(Shape=None) -> TopoShape
@@ -85,7 +89,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def outLineVCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def outLineVCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
outLineVCompound(Shape=None) -> TopoShape
@@ -94,7 +98,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def hCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def hCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
hCompound(Shape=None) -> TopoShape
@@ -103,7 +107,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def Rg1LineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
Rg1LineHCompound(Shape=None) -> TopoShape
@@ -112,7 +116,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def RgNLineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
RgNLineHCompound(Shape=None) -> TopoShape
@@ -121,7 +125,7 @@ class PolyHLRToShape(PyObjectBase):
"""
...
def outLineHCompound(self, Shape: Optional[TopoShape] = None) -> TopoShape:
def outLineHCompound(self, Shape: Optional[TopoShape] = None, /) -> TopoShape:
"""
outLineHCompound(Shape=None) -> TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Conic import Conic

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from GeometryCurve import GeometryCurve

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Type import Type
from TrimmedCurve import TrimmedCurve

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from GeometryCurve import GeometryCurve

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometrySurface import GeometrySurface

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Conic import Conic
@@ -35,7 +39,7 @@ class Parabola(Conic):
and its directrix. This distance is twice the focal length.
"""
def compute(self, p1: Vector, p2: Vector, p3: Vector) -> None:
def compute(self, p1: Vector, p2: Vector, p3: Vector, /) -> None:
"""
compute(p1,p2,p3) -> None

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from PartFeature import PartFeature

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from App.GeoFeature import GeoFeature
from App.DocumentObject import DocumentObject

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometrySurface import GeometrySurface

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometrySurface import GeometrySurface

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Geometry import Geometry

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometrySurface import GeometrySurface
from typing import Any, Final, Tuple
@@ -31,7 +35,7 @@ class RectangularTrimmedSurface(GeometrySurface):
BasisSurface: Final[Any] = None
"""Represents the basis surface from which the trimmed surface is derived."""
def setTrim(self, params: Tuple[float, float, float, float]) -> None:
def setTrim(self, params: Tuple[float, float, float, float], /) -> None:
"""
setTrim(self, params: (u1, u2, v1, v2)) -> None

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod, class_declarations
from Base.PyObjectBase import PyObjectBase
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Part.App.TopoShapeEdge import TopoShapeEdge
@@ -19,9 +23,11 @@ class ShapeFix_EdgeConnect(PyObjectBase):
"""
@overload
def add(self, edge1: TopoShapeEdge, edge2: TopoShapeEdge) -> None: ...
def add(self, edge1: TopoShapeEdge, edge2: TopoShapeEdge, /) -> None: ...
@overload
def add(self, shape: TopoShape) -> None: ...
def add(self, shape: TopoShape, /) -> None: ...
def add(self, *args, **kwargs) -> None:
"""
add(edge, edge)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.ShapeFix_Root import ShapeFix_Root
from Part.TopoShapeFace import TopoShapeFace

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
@@ -15,13 +19,13 @@ class ShapeFix_FaceConnect(PyObjectBase):
Licence: LGPL
"""
def add(self, face) -> None:
def add(self, face, /) -> None:
"""
add(face, face)
"""
...
def build(self, shell, sewtolerance, fixtolerance) -> None:
def build(self, shell, sewtolerance, fixtolerance, /) -> None:
"""
build(shell, sewtolerance, fixtolerance)
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from Part.App.TopoShape import TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import overload
@@ -16,7 +20,7 @@ class ShapeFix_FixSmallSolid(ShapeFix_Root):
Licence: LGPL
"""
def setFixMode(self, theMode: int) -> None:
def setFixMode(self, theMode: int, /) -> None:
"""
Set working mode for operator:
- theMode = 0 use both WidthFactorThreshold and VolumeThreshold parameters

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Part.App.TopoShapeCompound import TopoShapeCompound

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import Final, overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from Part.TopoShape import TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from Part.App.TopoShape import TopoShape
@@ -18,24 +22,24 @@ class ShapeFix_ShapeTolerance(PyObjectBase):
"""
@overload
def limitTolerance(self, shape: TopoShape, tmin: float) -> None: ...
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:
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: ...
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:
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])
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import Final, overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import Final
@@ -54,7 +58,7 @@ class ShapeFix_Wire(ShapeFix_Root):
"""
pass
def setSurface(self, surface: object, Placement: object = ...) -> None:
def setSurface(self, surface: object, Placement: object = ..., /) -> None:
"""
setSurface(surface, [Placement])
Set surface for the wire
@@ -127,7 +131,7 @@ class ShapeFix_Wire(ShapeFix_Root):
"""
pass
def fixConnected(self, num: int) -> None:
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
@@ -176,13 +180,13 @@ class ShapeFix_Wire(ShapeFix_Root):
"""
pass
def fixGaps3d(self, num: int) -> None:
def fixGaps3d(self, num: int, /) -> None:
"""
Fixes gaps between ends of 3d curves on adjacent edges
"""
pass
def fixGaps2d(self, num: int) -> None:
def fixGaps2d(self, num: int, /) -> None:
"""
Fixes gaps between ends of pcurves on adjacent edges
"""
@@ -207,13 +211,13 @@ class ShapeFix_Wire(ShapeFix_Root):
"""
pass
def fixGap3d(self, num: int) -> None:
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:
def fixGap2d(self, num: int, /) -> None:
"""
Fixes gap between ends of pcurves on num-1 and num-th edges
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Part.App.ShapeFix.ShapeFix_Root import ShapeFix_Root
from typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.PyObjectBase import PyObjectBase
from typing import overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.BaseClass import BaseClass
from Base.Vector import Vector

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from GeometrySurface import GeometrySurface
from GeometryCurve import GeometryCurve

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Placement import Placement
from Base.Vector import Vector

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Base.Matrix import Matrix
@@ -70,13 +74,13 @@ class TopoShape(ComplexGeoData):
"""
...
def loads(self, brep_str: str) -> None:
def loads(self, brep_str: str, /) -> None:
"""
Deserialize the content of this shape from a string in BREP format.
"""
...
def read(self, filename: str) -> None:
def read(self, filename: str, /) -> None:
"""
Read in an IGES, STEP or BREP file.
read(filename)
@@ -94,7 +98,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def exportIges(self, filename: str) -> None:
def exportIges(self, filename: str, /) -> None:
"""
Export the content of this shape to an IGES file.
exportIges(filename)
@@ -102,7 +106,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def exportStep(self, filename: str) -> None:
def exportStep(self, filename: str, /) -> None:
"""
Export the content of this shape to an STEP file.
exportStep(filename)
@@ -110,7 +114,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def exportBrep(self, filename: str) -> None:
def exportBrep(self, filename: str, /) -> None:
"""
Export the content of this shape to an BREP file.
exportBrep(filename)
@@ -120,7 +124,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def exportBinary(self, filename: str) -> None:
def exportBinary(self, filename: str, /) -> None:
"""
Export the content of this shape in binary format to a file.
exportBinary(filename)
@@ -146,28 +150,28 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def exportStl(self, filename: str) -> None:
def exportStl(self, filename: str, /) -> None:
"""
Export the content of this shape to an STL mesh file.
exportStl(filename)
"""
...
def importBrep(self, filename: str) -> None:
def importBrep(self, filename: str, /) -> None:
"""
Load the shape from a file in BREP format.
importBrep(filename)
"""
...
def importBinary(self, filename: str) -> None:
def importBinary(self, filename: str, /) -> None:
"""
Import the content to this shape of a string in BREP format.
importBinary(filename)
"""
...
def importBrepFromString(self, s: str, displayProgressBar: bool = True) -> None:
def importBrepFromString(self, s: str, displayProgressBar: bool = True, /) -> None:
"""
Load the shape from a string that keeps the content in BREP format.
importBrepFromString(string, [displayProgressBar=True])
@@ -177,7 +181,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def extrude(self, vector: Vector) -> TopoShape:
def extrude(self, vector: Vector, /) -> TopoShape:
"""
Extrude the shape along a vector.
extrude(vector) -> Shape
@@ -187,7 +191,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def revolve(self, base: Vector, direction: Vector, angle: float) -> TopoShape:
def revolve(self, base: Vector, direction: Vector, angle: float, /) -> TopoShape:
"""
Revolve the shape around an Axis to a given degree.
revolve(base, direction, angle)
@@ -229,7 +233,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def check(self, runBopCheck: bool = False) -> bool:
def check(self, runBopCheck: bool = False, /) -> bool:
"""
Checks the shape and report errors in the shape structure.
check([runBopCheck = False])
@@ -240,7 +244,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def fuse(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0) -> TopoShape:
def fuse(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0, /) -> TopoShape:
"""
Union of this and a given (list of) topo shape.
fuse(tool) -> Shape
@@ -259,7 +263,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def multiFuse(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0) -> TopoShape:
def multiFuse(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0, /) -> TopoShape:
"""
Union of this and a given list of topo shapes.
multiFuse((tool1,tool2,...),[tolerance=0.0]) -> Shape
@@ -275,7 +279,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def common(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0) -> TopoShape:
def common(self, tools: Tuple[TopoShape, ...], tolerance: float = 0.0, /) -> TopoShape:
"""
Intersection of this and a given (list of) topo shape.
common(tool) -> Shape
@@ -292,9 +296,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def section(
self, tool: Tuple[TopoShape, ...], tolerance: float = 0.0, approximation: bool = False
) -> TopoShape:
def section(self, tool: Tuple[TopoShape, ...], tolerance: float = 0.0, approximation: bool = False, /) -> TopoShape:
"""
Section of this with a given (list of) topo shape.
section(tool,[approximation=False]) -> Shape
@@ -313,7 +315,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def slices(self, direction: Vector, distancesList: List[float]) -> List:
def slices(self, direction: Vector, distancesList: List[float], /) -> List:
"""
Make slices of this shape.
slices(direction, distancesList) --> Wires
@@ -321,7 +323,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def slice(self, direction: Vector, distance: float) -> List:
def slice(self, direction: Vector, distance: float, /) -> List:
"""
Make single slice of this shape.
slice(direction, distance) --> Wires
@@ -329,7 +331,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def cut(self, tool: Tuple[TopoShape, ...], tolerance: float = 0.0) -> TopoShape:
def cut(self, tool: Tuple[TopoShape, ...], tolerance: float = 0.0, /) -> TopoShape:
"""
Difference of this and a given (list of) topo shape
cut(tool) -> Shape
@@ -346,9 +348,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def generalFuse(
self, shapes: Tuple[TopoShape, ...], fuzzy_value: float = 0.0
) -> Tuple[TopoShape, List[List[TopoShape]]]:
def generalFuse(self, shapes: Tuple[TopoShape, ...], fuzzy_value: float = 0.0, /) -> Tuple[TopoShape, List[List[TopoShape]]]:
"""
Run general fuse algorithm (GFA) between this and given shapes.
generalFuse(list_of_other_shapes, [fuzzy_value = 0.0]) -> (result, map)
@@ -386,7 +386,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def childShapes(self, cumOri: bool = True, cumLoc: bool = True) -> List:
def childShapes(self, cumOri: bool = True, cumLoc: bool = True, /) -> List:
"""
Return a list of sub-shapes that are direct children of this shape.
childShapes([cumOri=True, cumLoc=True]) -> list
@@ -400,14 +400,14 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def ancestorsOfType(self, shape: TopoShape, shape_type: str) -> List:
def ancestorsOfType(self, shape: TopoShape, shape_type: str, /) -> List:
"""
For a sub-shape of this shape get its ancestors of a type.
ancestorsOfType(shape, shape type) -> list
"""
...
def removeInternalWires(self, minimalArea: float) -> bool:
def removeInternalWires(self, minimalArea: float, /) -> bool:
"""
Removes internal wires (also holes) from the shape.
removeInternalWires(minimalArea) -> bool
@@ -415,7 +415,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def mirror(self, base: Vector, norm: Vector) -> TopoShape:
def mirror(self, base: Vector, norm: Vector, /) -> TopoShape:
"""
Mirror this shape on a given plane.
mirror(base, norm) -> Shape
@@ -425,7 +425,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def transformGeometry(self, matrix: Matrix) -> TopoShape:
def transformGeometry(self, matrix: Matrix, /) -> TopoShape:
"""
Apply geometric transformation on this or a copy the shape.
transformGeometry(matrix) -> Shape
@@ -449,7 +449,7 @@ class TopoShape(ComplexGeoData):
"""
...
def transformShape(self, matrix: Matrix, copy: bool = False, checkScale: bool = False) -> None:
def transformShape(self, matrix: Matrix, copy: bool = False, checkScale: bool = False, /) -> None:
"""
Apply transformation on a shape without changing the underlying geometry.
transformShape(Matrix, [boolean copy=False, checkScale=False]) -> None
@@ -469,7 +469,7 @@ class TopoShape(ComplexGeoData):
"""
...
def translate(self, vector: Vector) -> None:
def translate(self, vector: Vector, /) -> None:
"""
Apply the translation to the current location of this shape.
translate(vector)
@@ -477,14 +477,14 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def translated(self, vector: Vector) -> TopoShape:
def translated(self, vector: Vector, /) -> TopoShape:
"""
Create a new shape with translation
translated(vector) -> shape
"""
...
def rotate(self, base: Vector, dir: Vector, degree: float) -> None:
def rotate(self, base: Vector, dir: Vector, degree: float, /) -> None:
"""
Apply the rotation (base, dir, degree) to the current location of this shape
rotate(base, dir, degree)
@@ -494,14 +494,14 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def rotated(self, base: Vector, dir: Vector, degree: float) -> TopoShape:
def rotated(self, base: Vector, dir: Vector, degree: float, /) -> TopoShape:
"""
Create a new shape with rotation.
rotated(base, dir, degree) -> shape
"""
...
def scale(self, factor: float, base: Vector = None) -> None:
def scale(self, factor: float, base: Vector = None, /) -> None:
"""
Apply scaling with point and factor to this shape.
scale(factor, [base=App.Vector(0,0,0)])
@@ -509,7 +509,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def scaled(self, factor: float, base: Vector = None) -> TopoShape:
def scaled(self, factor: float, base: Vector = None, /) -> TopoShape:
"""
Create a new shape with scale.
scaled(factor, [base=App.Vector(0,0,0)]) -> shape
@@ -528,10 +528,12 @@ class TopoShape(ComplexGeoData):
@overload
@constmethod
def makeFillet(self, radius: float, edgeList: List) -> TopoShape: ...
def makeFillet(self, radius: float, edgeList: List, /) -> TopoShape: ...
@overload
@constmethod
def makeFillet(self, radius1: float, radius2: float, edgeList: List) -> TopoShape: ...
def makeFillet(self, radius1: float, radius2: float, edgeList: List, /) -> TopoShape: ...
@constmethod
def makeChamfer(self, *args) -> TopoShape:
"""
@@ -544,12 +546,14 @@ class TopoShape(ComplexGeoData):
@overload
@constmethod
def makeChamfer(self, radius: float, edgeList: List) -> TopoShape: ...
def makeChamfer(self, radius: float, edgeList: List, /) -> TopoShape: ...
@overload
@constmethod
def makeChamfer(self, radius1: float, radius2: float, edgeList: List) -> TopoShape: ...
def makeChamfer(self, radius1: float, radius2: float, edgeList: List, /) -> TopoShape: ...
@constmethod
def makeThickness(self, faces: List, offset: float, tolerance: float) -> TopoShape:
def makeThickness(self, faces: List, offset: float, tolerance: float, /) -> TopoShape:
"""
Hollow a solid according to given thickness and faces.
makeThickness(List of faces, Offset (Float), Tolerance (Float)) -> Shape
@@ -653,7 +657,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def makeWires(self, op: str = None) -> TopoShape:
def makeWires(self, op: str = None, /) -> TopoShape:
"""
Make wire(s) using the edges of this shape
makeWires([op=None])
@@ -715,7 +719,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def isPartner(self, shape: TopoShape) -> bool:
def isPartner(self, shape: TopoShape, /) -> bool:
"""
Checks if both shapes share the same geometry.
Placement and orientation may differ.
@@ -724,7 +728,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def isSame(self, shape: TopoShape) -> bool:
def isSame(self, shape: TopoShape, /) -> bool:
"""
Checks if both shapes share the same geometry
and placement. Orientation may differ.
@@ -733,7 +737,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def isEqual(self, shape: TopoShape) -> bool:
def isEqual(self, shape: TopoShape, /) -> bool:
"""
Checks if both shapes are equal.
This means geometry, placement and orientation are equal.
@@ -758,7 +762,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def isCoplanar(self, shape: TopoShape, tol: float = None) -> bool:
def isCoplanar(self, shape: TopoShape, tol: float = None, /) -> bool:
"""
Checks if this shape is coplanar with the given shape.
isCoplanar(shape,tol=None) -> bool
@@ -774,16 +778,14 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def findPlane(self, tol: float = None) -> TopoShape:
def findPlane(self, tol: float = None, /) -> TopoShape:
"""
Returns a plane if the shape is planar
findPlane(tol=None) -> Shape
"""
...
def fix(
self, working_precision: float, minimum_precision: float, maximum_precision: float
) -> bool:
def fix(self, working_precision: float, minimum_precision: float, maximum_precision: float, /) -> bool:
"""
Tries to fix a broken shape.
fix(working precision, minimum precision, maximum precision) -> bool
@@ -811,7 +813,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def project(self, shapeList: List[TopoShape]) -> TopoShape:
def project(self, shapeList: List[TopoShape], /) -> TopoShape:
"""
Project a list of shapes on this shape
project(shapeList) -> Shape
@@ -819,7 +821,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def makeParallelProjection(self, shape: TopoShape, dir: Vector) -> TopoShape:
def makeParallelProjection(self, shape: TopoShape, dir: Vector, /) -> TopoShape:
"""
Parallel projection of an edge or wire on this shape
makeParallelProjection(shape, dir) -> Shape
@@ -827,7 +829,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def makePerspectiveProjection(self, shape: TopoShape, pnt: Vector) -> TopoShape:
def makePerspectiveProjection(self, shape: TopoShape, pnt: Vector, /) -> TopoShape:
"""
Perspective projection of an edge or wire on this shape
makePerspectiveProjection(shape, pnt) -> Shape
@@ -864,7 +866,7 @@ class TopoShape(ComplexGeoData):
"""
...
def makeShapeFromMesh(self, mesh: Tuple[List[Vector], List], tolerance: float) -> TopoShape:
def makeShapeFromMesh(self, mesh: Tuple[List[Vector], List], tolerance: float, /) -> TopoShape:
"""
Make a compound shape out of mesh data.
makeShapeFromMesh((vertex,facets),tolerance) -> Shape
@@ -886,7 +888,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def copy(self, copyGeom: bool = True, copyMesh: bool = False) -> TopoShape:
def copy(self, copyGeom: bool = True, copyMesh: bool = False, /) -> TopoShape:
"""
Create a copy of this shape
copy(copyGeom=True, copyMesh=False) -> Shape
@@ -911,7 +913,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def replaceShape(self, tupleList: List[Tuple[TopoShape, TopoShape]]) -> TopoShape:
def replaceShape(self, tupleList: List[Tuple[TopoShape, TopoShape]], /) -> TopoShape:
"""
Replace a sub-shape with a new shape and return a new shape.
replaceShape(tupleList) -> Shape
@@ -921,7 +923,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def removeShape(self, shapeList: List[TopoShape]) -> TopoShape:
def removeShape(self, shapeList: List[TopoShape], /) -> TopoShape:
"""
Remove a sub-shape and return a new shape.
removeShape(shapeList) -> Shape
@@ -931,7 +933,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def defeaturing(self, shapeList: List[TopoShape]) -> TopoShape:
def defeaturing(self, shapeList: List[TopoShape], /) -> TopoShape:
"""
Remove a feature defined by supplied faces and return a new shape.
defeaturing(shapeList) -> Shape
@@ -941,7 +943,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def isInside(self, point: Vector, tolerance: float, checkFace: bool) -> bool:
def isInside(self, point: Vector, tolerance: float, checkFace: bool, /) -> bool:
"""
Checks whether a point is inside or outside the shape.
isInside(point, tolerance, checkFace) => Boolean
@@ -959,7 +961,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def proximity(self, shape: TopoShape, tolerance: float = None) -> Tuple[List[int], List[int]]:
def proximity(self, shape: TopoShape, tolerance: float = None, /) -> Tuple[List[int], List[int]]:
"""
Returns two lists of Face indexes for the Faces involved in the intersection.
proximity(shape,[tolerance]) -> (selfFaces, shapeFaces)
@@ -967,9 +969,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def distToShape(
self, shape: TopoShape, tol: float = 1e-7
) -> Tuple[float, List[Tuple[Vector, Vector]], List[Tuple]]:
def distToShape(self, shape: TopoShape, tol: float = 1e-7, /) -> Tuple[float, List[Tuple[Vector, Vector]], List[Tuple]]:
"""
Find the minimum distance to another shape.
distToShape(shape, tol=1e-7) -> (dist, vectors, infos)
@@ -996,7 +996,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def getElement(self, elementName: str, silent: bool = False) -> TopoShape:
def getElement(self, elementName: str, silent: bool = False, /) -> TopoShape:
"""
Returns a SubElement
getElement(elementName, [silent = False]) -> Face | Edge | Vertex
@@ -1007,14 +1007,14 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def countElement(self, type: str) -> int:
def countElement(self, type: str, /) -> int:
"""
Returns the count of a type of element
countElement(type) -> int
"""
...
def mapSubElement(self, shape: Union[TopoShape, Tuple[TopoShape, ...]], op: str = "") -> None:
def mapSubElement(self, shape: Union[TopoShape, Tuple[TopoShape, ...]], op: str = "", /) -> None:
"""
mapSubElement(shape|[shape...], op='') - maps the sub element of other shape
@@ -1023,12 +1023,7 @@ class TopoShape(ComplexGeoData):
"""
...
def mapShapes(
self,
generated: List[Tuple[TopoShape, TopoShape]],
modified: List[Tuple[TopoShape, TopoShape]],
op: str = "",
) -> None:
def mapShapes(self, generated: List[Tuple[TopoShape, TopoShape]], modified: List[Tuple[TopoShape, TopoShape]], op: str = "", /) -> None:
"""
mapShapes(generated, modified, op='')
@@ -1045,7 +1040,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def getElementHistory(self, name: str) -> Union[Tuple[str, str, List[str]], None]:
def getElementHistory(self, name: str, /) -> Union[Tuple[str, str, List[str]], None]:
"""
getElementHistory(name) - returns the element mapped name history
@@ -1057,7 +1052,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def getTolerance(self, mode: int, ShapeType: str = "Shape") -> float:
def getTolerance(self, mode: int, ShapeType: str = "Shape", /) -> float:
"""
Determines a tolerance from the ones stored in a shape
getTolerance(mode, ShapeType=Shape) -> float
@@ -1076,7 +1071,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def overTolerance(self, value: float, ShapeType: str = "Shape") -> List[TopoShape]:
def overTolerance(self, value: float, ShapeType: str = "Shape", /) -> List[TopoShape]:
"""
Determines which shapes have a tolerance over the given value
overTolerance(value, [ShapeType=Shape]) -> ShapeList
@@ -1086,9 +1081,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def inTolerance(
self, valmin: float, valmax: float, ShapeType: str = "Shape"
) -> List[TopoShape]:
def inTolerance(self, valmin: float, valmax: float, ShapeType: str = "Shape", /) -> List[TopoShape]:
"""
Determines which shapes have a tolerance within a given interval
inTolerance(valmin, valmax, [ShapeType=Shape]) -> ShapeList
@@ -1098,7 +1091,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def globalTolerance(self, mode: int) -> float:
def globalTolerance(self, mode: int, /) -> float:
"""
Returns the computed tolerance according to the mode
globalTolerance(mode) -> float
@@ -1110,7 +1103,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def fixTolerance(self, value: float, ShapeType: str = "Shape") -> None:
def fixTolerance(self, value: float, ShapeType: str = "Shape", /) -> None:
"""
Sets (enforces) tolerances in a shape to the given value
fixTolerance(value, [ShapeType=Shape])
@@ -1124,7 +1117,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def limitTolerance(self, tmin: float, tmax: float = 0, ShapeType: str = "Shape") -> bool:
def limitTolerance(self, tmin: float, tmax: float = 0, ShapeType: str = "Shape", /) -> bool:
"""
Limits tolerances in a shape
limitTolerance(tmin, [tmax=0, ShapeType=Shape]) -> bool
@@ -1144,9 +1137,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def optimalBoundingBox(
self, useTriangulation: bool = True, useShapeTolerance: bool = False
) -> BoundBox:
def optimalBoundingBox(self, useTriangulation: bool = True, useShapeTolerance: bool = False, /) -> BoundBox:
"""
Get the optimal bounding box
optimalBoundingBox([useTriangulation = True, useShapeTolerance = False]) -> bound box
@@ -1160,7 +1151,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def findSubShape(self, shape: TopoShape) -> Tuple[Union[str, None], int]:
def findSubShape(self, shape: TopoShape, /) -> Tuple[Union[str, None], int]:
"""
findSubShape(shape) -> (type_name, index)
@@ -1200,7 +1191,7 @@ class TopoShape(ComplexGeoData):
...
@constmethod
def getChildShapes(self, shapetype: str, avoidtype: str = "") -> List[TopoShape]:
def getChildShapes(self, shapetype: str, avoidtype: str = "", /) -> List[TopoShape]:
"""
getChildShapes(shapetype, avoidtype='') -> list(Shape)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from TopoShape import TopoShape
@@ -17,7 +21,7 @@ class TopoShapeCompSolid(TopoShape):
TopoShapeCompSolid is the OpenCasCade topological compound solid wrapper
"""
def add(self, solid: TopoShape) -> None:
def add(self, solid: TopoShape, /) -> None:
"""
Add a solid to the compound.
add(solid)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from TopoShape import TopoShape
@@ -16,7 +20,7 @@ class TopoShapeCompound(TopoShape):
Licence: LGPL
"""
def add(self, shape: TopoShape) -> None:
def add(self, shape: TopoShape, /) -> None:
"""
Add a shape to the compound.
add(shape)
@@ -24,9 +28,7 @@ class TopoShapeCompound(TopoShape):
...
@constmethod
def connectEdgesToWires(
self, Shared: bool = True, Tolerance: float = 1e-7
) -> "TopoShapeCompound":
def connectEdgesToWires(self, Shared: bool = True, Tolerance: float = 1e-7, /) -> "TopoShapeCompound":
"""
Build a compound of wires out of the edges of this compound.
connectEdgesToWires([Shared = True, Tolerance = 1e-7]) -> Compound

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Wire import Wire
@@ -141,7 +145,7 @@ class TopoShapeEdge(TopoShape):
"""Returns the continuity"""
@constmethod
def getParameterByLength(self, pos: float, tolerance: float = 1e-7) -> float:
def getParameterByLength(self, pos: float, tolerance: float = 1e-7, /) -> float:
"""
Get the value of the primary parameter at the given distance along the cartesian length of the edge.
getParameterByLength(pos, [tolerance = 1e-7]) -> Float
@@ -161,7 +165,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def tangentAt(self, paramval: float) -> Vector:
def tangentAt(self, paramval: float, /) -> Vector:
"""
Get the tangent direction at the given primary parameter value along the Edge if it is defined
tangentAt(paramval) -> Vector
@@ -199,7 +203,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def valueAt(self, paramval: float) -> Vector:
def valueAt(self, paramval: float, /) -> Vector:
"""
Get the value of the cartesian parameter value at the given parameter value along the Edge
valueAt(paramval) -> Vector
@@ -241,7 +245,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def parameters(self, face: object = ...) -> List[float]:
def parameters(self, face: object = ..., /) -> List[float]:
"""
Get the list of parameters of the tessellation of an edge.
parameters([face]) -> list
@@ -252,7 +256,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def parameterAt(self, vertex: object) -> float:
def parameterAt(self, vertex: object, /) -> float:
"""
Get the parameter at the given vertex if lying on the edge
parameterAt(Vertex) -> Float
@@ -260,7 +264,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def normalAt(self, paramval: float) -> Vector:
def normalAt(self, paramval: float, /) -> Vector:
"""
Get the normal direction at the given parameter value along the Edge if it is defined
normalAt(paramval) -> Vector
@@ -298,7 +302,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def derivative1At(self, paramval: float) -> Vector:
def derivative1At(self, paramval: float, /) -> Vector:
"""
Get the first derivative at the given parameter value along the Edge if it is defined
derivative1At(paramval) -> Vector
@@ -336,7 +340,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def derivative2At(self, paramval: float) -> Vector:
def derivative2At(self, paramval: float, /) -> Vector:
"""
Get the second derivative at the given parameter value along the Edge if it is defined
derivative2At(paramval) -> Vector
@@ -374,7 +378,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def derivative3At(self, paramval: float) -> Vector:
def derivative3At(self, paramval: float, /) -> Vector:
"""
Get the third derivative at the given parameter value along the Edge if it is defined
derivative3At(paramval) -> Vector
@@ -412,7 +416,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def curvatureAt(self, paramval: float) -> float:
def curvatureAt(self, paramval: float, /) -> float:
"""
Get the curvature at the given parameter [First|Last] if defined
curvatureAt(paramval) -> Float
@@ -420,7 +424,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def centerOfCurvatureAt(self, paramval: float) -> Vector:
def centerOfCurvatureAt(self, paramval: float, /) -> Vector:
"""
Get the center of curvature at the given parameter [First|Last] if defined
centerOfCurvatureAt(paramval) -> Vector
@@ -428,7 +432,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def firstVertex(self, Orientation: bool = False) -> Vertex:
def firstVertex(self, Orientation: bool = False, /) -> Vertex:
"""
Returns the Vertex of orientation FORWARD in this edge.
firstVertex([Orientation=False]) -> Vertex
@@ -439,7 +443,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def lastVertex(self, Orientation: bool = False) -> Vertex:
def lastVertex(self, Orientation: bool = False, /) -> Vertex:
"""
Returns the Vertex of orientation REVERSED in this edge.
lastVertex([Orientation=False]) -> Vertex
@@ -527,7 +531,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def split(self, paramval: float) -> Wire:
def split(self, paramval: float, /) -> Wire:
"""
Splits the edge at the given parameter values and builds a wire out of it
split(paramval) -> Wire
@@ -545,7 +549,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def isSeam(self, Face: object) -> bool:
def isSeam(self, Face: object, /) -> bool:
"""
Checks whether the edge is a seam edge.
isSeam(Face)
@@ -553,7 +557,7 @@ class TopoShapeEdge(TopoShape):
...
@constmethod
def curveOnSurface(self, idx: int) -> Tuple[object, object, object, float, float]:
def curveOnSurface(self, idx: int, /) -> Tuple[object, object, object, float, float]:
"""
Returns the 2D curve, the surface, the placement and the parameter range of index idx.
curveOnSurface(idx) -> None or tuple

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from TopoShape import TopoShape
@@ -87,7 +91,7 @@ class TopoShapeFace(TopoShape):
eigen vectors of the matrix of inertia of the system.
"""
def addWire(self, wire: object) -> None:
def addWire(self, wire: object, /) -> None:
"""
Adds a wire to the face.
addWire(wire)
@@ -95,7 +99,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def makeOffset(self, dist: float) -> object:
def makeOffset(self, dist: float, /) -> object:
"""
Offset the face by a given amount.
makeOffset(dist) -> Face
@@ -131,7 +135,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def tangentAt(self, u: float, v: float) -> Vector:
def tangentAt(self, u: float, v: float, /) -> Vector:
"""
Get the tangent in u and v isoparametric at the given point if defined
tangentAt(u,v) -> Vector
@@ -139,7 +143,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def valueAt(self, u: float, v: float) -> Vector:
def valueAt(self, u: float, v: float, /) -> Vector:
"""
Get the point at the given parameter [0|Length] if defined
valueAt(u,v) -> Vector
@@ -147,7 +151,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def normalAt(self, pos: float) -> Vector:
def normalAt(self, pos: float, /) -> Vector:
"""
Get the normal vector at the given parameter [0|Length] if defined
normalAt(pos) -> Vector
@@ -155,7 +159,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def derivative1At(self, u: float, v: float) -> Tuple[Vector, Vector]:
def derivative1At(self, u: float, v: float, /) -> Tuple[Vector, Vector]:
"""
Get the first derivative at the given parameter [0|Length] if defined
derivative1At(u,v) -> (vectorU,vectorV)
@@ -163,7 +167,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def derivative2At(self, u: float, v: float) -> Tuple[Vector, Vector]:
def derivative2At(self, u: float, v: float, /) -> Tuple[Vector, Vector]:
"""
Vector = d2At(pos) - Get the second derivative at the given parameter [0|Length] if defined
derivative2At(u,v) -> (vectorU,vectorV)
@@ -171,7 +175,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def curvatureAt(self, u: float, v: float) -> float:
def curvatureAt(self, u: float, v: float, /) -> float:
"""
Get the curvature at the given parameter [0|Length] if defined
curvatureAt(u,v) -> Float
@@ -179,7 +183,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def isPartOfDomain(self, u: float, v: float) -> bool:
def isPartOfDomain(self, u: float, v: float, /) -> bool:
"""
Check if a given (u,v) pair is inside the domain of a face
isPartOfDomain(u,v) -> bool
@@ -187,7 +191,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def makeHalfSpace(self, pos: object) -> object:
def makeHalfSpace(self, pos: object, /) -> object:
"""
Make a half-space solid by this face and a reference point.
makeHalfSpace(pos) -> Shape
@@ -216,7 +220,7 @@ class TopoShapeFace(TopoShape):
...
@constmethod
def curveOnSurface(self, Edge: object) -> Optional[Tuple[object, float, float]]:
def curveOnSurface(self, Edge: object, /) -> Optional[Tuple[object, float, float]]:
"""
Returns the curve associated to the edge in the parametric space of the face.
curveOnSurface(Edge) -> (curve, min, max) or None
@@ -226,7 +230,7 @@ class TopoShapeFace(TopoShape):
"""
...
def cutHoles(self, list_of_wires: List[object]) -> None:
def cutHoles(self, list_of_wires: List[object], /) -> None:
"""
Cut holes in the face.
cutHoles(list_of_wires)

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from TopoShape import TopoShape
from typing import Final, Dict
@@ -68,7 +72,7 @@ class TopoShapeShell(TopoShape):
eigen vectors of the matrix of inertia of the system.
"""
def add(self, face: object) -> None:
def add(self, face: object, /) -> None:
"""
Add a face to the shell.
add(face)
@@ -92,7 +96,7 @@ class TopoShapeShell(TopoShape):
...
@constmethod
def makeHalfSpace(self, point: object) -> object:
def makeHalfSpace(self, point: object, /) -> object:
"""
Make a half-space solid by this shell and a reference point.
makeHalfSpace(point) -> Solid

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from TopoShape import TopoShape
from Base.Vector import Vector
@@ -77,7 +81,7 @@ class TopoShapeSolid(TopoShape):
"""
@constmethod
def getMomentOfInertia(self, point: Vector, direction: Vector) -> float:
def getMomentOfInertia(self, point: Vector, direction: Vector, /) -> float:
"""
computes the moment of inertia of the material system about the axis A.
getMomentOfInertia(point,direction) -> Float
@@ -85,7 +89,7 @@ class TopoShapeSolid(TopoShape):
...
@constmethod
def getRadiusOfGyration(self, point: Vector, direction: Vector) -> float:
def getRadiusOfGyration(self, point: Vector, direction: Vector, /) -> float:
"""
Returns the radius of gyration of the current system about the axis A.
getRadiusOfGyration(point,direction) -> Float
@@ -94,10 +98,13 @@ class TopoShapeSolid(TopoShape):
@overload
@constmethod
def offsetFaces(self, facesTuple: Tuple[TopoShape, ...], offset: float) -> TopoShape: ...
def offsetFaces(
self, facesTuple: Tuple[TopoShape, ...], offset: float, /) -> TopoShape: ...
@overload
@constmethod
def offsetFaces(self, facesDict: Dict[TopoShape, float]) -> TopoShape: ...
def offsetFaces(self, facesDict: Dict[TopoShape, float], /) -> TopoShape: ...
@constmethod
def offsetFaces(self, *args, **kwargs) -> TopoShape:
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.Vector import Vector
from TopoShape import TopoShape

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from TopoShape import TopoShape
from typing import Dict, List, Final, overload, Optional
@@ -85,14 +89,15 @@ class TopoShapeWire(TopoShape):
"""
...
def add(self, edge: object) -> None:
def add(self, edge: object, /) -> None:
"""
Add an edge to the wire
add(edge)
"""
...
def fixWire(self, face: Optional[object] = None, tolerance: Optional[float] = None) -> None:
def fixWire(
self, face: Optional[object] = None, tolerance: Optional[float] = None, /) -> None:
"""
Fix wire
fixWire([face, tolerance])
@@ -102,7 +107,7 @@ class TopoShapeWire(TopoShape):
...
@constmethod
def makeHomogenousWires(self, wire: object) -> object:
def makeHomogenousWires(self, wire: object, /) -> object:
"""
Make this and the given wire homogeneous to have the same number of edges
makeHomogenousWires(wire) -> Wire
@@ -110,7 +115,7 @@ class TopoShapeWire(TopoShape):
...
@constmethod
def makePipe(self, profile: object) -> object:
def makePipe(self, profile: object, /) -> object:
"""
Make a pipe by sweeping along a wire.
makePipe(profile) -> Shape
@@ -124,7 +129,7 @@ class TopoShapeWire(TopoShape):
isSolid: bool = False,
isFrenet: bool = False,
transition: int = 0,
) -> object:
/,) -> object:
"""
Make a loft defined by a list of profiles along a wire.
makePipeShell(shapeList,[isSolid=False,isFrenet=False,transition=0]) -> Shape

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