Remove C++ escaping from *Py.xml templates
Now all escaping required for the C++ code generation is done when the .cpp/.h files are generated. Previously, only newlines were escaped automatically. This was a) inconsistent and b) leaked c++ details into the xml data. In addition, the escaping is now done in one central place, harmonizing the three previous implementations. Pre-existing c++ escape sequences in the XML files have been replaced by their literal equivalent so that the resulting python doc sting remains unchanged.
This commit is contained in:
@@ -13,14 +13,19 @@
|
||||
FatherNamespace="Base">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<UserDocu>Base.Axis class.\n
|
||||
An Axis defines a direction and a position (base) in 3D space.\n
|
||||
The following constructors are supported:\n
|
||||
<UserDocu>Base.Axis class.
|
||||
|
||||
An Axis defines a direction and a position (base) in 3D space.
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
Axis()
|
||||
Empty constructor.\n
|
||||
Empty constructor.
|
||||
|
||||
Axis(axis)
|
||||
Copy constructor.
|
||||
axis : Base.Axis\n
|
||||
axis : Base.Axis
|
||||
|
||||
Axis(base, direction)
|
||||
Define from a position and a direction.
|
||||
base : Base.Vector
|
||||
@@ -29,27 +34,35 @@ direction : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="copy">>
|
||||
<Documentation>
|
||||
<UserDocu>copy() -> Base.Axis\n
|
||||
<UserDocu>copy() -> Base.Axis
|
||||
|
||||
Returns a copy of this Axis.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="move">
|
||||
<Documentation>
|
||||
<UserDocu>move(vector) -> None\n
|
||||
Move the axis base along the given vector.\n
|
||||
vector : Base.Vector\n Vector by which to move the axis.</UserDocu>
|
||||
<UserDocu>move(vector) -> None
|
||||
|
||||
Move the axis base along the given vector.
|
||||
|
||||
vector : Base.Vector
|
||||
Vector by which to move the axis.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(placement) -> Base.Axis\n
|
||||
Multiply this axis by a placement.\n
|
||||
placement : Base.Placement\n Placement by which to multiply the axis.</UserDocu>
|
||||
<UserDocu>multiply(placement) -> Base.Axis
|
||||
|
||||
Multiply this axis by a placement.
|
||||
|
||||
placement : Base.Placement
|
||||
Placement by which to multiply the axis.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="reversed">
|
||||
<Documentation>
|
||||
<UserDocu>reversed() -> Base.Axis\n
|
||||
<UserDocu>reversed() -> Base.Axis
|
||||
|
||||
Compute the reversed axis. This returns a new Base.Axis with
|
||||
the original direction reversed.</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the BoundBox export class</DeveloperDocu>
|
||||
<UserDocu>Base.BoundBox class.\n
|
||||
<UserDocu>Base.BoundBox class.
|
||||
|
||||
This class represents a bounding box.
|
||||
A bounding box is a rectangular cuboid which is a way to describe outer
|
||||
boundaries and is obtained from a lot of 3D types.
|
||||
@@ -22,85 +23,118 @@ It is often used to check if a 3D entity lies in the range of another object.
|
||||
Checking for bounding interference first can save a lot of computing time!
|
||||
An invalid BoundBox is represented by inconsistent values at each direction:
|
||||
The maximum float value of the system at the minimum coordinates, and the
|
||||
opposite value at the maximum coordinates.\n
|
||||
The following constructors are supported:\n
|
||||
opposite value at the maximum coordinates.
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
BoundBox()
|
||||
Empty constructor. Returns an invalid BoundBox.\n
|
||||
Empty constructor. Returns an invalid BoundBox.
|
||||
|
||||
BoundBox(boundBox)
|
||||
Copy constructor.
|
||||
boundBox : Base.BoundBox\n
|
||||
boundBox : Base.BoundBox
|
||||
|
||||
BoundBox(xMin, yMin=0, zMin=0, xMax=0, yMax=0, zMax=0)
|
||||
Define from the minimum and maximum values at each direction.
|
||||
xMin : float\n Minimum value at x-coordinate.
|
||||
yMin : float\n Minimum value at y-coordinate.
|
||||
zMin : float\n Minimum value at z-coordinate.
|
||||
xMax : float\n Maximum value at x-coordinate.
|
||||
yMax : float\n Maximum value at y-coordinate.
|
||||
zMax : float\n Maximum value at z-coordinate.\n
|
||||
xMin : float
|
||||
Minimum value at x-coordinate.
|
||||
yMin : float
|
||||
Minimum value at y-coordinate.
|
||||
zMin : float
|
||||
Minimum value at z-coordinate.
|
||||
xMax : float
|
||||
Maximum value at x-coordinate.
|
||||
yMax : float
|
||||
Maximum value at y-coordinate.
|
||||
zMax : float
|
||||
Maximum value at z-coordinate.
|
||||
|
||||
App.BoundBox(min, max)
|
||||
Define from two containers representing the minimum and maximum values of the
|
||||
coordinates in each direction.
|
||||
min : Base.Vector, tuple\n Minimum values of the coordinates.
|
||||
max : Base.Vector, tuple\n Maximum values of the coordinates.</UserDocu>
|
||||
min : Base.Vector, tuple
|
||||
Minimum values of the coordinates.
|
||||
max : Base.Vector, tuple
|
||||
Maximum values of the coordinates.</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="setVoid">
|
||||
<Documentation>
|
||||
<UserDocu>setVoid() -> None\n
|
||||
<UserDocu>setVoid() -> None
|
||||
|
||||
Invalidate the bounding box.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isValid">
|
||||
<Documentation>
|
||||
<UserDocu>isValid() -> bool\n
|
||||
<UserDocu>isValid() -> bool
|
||||
|
||||
Checks if the bounding box is valid.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="add">
|
||||
<Documentation>
|
||||
<UserDocu>add(minMax) -> None
|
||||
add(x, y, z) -> None\n
|
||||
add(x, y, z) -> None
|
||||
|
||||
Increase the maximum values or decrease the minimum values of this BoundBox by
|
||||
replacing the current values with the given values, so the bounding box can grow
|
||||
but not shrink.\n
|
||||
minMax : Base.Vector, tuple\n Values to enlarge at each direction.
|
||||
x : float\n Value to enlarge at x-direction.
|
||||
y : float\n Value to enlarge at y-direction.
|
||||
z : float\n Value to enlarge at z-direction.</UserDocu>
|
||||
but not shrink.
|
||||
|
||||
minMax : Base.Vector, tuple
|
||||
Values to enlarge at each direction.
|
||||
x : float
|
||||
Value to enlarge at x-direction.
|
||||
y : float
|
||||
Value to enlarge at y-direction.
|
||||
z : float
|
||||
Value to enlarge at z-direction.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getPoint">
|
||||
<Documentation>
|
||||
<UserDocu>getPoint(index) ->Base.Vector\n
|
||||
<UserDocu>getPoint(index) ->Base.Vector
|
||||
|
||||
Get the point of the given index.
|
||||
The index must be in the range of [0, 7].\n
|
||||
The index must be in the range of [0, 7].
|
||||
|
||||
index : int</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getEdge">
|
||||
<Documentation>
|
||||
<UserDocu>getEdge(index) -> tuple of Base.Vector\n
|
||||
<UserDocu>getEdge(index) -> tuple of Base.Vector
|
||||
|
||||
Get the edge points of the given index.
|
||||
The index must be in the range of [0, 11].\n
|
||||
The index must be in the range of [0, 11].
|
||||
|
||||
index : int</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="closestPoint">
|
||||
<Documentation>
|
||||
<UserDocu>closestPoint(point) -> Base.Vector
|
||||
closestPoint(x, y, z) -> Base.Vector\n
|
||||
Get the closest point of the bounding box to the given point.\n
|
||||
point : Base.Vector, tuple\n Coordinates of the given point.
|
||||
x : float\n X-coordinate of the given point.
|
||||
y : float\n Y-coordinate of the given point.
|
||||
z : float\n Z-coordinate of the given point.</UserDocu>
|
||||
closestPoint(x, y, z) -> Base.Vector
|
||||
|
||||
Get the closest point of the bounding box to the given point.
|
||||
|
||||
point : Base.Vector, tuple
|
||||
Coordinates of the given point.
|
||||
x : float
|
||||
X-coordinate of the given point.
|
||||
y : float
|
||||
Y-coordinate of the given point.
|
||||
z : float
|
||||
Z-coordinate of the given point.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="intersect">
|
||||
<Documentation>
|
||||
<UserDocu>intersect(boundBox2) -> bool
|
||||
intersect(base, dir) -> bool\n
|
||||
intersect(base, dir) -> bool
|
||||
|
||||
Checks if the given object intersects with this bounding box. That can be
|
||||
another bounding box or a line specified by base and direction.\n
|
||||
another bounding box or a line specified by base and direction.
|
||||
|
||||
boundBox2 : Base.BoundBox
|
||||
base : Base.Vector, tuple
|
||||
dir : Base.Vector, tuple</UserDocu>
|
||||
@@ -108,72 +142,100 @@ dir : Base.Vector, tuple</UserDocu>
|
||||
</Methode>
|
||||
<Methode Name="intersected">
|
||||
<Documentation>
|
||||
<UserDocu>intersected(boundBox2) -> Base.BoundBox\n
|
||||
Returns the intersection of this and the given bounding box.\n
|
||||
<UserDocu>intersected(boundBox2) -> Base.BoundBox
|
||||
|
||||
Returns the intersection of this and the given bounding box.
|
||||
|
||||
boundBox2 : Base.BoundBox</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="united">
|
||||
<Documentation>
|
||||
<UserDocu>united(boundBox2) -> Base.BoundBox\n
|
||||
Returns the union of this and the given bounding box.\n
|
||||
<UserDocu>united(boundBox2) -> Base.BoundBox
|
||||
|
||||
Returns the union of this and the given bounding box.
|
||||
|
||||
boundBox2 : Base.BoundBox</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="enlarge">
|
||||
<Documentation>
|
||||
<UserDocu>enlarge(variation) -> None\n
|
||||
<UserDocu>enlarge(variation) -> None
|
||||
|
||||
Decrease the minimum values and increase the maximum values by the given value.
|
||||
A negative value shrinks the bounding box.\n
|
||||
A negative value shrinks the bounding box.
|
||||
|
||||
variation : float</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
<Methode Name="getIntersectionPoint">
|
||||
<Documentation>
|
||||
<UserDocu>getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector\n
|
||||
<UserDocu>getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector
|
||||
|
||||
Calculate the intersection point of a line with the bounding box.
|
||||
The base point must lie inside the bounding box, if not an exception is thrown.\n
|
||||
base : Base.Vector\n Base point of the line.
|
||||
dir : Base.Vector\n Direction of the line.
|
||||
epsilon : float\n Bounding box size tolerance.</UserDocu>
|
||||
The base point must lie inside the bounding box, if not an exception is thrown.
|
||||
|
||||
base : Base.Vector
|
||||
Base point of the line.
|
||||
dir : Base.Vector
|
||||
Direction of the line.
|
||||
epsilon : float
|
||||
Bounding box size tolerance.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="move">
|
||||
<Documentation>
|
||||
<UserDocu>move(displacement) -> None
|
||||
move(x, y, z) -> None\n
|
||||
Move the bounding box by the given values.\n
|
||||
displacement : Base.Vector, tuple\n Displacement at each direction.
|
||||
x : float\n Displacement at x-direction.
|
||||
y : float\n Displacement at y-direction.
|
||||
z : float\n Displacement at z-direction.</UserDocu>
|
||||
move(x, y, z) -> None
|
||||
|
||||
Move the bounding box by the given values.
|
||||
|
||||
displacement : Base.Vector, tuple
|
||||
Displacement at each direction.
|
||||
x : float
|
||||
Displacement at x-direction.
|
||||
y : float
|
||||
Displacement at y-direction.
|
||||
z : float
|
||||
Displacement at z-direction.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="scale">
|
||||
<Documentation>
|
||||
<UserDocu>scale(factor) -> None
|
||||
scale(x, y, z) -> None\n
|
||||
Scale the bounding box by the given values.\n
|
||||
factor : Base.Vector, tuple\n Factor scale at each direction.
|
||||
x : float\n Scale at x-direction.
|
||||
y : float\n Scale at y-direction.
|
||||
z : float\n Scale at z-direction.</UserDocu>
|
||||
scale(x, y, z) -> None
|
||||
|
||||
Scale the bounding box by the given values.
|
||||
|
||||
factor : Base.Vector, tuple
|
||||
Factor scale at each direction.
|
||||
x : float
|
||||
Scale at x-direction.
|
||||
y : float
|
||||
Scale at y-direction.
|
||||
z : float
|
||||
Scale at z-direction.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transformed">
|
||||
<Documentation>
|
||||
<UserDocu>transformed(matrix) -> Base.BoundBox\n
|
||||
<UserDocu>transformed(matrix) -> Base.BoundBox
|
||||
|
||||
Returns a new BoundBox containing the transformed rectangular cuboid
|
||||
represented by this BoundBox.\n
|
||||
matrix : Base.Matrix\n Transformation matrix.</UserDocu>
|
||||
represented by this BoundBox.
|
||||
|
||||
matrix : Base.Matrix
|
||||
Transformation matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isCutPlane">
|
||||
<Documentation>
|
||||
<UserDocu>isCutPlane(base, normal) -> bool\n
|
||||
<UserDocu>isCutPlane(base, normal) -> bool
|
||||
|
||||
Check if the plane specified by base and normal intersects (cuts) this bounding
|
||||
box.\n
|
||||
box.
|
||||
|
||||
base : Base.Vector
|
||||
normal : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
@@ -181,12 +243,18 @@ normal : Base.Vector</UserDocu>
|
||||
<Methode Name="isInside">
|
||||
<Documentation>
|
||||
<UserDocu>isInside(object) -> bool
|
||||
isInside(x, y, z) -> bool\n
|
||||
Check if a point or a bounding box is inside this bounding box.\n
|
||||
object : Base.Vector, Base.BoundBox\n Object to check if it is inside this bounding box.
|
||||
x : float\n X-coordinate of the point to check.
|
||||
y : float\n Y-coordinate of the point to check.
|
||||
z : float\n Z-coordinate of the point to check.</UserDocu>
|
||||
isInside(x, y, z) -> bool
|
||||
|
||||
Check if a point or a bounding box is inside this bounding box.
|
||||
|
||||
object : Base.Vector, Base.BoundBox
|
||||
Object to check if it is inside this bounding box.
|
||||
x : float
|
||||
X-coordinate of the point to check.
|
||||
y : float
|
||||
Y-coordinate of the point to check.
|
||||
z : float
|
||||
Z-coordinate of the point to check.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Center" ReadOnly="true">
|
||||
|
||||
@@ -14,46 +14,58 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the CoordinateSystem export class</DeveloperDocu>
|
||||
<UserDocu>Base.CoordinateSystem class.\n
|
||||
An orthonormal right-handed coordinate system in 3D space.\n
|
||||
<UserDocu>Base.CoordinateSystem class.
|
||||
|
||||
An orthonormal right-handed coordinate system in 3D space.
|
||||
|
||||
CoordinateSystem()
|
||||
Empty constructor.</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="setAxes">
|
||||
<Documentation>
|
||||
<UserDocu>setAxes(axis, xDir) -> None\n
|
||||
<UserDocu>setAxes(axis, xDir) -> None
|
||||
|
||||
Set axis or Z-direction, and X-direction.
|
||||
The X-direction is determined from the orthonormal compononent of `xDir`
|
||||
with respect to `axis` direction.\n
|
||||
with respect to `axis` direction.
|
||||
|
||||
axis : Base.Axis, Base.Vector
|
||||
xDir : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="displacement" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>displacement(coordSystem2) -> Base.Placement\n
|
||||
Computes the placement from this to the passed coordinate system `coordSystem2`.\n
|
||||
<UserDocu>displacement(coordSystem2) -> Base.Placement
|
||||
|
||||
Computes the placement from this to the passed coordinate system `coordSystem2`.
|
||||
|
||||
coordSystem2 : Base.CoordinateSystem</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transformTo">
|
||||
<Documentation>
|
||||
<UserDocu>transformTo(vector) -> Base.Vector\n
|
||||
Computes the coordinates of the point in coordinates of this coordinate system.\n
|
||||
<UserDocu>transformTo(vector) -> Base.Vector
|
||||
|
||||
Computes the coordinates of the point in coordinates of this coordinate system.
|
||||
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transform">
|
||||
<Documentation>
|
||||
<UserDocu>transform(trans) -> None\n
|
||||
Applies a transformation on this coordinate system.\n
|
||||
<UserDocu>transform(trans) -> None
|
||||
|
||||
Applies a transformation on this coordinate system.
|
||||
|
||||
trans : Base.Rotation, Base.Placement</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setPlacement">
|
||||
<Documentation>
|
||||
<UserDocu>setPlacment(placement) -> None\n
|
||||
Set placement to the coordinate system.\n
|
||||
<UserDocu>setPlacment(placement) -> None
|
||||
|
||||
Set placement to the coordinate system.
|
||||
|
||||
placement : Base.Placement</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
@@ -16,23 +16,30 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the Matrix export class</DeveloperDocu>
|
||||
<UserDocu>Base.Matrix class.\n
|
||||
<UserDocu>Base.Matrix class.
|
||||
|
||||
A 4x4 Matrix.
|
||||
In particular, this matrix can represent an affine transformation, that is,
|
||||
given a 3D vector `x`, apply the transformation y = M*x + b, where the matrix
|
||||
`M` is a linear map and the vector `b` is a translation.
|
||||
`y` can be obtained using a linear transformation represented by the 4x4 matrix
|
||||
`A` conformed by the augmented 3x4 matrix (M|b), augmented by row with
|
||||
(0,0,0,1), therefore: (y, 1) = A*(x, 1).\n
|
||||
The following constructors are supported:\n
|
||||
(0,0,0,1), therefore: (y, 1) = A*(x, 1).
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
Matrix()
|
||||
Empty constructor.\n
|
||||
Empty constructor.
|
||||
|
||||
Matrix(matrix)
|
||||
Copy constructor.
|
||||
matrix : Base.Matrix.\n
|
||||
matrix : Base.Matrix.
|
||||
|
||||
Matrix(*coef)
|
||||
Define from 16 coefficients of the 4x4 matrix.
|
||||
coef : sequence of float\n The sequence can have up to 16 elements which complete the matrix by rows.\n
|
||||
coef : sequence of float
|
||||
The sequence can have up to 16 elements which complete the matrix by rows.
|
||||
|
||||
Matrix(vector1, vector2, vector3, vector4)
|
||||
Define from four 3D vectors which represent the columns of the 3x4 submatrix,
|
||||
useful to represent an affine transformation. The fourth row is made up by
|
||||
@@ -40,212 +47,272 @@ useful to represent an affine transformation. The fourth row is made up by
|
||||
vector1 : Base.Vector
|
||||
vector2 : Base.Vector
|
||||
vector3 : Base.Vector
|
||||
vector4 : Base.Vector\n Default to (0,0,0). Optional.</UserDocu>
|
||||
vector4 : Base.Vector
|
||||
Default to (0,0,0). Optional.</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="move">
|
||||
<Documentation>
|
||||
<UserDocu>move(vector) -> None
|
||||
move(x, y, z) -> None\n
|
||||
move(x, y, z) -> None
|
||||
|
||||
Move the matrix along a vector, equivalent to left multiply the matrix
|
||||
by a pure translation transformation.\n
|
||||
by a pure translation transformation.
|
||||
|
||||
vector : Base.Vector, tuple
|
||||
x : float\n `x` translation.
|
||||
y : float\n `y` translation.
|
||||
z : float\n `z` translation.</UserDocu>
|
||||
x : float
|
||||
`x` translation.
|
||||
y : float
|
||||
`y` translation.
|
||||
z : float
|
||||
`z` translation.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="scale">
|
||||
<Documentation>
|
||||
<UserDocu>scale(vector) -> None
|
||||
scale(x, y, z) -> None
|
||||
scale(factor) -> None\n
|
||||
Scale the first three rows of the matrix.\n
|
||||
scale(factor) -> None
|
||||
|
||||
Scale the first three rows of the matrix.
|
||||
|
||||
vector : Base.Vector
|
||||
x : float\n First row factor scale.
|
||||
y : float\n Second row factor scale.
|
||||
z : float\n Third row factor scale.
|
||||
factor : float\n global factor scale.</UserDocu>
|
||||
x : float
|
||||
First row factor scale.
|
||||
y : float
|
||||
Second row factor scale.
|
||||
z : float
|
||||
Third row factor scale.
|
||||
factor : float
|
||||
global factor scale.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="hasScale" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>hasScale(tol=0) -> ScaleType\n
|
||||
<UserDocu>hasScale(tol=0) -> ScaleType
|
||||
|
||||
Return an enum value of ScaleType. Possible values are:
|
||||
Uniform, NonUniformLeft, NonUniformRight, NoScaling or Other
|
||||
if it's not a scale matrix.\n
|
||||
if it's not a scale matrix.
|
||||
|
||||
tol : float</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="nullify">
|
||||
<Documentation>
|
||||
<UserDocu>nullify() -> None\n
|
||||
<UserDocu>nullify() -> None
|
||||
|
||||
Make this the null matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isNull" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isNull() -> bool\n
|
||||
<UserDocu>isNull() -> bool
|
||||
|
||||
Check if this is the null matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="unity">
|
||||
<Documentation>
|
||||
<UserDocu>unity() -> None\n
|
||||
<UserDocu>unity() -> None
|
||||
|
||||
Make this matrix to unity (4D identity matrix).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isUnity" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isUnity() -> bool\n
|
||||
<UserDocu>isUnity() -> bool
|
||||
|
||||
Check if this is the unit matrix (4D identity matrix).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transform">
|
||||
<Documentation>
|
||||
<UserDocu>transform(vector, matrix2) -> None\n
|
||||
<UserDocu>transform(vector, matrix2) -> None
|
||||
|
||||
Transform the matrix around a given point.
|
||||
Equivalent to left multiply the matrix by T*M*T_inv, where M is `matrix2`, T the
|
||||
translation generated by `vector` and T_inv the inverse translation.
|
||||
For example, if `matrix2` is a rotation, the result is the transformation generated
|
||||
by the current matrix followed by a rotation around the point represented by `vector`.\n
|
||||
by the current matrix followed by a rotation around the point represented by `vector`.
|
||||
|
||||
vector : Base.Vector
|
||||
matrix2 : Base.Matrix</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="col" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>col(index) -> Base.Vector\n
|
||||
<UserDocu>col(index) -> Base.Vector
|
||||
|
||||
Return the vector of a column, that is, the vector generated by the three
|
||||
first elements of the specified column.\n
|
||||
index : int\n Required column index.</UserDocu>
|
||||
first elements of the specified column.
|
||||
|
||||
index : int
|
||||
Required column index.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setCol">
|
||||
<Documentation>
|
||||
<UserDocu>setCol(index, vector) -> None\n
|
||||
<UserDocu>setCol(index, vector) -> None
|
||||
|
||||
Set the vector of a column, that is, the three first elements of the specified
|
||||
column by index.\n
|
||||
index : int\n Required column index.
|
||||
column by index.
|
||||
|
||||
index : int
|
||||
Required column index.
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="row" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>row(index) -> Base.Vector\n
|
||||
<UserDocu>row(index) -> Base.Vector
|
||||
|
||||
Return the vector of a row, that is, the vector generated by the three
|
||||
first elements of the specified row.\n
|
||||
index : int\n Required row index.</UserDocu>
|
||||
first elements of the specified row.
|
||||
|
||||
index : int
|
||||
Required row index.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setRow">
|
||||
<Documentation>
|
||||
<UserDocu>setRow(index, vector) -> None\n
|
||||
<UserDocu>setRow(index, vector) -> None
|
||||
|
||||
Set the vector of a row, that is, the three first elements of the specified
|
||||
row by index.\n
|
||||
index : int\n Required row index.
|
||||
row by index.
|
||||
|
||||
index : int
|
||||
Required row index.
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="trace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>trace() -> Base.Vector\n
|
||||
<UserDocu>trace() -> Base.Vector
|
||||
|
||||
Return the diagonal of the 3x3 leading principal submatrix as vector.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setTrace">
|
||||
<Documentation>
|
||||
<UserDocu>setTrace(vector) -> None\n
|
||||
Set the diagonal of the 3x3 leading principal submatrix.\n
|
||||
<UserDocu>setTrace(vector) -> None
|
||||
|
||||
Set the diagonal of the 3x3 leading principal submatrix.
|
||||
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="rotateX">
|
||||
<Documentation>
|
||||
<UserDocu>rotateX(angle) -> None\n
|
||||
Rotate around X axis.\n
|
||||
angle : float\n Angle in radians.</UserDocu>
|
||||
<UserDocu>rotateX(angle) -> None
|
||||
|
||||
Rotate around X axis.
|
||||
|
||||
angle : float
|
||||
Angle in radians.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="rotateY">
|
||||
<Documentation>
|
||||
<UserDocu>rotateY(angle) -> None\n
|
||||
Rotate around Y axis.\n
|
||||
angle : float\n Angle in radians.</UserDocu>
|
||||
<UserDocu>rotateY(angle) -> None
|
||||
|
||||
Rotate around Y axis.
|
||||
|
||||
angle : float
|
||||
Angle in radians.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="rotateZ">
|
||||
<Documentation>
|
||||
<UserDocu>rotateZ(angle) -> None\n
|
||||
Rotate around Z axis.\n
|
||||
angle : float\n Angle in radians.</UserDocu>
|
||||
<UserDocu>rotateZ(angle) -> None
|
||||
|
||||
Rotate around Z axis.
|
||||
|
||||
angle : float
|
||||
Angle in radians.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(matrix) -> Base.Matrix
|
||||
multiply(vector) -> Base.Vector\n
|
||||
multiply(vector) -> Base.Vector
|
||||
|
||||
Right multiply the matrix by the given object.
|
||||
If the argument is a vector, this is augmented to the 4D vector (`vector`, 1).\n
|
||||
If the argument is a vector, this is augmented to the 4D vector (`vector`, 1).
|
||||
|
||||
matrix : Base.Matrix
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multVec" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multVec(vector) -> Base.Vector\n
|
||||
Compute the transformed vector using the matrix.\n
|
||||
<UserDocu>multVec(vector) -> Base.Vector
|
||||
|
||||
Compute the transformed vector using the matrix.
|
||||
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="invert">
|
||||
<Documentation>
|
||||
<UserDocu>invert() -> None\n
|
||||
<UserDocu>invert() -> None
|
||||
|
||||
Compute the inverse matrix in-place, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverse" Const="true">
|
||||
<Documentation><UserDocu>inverse() -> Base.Matrix\n
|
||||
<Documentation><UserDocu>inverse() -> Base.Matrix
|
||||
|
||||
Compute the inverse matrix, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transpose">
|
||||
<Documentation>
|
||||
<UserDocu>transpose() -> None\n
|
||||
<UserDocu>transpose() -> None
|
||||
|
||||
Transpose the matrix in-place.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transposed" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>transposed() -> Base.Matrix\n
|
||||
<UserDocu>transposed() -> Base.Matrix
|
||||
|
||||
Returns a transposed copy of this matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="determinant" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>determinant() -> float\n
|
||||
<UserDocu>determinant() -> float
|
||||
|
||||
Compute the determinant of the matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isOrthogonal" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isOrthogonal(tol=1e-6) -> float\n
|
||||
<UserDocu>isOrthogonal(tol=1e-6) -> float
|
||||
|
||||
Checks if the matrix is orthogonal, i.e. M * M^T = k*I and returns
|
||||
the multiple of the identity matrix. If it's not orthogonal 0 is returned.\n
|
||||
tol : float\n Tolerance used to check orthogonality.</UserDocu>
|
||||
the multiple of the identity matrix. If it's not orthogonal 0 is returned.
|
||||
|
||||
tol : float
|
||||
Tolerance used to check orthogonality.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="submatrix" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>submatrix(dim) -> Base.Matrix\n
|
||||
<UserDocu>submatrix(dim) -> Base.Matrix
|
||||
|
||||
Get the leading principal submatrix of the given dimension.
|
||||
The (4 - `dim`) remaining dimensions are completed with the
|
||||
corresponding identity matrix.\n
|
||||
dim : int\n Dimension parameter must be in the range [1,4].</UserDocu>
|
||||
corresponding identity matrix.
|
||||
|
||||
dim : int
|
||||
Dimension parameter must be in the range [1,4].</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="analyze" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>analyze() -> str\n
|
||||
<UserDocu>analyze() -> str
|
||||
|
||||
Analyzes the type of transformation.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the Persistence class</DeveloperDocu>
|
||||
<UserDocu>Base.Persistence class.\n
|
||||
<UserDocu>Base.Persistence class.
|
||||
|
||||
Class to dump and restore the content of an object.</UserDocu>
|
||||
</Documentation>
|
||||
<Attribute Name="Content" ReadOnly="true">
|
||||
@@ -29,18 +30,24 @@ Class to dump and restore the content of an object.</UserDocu>
|
||||
</Attribute>
|
||||
<Methode Name="dumpContent" Keyword="true" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>dumpContent(Compression=3) -> bytearray\n
|
||||
<UserDocu>dumpContent(Compression=3) -> bytearray
|
||||
|
||||
Dumps the content of the object, both the XML representation and the additional
|
||||
data files required, into a byte representation.\n
|
||||
Compression : int\n Set the data compression level in the range [0,9]. Set to 0 for no compression.</UserDocu>
|
||||
data files required, into a byte representation.
|
||||
|
||||
Compression : int
|
||||
Set the data compression level in the range [0,9]. Set to 0 for no compression.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="restoreContent">
|
||||
<Documentation>
|
||||
<UserDocu>restoreContent(obj) -> None\n
|
||||
<UserDocu>restoreContent(obj) -> None
|
||||
|
||||
Restore the content of the object from a byte representation as stored by `dumpContent`.
|
||||
It could be restored from any Python object implementing the buffer protocol.\n
|
||||
obj : buffer\n Object with buffer protocol support.</UserDocu>
|
||||
It could be restored from any Python object implementing the buffer protocol.
|
||||
|
||||
obj : buffer
|
||||
Object with buffer protocol support.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
|
||||
@@ -15,27 +15,35 @@
|
||||
FatherNamespace="Base">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<UserDocu>Base.Placement class.\n
|
||||
<UserDocu>Base.Placement class.
|
||||
|
||||
A Placement defines an orientation (rotation) and a position (base) in 3D space.
|
||||
It is used when no scaling or other distortion is needed.\n
|
||||
The following constructors are supported:\n
|
||||
It is used when no scaling or other distortion is needed.
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
Placement()
|
||||
Empty constructor.\n
|
||||
Empty constructor.
|
||||
|
||||
Placement(placement)
|
||||
Copy constructor.
|
||||
placement : Base.Placement\n
|
||||
placement : Base.Placement
|
||||
|
||||
Placement(matrix)
|
||||
Define from a 4D matrix consisting of rotation and translation.
|
||||
matrix : Base.Matrix\n
|
||||
matrix : Base.Matrix
|
||||
|
||||
Placement(base, rotation)
|
||||
Define from position and rotation.
|
||||
base : Base.Vector
|
||||
rotation : Base.Rotation\n
|
||||
rotation : Base.Rotation
|
||||
|
||||
Placement(base, rotation, center)
|
||||
Define from position and rotation with center.
|
||||
base : Base.Vector
|
||||
rotation : Base.Rotation
|
||||
center : Base.Vector\n
|
||||
center : Base.Vector
|
||||
|
||||
Placement(base, axis, angle)
|
||||
define position and rotation.
|
||||
base : Base.Vector
|
||||
@@ -45,115 +53,149 @@ angle : float</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="copy" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>copy() -> Base.Placement\n
|
||||
<UserDocu>copy() -> Base.Placement
|
||||
|
||||
Returns a copy of this placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="move">
|
||||
<Documentation>
|
||||
<UserDocu>move(vector) -> None\n
|
||||
Move the placement along a vector.\n
|
||||
vector : Base.Vector\n Vector by which to move the placement.</UserDocu>
|
||||
<UserDocu>move(vector) -> None
|
||||
|
||||
Move the placement along a vector.
|
||||
|
||||
vector : Base.Vector
|
||||
Vector by which to move the placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="translate">
|
||||
<Documentation>
|
||||
<UserDocu>translate(vector) -> None\n
|
||||
Alias to move(), to be compatible with TopoShape.translate().\n
|
||||
vector : Base.Vector\n Vector by which to move the placement.</UserDocu>
|
||||
<UserDocu>translate(vector) -> None
|
||||
|
||||
Alias to move(), to be compatible with TopoShape.translate().
|
||||
|
||||
vector : Base.Vector
|
||||
Vector by which to move the placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="rotate" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>rotate(center, axis, angle, comp) -> None\n
|
||||
<UserDocu>rotate(center, axis, angle, comp) -> None
|
||||
|
||||
Rotate the current placement around center and axis with the given angle.
|
||||
This method is compatible with TopoShape.rotate() if the (optional) keyword
|
||||
argument comp is True (default=False).
|
||||
|
||||
center : Base.Vector, sequence of float\n Rotation center.
|
||||
axis : Base.Vector, sequence of float\n Rotation axis.
|
||||
angle : float\n Rotation angle in degrees.
|
||||
comp : bool\n optional keyword only argument, if True (default=False),
|
||||
center : Base.Vector, sequence of float
|
||||
Rotation center.
|
||||
axis : Base.Vector, sequence of float
|
||||
Rotation axis.
|
||||
angle : float
|
||||
Rotation angle in degrees.
|
||||
comp : bool
|
||||
optional keyword only argument, if True (default=False),
|
||||
behave like TopoShape.rotate() (i.e. the resulting placements are interchangeable).
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(placement) -> Base.Placement\n
|
||||
<UserDocu>multiply(placement) -> Base.Placement
|
||||
|
||||
Right multiply this placement with another placement.
|
||||
Also available as `*` operator.\n
|
||||
placement : Base.Placement\n Placement by which to multiply this placement.</UserDocu>
|
||||
Also available as `*` operator.
|
||||
|
||||
placement : Base.Placement
|
||||
Placement by which to multiply this placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multVec" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multVec(vector) -> Base.Vector\n
|
||||
Compute the transformed vector using the placement.\n
|
||||
vector : Base.Vector\n Vector to be transformed.</UserDocu>
|
||||
<UserDocu>multVec(vector) -> Base.Vector
|
||||
|
||||
Compute the transformed vector using the placement.
|
||||
|
||||
vector : Base.Vector
|
||||
Vector to be transformed.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toMatrix" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>toMatrix() -> Base.Matrix\n
|
||||
<UserDocu>toMatrix() -> Base.Matrix
|
||||
|
||||
Compute the matrix representation of the placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverse" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>inverse() -> Base.Placement\n
|
||||
<UserDocu>inverse() -> Base.Placement
|
||||
|
||||
Compute the inverse placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="pow" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>pow(t, shorten=True) -> Base.Placement\n
|
||||
<UserDocu>pow(t, shorten=True) -> Base.Placement
|
||||
|
||||
Raise this placement to real power using ScLERP interpolation.
|
||||
Also available as `**` operator.\n
|
||||
t : float\n Real power.
|
||||
shorten : bool\n If True, ensures rotation quaternion is net positive to make
|
||||
Also available as `**` operator.
|
||||
|
||||
t : float
|
||||
Real power.
|
||||
shorten : bool
|
||||
If True, ensures rotation quaternion is net positive to make
|
||||
the path shorter.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="sclerp" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>sclerp(placement2, t, shorten=True) -> Base.Placement\n
|
||||
<UserDocu>sclerp(placement2, t, shorten=True) -> Base.Placement
|
||||
|
||||
Screw Linear Interpolation (ScLERP) between this placement and `placement2`.
|
||||
Interpolation is a continuous motion along a helical path parametrized by `t`
|
||||
made of equal transforms if discretized.
|
||||
If quaternions of rotations of the two placements differ in sign, the interpolation
|
||||
will take a long path.\n
|
||||
will take a long path.
|
||||
|
||||
placement2 : Base.Placement
|
||||
t : float\n Parameter of helical path. t=0 returns this placement, t=1 returns
|
||||
t : float
|
||||
Parameter of helical path. t=0 returns this placement, t=1 returns
|
||||
`placement2`. t can also be outside of [0, 1] range for extrapolation.
|
||||
shorten : bool\n If True, the signs are harmonized before interpolation and the interpolation
|
||||
shorten : bool
|
||||
If True, the signs are harmonized before interpolation and the interpolation
|
||||
takes the shorter path.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="slerp" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>slerp(placement2, t) -> Base.Placement\n
|
||||
<UserDocu>slerp(placement2, t) -> Base.Placement
|
||||
|
||||
Spherical Linear Interpolation (SLERP) between this placement and `placement2`.
|
||||
This function performs independent interpolation of rotation and movement.
|
||||
Result of such interpolation might be not what application expects, thus this tool
|
||||
might be considered for simple cases or for interpolating between small intervals.
|
||||
For more complex cases you better use the advanced sclerp() function.\n
|
||||
For more complex cases you better use the advanced sclerp() function.
|
||||
|
||||
placement2 : Base.Placement
|
||||
t : float\n Parameter of the path. t=0 returns this placement, t=1 returns `placement2`.</UserDocu>
|
||||
t : float
|
||||
Parameter of the path. t=0 returns this placement, t=1 returns `placement2`.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isIdentity" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isIdentity([tol=0.0]) -> bool\n
|
||||
<UserDocu>isIdentity([tol=0.0]) -> bool
|
||||
|
||||
Returns True if the placement has no displacement and no rotation.
|
||||
Matrix representation is the 4D identity matrix.
|
||||
tol : float\n Tolerance used to check for identity.
|
||||
tol : float
|
||||
Tolerance used to check for identity.
|
||||
If tol is negative or zero, no tolerance is used.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isSame" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isSame(Base.Placement, [tol=0.0]) -> bool\n
|
||||
<UserDocu>isSame(Base.Placement, [tol=0.0]) -> bool
|
||||
|
||||
Checks whether this and the given placement are the same.
|
||||
The default tolerance is set to 0.0</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
@@ -16,42 +16,52 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the Rotation export class</DeveloperDocu>
|
||||
<UserDocu>Base.Rotation class.\n
|
||||
A Rotation using a quaternion.\n
|
||||
The following constructors are supported:\n
|
||||
<UserDocu>Base.Rotation class.
|
||||
|
||||
A Rotation using a quaternion.
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
Rotation()
|
||||
Empty constructor.\n
|
||||
Empty constructor.
|
||||
|
||||
Rotation(rotation)
|
||||
Copy constructor.\n
|
||||
Copy constructor.
|
||||
|
||||
Rotation(Axis, Radian)
|
||||
Rotation(Axis, Degree)
|
||||
Define from an axis and an angle (in radians or degrees according to the keyword).
|
||||
Axis : Base.Vector
|
||||
Radian : float
|
||||
Degree : float\n
|
||||
Degree : float
|
||||
|
||||
Rotation(vector_start, vector_end)
|
||||
Define from two vectors (rotation from/to vector).
|
||||
vector_start : Base.Vector
|
||||
vector_end : Base.Vector\n
|
||||
vector_end : Base.Vector
|
||||
|
||||
Rotation(angle1, angle2, angle3)
|
||||
Define from three floats (Euler angles) as yaw-pitch-roll in XY'Z'' convention.
|
||||
angle1 : float
|
||||
angle2 : float
|
||||
angle3 : float\n
|
||||
angle3 : float
|
||||
|
||||
Rotation(seq, angle1, angle2, angle3)
|
||||
Define from one string and three floats (Euler angles) as Euler rotation
|
||||
of a given type. Call toEulerAngles() for supported sequence types.
|
||||
seq : str
|
||||
angle1 : float
|
||||
angle2 : float
|
||||
angle3 : float\n
|
||||
angle3 : float
|
||||
|
||||
Rotation(x, y, z, w)
|
||||
Define from four floats (quaternion) where the quaternion is specified as:
|
||||
q = xi+yj+zk+w, i.e. the last parameter is the real part.
|
||||
x : float
|
||||
y : float
|
||||
z : float
|
||||
w : float\n
|
||||
w : float
|
||||
|
||||
Rotation(dir1, dir2, dir3, seq)
|
||||
Define from three vectors that define rotated axes directions plus an optional
|
||||
3-characher string of capital letters 'X', 'Y', 'Z' that sets the order of
|
||||
@@ -60,10 +70,12 @@ x is used but corrected if necessary, y is ignored).
|
||||
dir1 : Base.Vector
|
||||
dir2 : Base.Vector
|
||||
dir3 : Base.Vector
|
||||
seq : str\n
|
||||
seq : str
|
||||
|
||||
Rotation(matrix)
|
||||
Define from a matrix rotation in the 4D representation.
|
||||
matrix : Base.Matrix\n
|
||||
matrix : Base.Matrix
|
||||
|
||||
Rotation(*coef)
|
||||
Define from 16 or 9 elements which represent the rotation in the 4D matrix
|
||||
representation or in the 3D matrix representation, respectively.
|
||||
@@ -71,68 +83,91 @@ coef : sequence of float</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="invert">
|
||||
<Documentation>
|
||||
<UserDocu>invert() -> None\n
|
||||
<UserDocu>invert() -> None
|
||||
|
||||
Sets the rotation to its inverse.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverted">
|
||||
<Documentation>
|
||||
<UserDocu>inverted() -> Base.Rotation\n
|
||||
<UserDocu>inverted() -> Base.Rotation
|
||||
|
||||
Returns the inverse of the rotation.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isSame">
|
||||
<Documentation>
|
||||
<UserDocu>isSame(rotation, tol=0) -> bool\n
|
||||
Checks if `rotation` perform the same transformation as this rotation.\n
|
||||
<UserDocu>isSame(rotation, tol=0) -> bool
|
||||
|
||||
Checks if `rotation` perform the same transformation as this rotation.
|
||||
|
||||
rotation : Base.Rotation
|
||||
tol : float\n Tolerance used to compare both rotations.
|
||||
tol : float
|
||||
Tolerance used to compare both rotations.
|
||||
If tol is negative or zero, no tolerance is used.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(rotation) -> Base.Rotation\n
|
||||
Right multiply this rotation with another rotation.\n
|
||||
rotation : Base.Rotation\n Rotation by which to multiply this rotation.</UserDocu>
|
||||
<UserDocu>multiply(rotation) -> Base.Rotation
|
||||
|
||||
Right multiply this rotation with another rotation.
|
||||
|
||||
rotation : Base.Rotation
|
||||
Rotation by which to multiply this rotation.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multVec" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multVec(vector) -> Base.Vector\n
|
||||
Compute the transformed vector using the rotation.\n
|
||||
vector : Base.Vector\n Vector to be transformed.</UserDocu>
|
||||
<UserDocu>multVec(vector) -> Base.Vector
|
||||
|
||||
Compute the transformed vector using the rotation.
|
||||
|
||||
vector : Base.Vector
|
||||
Vector to be transformed.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="slerp" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>slerp(rotation2, t) -> Base.Rotation\n
|
||||
Spherical Linear Interpolation (SLERP) of this rotation and `rotation2`.\n
|
||||
t : float\n Parameter of the path. t=0 returns this rotation, t=1 returns `rotation2`.</UserDocu>
|
||||
<UserDocu>slerp(rotation2, t) -> Base.Rotation
|
||||
|
||||
Spherical Linear Interpolation (SLERP) of this rotation and `rotation2`.
|
||||
|
||||
t : float
|
||||
Parameter of the path. t=0 returns this rotation, t=1 returns `rotation2`.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setYawPitchRoll">
|
||||
<Documentation>
|
||||
<UserDocu>setYawPitchRoll(angle1, angle2, angle3) -> None\n
|
||||
Set the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention.\n
|
||||
angle1 : float\n Angle around yaw axis in degrees.
|
||||
angle2 : float\n Angle around pitch axis in degrees.
|
||||
angle3 : float\n Angle around roll axis in degrees.</UserDocu>
|
||||
<UserDocu>setYawPitchRoll(angle1, angle2, angle3) -> None
|
||||
|
||||
Set the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention.
|
||||
|
||||
angle1 : float
|
||||
Angle around yaw axis in degrees.
|
||||
angle2 : float
|
||||
Angle around pitch axis in degrees.
|
||||
angle3 : float
|
||||
Angle around roll axis in degrees.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getYawPitchRoll" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>getYawPitchRoll() -> tuple\n
|
||||
<UserDocu>getYawPitchRoll() -> tuple
|
||||
|
||||
Get the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention.
|
||||
The angles are given in degrees.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setEulerAngles">
|
||||
<Documentation>
|
||||
<UserDocu>setEulerAngles(seq, angle1, angle2, angle3) -> None\n
|
||||
<UserDocu>setEulerAngles(seq, angle1, angle2, angle3) -> None
|
||||
|
||||
Set the Euler angles in a given sequence for this rotation.
|
||||
The angles must be given in degrees.\n
|
||||
seq : str\n Euler sequence name. All possible values given by toEulerAngles().
|
||||
The angles must be given in degrees.
|
||||
|
||||
seq : str
|
||||
Euler sequence name. All possible values given by toEulerAngles().
|
||||
angle1 : float
|
||||
angle2 : float
|
||||
angle3 : float </UserDocu>
|
||||
@@ -140,29 +175,36 @@ angle3 : float </UserDocu>
|
||||
</Methode>
|
||||
<Methode Name="toEulerAngles" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>toEulerAngles(seq) -> list\n
|
||||
Get the Euler angles in a given sequence for this rotation.\n
|
||||
seq : str\n Euler sequence name. If not given, the function returns
|
||||
<UserDocu>toEulerAngles(seq) -> list
|
||||
|
||||
Get the Euler angles in a given sequence for this rotation.
|
||||
|
||||
seq : str
|
||||
Euler sequence name. If not given, the function returns
|
||||
all possible values of `seq`. Optional.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toMatrix" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>toMatrix() -> Base.Matrix\n
|
||||
<UserDocu>toMatrix() -> Base.Matrix
|
||||
|
||||
Convert the rotation to a 4D matrix representation.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isNull" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isNull() -> bool\n
|
||||
<UserDocu>isNull() -> bool
|
||||
|
||||
Returns True if all values in the quaternion representation are zero.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isIdentity" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isIdentity(tol=0) -> bool\n
|
||||
<UserDocu>isIdentity(tol=0) -> bool
|
||||
|
||||
Returns True if the rotation equals the 4D identity matrix.
|
||||
tol : float\n Tolerance used to check for identity.
|
||||
tol : float
|
||||
Tolerance used to check for identity.
|
||||
If tol is negative or zero, no tolerance is used.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace Base {
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the Type class</DeveloperDocu>
|
||||
<UserDocu>Base.BaseType class.\n
|
||||
<UserDocu>Base.BaseType class.
|
||||
|
||||
This class is not intended to create instances of itself, but to get information
|
||||
from the different types and create instances of them.
|
||||
Regarding instantiation, this is possible in cases that inherit from the
|
||||
@@ -25,74 +26,91 @@ Base::BaseClass class and are not abstract classes.</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="fromName" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>fromName(name) -> Base.BaseType\n
|
||||
Returns a type object by name.\n
|
||||
<UserDocu>fromName(name) -> Base.BaseType
|
||||
|
||||
Returns a type object by name.
|
||||
|
||||
name : str</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="fromKey" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>fromKey(key) -> Base.BaseType\n
|
||||
Returns a type id object by key.\n
|
||||
<UserDocu>fromKey(key) -> Base.BaseType
|
||||
|
||||
Returns a type id object by key.
|
||||
|
||||
key : int</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNumTypes" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>getNumTypes() -> int\n
|
||||
<UserDocu>getNumTypes() -> int
|
||||
|
||||
Returns the number of type ids created so far.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getBadType" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>getBadType() -> Base.BaseType\n
|
||||
<UserDocu>getBadType() -> Base.BaseType
|
||||
|
||||
Returns an invalid type id.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getAllDerivedFrom" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>getAllDerivedFrom(type) -> list\n
|
||||
Returns all descendants from the given type id.\n
|
||||
<UserDocu>getAllDerivedFrom(type) -> list
|
||||
|
||||
Returns all descendants from the given type id.
|
||||
|
||||
type : str, Base.BaseType</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getParent" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>getParent() -> Base.BaseType\n
|
||||
<UserDocu>getParent() -> Base.BaseType
|
||||
|
||||
Returns the parent type id.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isBad" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isBad() -> bool\n
|
||||
<UserDocu>isBad() -> bool
|
||||
|
||||
Checks if the type id is invalid.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isDerivedFrom" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isDerivedFrom(type) -> bool\n
|
||||
Returns true if given type id is a father of this type id.\n
|
||||
<UserDocu>isDerivedFrom(type) -> bool
|
||||
|
||||
Returns true if given type id is a father of this type id.
|
||||
|
||||
type : str, Base.BaseType</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getAllDerived" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>getAllDerived() -> list\n
|
||||
<UserDocu>getAllDerived() -> list
|
||||
|
||||
Returns all descendants from this type id.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="createInstance">
|
||||
<Documentation>
|
||||
<UserDocu>createInstance() -> object\n
|
||||
<UserDocu>createInstance() -> object
|
||||
|
||||
Creates an instance of this type id.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="createInstanceByName" Static="true">
|
||||
<Documentation>
|
||||
<UserDocu>createInstanceByName(name, load=False) -> object\n
|
||||
Creates an instance of the named type id.\n
|
||||
<UserDocu>createInstanceByName(name, load=False) -> object
|
||||
|
||||
Creates an instance of the named type id.
|
||||
|
||||
name : str
|
||||
load : bool\n Load named type id module.</UserDocu>
|
||||
load : bool
|
||||
Load named type id module.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Name" ReadOnly="true">
|
||||
|
||||
@@ -16,162 +16,203 @@
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<DeveloperDocu>This is the Vector export class</DeveloperDocu>
|
||||
<UserDocu>Base.Vector class.\n
|
||||
<UserDocu>Base.Vector class.
|
||||
|
||||
This class represents a 3D float vector.
|
||||
Useful to represent points in the 3D space.\n
|
||||
The following constructors are supported:\n
|
||||
Useful to represent points in the 3D space.
|
||||
|
||||
The following constructors are supported:
|
||||
|
||||
Vector(x=0, y=0, z=0)
|
||||
x : float
|
||||
y : float
|
||||
z : float\n
|
||||
z : float
|
||||
|
||||
Vector(vector)
|
||||
Copy constructor.
|
||||
vector : Base.Vector\n
|
||||
vector : Base.Vector
|
||||
|
||||
Vector(seq)
|
||||
Define from a sequence of float.
|
||||
seq : sequence of float.</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="__reduce__" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>__reduce__() -> tuple\n
|
||||
<UserDocu>__reduce__() -> tuple
|
||||
|
||||
Serialization of Vector objects.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="add" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>add(vector2) -> Base.Vector\n
|
||||
Returns the sum of this vector and `vector2`.\n
|
||||
<UserDocu>add(vector2) -> Base.Vector
|
||||
|
||||
Returns the sum of this vector and `vector2`.
|
||||
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="sub" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>sub(vector2) -> Base.Vector\n
|
||||
Returns the difference of this vector and `vector2`.\n
|
||||
<UserDocu>sub(vector2) -> Base.Vector
|
||||
|
||||
Returns the difference of this vector and `vector2`.
|
||||
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="negative" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>negative() -> Base.Vector\n
|
||||
<UserDocu>negative() -> Base.Vector
|
||||
|
||||
Returns the negative (opposite) of this vector.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="scale">
|
||||
<Documentation>
|
||||
<UserDocu>scale(x, y, z) -> Base.Vector\n
|
||||
Scales in-place this vector by the given factor in each component.\n
|
||||
x : float\n x-component factor scale.
|
||||
y : float\n y-component factor scale.
|
||||
z : float\n z-component factor scale.</UserDocu>
|
||||
<UserDocu>scale(x, y, z) -> Base.Vector
|
||||
|
||||
Scales in-place this vector by the given factor in each component.
|
||||
|
||||
x : float
|
||||
x-component factor scale.
|
||||
y : float
|
||||
y-component factor scale.
|
||||
z : float
|
||||
z-component factor scale.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multiply">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(factor) -> Base.Vector\n
|
||||
<UserDocu>multiply(factor) -> Base.Vector
|
||||
|
||||
Multiplies in-place each component of this vector by a single factor.
|
||||
Equivalent to scale(factor, factor, factor).\n
|
||||
Equivalent to scale(factor, factor, factor).
|
||||
|
||||
factor : float</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="dot" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>dot(vector2) -> float\n
|
||||
Returns the scalar product (dot product) between this vector and `vector2`.\n
|
||||
<UserDocu>dot(vector2) -> float
|
||||
|
||||
Returns the scalar product (dot product) between this vector and `vector2`.
|
||||
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="cross" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>cross(vector2) -> Base.Vector\n
|
||||
Returns the vector product (cross product) between this vector and `vector2`.\n
|
||||
<UserDocu>cross(vector2) -> Base.Vector
|
||||
|
||||
Returns the vector product (cross product) between this vector and `vector2`.
|
||||
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isOnLineSegment" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isOnLineSegment(vector1, vector2) -> bool\n
|
||||
Checks if this vector is on the line segment generated by `vector1` and `vector2`.\n
|
||||
<UserDocu>isOnLineSegment(vector1, vector2) -> bool
|
||||
|
||||
Checks if this vector is on the line segment generated by `vector1` and `vector2`.
|
||||
|
||||
vector1 : Base.Vector
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getAngle" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>getAngle(vector2) -> float\n
|
||||
Returns the angle in radians between this vector and `vector2`.\n
|
||||
<UserDocu>getAngle(vector2) -> float
|
||||
|
||||
Returns the angle in radians between this vector and `vector2`.
|
||||
|
||||
vector2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="normalize">
|
||||
<Documentation>
|
||||
<UserDocu>normalize() -> Base.Vector\n
|
||||
<UserDocu>normalize() -> Base.Vector
|
||||
|
||||
Normalizes in-place this vector to the length of 1.0.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isEqual" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>isEqual(vector2, tol=0) -> bool\n
|
||||
<UserDocu>isEqual(vector2, tol=0) -> bool
|
||||
|
||||
Checks if the distance between the points represented by this vector
|
||||
and `vector2` is less or equal to the given tolerance.\n
|
||||
and `vector2` is less or equal to the given tolerance.
|
||||
|
||||
vector2 : Base.Vector
|
||||
tol : float</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="projectToLine">
|
||||
<Documentation>
|
||||
<UserDocu>projectToLine(point, dir) -> Base.Vector\n
|
||||
<UserDocu>projectToLine(point, dir) -> Base.Vector
|
||||
|
||||
Projects `point` on a line that goes through the origin with the direction `dir`.
|
||||
The result is the vector from `point` to the projected point.
|
||||
The operation is equivalent to dir_n.cross(dir_n.cross(point)), where `dir_n` is
|
||||
the vector `dir` normalized.
|
||||
The method modifies this vector instance according to result and does not
|
||||
depend on the vector itself.\n
|
||||
depend on the vector itself.
|
||||
|
||||
point : Base.Vector
|
||||
dir : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="projectToPlane">
|
||||
<Documentation>
|
||||
<UserDocu>projectToPlane(base, normal) -> Base.Vector\n
|
||||
<UserDocu>projectToPlane(base, normal) -> Base.Vector
|
||||
|
||||
Projects in-place this vector on a plane defined by a base point
|
||||
represented by `base` and a normal defined by `normal`.\n
|
||||
represented by `base` and a normal defined by `normal`.
|
||||
|
||||
base : Base.Vector
|
||||
normal : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="distanceToPoint" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>distanceToPoint(point2) -> float\n
|
||||
Returns the distance to another point represented by `point2`.\n.
|
||||
<UserDocu>distanceToPoint(point2) -> float
|
||||
|
||||
Returns the distance to another point represented by `point2`.
|
||||
.
|
||||
point : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="distanceToLine" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>distanceToLine(base, dir) -> float\n
|
||||
<UserDocu>distanceToLine(base, dir) -> float
|
||||
|
||||
Returns the distance between the point represented by this vector
|
||||
and a line defined by a base point represented by `base` and a
|
||||
direction `dir`.\n
|
||||
direction `dir`.
|
||||
|
||||
base : Base.Vector
|
||||
dir : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="distanceToLineSegment" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>distanceToLineSegment(point1, point2) -> Base.Vector\n
|
||||
<UserDocu>distanceToLineSegment(point1, point2) -> Base.Vector
|
||||
|
||||
Returns the vector between the point represented by this vector and the point
|
||||
on the line segment with the shortest distance. The line segment is defined by
|
||||
`point1` and `point2`.\n
|
||||
`point1` and `point2`.
|
||||
|
||||
point1 : Base.Vector
|
||||
point2 : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="distanceToPlane" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>distanceToPlane(base, normal) -> float\n
|
||||
<UserDocu>distanceToPlane(base, normal) -> float
|
||||
|
||||
Returns the distance between this vector and a plane defined by a
|
||||
base point represented by `base` and a normal defined by `normal`.\n
|
||||
base point represented by `base` and a normal defined by `normal`.
|
||||
|
||||
base : Base.Vector
|
||||
normal : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
Reference in New Issue
Block a user