[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,10 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export
from PyObjectBase import PyObjectBase
from Vector import Vector
from Placement import Placement
from Axis import Axis
from typing import overload
@export(
@@ -55,7 +56,7 @@ class Axis(PyObjectBase):
"""
...
def move(self, vector: Vector) -> None:
def move(self, vector: Vector, /) -> None:
"""
move(vector) -> None
@@ -66,7 +67,7 @@ class Axis(PyObjectBase):
"""
...
def multiply(self, placement: Placement) -> Axis:
def multiply(self, placement: Placement, /) -> Axis:
"""
multiply(placement) -> Base.Axis

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import constmethod
from PyObjectBase import PyObjectBase
@@ -19,7 +21,7 @@ class BaseClass(PyObjectBase):
"""Module in which this class is defined"""
@constmethod
def isDerivedFrom(self, typeName: str) -> bool:
def isDerivedFrom(self, typeName: str, /) -> bool:
"""
Returns true if given type is a father
"""

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from PyObjectBase import PyObjectBase
@@ -134,11 +136,14 @@ class BoundBox(PyObjectBase):
...
@overload
def add(self, minMax: Vector) -> None: ...
def add(self, minMax: Vector, /) -> None: ...
@overload
def add(self, minMax: Tuple[float, float, float]) -> None: ...
def add(self, minMax: Tuple[float, float, float], /) -> None: ...
@overload
def add(self, x: float, y: float, z: float) -> None: ...
def add(self, x: float, y: float, z: float, /) -> None: ...
def add(self, *args: Any, **kwargs: Any) -> None:
"""
add(minMax) -> None
@@ -160,7 +165,7 @@ class BoundBox(PyObjectBase):
...
@constmethod
def getPoint(self, index: int) -> Vector:
def getPoint(self, index: int, /) -> Vector:
"""
getPoint(index) -> Base.Vector
@@ -172,7 +177,7 @@ class BoundBox(PyObjectBase):
...
@constmethod
def getEdge(self, index: int) -> Tuple[Vector, ...]:
def getEdge(self, index: int, /) -> Tuple[Vector, ...]:
"""
getEdge(index) -> tuple of Base.Vector
@@ -184,9 +189,9 @@ class BoundBox(PyObjectBase):
...
@overload
def closestPoint(self, point: Vector) -> Vector: ...
def closestPoint(self, point: Vector, /) -> Vector: ...
@overload
def closestPoint(self, x: float, y: float, z: float) -> Vector: ...
def closestPoint(self, x: float, y: float, z: float, /) -> Vector: ...
@constmethod
def closestPoint(self, *args: Any, **kwargs: Any) -> Vector:
"""
@@ -207,13 +212,13 @@ class BoundBox(PyObjectBase):
...
@overload
def intersect(self, boundBox2: "BoundBox") -> bool: ...
def intersect(self, boundBox2: "BoundBox", /) -> bool: ...
@overload
def intersect(
self,
base: Union[Vector, Tuple[float, float, float]],
dir: Union[Vector, Tuple[float, float, float]],
) -> bool: ...
/,) -> bool: ...
def intersect(self, *args: Any) -> bool:
"""
intersect(boundBox2) -> bool
@@ -228,7 +233,7 @@ class BoundBox(PyObjectBase):
"""
...
def intersected(self, boundBox2: "BoundBox") -> "BoundBox":
def intersected(self, boundBox2: "BoundBox", /) -> "BoundBox":
"""
intersected(boundBox2) -> Base.BoundBox
@@ -238,7 +243,7 @@ class BoundBox(PyObjectBase):
"""
...
def united(self, boundBox2: "BoundBox") -> "BoundBox":
def united(self, boundBox2: "BoundBox", /) -> "BoundBox":
"""
united(boundBox2) -> Base.BoundBox
@@ -248,7 +253,7 @@ class BoundBox(PyObjectBase):
"""
...
def enlarge(self, variation: float) -> None:
def enlarge(self, variation: float, /) -> None:
"""
enlarge(variation) -> None
@@ -259,7 +264,7 @@ class BoundBox(PyObjectBase):
"""
...
def getIntersectionPoint(self, base: Vector, dir: Vector, epsilon: float = 0.0001) -> Vector:
def getIntersectionPoint(self, base: Vector, dir: Vector, epsilon: float = 0.0001, /) -> Vector:
"""
getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector
@@ -276,11 +281,11 @@ class BoundBox(PyObjectBase):
...
@overload
def move(self, displacement: Vector) -> None: ...
def move(self, displacement: Vector, /) -> None: ...
@overload
def move(self, displacement: Tuple[float, float, float]) -> None: ...
def move(self, displacement: Tuple[float, float, float], /) -> None: ...
@overload
def move(self, x: float, y: float, z: float) -> None: ...
def move(self, x: float, y: float, z: float, /) -> None: ...
def move(self, *args: Any, **kwargs: Any) -> None:
"""
move(displacement) -> None
@@ -300,11 +305,11 @@ class BoundBox(PyObjectBase):
...
@overload
def scale(self, factor: Vector) -> None: ...
def scale(self, factor: Vector, /) -> None: ...
@overload
def scale(self, factor: Tuple[float, float, float]) -> None: ...
def scale(self, factor: Tuple[float, float, float], /) -> None: ...
@overload
def scale(self, x: float, y: float, z: float) -> None: ...
def scale(self, x: float, y: float, z: float, /) -> None: ...
def scale(self, *args: Any, **kwargs: Any) -> None:
"""
scale(factor) -> None
@@ -323,7 +328,7 @@ class BoundBox(PyObjectBase):
"""
...
def transformed(self, matrix: Matrix) -> "BoundBox":
def transformed(self, matrix: Matrix, /) -> "BoundBox":
"""
transformed(matrix) -> Base.BoundBox
@@ -335,7 +340,7 @@ class BoundBox(PyObjectBase):
"""
...
def isCutPlane(self, base: Vector, normal: Vector) -> bool:
def isCutPlane(self, base: Vector, normal: Vector, /) -> bool:
"""
isCutPlane(base, normal) -> bool
@@ -348,11 +353,11 @@ class BoundBox(PyObjectBase):
...
@overload
def isInside(self, object: Vector) -> bool: ...
def isInside(self, object: Vector, /) -> bool: ...
@overload
def isInside(self, object: "BoundBox") -> bool: ...
def isInside(self, object: "BoundBox", /) -> bool: ...
@overload
def isInside(self, x: float, y: float, z: float) -> bool: ...
def isInside(self, x: float, y: float, z: float, /) -> bool: ...
def isInside(self, *args: Any) -> bool:
"""
isInside(object) -> bool

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from PyObjectBase import PyObjectBase
@@ -40,7 +42,7 @@ class CoordinateSystem(PyObjectBase):
Position: Vector = None
"""Set or get position."""
def setAxes(self, axis: Union[AxisPy, Vector], xDir: Vector) -> None:
def setAxes(self, axis: Union[AxisPy, Vector], xDir: Vector, /) -> None:
"""
setAxes(axis, xDir) -> None
@@ -54,7 +56,7 @@ class CoordinateSystem(PyObjectBase):
...
@constmethod
def displacement(self, coordSystem2: "CoordinateSystem") -> Placement:
def displacement(self, coordSystem2: "CoordinateSystem", /) -> Placement:
"""
displacement(coordSystem2) -> Base.Placement
@@ -64,7 +66,7 @@ class CoordinateSystem(PyObjectBase):
"""
...
def transformTo(self, vector: Vector) -> Vector:
def transformTo(self, vector: Vector, /) -> Vector:
"""
transformTo(vector) -> Base.Vector
@@ -74,7 +76,7 @@ class CoordinateSystem(PyObjectBase):
"""
...
def transform(self, trans: Union[Rotation, Placement]) -> None:
def transform(self, trans: Union[Rotation, Placement], /) -> None:
"""
transform(trans) -> None
@@ -84,7 +86,7 @@ class CoordinateSystem(PyObjectBase):
"""
...
def setPlacement(self, placement: Placement) -> None:
def setPlacement(self, placement: Placement, /) -> None:
"""
setPlacement(placement) -> None

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Vector import Vector
from Metadata import export, constmethod, class_declarations, no_args
@@ -105,9 +107,9 @@ class Matrix(PyObjectBase):
"""The matrix elements."""
@overload
def move(self, vector: Vector) -> None: ...
def move(self, vector: Vector, /) -> None: ...
@overload
def move(self, x: float, y: float, z: float) -> None: ...
def move(self, x: float, y: float, z: float, /) -> None: ...
def move(self, *args) -> None:
"""
move(vector) -> None
@@ -127,11 +129,11 @@ class Matrix(PyObjectBase):
...
@overload
def scale(self, vector: Vector) -> None: ...
def scale(self, vector: Vector, /) -> None: ...
@overload
def scale(self, x: float, y: float, z: float) -> None: ...
def scale(self, x: float, y: float, z: float, /) -> None: ...
@overload
def scale(self, factor: float) -> None: ...
def scale(self, factor: float, /) -> None: ...
def scale(self, *args) -> None:
"""
scale(vector) -> None
@@ -153,7 +155,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def hasScale(self, tol: float = 0) -> ScaleType:
def hasScale(self, tol: float = 0, /) -> ScaleType:
"""
hasScale(tol=0) -> ScaleType
@@ -204,7 +206,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def isUnity(self, tol: float = 0.0) -> bool:
def isUnity(self, tol: float = 0.0, /) -> bool:
"""
isUnity([tol=0.0]) -> bool
@@ -212,7 +214,7 @@ class Matrix(PyObjectBase):
"""
...
def transform(self, vector: Vector, matrix2: "Matrix") -> None:
def transform(self, vector: Vector, matrix2: "Matrix", /) -> None:
"""
transform(vector, matrix2) -> None
@@ -228,7 +230,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def col(self, index: int) -> Vector:
def col(self, index: int, /) -> Vector:
"""
col(index) -> Base.Vector
@@ -240,7 +242,7 @@ class Matrix(PyObjectBase):
"""
...
def setCol(self, index: int, vector: Vector) -> None:
def setCol(self, index: int, vector: Vector, /) -> None:
"""
setCol(index, vector) -> None
@@ -254,7 +256,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def row(self, index: int) -> Vector:
def row(self, index: int, /) -> Vector:
"""
row(index) -> Base.Vector
@@ -266,7 +268,7 @@ class Matrix(PyObjectBase):
"""
...
def setRow(self, index: int, vector: Vector) -> None:
def setRow(self, index: int, vector: Vector, /) -> None:
"""
setRow(index, vector) -> None
@@ -289,7 +291,7 @@ class Matrix(PyObjectBase):
"""
...
def setDiagonal(self, vector: Vector) -> None:
def setDiagonal(self, vector: Vector, /) -> None:
"""
setDiagonal(vector) -> None
@@ -299,7 +301,7 @@ class Matrix(PyObjectBase):
"""
...
def rotateX(self, angle: float) -> None:
def rotateX(self, angle: float, /) -> None:
"""
rotateX(angle) -> None
@@ -310,7 +312,7 @@ class Matrix(PyObjectBase):
"""
...
def rotateY(self, angle: float) -> None:
def rotateY(self, angle: float, /) -> None:
"""
rotateY(angle) -> None
@@ -321,7 +323,7 @@ class Matrix(PyObjectBase):
"""
...
def rotateZ(self, angle: float) -> None:
def rotateZ(self, angle: float, /) -> None:
"""
rotateZ(angle) -> None
@@ -333,11 +335,11 @@ class Matrix(PyObjectBase):
...
@overload
def multiply(self, matrix: "Matrix") -> "Matrix": ...
def multiply(self, matrix: "Matrix", /) -> "Matrix": ...
@overload
def multiply(self, vector: Vector) -> Vector: ...
def multiply(self, vector: Vector, /) -> Vector: ...
@constmethod
def multiply(self, obj: Union["Matrix", Vector]) -> Union["Matrix", Vector]:
def multiply(self, obj: Union["Matrix", Vector], /) -> Union["Matrix", Vector]:
"""
multiply(matrix) -> Base.Matrix
multiply(vector) -> Base.Vector
@@ -351,7 +353,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def multVec(self, vector: Vector) -> Vector:
def multVec(self, vector: Vector, /) -> Vector:
"""
multVec(vector) -> Base.Vector
@@ -410,7 +412,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def isOrthogonal(self, tol: float = 1e-6) -> float:
def isOrthogonal(self, tol: float = 1e-6, /) -> float:
"""
isOrthogonal(tol=1e-6) -> float
@@ -423,7 +425,7 @@ class Matrix(PyObjectBase):
...
@constmethod
def submatrix(self, dim: int) -> "Matrix":
def submatrix(self, dim: int, /) -> "Matrix":
"""
submatrix(dim) -> Base.Matrix

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
"""
This file keeps auxiliary metadata to be used by the Python API stubs.

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import constmethod
from BaseClass import BaseClass
@@ -21,7 +23,7 @@ class Persistence(BaseClass):
"""Memory size of the object in bytes."""
@constmethod
def dumpContent(self, *, Compression: int = 3) -> bytearray:
def dumpContent(self, Compression: int = 3) -> bytearray:
"""
dumpContent(Compression=3) -> bytearray
@@ -33,7 +35,7 @@ class Persistence(BaseClass):
"""
...
def restoreContent(self, obj: object) -> None:
def restoreContent(self, obj: object, /) -> None:
# TODO: Starting with Python 3.12, collections.abc.Buffer can be used for type hinting
"""
restoreContent(obj) -> None

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod, class_declarations
from PyObjectBase import PyObjectBase
@@ -92,7 +94,7 @@ class Placement(PyObjectBase):
"""
...
def move(self, vector: Vector) -> None:
def move(self, vector: Vector, /) -> None:
"""
move(vector) -> None
@@ -103,7 +105,7 @@ class Placement(PyObjectBase):
"""
...
def translate(self, vector: Vector) -> None:
def translate(self, vector: Vector, /) -> None:
"""
translate(vector) -> None
@@ -139,7 +141,7 @@ class Placement(PyObjectBase):
...
@constmethod
def multiply(self, placement: "Placement") -> "Placement":
def multiply(self, placement: "Placement", /) -> "Placement":
"""
multiply(placement) -> Base.Placement
@@ -152,7 +154,7 @@ class Placement(PyObjectBase):
...
@constmethod
def multVec(self, vector: Vector) -> Vector:
def multVec(self, vector: Vector, /) -> Vector:
"""
multVec(vector) -> Base.Vector
@@ -182,7 +184,7 @@ class Placement(PyObjectBase):
...
@constmethod
def pow(self, t: float, shorten: bool = True) -> "Placement":
def pow(self, t: float, shorten: bool = True, /) -> "Placement":
"""
pow(t, shorten=True) -> Base.Placement
@@ -198,7 +200,7 @@ class Placement(PyObjectBase):
...
@constmethod
def sclerp(self, placement2: "Placement", t: float, shorten: bool = True) -> "Placement":
def sclerp(self, placement2: "Placement", t: float, shorten: bool = True, /) -> "Placement":
"""
sclerp(placement2, t, shorten=True) -> Base.Placement
@@ -219,7 +221,7 @@ class Placement(PyObjectBase):
...
@constmethod
def slerp(self, placement2: "Placement", t: float) -> "Placement":
def slerp(self, placement2: "Placement", t: float, /) -> "Placement":
"""
slerp(placement2, t) -> Base.Placement
@@ -236,7 +238,7 @@ class Placement(PyObjectBase):
...
@constmethod
def isIdentity(self, tol: float = 0.0) -> bool:
def isIdentity(self, tol: float = 0.0, /) -> bool:
"""
isIdentity([tol=0.0]) -> bool
@@ -249,7 +251,7 @@ class Placement(PyObjectBase):
...
@constmethod
def isSame(self, other: "Placement", tol: float = 0.0) -> bool:
def isSame(self, other: "Placement", tol: float = 0.0, /) -> bool:
"""
isSame(Base.Placement, [tol=0.0]) -> bool

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from PyObjectBase import PyObjectBase

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
class PyObjectBase:
"""

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from PyObjectBase import PyObjectBase
@@ -53,7 +55,7 @@ class Quantity(PyObjectBase):
# fmt: on
@constmethod
def toStr(self, decimals: int = ...) -> str:
def toStr(self, decimals: int = ..., /) -> str:
"""
toStr([decimals])
@@ -63,9 +65,9 @@ class Quantity(PyObjectBase):
...
@overload
def toStr(self) -> str: ...
def toStr(self, /) -> str: ...
@overload
def toStr(self, decimals: int) -> str: ...
def toStr(self, decimals: int, /) -> str: ...
@constmethod
def getUserPreferred(self) -> Tuple["Quantity", str]:
"""
@@ -74,13 +76,13 @@ class Quantity(PyObjectBase):
...
@overload
def getValueAs(self, unit: str) -> float: ...
def getValueAs(self, unit: str, /) -> float: ...
@overload
def getValueAs(self, translation: float, unit_signature: int) -> float: ...
def getValueAs(self, translation: float, unit_signature: int, /) -> float: ...
@overload
def getValueAs(self, unit: UnitPy) -> float: ...
def getValueAs(self, unit: UnitPy, /) -> float: ...
@overload
def getValueAs(self, quantity: "Quantity") -> float: ...
def getValueAs(self, quantity: "Quantity", /) -> float: ...
@constmethod
def getValueAs(self, *args) -> float:
"""
@@ -96,7 +98,7 @@ class Quantity(PyObjectBase):
...
@constmethod
def __round__(self, ndigits: int = ...) -> Union[int, float]:
def __round__(self, ndigits: int = ..., /) -> Union[int, float]:
"""
Returns the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
@@ -104,6 +106,6 @@ class Quantity(PyObjectBase):
...
@overload
def __round__(self) -> int: ...
def __round__(self, /) -> int: ...
@overload
def __round__(self, ndigits: int) -> float: ...
def __round__(self, ndigits: int, /) -> float: ...

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod, class_declarations
from PyObjectBase import PyObjectBase
@@ -144,7 +146,7 @@ class Rotation(PyObjectBase):
"""
...
def isSame(self, rotation: "Rotation", tol: float = 0) -> bool:
def isSame(self, rotation: "Rotation", tol: float = 0, /) -> bool:
"""
isSame(rotation, tol=0) -> bool
@@ -158,7 +160,7 @@ class Rotation(PyObjectBase):
...
@constmethod
def multiply(self, rotation: "Rotation") -> "Rotation":
def multiply(self, rotation: "Rotation", /) -> "Rotation":
"""
multiply(rotation) -> Base.Rotation
@@ -170,7 +172,7 @@ class Rotation(PyObjectBase):
...
@constmethod
def multVec(self, vector: Vector) -> Vector:
def multVec(self, vector: Vector, /) -> Vector:
"""
multVec(vector) -> Base.Vector
@@ -182,7 +184,7 @@ class Rotation(PyObjectBase):
...
@constmethod
def slerp(self, rotation2: "Rotation", t: float) -> "Rotation":
def slerp(self, rotation2: "Rotation", t: float, /) -> "Rotation":
"""
slerp(rotation2, t) -> Base.Rotation
@@ -193,7 +195,7 @@ class Rotation(PyObjectBase):
"""
...
def setYawPitchRoll(self, angle1: float, angle2: float, angle3: float) -> None:
def setYawPitchRoll(self, angle1: float, angle2: float, angle3: float, /) -> None:
"""
setYawPitchRoll(angle1, angle2, angle3) -> None
@@ -218,7 +220,7 @@ class Rotation(PyObjectBase):
"""
...
def setEulerAngles(self, seq: str, angle1: float, angle2: float, angle3: float) -> None:
def setEulerAngles(self, seq: str, angle1: float, angle2: float, angle3: float, /) -> None:
"""
setEulerAngles(seq, angle1, angle2, angle3) -> None
@@ -234,7 +236,7 @@ class Rotation(PyObjectBase):
...
@constmethod
def toEulerAngles(self, seq: str = "") -> List[float]:
def toEulerAngles(self, seq: str = "", /) -> List[float]:
"""
toEulerAngles(seq) -> list
@@ -265,7 +267,7 @@ class Rotation(PyObjectBase):
...
@constmethod
def isIdentity(self, tol: float = 0) -> bool:
def isIdentity(self, tol: float = 0, /) -> bool:
"""
isIdentity(tol=0) -> bool

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, forward_declarations, constmethod
from PyObjectBase import PyObjectBase
@@ -35,7 +37,7 @@ class Type(PyObjectBase):
"""Module in which this class is defined."""
@staticmethod
def fromName(name: str) -> "Type":
def fromName(name: str, /) -> "Type":
"""
fromName(name) -> Base.BaseType
@@ -46,7 +48,7 @@ class Type(PyObjectBase):
...
@staticmethod
def fromKey(key: int) -> "Type":
def fromKey(key: int, /) -> "Type":
"""
fromKey(key) -> Base.BaseType
@@ -75,7 +77,7 @@ class Type(PyObjectBase):
...
@staticmethod
def getAllDerivedFrom(type: str) -> List[str]:
def getAllDerivedFrom(type: str, /) -> List[str]:
"""
getAllDerivedFrom(type) -> list
@@ -104,7 +106,7 @@ class Type(PyObjectBase):
...
@constmethod
def isDerivedFrom(self, type: str) -> bool:
def isDerivedFrom(self, type: str, /) -> bool:
"""
isDerivedFrom(type) -> bool
@@ -132,7 +134,7 @@ class Type(PyObjectBase):
...
@staticmethod
def createInstanceByName(name: str, load: bool = False) -> object:
def createInstanceByName(name: str, load: bool = False, /) -> object:
"""
createInstanceByName(name, load=False) -> object

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export
from PyObjectBase import PyObjectBase

View File

@@ -1,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod, sequence_protocol, class_declarations
from PyObjectBase import PyObjectBase
@@ -93,7 +95,7 @@ class Vector(PyObjectBase):
...
@constmethod
def add(self, vector2: "Vector") -> "Vector":
def add(self, vector2: "Vector", /) -> "Vector":
"""
add(vector2) -> Base.Vector
@@ -104,7 +106,7 @@ class Vector(PyObjectBase):
...
@constmethod
def sub(self, vector2: "Vector") -> "Vector":
def sub(self, vector2: "Vector", /) -> "Vector":
"""
sub(vector2) -> Base.Vector
@@ -123,7 +125,7 @@ class Vector(PyObjectBase):
"""
...
def scale(self, x: float, y: float, z: float) -> "Vector":
def scale(self, x: float, y: float, z: float, /) -> "Vector":
"""
scale(x, y, z) -> Base.Vector
@@ -138,7 +140,7 @@ class Vector(PyObjectBase):
"""
...
def multiply(self, factor: float) -> "Vector":
def multiply(self, factor: float, /) -> "Vector":
"""
multiply(factor) -> Base.Vector
@@ -150,7 +152,7 @@ class Vector(PyObjectBase):
...
@constmethod
def dot(self, vector2: "Vector") -> float:
def dot(self, vector2: "Vector", /) -> float:
"""
dot(vector2) -> float
@@ -161,7 +163,7 @@ class Vector(PyObjectBase):
...
@constmethod
def cross(self, vector2: "Vector") -> "Vector":
def cross(self, vector2: "Vector", /) -> "Vector":
"""
cross(vector2) -> Base.Vector
@@ -172,7 +174,7 @@ class Vector(PyObjectBase):
...
@constmethod
def isOnLineSegment(self, vector1: "Vector", vector2: "Vector") -> bool:
def isOnLineSegment(self, vector1: "Vector", vector2: "Vector", /) -> bool:
"""
isOnLineSegment(vector1, vector2) -> bool
@@ -184,7 +186,7 @@ class Vector(PyObjectBase):
...
@constmethod
def getAngle(self, vector2: "Vector") -> float:
def getAngle(self, vector2: "Vector", /) -> float:
"""
getAngle(vector2) -> float
@@ -203,7 +205,7 @@ class Vector(PyObjectBase):
...
@constmethod
def isEqual(self, vector2: "Vector", tol: float = 0) -> bool:
def isEqual(self, vector2: "Vector", tol: float = 0, /) -> bool:
"""
isEqual(vector2, tol=0) -> bool
@@ -216,7 +218,7 @@ class Vector(PyObjectBase):
...
@constmethod
def isParallel(self, vector2: "Vector", tol: float = 0) -> bool:
def isParallel(self, vector2: "Vector", tol: float = 0, /) -> bool:
"""
isParallel(vector2, tol=0) -> bool
@@ -229,7 +231,7 @@ class Vector(PyObjectBase):
...
@constmethod
def isNormal(self, vector2: "Vector", tol: float = 0) -> bool:
def isNormal(self, vector2: "Vector", tol: float = 0, /) -> bool:
"""
isNormal(vector2, tol=0) -> bool
@@ -241,7 +243,7 @@ class Vector(PyObjectBase):
"""
...
def projectToLine(self, point: "Vector", dir: "Vector") -> "Vector":
def projectToLine(self, point: "Vector", dir: "Vector", /) -> "Vector":
"""
projectToLine(point, dir) -> Base.Vector
@@ -257,7 +259,7 @@ class Vector(PyObjectBase):
"""
...
def projectToPlane(self, base: "Vector", normal: "Vector") -> "Vector":
def projectToPlane(self, base: "Vector", normal: "Vector", /) -> "Vector":
"""
projectToPlane(base, normal) -> Base.Vector
@@ -270,7 +272,7 @@ class Vector(PyObjectBase):
...
@constmethod
def distanceToPoint(self, point2: "Vector") -> float:
def distanceToPoint(self, point2: "Vector", /) -> float:
"""
distanceToPoint(point2) -> float
@@ -281,7 +283,7 @@ class Vector(PyObjectBase):
...
@constmethod
def distanceToLine(self, base: "Vector", dir: "Vector") -> float:
def distanceToLine(self, base: "Vector", dir: "Vector", /) -> float:
"""
distanceToLine(base, dir) -> float
@@ -295,7 +297,7 @@ class Vector(PyObjectBase):
...
@constmethod
def distanceToLineSegment(self, point1: "Vector", point2: "Vector") -> "Vector":
def distanceToLineSegment(self, point1: "Vector", point2: "Vector", /) -> "Vector":
"""
distanceToLineSegment(point1, point2) -> Base.Vector
@@ -309,7 +311,7 @@ class Vector(PyObjectBase):
...
@constmethod
def distanceToPlane(self, base: "Vector", normal: "Vector") -> float:
def distanceToPlane(self, base: "Vector", normal: "Vector", /) -> float:
"""
distanceToPlane(base, normal) -> float