Base: apply clang format
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="PlacementPy"
|
||||
Twin="Placement"
|
||||
TwinPointer="Placement"
|
||||
Include="Base/Placement.h"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
Namespace="Base"
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="PlacementPy"
|
||||
Twin="Placement"
|
||||
TwinPointer="Placement"
|
||||
Include="Base/Placement.h"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
Namespace="Base"
|
||||
Constructor="true"
|
||||
Delete="true"
|
||||
NumberProtocol="true"
|
||||
@@ -15,34 +15,34 @@
|
||||
FatherNamespace="Base">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
<UserDocu>Base.Placement class.
|
||||
<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.
|
||||
It is used when no scaling or other distortion is needed.
|
||||
|
||||
The following constructors are supported:
|
||||
The following constructors are supported:
|
||||
|
||||
Placement()
|
||||
Empty constructor.
|
||||
Empty constructor.
|
||||
|
||||
Placement(placement)
|
||||
Copy constructor.
|
||||
placement : Base.Placement
|
||||
placement : Base.Placement
|
||||
|
||||
Placement(matrix)
|
||||
Define from a 4D matrix consisting of rotation and translation.
|
||||
matrix : Base.Matrix
|
||||
matrix : Base.Matrix
|
||||
|
||||
Placement(base, rotation)
|
||||
Define from position and rotation.
|
||||
base : Base.Vector
|
||||
rotation : Base.Rotation
|
||||
rotation : Base.Rotation
|
||||
|
||||
Placement(base, rotation, center)
|
||||
Define from position and rotation with center.
|
||||
base : Base.Vector
|
||||
rotation : Base.Rotation
|
||||
center : Base.Vector
|
||||
center : Base.Vector
|
||||
|
||||
Placement(base, axis, angle)
|
||||
define position and rotation.
|
||||
@@ -53,46 +53,46 @@ angle : float</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="copy" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>copy() -> Base.Placement
|
||||
<UserDocu>copy() -> Base.Placement
|
||||
|
||||
Returns a copy of this placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="move">
|
||||
<Documentation>
|
||||
<UserDocu>move(vector) -> None
|
||||
<UserDocu>move(vector) -> None
|
||||
|
||||
Move the placement along a vector.
|
||||
Move the placement along a vector.
|
||||
|
||||
vector : Base.Vector
|
||||
vector : Base.Vector
|
||||
Vector by which to move the placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="translate">
|
||||
<Documentation>
|
||||
<UserDocu>translate(vector) -> None
|
||||
<UserDocu>translate(vector) -> None
|
||||
|
||||
Alias to move(), to be compatible with TopoShape.translate().
|
||||
Alias to move(), to be compatible with TopoShape.translate().
|
||||
|
||||
vector : Base.Vector
|
||||
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
|
||||
<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
|
||||
center : Base.Vector, sequence of float
|
||||
Rotation center.
|
||||
axis : Base.Vector, sequence of float
|
||||
axis : Base.Vector, sequence of float
|
||||
Rotation axis.
|
||||
angle : float
|
||||
angle : float
|
||||
Rotation angle in degrees.
|
||||
comp : bool
|
||||
comp : bool
|
||||
optional keyword only argument, if True (default=False),
|
||||
behave like TopoShape.rotate() (i.e. the resulting placements are interchangeable).
|
||||
</UserDocu>
|
||||
@@ -100,101 +100,101 @@ behave like TopoShape.rotate() (i.e. the resulting placements are interchangeabl
|
||||
</Methode>
|
||||
<Methode Name="multiply" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multiply(placement) -> Base.Placement
|
||||
<UserDocu>multiply(placement) -> Base.Placement
|
||||
|
||||
Right multiply this placement with another placement.
|
||||
Also available as `*` operator.
|
||||
Also available as `*` operator.
|
||||
|
||||
placement : Base.Placement
|
||||
placement : Base.Placement
|
||||
Placement by which to multiply this placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multVec" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>multVec(vector) -> Base.Vector
|
||||
<UserDocu>multVec(vector) -> Base.Vector
|
||||
|
||||
Compute the transformed vector using the placement.
|
||||
Compute the transformed vector using the placement.
|
||||
|
||||
vector : Base.Vector
|
||||
vector : Base.Vector
|
||||
Vector to be transformed.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toMatrix" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>toMatrix() -> Base.Matrix
|
||||
<UserDocu>toMatrix() -> Base.Matrix
|
||||
|
||||
Compute the matrix representation of the placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverse" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>inverse() -> Base.Placement
|
||||
<UserDocu>inverse() -> Base.Placement
|
||||
|
||||
Compute the inverse placement.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="pow" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>pow(t, shorten=True) -> Base.Placement
|
||||
<UserDocu>pow(t, shorten=True) -> Base.Placement
|
||||
|
||||
Raise this placement to real power using ScLERP interpolation.
|
||||
Also available as `**` operator.
|
||||
Also available as `**` operator.
|
||||
|
||||
t : float
|
||||
t : float
|
||||
Real power.
|
||||
shorten : bool
|
||||
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
|
||||
<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.
|
||||
will take a long path.
|
||||
|
||||
placement2 : Base.Placement
|
||||
t : float
|
||||
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
|
||||
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
|
||||
<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.
|
||||
For more complex cases you better use the advanced sclerp() function.
|
||||
|
||||
placement2 : Base.Placement
|
||||
t : float
|
||||
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
|
||||
<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
|
||||
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
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user