File size: 6,228 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# SPDX-License-Identifier: LGPL-2.1-or-later

from __future__ import annotations

from Base.Metadata import export
from Base.PyObjectBase import PyObjectBase
from Base.Vector import Vector
from TopoShape import TopoShape
from typing import overload

@export(
    PythonName="Part.BRepOffsetAPI_MakePipeShell",
    Include="BRepOffsetAPI_MakePipeShell.hxx",
    Constructor=True,
    Delete=True,
)
class BRepOffsetAPI_MakePipeShell(PyObjectBase):
    """
    Low level API to create a PipeShell using OCC API

    Ref: https://dev.opencascade.org/doc/refman/html/class_b_rep_offset_a_p_i___make_pipe_shell.html

    Author: Werner Mayer (wmayer[at]users.sourceforge.net)
    Licence: LGPL
    """

    def setFrenetMode(self, mode: bool, /) -> None:
        """
        setFrenetMode(True|False)
        Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping.
        True  = Frenet
        False = CorrectedFrenet
        """
        ...

    def setTrihedronMode(self, point: Vector, direction: Vector, /) -> None:
        """
        setTrihedronMode(point,direction)
        Sets a fixed trihedron to perform the sweeping.
        All sections will be parallel.
        """
        ...

    def setBiNormalMode(self, direction: Vector, /) -> None:
        """
        setBiNormalMode(direction)
        Sets a fixed BiNormal direction to perform the sweeping.
        Angular relations between the section(s) and the BiNormal direction will be constant.
        """
        ...

    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.
        Warning: To be effective, Each edge of the spine must have an representation on one face of SpineSupport.
        """
        ...

    def setAuxiliarySpine(
        self, wire: TopoShape, CurvilinearEquivalence: bool, TypeOfContact: int, /
    ) -> None:
        """
        setAuxiliarySpine(wire, CurvilinearEquivalence, TypeOfContact)
        Sets an auxiliary spine to define the Normal.

        CurvilinearEquivalence = bool
        For each Point of the Spine P, an Point Q is evalued on AuxiliarySpine.
        If CurvilinearEquivalence=True Q split AuxiliarySpine with the same length ratio than P split Spine.

        * OCC >= 6.7
        TypeOfContact = long
        0: No contact
        1: Contact
        2: Contact On Border (The auxiliary spine becomes a boundary of the swept surface)
        """
        ...

    @overload
    def add(
        self, Profile: TopoShape, *, WithContact: bool = False, WithCorrection: bool = False
    ) -> None: ...
    @overload
    def add(
        self,
        Profile: TopoShape,
        Location: TopoShape,
        *,
        WithContact: bool = False,
        WithCorrection: bool = False,
    ) -> None: ...
    def add(self, **kwargs) -> None:
        """
        add(shape Profile, bool WithContact=False, bool WithCorrection=False)
        add(shape Profile, vertex Location, bool WithContact=False, bool WithCorrection=False)
        Adds the section Profile to this framework.
        First and last sections may be punctual, so the shape Profile may be both wire and vertex.
        If WithContact is true, the section is translated to be in contact with the spine.
        If WithCorrection is true, the section is rotated to be orthogonal to the spine tangent in the correspondent point.
        """
        ...

    def remove(self, Profile: TopoShape, /) -> None:
        """
        remove(shape Profile)
        Removes the section Profile from this framework.
        """
        ...

    def isReady(self) -> bool:
        """
        isReady()
        Returns true if this tool object is ready to build the shape.
        """
        ...

    def getStatus(self) -> int:
        """
        getStatus()
        Get a status, when Simulate or Build failed.
        """
        ...

    def makeSolid(self) -> bool:
        """
        makeSolid()
        Transforms the sweeping Shell in Solid. If a propfile is not closed returns False.
        """
        ...

    def setTolerance(self, tol3d: float, boundTol: float, tolAngular: float, /) -> None:
        """
        setTolerance( tol3d, boundTol, tolAngular)
        Tol3d = 3D tolerance
        BoundTol = boundary tolerance
        TolAngular = angular tolerance
        """
        ...

    def setTransitionMode(self, mode: int, /) -> None:
        """
        0: BRepBuilderAPI_Transformed
        1: BRepBuilderAPI_RightCorner
        2: BRepBuilderAPI_RoundCorner
        """
        ...

    def firstShape(self) -> TopoShape:
        """
        firstShape()
        Returns the Shape of the bottom of the sweep.
        """
        ...

    def lastShape(self) -> TopoShape:
        """
        lastShape()
        Returns the Shape of the top of the sweep.
        """
        ...

    def build(self) -> None:
        """
        build()
        Builds the resulting shape.
        """
        ...

    def shape(self) -> TopoShape:
        """
        shape()
        Returns the resulting shape.
        """
        ...

    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:
        """
        setMaxDegree(int degree)
        Define the maximum V degree of resulting surface.
        """
        ...

    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:
        """
        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:
        """
        simulate(int nbsec)
        Simulates the resulting shape by calculating the given number of cross-sections.
        """
        ...