Files
create/src/Mod/Part/App/GeometryCurvePy.xml
2023-10-28 22:45:15 +02:00

248 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Name="GeometryCurvePy"
Namespace="Part"
Twin="GeomCurve"
TwinPointer="GeomCurve"
PythonName="Part.Curve"
FatherInclude="Mod/Part/App/GeometryPy.h"
Include="Mod/Part/App/Geometry.h"
Father="GeometryPy"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net"/>
<UserDocu>The abstract class GeometryCurve is the root class of all curve objects.</UserDocu>
</Documentation>
<Methode Name="toShape" Const="true">
<Documentation>
<UserDocu>Return the shape for the geometry.</UserDocu>
</Documentation>
</Methode>
<Methode Name="discretize" Const="true" Keyword="true">
<Documentation>
<UserDocu>Discretizes the curve and returns a list of points.
The function accepts keywords as argument:
discretize(Number=n) =&gt; gives a list of 'n' equidistant points
discretize(QuasiNumber=n) =&gt; gives a list of 'n' quasi equidistant points (is faster than the method above)
discretize(Distance=d) =&gt; gives a list of equidistant points with distance 'd'
discretize(Deflection=d) =&gt; gives a list of points with a maximum deflection 'd' to the curve
discretize(QuasiDeflection=d) =&gt; gives a list of points with a maximum deflection 'd' to the curve (faster)
discretize(Angular=a,Curvature=c,[Minimum=m]) =&gt; gives a list of points with an angular deflection of 'a'
and a curvature deflection of 'c'. Optionally a minimum number of points
can be set which by default is set to 2.
Optionally you can set the keywords 'First' and 'Last' to define a sub-range of the parameter range
of the curve.
If no keyword is given then it depends on whether the argument is an int or float.
If it's an int then the behaviour is as if using the keyword 'Number', if it's float
then the behaviour is as if using the keyword 'Distance'.
Example:
import Part
c=Part.Circle()
c.Radius=5
p=c.discretize(Number=50,First=3.14)
s=Part.Compound([Part.Vertex(i) for i in p])
Part.show(s)
p=c.discretize(Angular=0.09,Curvature=0.01,Last=3.14,Minimum=100)
s=Part.Compound([Part.Vertex(i) for i in p])
Part.show(s)</UserDocu>
</Documentation>
</Methode>
<Methode Name="getD0" Const="true">
<Documentation>
<UserDocu>Returns the point of given parameter</UserDocu>
</Documentation>
</Methode>
<Methode Name="getD1" Const="true">
<Documentation>
<UserDocu>Returns the point and first derivative of given parameter</UserDocu>
</Documentation>
</Methode>
<Methode Name="getD2" Const="true">
<Documentation>
<UserDocu>Returns the point, first and second derivatives</UserDocu>
</Documentation>
</Methode>
<Methode Name="getD3" Const="true">
<Documentation>
<UserDocu>Returns the point, first, second and third derivatives</UserDocu>
</Documentation>
</Methode>
<Methode Name="getDN" Const="true">
<Documentation>
<UserDocu>Returns the n-th derivative</UserDocu>
</Documentation>
</Methode>
<Methode Name="length" Const="true">
<Documentation>
<UserDocu>Computes the length of a curve
length([uMin,uMax,Tol]) -&gt; Float</UserDocu>
</Documentation>
</Methode>
<Methode Name="parameterAtDistance" Const="true">
<Documentation>
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
parameterAtDistance([abscissa, startingParameter]) -&gt; Float the</UserDocu>
</Documentation>
</Methode>
<Methode Name="value" Const="true">
<Documentation>
<UserDocu>Computes the point of parameter u on this curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="tangent" Const="true">
<Documentation>
<UserDocu>Computes the tangent of parameter u on this curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="makeRuledSurface" Const="true">
<Documentation>
<UserDocu>Make a ruled surface of this and the given curves</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersect2d" Const="true">
<Documentation>
<UserDocu>Get intersection points with another curve lying on a plane.</UserDocu>
</Documentation>
</Methode>
<Methode Name="continuityWith" Const="true">
<Documentation>
<UserDocu>Computes the continuity of two curves</UserDocu>
</Documentation>
</Methode>
<Methode Name="parameter" Const="true">
<Documentation>
<UserDocu>Returns the parameter on the curve
of the nearest orthogonal projection of the point.</UserDocu>
</Documentation>
</Methode>
<Methode Name="normal" Const="true">
<Documentation>
<UserDocu>Vector = normal(pos) - Get the normal vector at the given parameter [First|Last] if defined</UserDocu>
</Documentation>
</Methode>
<Methode Name="projectPoint" Const="true" Keyword="true">
<Documentation>
<UserDocu>Computes the projection of a point on the curve
projectPoint(Point=Vector,[Method=&quot;NearestPoint&quot;])
projectPoint(Vector,&quot;NearestPoint&quot;) -&gt; Vector
projectPoint(Vector,&quot;LowerDistance&quot;) -&gt; float
projectPoint(Vector,&quot;LowerDistanceParameter&quot;) -&gt; float
projectPoint(Vector,&quot;Distance&quot;) -&gt; list of floats
projectPoint(Vector,&quot;Parameter&quot;) -&gt; list of floats
projectPoint(Vector,&quot;Point&quot;) -&gt; list of points</UserDocu>
</Documentation>
</Methode>
<Methode Name="curvature" Const="true">
<Documentation>
<UserDocu>Float = curvature(pos) - Get the curvature at the given parameter [First|Last] if defined</UserDocu>
</Documentation>
</Methode>
<Methode Name="centerOfCurvature" Const="true">
<Documentation>
<UserDocu>Vector = centerOfCurvature(float pos) - Get the center of curvature at the given parameter [First|Last] if defined</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersect" Const="true">
<Documentation>
<UserDocu>Returns all intersection points and curve segments between the curve and the curve/surface.
arguments: curve/surface (for the intersection), precision (float)</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersectCS" Const="true">
<Documentation>
<UserDocu>Returns all intersection points and curve segments between the curve and the surface.</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersectCC" Const="true">
<Documentation>
<UserDocu>Returns all intersection points between this curve and the given curve.</UserDocu>
</Documentation>
</Methode>
<Methode Name="toBSpline" Const="true">
<Documentation>
<UserDocu>Converts a curve of any type (only part from First to Last)
toBSpline([Float=First, Float=Last]) -&gt; B-Spline curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="toNurbs" Const="true">
<Documentation>
<UserDocu>Converts a curve of any type (only part from First to Last)
toNurbs([Float=First, Float=Last]) -&gt; NURBS curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="trim" Const="true">
<Documentation>
<UserDocu>Returns a trimmed curve defined in the given parameter range
trim([Float=First, Float=Last]) -&gt; trimmed curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="approximateBSpline" Const="true">
<Documentation>
<UserDocu>Approximates a curve of any type to a B-Spline curve
approximateBSpline(Tolerance, MaxSegments, MaxDegree, [Order='C2']) -&gt; B-Spline curve</UserDocu>
</Documentation>
</Methode>
<Methode Name="reverse">
<Documentation>
<UserDocu>Changes the direction of parametrization of the curve.</UserDocu>
</Documentation>
</Methode>
<Methode Name="reversedParameter" Const="true">
<Documentation>
<UserDocu>Returns the parameter on the reversed curve for
the point of parameter U on this curve.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPeriodic" Const="true">
<Documentation>
<UserDocu>Returns true if this curve is periodic.</UserDocu>
</Documentation>
</Methode>
<Methode Name="period" Const="true">
<Documentation>
<UserDocu>Returns the period of this curve
or raises an exception if it is not periodic.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isClosed" Const="true">
<Documentation>
<UserDocu>Returns true if the curve is closed.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Continuity" ReadOnly="true">
<Documentation>
<UserDocu>Returns the global continuity of the curve.</UserDocu>
</Documentation>
<Parameter Name="Continuity" Type="String"/>
</Attribute>
<Attribute Name="FirstParameter" ReadOnly="true">
<Documentation>
<UserDocu>Returns the value of the first parameter.</UserDocu>
</Documentation>
<Parameter Name="FirstParameter" Type="Float"/>
</Attribute>
<Attribute Name="LastParameter" ReadOnly="true">
<Documentation>
<UserDocu>Returns the value of the last parameter.</UserDocu>
</Documentation>
<Parameter Name="LastParameter" Type="Float"/>
</Attribute>
<Attribute Name="Rotation" ReadOnly="true">
<Documentation>
<UserDocu>Returns a rotation object to describe the orientation for curve that supports it</UserDocu>
</Documentation>
<Parameter Name="Rotation" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>