FreeCAD

Форк
0
/
GeometryCurvePy.xml 
247 строк · 10.9 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
3
    <PythonExport
4
        Name="GeometryCurvePy"
5
        Namespace="Part"
6
        Twin="GeomCurve"
7
        TwinPointer="GeomCurve"
8
        PythonName="Part.Curve"
9
        FatherInclude="Mod/Part/App/GeometryPy.h"
10
        Include="Mod/Part/App/Geometry.h"
11
        Father="GeometryPy"
12
        FatherNamespace="Part"
13
        Constructor="true">
14
        <Documentation>
15
            <Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net"/>
16
            <UserDocu>The abstract class GeometryCurve is the root class of all curve objects.</UserDocu>
17
        </Documentation>
18
        <Methode Name="toShape" Const="true">
19
            <Documentation>
20
                <UserDocu>Return the shape for the geometry.</UserDocu>
21
            </Documentation>
22
        </Methode>
23
        <Methode Name="discretize" Const="true" Keyword="true">
24
            <Documentation>
25
                <UserDocu>Discretizes the curve and returns a list of points.
26
The function accepts keywords as argument:
27
discretize(Number=n) =&gt; gives a list of 'n' equidistant points
28
discretize(QuasiNumber=n) =&gt; gives a list of 'n' quasi equidistant points (is faster than the method above)
29
discretize(Distance=d) =&gt; gives a list of equidistant points with distance 'd'
30
discretize(Deflection=d) =&gt; gives a list of points with a maximum deflection 'd' to the curve
31
discretize(QuasiDeflection=d) =&gt; gives a list of points with a maximum deflection 'd' to the curve (faster)
32
discretize(Angular=a,Curvature=c,[Minimum=m]) =&gt; gives a list of points with an angular deflection of 'a'
33
                                    and a curvature deflection of 'c'. Optionally a minimum number of points
34
                                    can be set which by default is set to 2.
35

36
Optionally you can set the keywords 'First' and 'Last' to define a sub-range of the parameter range
37
of the curve.
38

39
If no keyword is given then it depends on whether the argument is an int or float.
40
If it's an int then the behaviour is as if using the keyword 'Number', if it's float
41
then the behaviour is as if using the keyword 'Distance'.
42

43
Example:
44

45
import Part
46
c=Part.Circle()
47
c.Radius=5
48
p=c.discretize(Number=50,First=3.14)
49
s=Part.Compound([Part.Vertex(i) for i in p])
50
Part.show(s)
51

52

53
p=c.discretize(Angular=0.09,Curvature=0.01,Last=3.14,Minimum=100)
54
s=Part.Compound([Part.Vertex(i) for i in p])
55
Part.show(s)</UserDocu>
56
            </Documentation>
57
        </Methode>
58
        <Methode Name="getD0" Const="true">
59
            <Documentation>
60
                <UserDocu>Returns the point of given parameter</UserDocu>
61
            </Documentation>
62
        </Methode>
63
        <Methode Name="getD1" Const="true">
64
            <Documentation>
65
                <UserDocu>Returns the point and first derivative of given parameter</UserDocu>
66
            </Documentation>
67
        </Methode>
68
        <Methode Name="getD2" Const="true">
69
            <Documentation>
70
                <UserDocu>Returns the point, first and second derivatives</UserDocu>
71
            </Documentation>
72
        </Methode>
73
        <Methode Name="getD3" Const="true">
74
            <Documentation>
75
                <UserDocu>Returns the point, first, second and third derivatives</UserDocu>
76
            </Documentation>
77
        </Methode>
78
        <Methode Name="getDN" Const="true">
79
            <Documentation>
80
                <UserDocu>Returns the n-th derivative</UserDocu>
81
            </Documentation>
82
        </Methode>
83
        <Methode Name="length" Const="true">
84
            <Documentation>
85
                <UserDocu>Computes the length of a curve
86
length([uMin,uMax,Tol]) -&gt; Float</UserDocu>
87
            </Documentation>
88
        </Methode>
89
        <Methode Name="parameterAtDistance" Const="true">
90
            <Documentation>
91
                <UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
92
parameterAtDistance([abscissa, startingParameter]) -&gt; Float the</UserDocu>
93
            </Documentation>
94
        </Methode>
95
        <Methode Name="value" Const="true">
96
            <Documentation>
97
                <UserDocu>Computes the point of parameter u on this curve</UserDocu>
98
            </Documentation>
99
        </Methode>
100
        <Methode Name="tangent" Const="true">
101
            <Documentation>
102
                <UserDocu>Computes the tangent of parameter u on this curve</UserDocu>
103
            </Documentation>
104
        </Methode>
105
        <Methode Name="makeRuledSurface" Const="true">
106
            <Documentation>
107
                <UserDocu>Make a ruled surface of this and the given curves</UserDocu>
108
            </Documentation>
109
        </Methode>
110
        <Methode Name="intersect2d" Const="true">
111
            <Documentation>
112
                <UserDocu>Get intersection points with another curve lying on a plane.</UserDocu>
113
            </Documentation>
114
        </Methode>
115
        <Methode Name="continuityWith" Const="true">
116
            <Documentation>
117
                <UserDocu>Computes the continuity of two curves</UserDocu>
118
            </Documentation>
119
        </Methode>
120
        <Methode Name="parameter" Const="true">
121
            <Documentation>
122
                <UserDocu>Returns the parameter on the curve
123
of the nearest orthogonal projection of the point.</UserDocu>
124
            </Documentation>
125
        </Methode>
126
        <Methode Name="normal" Const="true">
127
            <Documentation>
128
                <UserDocu>Vector = normal(pos) - Get the normal vector at the given parameter [First|Last] if defined</UserDocu>
