[bindings] Fix undefined symbols in pti files

This commit is contained in:
Frank Martinez
2025-10-05 13:30:30 -05:00
parent 2ada443c18
commit dd15887568
9 changed files with 23 additions and 15 deletions

View File

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

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from typing import Final
from typing import Final, Any
from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase

View File

@@ -4,7 +4,7 @@ from __future__ import annotations
from typing import Any, Final
from Base.Metadata import constmethod, export
from Base.Metadata import constmethod, export, class_declarations
from App.ComplexGeoData import ComplexGeoData

View File

@@ -5,7 +5,9 @@ from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Vector import Vector
from BoundedCurve import BoundedCurve
from typing import Final, List, overload
from Part.App.Arc import Arc
from Part.App.BezierCurve import BezierCurve
from typing import Final, List, overload, Any
@export(
PythonName="Part.BSplineCurve",
@@ -503,14 +505,14 @@ class BSplineCurve(BoundedCurve):
...
@constmethod
def toBezier(self) -> List["BezierCurve"]:
def toBezier(self) -> List[BezierCurve]:
"""
Build a list of Bezier splines.
"""
...
@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.

View File

@@ -7,7 +7,7 @@ from Base.Metadata import (
constmethod,
)
from GeometrySurface import GeometrySurface
from typing import Final, Tuple
from typing import Final, Tuple, Any
@export(
Twin="GeomBezierSurface",

View File

@@ -4,6 +4,7 @@ from __future__ import annotations
from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
from typing import Tuple
@export(
PythonName="Part.GeomPlate.PointConstraintPy",
@@ -97,13 +98,13 @@ class PointConstraint(PyObjectBase):
"""
...
def setPnt2dOnSurf(self, p: "gp_Pnt2d", /) -> None:
def setPnt2dOnSurf(self, x: float, y: float, /) -> None:
"""
Allows you to set a 2D point on the surface. It takes a gp_Pnt2d as an argument, representing the 2D point to be associated with the surface.
"""
...
def pnt2dOnSurf(self) -> "gp_Pnt2d":
def pnt2dOnSurf(self) -> Tuple[float, float]:
"""
Returns the 2D point on the surface. It returns a gp_Pnt2d representing the associated 2D point.
"""

View File

@@ -6,6 +6,8 @@ from Base.Metadata import export, constmethod
from Base.Vector import Vector
from Base.Rotation import Rotation as RotationPy
from Geometry import Geometry
from Part.App.BSplineCurve import BSplineCurve
from Part.App.TrimmedCurve import TrimmedCurve
from typing import Final, overload, List, Union, Optional, Tuple
@export(
@@ -361,7 +363,7 @@ class GeometryCurve(Geometry):
...
@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
@@ -369,7 +371,7 @@ class GeometryCurve(Geometry):
...
@constmethod
def toNurbs(self, points: Tuple[float, float], /) -> "NurbsCurve":
def toNurbs(self, points: Tuple[float, float], /) -> BSplineCurve:
"""
Converts a curve of any type (only part from First to Last) to NURBS curve.
toNurbs((first: float, last: float)) -> NurbsCurve
@@ -377,7 +379,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
@@ -387,7 +389,7 @@ class GeometryCurve(Geometry):
@constmethod
def approximateBSpline(
self, Tolerance: float, MaxSegments: int, MaxDegree: int, Order: str = "C2", /
) -> "BSplineCurve":
) -> BSplineCurve:
"""
Approximates a curve of any type to a B-Spline curve.
approximateBSpline(Tolerance, MaxSegments, MaxDegree, [Order='C2']) -> BSplineCurve

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Metadata import export, constmethod, class_declarations
from Base.PyObjectBase import PyObjectBase
@export(

View File

@@ -2,10 +2,13 @@
from __future__ import annotations
from typing import Final
from typing import Final, TypeAlias
from Base.PyObjectBase import PyObjectBase
from Base.Metadata import export
from Base import Vector
PyCXXVector: TypeAlias = Vector # Dirty trick to workaround current generator limitations
@export(
Include="Mod/TechDraw/App/Cosmetic.h",