[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 typing import Final
from Base.Metadata import export

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -24,11 +24,11 @@ class Command(Persistence):
"""toGCode(): returns a GCode representation of the command"""
...
def setFromGCode(self, gcode: str) -> None:
def setFromGCode(self, gcode: str, /) -> None:
"""setFromGCode(): sets the path from the contents of the given GCode string"""
...
def transform(self, placement: Placement) -> "CommandPy":
def transform(self, placement: Placement, /) -> "CommandPy":
"""transform(Placement): returns a copy of this command transformed by the given placement"""
...
Name: str

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from Base.Metadata import constmethod
@@ -33,20 +37,20 @@ class Array2D(BaseClass):
"""The number of columns in the array."""
@constmethod
def getRow(self, value: Any) -> Any:
def getRow(self, value: Any, /) -> Any:
"""
Get the row given the first column value
"""
...
@constmethod
def getValue(self, row: int, column: int) -> Any:
def getValue(self, row: int, column: int, /) -> Any:
"""
Get the value at the given row and column
"""
...
def setValue(self, row: int, column: int, value: Any):
def setValue(self, row: int, column: int, value: Any, /):
"""
Set the value at the given row and column
"""

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 typing import Any, Final, List
@@ -52,19 +56,19 @@ class Array3D(BaseClass):
"""
...
def setDepthValue(self, value: Any):
def setDepthValue(self, value: Any, /):
"""
Set the column value at the given depth
"""
...
def setValue(self, depth: int, row: int, column: int, value: Any):
def setValue(self, depth: int, row: int, column: int, value: Any, /):
"""
Set the value at the given depth, row, and column
"""
...
def setRows(self, depth: int, value: int):
def setRows(self, depth: int, value: int, /):
"""
Set the number of rows at the given depth
"""

View File

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

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 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
from Base.BaseClass import BaseClass

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 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 typing import Final, List, Dict, overload

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from ModelProperty import ModelProperty
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 typing import Final, List, Dict, 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 typing import Final, List, Dict

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 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 typing import Final

View File

@@ -1,3 +1,7 @@
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod, forward_declarations, class_declarations, sequence_protocol
from Base.BaseClass import BaseClass
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 App.DocumentObject import DocumentObject

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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