[bindings] remove redundant signatures. batch1

This commit is contained in:
Frank Martinez
2025-10-10 14:09:50 -05:00
parent d8b1a36e19
commit fc99a20a03
34 changed files with 194 additions and 668 deletions

View File

@@ -29,24 +29,25 @@ class Area(BaseClass):
""""""
...
def setPlane(self) -> Any:
"""setPlane(shape): Set the working plane.
def setPlane(self) -> None:
"""
Set the working plane.
The supplied shape does not need to be planar. Area will try to find planar
sub-shape (face, wire or edge). If more than one planar sub-shape is found, it
will prefer the top plane parallel to XY0 plane. If no working plane are set,
Area will try to find a working plane from the added children shape using the
same algorithm"""
same algorithm
"""
...
def getShape(self, **kwargs) -> Any:
"""getShape(index=-1,rebuild=False): Return the resulting shape
"""
Return the resulting shape
* index (-1): the index of the section. -1 means all sections. No effect on planar shape.
* rebuild: clean the internal cache and rebuild"""
* rebuild: clean the internal cache and rebuild
"""
...
def makeOffset(self, **kwargs) -> Any:

View File

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

View File

@@ -24,7 +24,10 @@ class FeatureArea(DocumentObject):
...
def setParams(self, **kwargs) -> Any:
"""setParams(key=value...): Convenient function to configure this feature.
"""
Convenient function to configure this feature.
Call with keywords: setParams(key=value, ...)
Same usage as Path.Area.setParams(). This function stores the parameters in the properties.
"""

View File

@@ -1,10 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from typing import Any, Final
from __future__ import annotations
from typing import Any, Final, overload, Union
from Base.Metadata import constmethod, export
from Base.Persistence import Persistence
from .Command import Command
@export(
Include="Mod/CAM/App/Path.h",
@@ -23,36 +25,44 @@ class Path(Persistence):
License: LGPL-2.1-or-later
"""
def addCommands(self) -> Any:
@overload
def addCommands(self, command: Command, /) -> Path: ...
@overload
def addCommands(self, commands: list[Command], /) -> Path: ...
def addCommands(self, arg: Union[Command, list[Command]], /) -> Path:
"""adds a command or a list of commands at the end of the path"""
...
def insertCommand(self) -> Any:
"""insertCommand(Command,[int]):
adds a command at the given position or at the end of the path"""
def insertCommand(self, command: Command, pos: int = -1, /) -> Path:
"""
adds a command at the given position or at the end of the path
"""
...
def deleteCommand(self) -> Any:
"""deleteCommand([int]):
deletes the command found at the given position or from the end of the path"""
def deleteCommand(self, pos: int = -1, /) -> Path:
"""
deletes the command found at the given position or from the end of the path
"""
...
def setFromGCode(self) -> Any:
def setFromGCode(self, gcode: str, /) -> None:
"""sets the contents of the path from a gcode string"""
...
@constmethod
def toGCode(self) -> Any:
def toGCode(self) -> str:
"""returns a gcode string representing the path"""
...
@constmethod
def copy(self) -> Any:
def copy(self) -> Path:
"""returns a copy of this path"""
...
@constmethod
def getCycleTime(self) -> Any:
def getCycleTime(self, h_feed: float, v_feed: float, h_rapid: float, v_rapid: float, /) -> float:
"""return the cycle time estimation for this path in s"""
...

View File

@@ -5,6 +5,7 @@ from typing import Any, Final
from Base.BaseClass import BaseClass
from Base.Metadata import constmethod, export
from Base.Vector import Vector
@export(
Include="Mod/CAM/App/Voronoi.h",
@@ -35,12 +36,12 @@ class Voronoi(BaseClass):
"""Return number of vertices"""
...
def addPoint(self) -> Any:
"""addPoint(vector|vector2d) add given point to input collection"""
def addPoint(self, point: Vector, /) -> None:
"""add given point to input collection"""
...
def addSegment(self) -> Any:
"""addSegment(vector|vector2d, vector|vector2d) add given segment to input collection"""
def addSegment(self, point1: Vector, point2: Vector, /) -> Any:
"""add given segment to input collection"""
...
def construct(self) -> Any:

View File

@@ -7,6 +7,10 @@ from typing import Any, Final
from Base.BaseClass import BaseClass
from Base.Metadata import export
from Part.App.TopoShape import TopoShape
from Mesh.App.Mesh import Mesh
from Base.Placement import Placement
from CAM.App.Command import Command
@export(
FatherInclude="Base/BaseClassPy.h",
@@ -27,30 +31,28 @@ class PathSim(BaseClass):
License: LGPL-2.1-or-later
"""
def BeginSimulation(self, **kwargs) -> Any:
"""BeginSimulation(stock, resolution):
Start a simulation process on a box shape stock with given resolution"""
...
def SetToolShape(self) -> Any:
"""SetToolShape(shape):
Set the shape of the tool to be used for simulation"""
...
def GetResultMesh(self) -> Any:
def BeginSimulation(self, stock: TopoShape, resolution: float) -> None:
"""
Start a simulation process on a box shape stock with given resolution
"""
GetResultMesh():
Return the current mesh result of the simulation."""
...
def ApplyCommand(self, **kwargs) -> Any:
def SetToolShape(self, tool: TopoShape, resolution: float, /) -> None:
"""
ApplyCommand(placement, command):
Set the shape of the tool to be used for simulation
"""
...
Apply a single path command on the stock starting from placement."""
def GetResultMesh(self) -> tuple[Mesh, Mesh]:
"""
Return the current mesh result of the simulation.
"""
...
def ApplyCommand(self, placement: Placement, command: Command) -> Placement:
"""
Apply a single path command on the stock starting from placement.
"""
...
Tool: Final[Any]

View File

@@ -5,8 +5,10 @@ from __future__ import annotations
from typing import Any
from Base.BaseClass import BaseClass
from Base.Metadata import export
from Metadata import no_args
from Base.Metadata import export, no_args
from Part.App.TopoShape import TopoShape
from CAM.App.Command import Command
@export(
@@ -28,38 +30,33 @@ class CAMSim(BaseClass):
License: LGPL-2.1-or-later
"""
def BeginSimulation(self, **kwargs) -> Any:
def BeginSimulation(self, stock: TopoShape, resolution: float) -> None:
"""
Start a simulation process on a box shape stock with given resolution
"""
BeginSimulation(stock, resolution):
Start a simulation process on a box shape stock with given resolution"""
...
@no_args
def ResetSimulation(self) -> Any:
def ResetSimulation(self) -> None:
"""
Clear the simulation and all gcode commands
"""
ResetSimulation():
Clear the simulation and all gcode commands"""
...
def AddTool(self, **kwargs) -> Any:
def AddTool(self, shape: TopoShape, toolnumber: int, diameter: float, resolution: float) -> Any:
"""
Set the shape of the tool to be used for simulation
"""
AddTool(shape, toolnumber, diameter, resolution):
Set the shape of the tool to be used for simulation"""
...
def SetBaseShape(self, **kwargs) -> Any:
def SetBaseShape(self, shape: TopoShape, resolution: float) -> None:
"""
Set the shape of the base object of the job
"""
SetBaseShape(shape, resolution):
Set the shape of the base object of the job"""
...
def AddCommand(self) -> Any:
def AddCommand(self, command: Command, /) -> Any:
"""
Add a path command to the simulation.
"""
AddCommand(command):
Add a path command to the simulation."""
...