129
            </Documentation>
130
        </Methode>
131
        <Methode Name="projectPoint" Const="true" Keyword="true">
132
            <Documentation>
133
                <UserDocu>Computes the projection of a point on the curve
134

135
projectPoint(Point=Vector,[Method=&quot;NearestPoint&quot;])
136
projectPoint(Vector,&quot;NearestPoint&quot;) -&gt; Vector
137
projectPoint(Vector,&quot;LowerDistance&quot;) -&gt; float
138
projectPoint(Vector,&quot;LowerDistanceParameter&quot;) -&gt; float
139
projectPoint(Vector,&quot;Distance&quot;) -&gt; list of floats
140
projectPoint(Vector,&quot;Parameter&quot;) -&gt; list of floats
141
projectPoint(Vector,&quot;Point&quot;) -&gt; list of points</UserDocu>
142
            </Documentation>
143
        </Methode>
144
        <Methode Name="curvature" Const="true">
145
            <Documentation>
146
                <UserDocu>Float = curvature(pos) - Get the curvature at the given parameter [First|Last] if defined</UserDocu>
147
            </Documentation>
148
        </Methode>
149
        <Methode Name="centerOfCurvature" Const="true">
150
            <Documentation>
151
                <UserDocu>Vector = centerOfCurvature(float pos) - Get the center of curvature at the given parameter [First|Last] if defined</UserDocu>
152
            </Documentation>
153
        </Methode>
154
        <Methode Name="intersect" Const="true">
155
            <Documentation>
156
                <UserDocu>Returns all intersection points and curve segments between the curve and the curve/surface.
157

158
                  arguments: curve/surface (for the intersection), precision (float)</UserDocu>
159
            </Documentation>
160
        </Methode>
161
        <Methode Name="intersectCS" Const="true">
162
            <Documentation>
163
                <UserDocu>Returns all intersection points and curve segments between the curve and the surface.</UserDocu>
164
            </Documentation>
165
        </Methode>
166
        <Methode Name="intersectCC" Const="true">
167
            <Documentation>
168
                <UserDocu>Returns all intersection points between this curve and the given curve.</UserDocu>
169
            </Documentation>
170
        </Methode>
171
        <Methode Name="toBSpline" Const="true">
172
            <Documentation>
173
                <UserDocu>Converts a curve of any type (only part from First to Last)
174
                    toBSpline([Float=First, Float=Last]) -&gt; B-Spline curve</UserDocu>
175
            </Documentation>
176
        </Methode>
177
        <Methode Name="toNurbs" Const="true">
178
            <Documentation>
179
                <UserDocu>Converts a curve of any type (only part from First to Last)
180
                    toNurbs([Float=First, Float=Last]) -&gt; NURBS curve</UserDocu>
181
            </Documentation>
182
        </Methode>
183
        <Methode Name="trim" Const="true">
184
            <Documentation>
185
                <UserDocu>Returns a trimmed curve defined in the given parameter range
186
                    trim([Float=First, Float=Last]) -&gt; trimmed curve</UserDocu>
187
            </Documentation>
188
        </Methode>
189
        <Methode Name="approximateBSpline" Const="true">
190
            <Documentation>
191
                <UserDocu>Approximates a curve of any type to a B-Spline curve
192
                    approximateBSpline(Tolerance, MaxSegments, MaxDegree, [Order='C2']) -&gt; B-Spline curve</UserDocu>
193
            </Documentation>
194
        </Methode>
195
        <Methode Name="reverse">
196
            <Documentation>
197
                <UserDocu>Changes the direction of parametrization of the curve.</UserDocu>
198
            </Documentation>
199
        </Methode>
200
        <Methode Name="reversedParameter" Const="true">
201
            <Documentation>
202
                <UserDocu>Returns the parameter on the reversed curve for
203
the point of parameter U on this curve.</UserDocu>
204
            </Documentation>
205
        </Methode>
206
        <Methode Name="isPeriodic" Const="true">
207
            <Documentation>
208
                <UserDocu>Returns true if this curve is periodic.</UserDocu>
209
            </Documentation>
210
        </Methode>
211
        <Methode Name="period" Const="true">
212
            <Documentation>
213
                <UserDocu>Returns the period of this curve
214
or raises an exception if it is not periodic.</UserDocu>
215
            </Documentation>
216
        </Methode>
217
        <Methode Name="isClosed" Const="true">
218
            <Documentation>
219
                <UserDocu>Returns true if the curve is closed.</UserDocu>
220
            </Documentation>
221
        </Methode>
222
        <Attribute Name="Continuity" ReadOnly="true">
223
            <Documentation>
224
                <UserDocu>Returns the global continuity of the curve.</UserDocu>
225
            </Documentation>
226
            <Parameter Name="Continuity" Type="String"/>
227
        </Attribute>
228
        <Attribute Name="FirstParameter" ReadOnly="true">
229
            <Documentation>
230
                <UserDocu>Returns the value of the first parameter.</UserDocu>
231
            </Documentation>
232
            <Parameter Name="FirstParameter" Type="Float"/>
233
        </Attribute>
234
        <Attribute Name="LastParameter" ReadOnly="true">
235
            <Documentation>
236
                <UserDocu>Returns the value of the last parameter.</UserDocu>
237
            </Documentation>
238
            <Parameter Name="LastParameter" Type="Float"/>
239
        </Attribute>
240
        <Attribute Name="Rotation" ReadOnly="true">
241
            <Documentation>
242
                <UserDocu>Returns a rotation object to describe the orientation for curve that supports it</UserDocu>
243
            </Documentation>
244
            <Parameter Name="Rotation" Type="Object"/>
245
        </Attribute>
246
    </PythonExport>
247
</GenerateModel>
248

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.