1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
7
TwinPointer="GeomCurve"
8
PythonName="Part.Curve"
9
FatherInclude="Mod/Part/App/GeometryPy.h"
10
Include="Mod/Part/App/Geometry.h"
12
FatherNamespace="Part"
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>
18
<Methode Name="toShape" Const="true">
20
<UserDocu>Return the shape for the geometry.</UserDocu>
23
<Methode Name="discretize" Const="true" Keyword="true">
25
<UserDocu>Discretizes the curve and returns a list of points.
26
The function accepts keywords as argument:
27
discretize(Number=n) => gives a list of 'n' equidistant points
28
discretize(QuasiNumber=n) => gives a list of 'n' quasi equidistant points (is faster than the method above)
29
discretize(Distance=d) => gives a list of equidistant points with distance 'd'
30
discretize(Deflection=d) => gives a list of points with a maximum deflection 'd' to the curve
31
discretize(QuasiDeflection=d) => gives a list of points with a maximum deflection 'd' to the curve (faster)
32
discretize(Angular=a,Curvature=c,[Minimum=m]) => 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.
36
Optionally you can set the keywords 'First' and 'Last' to define a sub-range of the parameter range
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'.
48
p=c.discretize(Number=50,First=3.14)
49
s=Part.Compound([Part.Vertex(i) for i in p])
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>
58
<Methode Name="getD0" Const="true">
60
<UserDocu>Returns the point of given parameter</UserDocu>
63
<Methode Name="getD1" Const="true">
65
<UserDocu>Returns the point and first derivative of given parameter</UserDocu>
68
<Methode Name="getD2" Const="true">
70
<UserDocu>Returns the point, first and second derivatives</UserDocu>
73
<Methode Name="getD3" Const="true">
75
<UserDocu>Returns the point, first, second and third derivatives</UserDocu>
78
<Methode Name="getDN" Const="true">
80
<UserDocu>Returns the n-th derivative</UserDocu>
83
<Methode Name="length" Const="true">
85
<UserDocu>Computes the length of a curve
86
length([uMin,uMax,Tol]) -> Float</UserDocu>
89
<Methode Name="parameterAtDistance" Const="true">
91
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
92
parameterAtDistance([abscissa, startingParameter]) -> Float the</UserDocu>
95
<Methode Name="value" Const="true">
97
<UserDocu>Computes the point of parameter u on this curve</UserDocu>
100
<Methode Name="tangent" Const="true">
102
<UserDocu>Computes the tangent of parameter u on this curve</UserDocu>
105
<Methode Name="makeRuledSurface" Const="true">
107
<UserDocu>Make a ruled surface of this and the given curves</UserDocu>
110
<Methode Name="intersect2d" Const="true">
112
<UserDocu>Get intersection points with another curve lying on a plane.</UserDocu>
115
<Methode Name="continuityWith" Const="true">
117
<UserDocu>Computes the continuity of two curves</UserDocu>
120
<Methode Name="parameter" Const="true">
122
<UserDocu>Returns the parameter on the curve
123
of the nearest orthogonal projection of the point.</UserDocu>
126
<Methode Name="normal" Const="true">
128
<UserDocu>Vector = normal(pos) - Get the normal vector at the given parameter [First|Last] if defined</UserDocu>
131
<Methode Name="projectPoint" Const="true" Keyword="true">
133
<UserDocu>Computes the projection of a point on the curve
135
projectPoint(Point=Vector,[Method="NearestPoint"])
136
projectPoint(Vector,"NearestPoint") -> Vector
137
projectPoint(Vector,"LowerDistance") -> float
138
projectPoint(Vector,"LowerDistanceParameter") -> float
139
projectPoint(Vector,"Distance") -> list of floats
140
projectPoint(Vector,"Parameter") -> list of floats
141
projectPoint(Vector,"Point") -> list of points</UserDocu>
144
<Methode Name="curvature" Const="true">
146
<UserDocu>Float = curvature(pos) - Get the curvature at the given parameter [First|Last] if defined</UserDocu>
149
<Methode Name="centerOfCurvature" Const="true">
151
<UserDocu>Vector = centerOfCurvature(float pos) - Get the center of curvature at the given parameter [First|Last] if defined</UserDocu>
154
<Methode Name="intersect" Const="true">
156
<UserDocu>Returns all intersection points and curve segments between the curve and the curve/surface.
158
arguments: curve/surface (for the intersection), precision (float)</UserDocu>
161
<Methode Name="intersectCS" Const="true">
163
<UserDocu>Returns all intersection points and curve segments between the curve and the surface.</UserDocu>
166
<Methode Name="intersectCC" Const="true">
168
<UserDocu>Returns all intersection points between this curve and the given curve.</UserDocu>
171
<Methode Name="toBSpline" Const="true">
173
<UserDocu>Converts a curve of any type (only part from First to Last)
174
toBSpline([Float=First, Float=Last]) -> B-Spline curve</UserDocu>
177
<Methode Name="toNurbs" Const="true">
179
<UserDocu>Converts a curve of any type (only part from First to Last)
180
toNurbs([Float=First, Float=Last]) -> NURBS curve</UserDocu>
183
<Methode Name="trim" Const="true">
185
<UserDocu>Returns a trimmed curve defined in the given parameter range
186
trim([Float=First, Float=Last]) -> trimmed curve</UserDocu>
189
<Methode Name="approximateBSpline" Const="true">
191
<UserDocu>Approximates a curve of any type to a B-Spline curve
192
approximateBSpline(Tolerance, MaxSegments, MaxDegree, [Order='C2']) -> B-Spline curve</UserDocu>
195
<Methode Name="reverse">
197
<UserDocu>Changes the direction of parametrization of the curve.</UserDocu>
200
<Methode Name="reversedParameter" Const="true">
202
<UserDocu>Returns the parameter on the reversed curve for
203
the point of parameter U on this curve.</UserDocu>
206
<Methode Name="isPeriodic" Const="true">
208
<UserDocu>Returns true if this curve is periodic.</UserDocu>
211
<Methode Name="period" Const="true">
213
<UserDocu>Returns the period of this curve
214
or raises an exception if it is not periodic.</UserDocu>
217
<Methode Name="isClosed" Const="true">
219
<UserDocu>Returns true if the curve is closed.</UserDocu>
222
<Attribute Name="Continuity" ReadOnly="true">
224
<UserDocu>Returns the global continuity of the curve.</UserDocu>
226
<Parameter Name="Continuity" Type="String"/>
228
<Attribute Name="FirstParameter" ReadOnly="true">
230
<UserDocu>Returns the value of the first parameter.</UserDocu>
232
<Parameter Name="FirstParameter" Type="Float"/>
234
<Attribute Name="LastParameter" ReadOnly="true">
236
<UserDocu>Returns the value of the last parameter.</UserDocu>
238
<Parameter Name="LastParameter" Type="Float"/>
240
<Attribute Name="Rotation" ReadOnly="true">
242
<UserDocu>Returns a rotation object to describe the orientation for curve that supports it</UserDocu>
244
<Parameter Name="Rotation" Type="Object"/>