File size: 3,340 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# SPDX-License-Identifier: LGPL-2.1-or-later

from typing import Any, Final

from Base.BaseClass import BaseClass
from Base.Metadata import export

@export(
    Include="Mod/CAM/App/Area.h",
    Namespace="Path",
    Constructor=True,
    Delete=True,
)
class Area(BaseClass):
    """
    FreeCAD python wrapper of libarea

    Path.Area(key=value ...)

    The constructor accepts the same parameters as setParams(...) to configure the object
    All arguments are optional.

    Author: Zheng, Lei (realthunder.dev@gmail.com)
    License: LGPL-2.1-or-later
    """

    def add(self, **kwargs) -> Any:
        """"""
        ...

    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
        """
        ...

    def getShape(self, **kwargs) -> Any:
        """
        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
        """
        ...

    def makeOffset(self, **kwargs) -> Any:
        """Make an offset of the shape."""
        ...

    def makePocket(self, **kwargs) -> Any:
        """Generate pocket toolpath of the shape."""
        ...

    def makeSections(self, **kwargs) -> Any:
        """Make a list of area holding the sectioned children shapes on given heights."""
        ...

    def getClearedArea(self) -> Any:
        """Gets the area cleared when a tool of the specified diameter follows the gcode represented in the path, ignoring cleared space above zmax and path segments that don't affect space within the x/y space of bbox."""
        ...

    def getRestArea(self) -> Any:
        """Rest machining: Gets the area left to be machined, assuming some of this area has already been cleared by previous tool paths."""
        ...

    def toTopoShape(self) -> Any:
        """Convert the Area object to a TopoShape."""
        ...

    def setParams(self, **kwargs) -> Any:
        """Set algorithm parameters."""
        ...

    def setDefaultParams(self, **kwargs) -> Any:
        """Static method to set the default parameters of all following Path.Area, plus the following additional parameters."""
        ...

    def getDefaultParams(self) -> Any:
        """Static method to return the current default parameters."""
        ...

    def getParamsDesc(self, **kwargs) -> Any:
        """Returns a list of supported parameters and their descriptions."""
        ...

    def getParams(self) -> Any:
        """Get current algorithm parameters as a dictionary."""
        ...

    def abort(self, **kwargs) -> Any:
        """Abort the current operation."""
        ...
    Sections: Final[list]
    """List of sections in this area."""

    Workplane: Any
    """The current workplane. If no plane is set, it is derived from the added shapes."""

    Shapes: Final[list]
    """A list of tuple: [(shape,op), ...] containing the added shapes together with their operation code"""