Base: Remove XML binding files.

This commit is contained in:
tritao
2025-03-16 12:55:12 +00:00
committed by Chris Hennes
parent 723a25c57d
commit 8d36987f16
15 changed files with 16 additions and 2166 deletions

View File

@@ -1,83 +0,0 @@
<?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="AxisPy"
Twin="Axis"
TwinPointer="Axis"
Include="Base/Axis.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Base.Axis class.
An Axis defines a direction and a position (base) in 3D space.
The following constructors are supported:
Axis()
Empty constructor.
Axis(axis)
Copy constructor.
axis : Base.Axis
Axis(base, direction)
Define from a position and a direction.
base : Base.Vector
direction : Base.Vector</UserDocu>
<DeveloperDocu>Axis</DeveloperDocu>
</Documentation>
<Methode Name="copy">>
<Documentation>
<UserDocu>copy() -> Base.Axis
Returns a copy of this Axis.</UserDocu>
</Documentation>
</Methode>
<Methode Name="move">
<Documentation>
<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
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
Compute the reversed axis. This returns a new Base.Axis with
the original direction reversed.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Base" ReadOnly="false">
<Documentation>
<UserDocu>Base position vector of the Axis.</UserDocu>
</Documentation>
<Parameter Name="Base" Type="Object" />
</Attribute>
<Attribute Name="Direction" ReadOnly="false">
<Documentation>
<UserDocu>Direction vector of the Axis.</UserDocu>
</Documentation>
<Parameter Name="Direction" Type="Object" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,40 +0,0 @@
<?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="BaseClassPy"
Twin="BaseClass"
TwinPointer="BaseClass"
Include="Base/BaseClass.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the BaseClass class</DeveloperDocu>
<UserDocu>This is the base class</UserDocu>
</Documentation>
<Methode Name="isDerivedFrom" Const="true">
<Documentation>
<UserDocu>Returns true if given type is a father</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAllDerivedFrom" Const="true">
<Documentation>
<UserDocu>Returns all descendants</UserDocu>
</Documentation>
</Methode>
<Attribute Name="TypeId" ReadOnly="true">
<Documentation>
<UserDocu>Is the type of the FreeCAD object with module domain</UserDocu>
</Documentation>
<Parameter Name="TypeId" Type="String" />
</Attribute>
<Attribute Name="Module" ReadOnly="true">
<Documentation>
<UserDocu>Module in which this class is defined</UserDocu>
</Documentation>
<Parameter Name="Module" Type="String"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,327 +0,0 @@
<?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="BoundBoxPy"
Twin="BoundBox"
TwinPointer="BoundBox3d"
Include="Base/BoundBox.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the BoundBox export class</DeveloperDocu>
<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.
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.
The following constructors are supported:
BoundBox()
Empty constructor. Returns an invalid BoundBox.
BoundBox(boundBox)
Copy constructor.
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
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
Minimum values of the coordinates.
max : Base.Vector, tuple
Maximum values of the coordinates.</UserDocu>
</Documentation>
<Methode Name="setVoid">
<Documentation>
<UserDocu>setVoid() -> None
Invalidate the bounding box.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isValid" Const="true">
<Documentation>
<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
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.
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" Const="true">
<Documentation>
<UserDocu>getPoint(index) -> Base.Vector
Get the point of the given index.
The index must be in the range of [0, 7].
index : int</UserDocu>
</Documentation>
</Methode>
<Methode Name="getEdge" Const="true">
<Documentation>
<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].
index : int</UserDocu>
</Documentation>
</Methode>
<Methode Name="closestPoint" Const="true">
<Documentation>
<UserDocu>closestPoint(point) -> Base.Vector
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
Checks if the given object intersects with this bounding box. That can be
another bounding box or a line specified by base and direction.
boundBox2 : Base.BoundBox
base : Base.Vector, tuple
dir : Base.Vector, tuple</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersected">
<Documentation>
<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
Returns the union of this and the given bounding box.
boundBox2 : Base.BoundBox</UserDocu>
</Documentation>
</Methode>
<Methode Name="enlarge">
<Documentation>
<UserDocu>enlarge(variation) -> None
Decrease the minimum values and increase the maximum values by the given value.
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
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.
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
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
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
Returns a new BoundBox containing the transformed rectangular cuboid
represented by this BoundBox.
matrix : Base.Matrix
Transformation matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isCutPlane">
<Documentation>
<UserDocu>isCutPlane(base, normal) -> bool
Check if the plane specified by base and normal intersects (cuts) this bounding
box.
base : Base.Vector
normal : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="isInside">
<Documentation>
<UserDocu>isInside(object) -> bool
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">
<Documentation>
<UserDocu>Center point of the bounding box.</UserDocu>
</Documentation>
<Parameter Name="Center" Type="Object" />
</Attribute>
<Attribute Name="XMax" ReadOnly="false">
<Documentation>
<UserDocu>The maximum x boundary position.</UserDocu>
</Documentation>
<Parameter Name="XMax" Type="Float" />
</Attribute>
<Attribute Name="YMax" ReadOnly="false">
<Documentation>
<UserDocu>The maximum y boundary position.</UserDocu>
</Documentation>
<Parameter Name="YMax" Type="Float" />
</Attribute>
<Attribute Name="ZMax" ReadOnly="false">
<Documentation>
<UserDocu>The maximum z boundary position.</UserDocu>
</Documentation>
<Parameter Name="ZMax" Type="Float" />
</Attribute>
<Attribute Name="XMin" ReadOnly="false">
<Documentation>
<UserDocu>The minimum x boundary position.</UserDocu>
</Documentation>
<Parameter Name="XMin" Type="Float" />
</Attribute>
<Attribute Name="YMin" ReadOnly="false">
<Documentation>
<UserDocu>The minimum y boundary position.</UserDocu>
</Documentation>
<Parameter Name="YMin" Type="Float" />
</Attribute>
<Attribute Name="ZMin" ReadOnly="false">
<Documentation>
<UserDocu>The minimum z boundary position.</UserDocu>
</Documentation>
<Parameter Name="ZMin" Type="Float" />
</Attribute>
<Attribute Name="XLength" ReadOnly="true">
<Documentation>
<UserDocu>Length of the bounding box in x direction.</UserDocu>
</Documentation>
<Parameter Name="XLength" Type="Float" />
</Attribute>
<Attribute Name="YLength" ReadOnly="true">
<Documentation>
<UserDocu>Length of the bounding box in y direction.</UserDocu>
</Documentation>
<Parameter Name="YLength" Type="Float" />
</Attribute>
<Attribute Name="ZLength" ReadOnly="true">
<Documentation>
<UserDocu>Length of the bounding box in z direction.</UserDocu>
</Documentation>
<Parameter Name="ZLength" Type="Float" />
</Attribute>
<Attribute Name="DiagonalLength" ReadOnly="true">
<Documentation>
<UserDocu>Diagonal length of the bounding box.</UserDocu>
</Documentation>
<Parameter Name="DiagonalLength" Type="Float" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -90,31 +90,18 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND FreeCADBase_LIBS -lutil -ldl)
endif()
generate_from_xml(TypePy)
generate_from_py(Type)
generate_from_xml(BaseClassPy)
generate_from_py(BaseClass)
generate_from_xml(BoundBoxPy)
generate_from_py(BoundBox)
generate_from_xml(CoordinateSystemPy)
generate_from_py(CoordinateSystem)
generate_from_xml(PersistencePy)
generate_from_py(Persistence)
generate_from_xml(VectorPy)
generate_from_py(Vector)
generate_from_xml(MatrixPy)
generate_from_py(Matrix)
generate_from_xml(RotationPy)
generate_from_py(Rotation)
generate_from_xml(PlacementPy)
generate_from_py(Placement)
generate_from_xml(AxisPy)
generate_from_py(Axis)
generate_from_xml(UnitPy)
generate_from_py(Unit)
generate_from_xml(QuantityPy)
generate_from_py(Quantity)
generate_from_xml(PrecisionPy)
generate_from_py(Precision)
generate_from_any(Parameter.xsd Parameter.inl xmlSchemeString)
@@ -140,22 +127,22 @@ qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
qt_create_resource_file(${FreeCADBase_TR_QRC} ${QM_SRCS})
qt_add_resources(FreeCADBase_QRC_SRCS ${FreeCADBase_TR_QRC})
SET(FreeCADBase_XML_SRCS
AxisPy.xml
BaseClassPy.xml
BoundBoxPy.xml
CoordinateSystemPy.xml
MatrixPy.xml
PersistencePy.xml
PlacementPy.xml
RotationPy.xml
VectorPy.xml
QuantityPy.xml
TypePy.xml
UnitPy.xml
PrecisionPy.xml
SET(FreeCADBase_Pyi_SRCS
Axis.pyi
BaseClass.pyi
BoundBox.pyi
CoordinateSystem.pyi
Matrix.pyi
Persistence.pyi
Placement.pyi
Rotation.pyi
Vector.pyi
Quantity.pyi
Type.pyi
Unit.pyi
Precision.pyi
)
SOURCE_GROUP("XML" FILES ${FreeCADBase_XML_SRCS})
SOURCE_GROUP("Pyi" FILES ${FreeCADBase_Pyi_SRCS})
SET(FreeCADBase_UNITAPI_SRCS
UnitsApi.cpp

View File

@@ -1,103 +0,0 @@
<?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="CoordinateSystemPy"
Twin="CoordinateSystem"
TwinPointer="CoordinateSystem"
Include="Base/CoordinateSystem.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the CoordinateSystem export class</DeveloperDocu>
<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
Set axis or Z-direction, and X-direction.
The X-direction is determined from the orthonormal compononent of `xDir`
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
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
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
Applies a transformation on this coordinate system.
trans : Base.Rotation, Base.Placement</UserDocu>
</Documentation>
</Methode>
<Methode Name="setPlacement">
<Documentation>
<UserDocu>setPlacment(placement) -> None
Set placement to the coordinate system.
placement : Base.Placement</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Axis" ReadOnly="false">
<Documentation>
<UserDocu>Set or get axis.</UserDocu>
</Documentation>
<Parameter Name="Axis" Type="Object" />
</Attribute>
<Attribute Name="XDirection" ReadOnly="false">
<Documentation>
<UserDocu>Set or get X-direction.</UserDocu>
</Documentation>
<Parameter Name="XDirection" Type="Object" />
</Attribute>
<Attribute Name="YDirection" ReadOnly="false">
<Documentation>
<UserDocu>Set or get Y-direction.</UserDocu>
</Documentation>
<Parameter Name="YDirection" Type="Object" />
</Attribute>
<Attribute Name="ZDirection" ReadOnly="false">
<Documentation>
<UserDocu>Set or get Z-direction.</UserDocu>
</Documentation>
<Parameter Name="ZDirection" Type="Object" />
</Attribute>
<Attribute Name="Position" ReadOnly="false">
<Documentation>
<UserDocu>Set or get position.</UserDocu>
</Documentation>
<Parameter Name="Position" Type="Object" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,436 +0,0 @@
<?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="MatrixPy"
Twin="Matrix"
TwinPointer="Matrix4D"
Include="Base/Matrix.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Matrix export class</DeveloperDocu>
<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).
The following constructors are supported:
Matrix()
Empty constructor.
Matrix(matrix)
Copy constructor.
matrix : Base.Matrix.
Matrix(*coef)
Define from 16 coefficients of the 4x4 matrix.
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
(0,0,0,1).
vector1 : Base.Vector
vector2 : Base.Vector
vector3 : Base.Vector
vector4 : Base.Vector
Default to (0,0,0). Optional.</UserDocu>
</Documentation>
<Methode Name="move">
<Documentation>
<UserDocu>move(vector) -> None
move(x, y, z) -> None
Move the matrix along a vector, equivalent to left multiply the matrix
by a pure translation transformation.
vector : Base.Vector, tuple
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
Scale the first three rows of the matrix.
vector : Base.Vector
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
Return an enum value of ScaleType. Possible values are:
Uniform, NonUniformLeft, NonUniformRight, NoScaling or Other
if it's not a scale matrix.
tol : float</UserDocu>
</Documentation>
</Methode>
<Methode Name="decompose" Const="true">
<Documentation>
<UserDocu>decompose() -> Base.Matrix, Base.Matrix, Base.Matrix, Base.Matrix
Return a tuple of matrices representing shear, scale, rotation and move.
So that matrix = move * rotation * scale * shear.</UserDocu>
</Documentation>
</Methode>
<Methode Name="nullify" NoArgs="true">
<Documentation>
<UserDocu>nullify() -> None
Make this the null matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNull" Const="true" NoArgs="true">
<Documentation>
<UserDocu>isNull() -> bool
Check if this is the null matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="unity" NoArgs="true">
<Documentation>
<UserDocu>unity() -> None
Make this matrix to unity (4D identity matrix).</UserDocu>
</Documentation>
</Methode>
<Methode Name="isUnity" Const="true">
<Documentation>
<UserDocu>isUnity([tol=0.0]) -> bool
Check if this is the unit matrix (4D identity matrix).</UserDocu>
</Documentation>
</Methode>
<Methode Name="transform">
<Documentation>
<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`.
vector : Base.Vector
matrix2 : Base.Matrix</UserDocu>
</Documentation>
</Methode>
<Methode Name="col" Const="true">
<Documentation>
<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.
index : int
Required column index.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setCol">
<Documentation>
<UserDocu>setCol(index, vector) -> None
Set the vector of a column, that is, the three first elements of the specified
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
Return the vector of a row, that is, the vector generated by the three
first elements of the specified row.
index : int
Required row index.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setRow">
<Documentation>
<UserDocu>setRow(index, vector) -> None
Set the vector of a row, that is, the three first elements of the specified
row by index.
index : int
Required row index.
vector : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="diagonal" Const="true" NoArgs="true">
<Documentation>
<UserDocu>diagonal() -> Base.Vector
Return the diagonal of the 3x3 leading principal submatrix as vector.</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDiagonal">
<Documentation>
<UserDocu>setDiagonal(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
Rotate around X axis.
angle : float
Angle in radians.</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotateY">
<Documentation>
<UserDocu>rotateY(angle) -> None
Rotate around Y axis.
angle : float
Angle in radians.</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotateZ">
<Documentation>
<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
Right multiply the matrix by the given object.
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
Compute the transformed vector using the matrix.
vector : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="invert" NoArgs="true">
<Documentation>
<UserDocu>invert() -> None
Compute the inverse matrix in-place, if possible.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse" Const="true" NoArgs="true">
<Documentation><UserDocu>inverse() -> Base.Matrix
Compute the inverse matrix, if possible.</UserDocu>
</Documentation>
</Methode>
<Methode Name="transpose" NoArgs="true">
<Documentation>
<UserDocu>transpose() -> None
Transpose the matrix in-place.</UserDocu>
</Documentation>
</Methode>
<Methode Name="transposed" Const="true" NoArgs="true">
<Documentation>
<UserDocu>transposed() -> Base.Matrix
Returns a transposed copy of this matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="determinant" Const="true" NoArgs="true">
<Documentation>
<UserDocu>determinant() -> float
Compute the determinant of the matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isOrthogonal" Const="true">
<Documentation>
<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.
tol : float
Tolerance used to check orthogonality.</UserDocu>
</Documentation>
</Methode>
<Methode Name="submatrix" Const="true">
<Documentation>
<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.
dim : int
Dimension parameter must be in the range [1,4].</UserDocu>
</Documentation>
</Methode>
<Methode Name="analyze" Const="true" NoArgs="true">
<Documentation>
<UserDocu>analyze() -> str
Analyzes the type of transformation.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="A11" ReadOnly="false">
<Documentation>
<UserDocu>The (1,1) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A11" Type="Float" />
</Attribute>
<Attribute Name="A12" ReadOnly="false">
<Documentation>
<UserDocu>The (1,2) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A12" Type="Float" />
</Attribute>
<Attribute Name="A13" ReadOnly="false">
<Documentation>
<UserDocu>The (1,3) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A13" Type="Float" />
</Attribute>
<Attribute Name="A14" ReadOnly="false">
<Documentation>
<UserDocu>The (1,4) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A14" Type="Float" />
</Attribute>
<Attribute Name="A21" ReadOnly="false">
<Documentation>
<UserDocu>The (2,1) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A21" Type="Float" />
</Attribute>
<Attribute Name="A22" ReadOnly="false">
<Documentation>
<UserDocu>The (2,2) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A22" Type="Float" />
</Attribute>
<Attribute Name="A23" ReadOnly="false">
<Documentation>
<UserDocu>The (2,3) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A23" Type="Float" />
</Attribute>
<Attribute Name="A24" ReadOnly="false">
<Documentation>
<UserDocu>The (2,4) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A24" Type="Float" />
</Attribute>
<Attribute Name="A31" ReadOnly="false">
<Documentation>
<UserDocu>The (3,1) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A31" Type="Float" />
</Attribute>
<Attribute Name="A32" ReadOnly="false">
<Documentation>
<UserDocu>The (3,2) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A32" Type="Float" />
</Attribute>
<Attribute Name="A33" ReadOnly="false">
<Documentation>
<UserDocu>The (3,3) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A33" Type="Float" />
</Attribute>
<Attribute Name="A34" ReadOnly="false">
<Documentation>
<UserDocu>The (3,4) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A34" Type="Float" />
</Attribute>
<Attribute Name="A41" ReadOnly="false">
<Documentation>
<UserDocu>The (4,1) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A41" Type="Float" />
</Attribute>
<Attribute Name="A42" ReadOnly="false">
<Documentation>
<UserDocu>The (4,2) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A42" Type="Float" />
</Attribute>
<Attribute Name="A43" ReadOnly="false">
<Documentation>
<UserDocu>The (4,3) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A43" Type="Float" />
</Attribute>
<Attribute Name="A44" ReadOnly="false">
<Documentation>
<UserDocu>The (4,4) matrix element.</UserDocu>
</Documentation>
<Parameter Name="A44" Type="Float" />
</Attribute>
<Attribute Name="A" ReadOnly="false">
<Documentation>
<UserDocu>The matrix elements.</UserDocu>
</Documentation>
<Parameter Name="A" Type="Sequence" />
</Attribute>
<ClassDeclarations>public:
MatrixPy(const Matrix4D &amp; mat, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Matrix4D(mat),T){}
Matrix4D value() const
{ return *(getMatrixPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="BaseClassPy"
Name="PersistencePy"
Twin="Persistence"
TwinPointer="Persistence"
Include="Base/Persistence.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Base"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Persistence class</DeveloperDocu>
<UserDocu>Base.Persistence class.
Class to dump and restore the content of an object.</UserDocu>
</Documentation>
<Attribute Name="Content" ReadOnly="true">
<Documentation>
<UserDocu>Content of the object in XML representation.</UserDocu>
</Documentation>
<Parameter Name="Content" Type="String" />
</Attribute>
<Attribute Name="MemSize" ReadOnly="true">
<Documentation>
<UserDocu>Memory size of the object in bytes.</UserDocu>
</Documentation>
<Parameter Name="MemSize" Type="Long"/>
</Attribute>
<Methode Name="dumpContent" Keyword="true" Const="true">
<Documentation>
<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.
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
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.
obj : buffer
Object with buffer protocol support.</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -1,228 +0,0 @@
<?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"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<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.
The following constructors are supported:
Placement()
Empty constructor.
Placement(placement)
Copy constructor.
placement : Base.Placement
Placement(matrix)
Define from a 4D matrix consisting of rotation and translation.
matrix : Base.Matrix
Placement(base, rotation)
Define from position and rotation.
base : Base.Vector
rotation : Base.Rotation
Placement(base, rotation, center)
Define from position and rotation with center.
base : Base.Vector
rotation : Base.Rotation
center : Base.Vector
Placement(base, axis, angle)
define position and rotation.
base : Base.Vector
axis : Base.Vector
angle : float</UserDocu>
<DeveloperDocu>Placement</DeveloperDocu>
</Documentation>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>copy() -> Base.Placement
Returns a copy of this placement.</UserDocu>
</Documentation>
</Methode>
<Methode Name="move">
<Documentation>
<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
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
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
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
Right multiply this placement with another placement.
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
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
Compute the matrix representation of the placement.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse" Const="true">
<Documentation>
<UserDocu>inverse() -> Base.Placement
Compute the inverse placement.</UserDocu>
</Documentation>
</Methode>
<Methode Name="pow" Const="true">
<Documentation>
<UserDocu>pow(t, shorten=True) -> Base.Placement
Raise this placement to real power using ScLERP interpolation.
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
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.
placement2 : Base.Placement
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
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
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.
placement2 : Base.Placement
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
Returns True if the placement has no displacement and no rotation.
Matrix representation is the 4D identity matrix.
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
Checks whether this and the given placement are the same.
The default tolerance is set to 0.0</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Base" ReadOnly="false">
<Documentation>
<UserDocu>Vector to the Base Position of the Placement.</UserDocu>
</Documentation>
<Parameter Name="Base" Type="Object" />
</Attribute>
<Attribute Name="Rotation" ReadOnly="false">
<Documentation>
<UserDocu>Orientation of the placement expressed as rotation.</UserDocu>
</Documentation>
<Parameter Name="Rotation" Type="Object" />
</Attribute>
<Attribute Name="Matrix" ReadOnly="false">
<Documentation>
<UserDocu>Set/get matrix representation of the placement.</UserDocu>
</Documentation>
<Parameter Name="Matrix" Type="Object" />
</Attribute>
<ClassDeclarations>public:
PlacementPy(const Placement &amp; pla, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Placement(pla),T){}
Placement value() const
{ return *(getPlacementPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -1,69 +0,0 @@
<?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="PrecisionPy"
PythonName="Base.Precision"
Twin="Precision"
TwinPointer="Precision"
Include="Base/Precision.h"
Namespace="Base"
FatherInclude="Base/PyObjectBase.h"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
<DeveloperDocu>This is the Precision class</DeveloperDocu>
<UserDocu>This is the Precision class</UserDocu>
</Documentation>
<Methode Name="angular" Static="true">
<Documentation>
<UserDocu>Returns the recommended precision value when checking the equality of two angles (given in radians)</UserDocu>
</Documentation>
</Methode>
<Methode Name="confusion" Static="true">
<Documentation>
<UserDocu>Returns the recommended precision value when checking coincidence of two points in real space</UserDocu>
</Documentation>
</Methode>
<Methode Name="squareConfusion" Static="true">
<Documentation>
<UserDocu>Returns square of confusion</UserDocu>
</Documentation>
</Methode>
<Methode Name="intersection" Static="true">
<Documentation>
<UserDocu>Returns the precision value in real space, frequently used by intersection algorithms</UserDocu>
</Documentation>
</Methode>
<Methode Name="approximation" Static="true">
<Documentation>
<UserDocu>Returns the precision value in real space, frequently used by approximation algorithms</UserDocu>
</Documentation>
</Methode>
<Methode Name="parametric" Static="true">
<Documentation>
<UserDocu>Convert a real space precision to a parametric space precision</UserDocu>
</Documentation>
</Methode>
<Methode Name="isInfinite" Static="true">
<Documentation>
<UserDocu>Returns True if R may be considered as an infinite number</UserDocu>
</Documentation>
</Methode>
<Methode Name="isPositiveInfinite" Static="true">
<Documentation>
<UserDocu>Returns True if R may be considered as a positive infinite number</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNegativeInfinite" Static="true">
<Documentation>
<UserDocu>Returns True if R may be considered as a negative infinite number</UserDocu>
</Documentation>
</Methode>
<Methode Name="infinite" Static="true">
<Documentation>
<UserDocu>Returns a big number that can be considered as infinite</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>

View File

@@ -1,91 +0,0 @@
<?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="QuantityPy"
Twin="Quantity"
TwinPointer="Quantity"
Include="Base/Quantity.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
NumberProtocol="true"
RichCompare="true"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Quantity
defined by a value and a unit.
The following constructors are supported:
Quantity() -- empty constructor
Quantity(Value) -- empty constructor
Quantity(Value,Unit) -- empty constructor
Quantity(Quantity) -- copy constructor
Quantity(string) -- arbitrary mixture of numbers and chars defining a Quantity
</UserDocu>
<DeveloperDocu>Quantity</DeveloperDocu>
</Documentation>
<Methode Name="toStr" Const="true">
<Documentation>
<UserDocu>toStr([decimals])
Returns a string representation rounded to number of decimals. If no decimals are specified then
the internal precision is used
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getUserPreferred" Const="true">
<Documentation>
<UserDocu>
Returns a quantity with the translation factor and a string with the prevered unit
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getValueAs" Const="true">
<Documentation>
<UserDocu>Returns a floating point value as the provided unit
Following parameters are allowed:
getValueAs('m/s') # unit string to parse
getValueAs(2.45,1) # translation value and unit signature
getValueAs(FreeCAD.Units.Pascal) # predefined standard units
getValueAs(Qantity('N/m^2')) # a quantity
getValueAs(Unit(0,1,0,0,0,0,0,0)) # a unit
</UserDocu>
</Documentation>
</Methode>
<Methode Name="__round__" Const="true">
<Documentation>
<UserDocu>Returns the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Value" ReadOnly="false">
<Documentation>
<UserDocu>Numeric Value of the Quantity (in internal system mm,kg,s)</UserDocu>
</Documentation>
<Parameter Name="Value" Type="Float" />
</Attribute>
<Attribute Name="Unit" ReadOnly="false">
<Documentation>
<UserDocu>Unit of the Quantity</UserDocu>
</Documentation>
<Parameter Name="Unit" Type="Object" />
</Attribute>
<Attribute Name="UserString" ReadOnly="true">
<Documentation>
<UserDocu>Unit of the Quantity</UserDocu>
</Documentation>
<Parameter Name="UserString" Type="String" />
</Attribute>
<Attribute Name="Format" ReadOnly="false">
<Documentation>
<UserDocu>Format of the Quantity</UserDocu>
</Documentation>
<Parameter Name="Format" Type="Dict" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,242 +0,0 @@
<?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="RotationPy"
Twin="Rotation"
TwinPointer="Rotation"
Include="Base/Rotation.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Rotation export class</DeveloperDocu>
<UserDocu>Base.Rotation class.
A Rotation using a quaternion.
The following constructors are supported:
Rotation()
Empty constructor.
Rotation(rotation)
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
Rotation(vector_start, vector_end)
Define from two vectors (rotation from/to vector).
vector_start : Base.Vector
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
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
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
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
importance of the axes (e.g., 'ZXY' means z direction is followed strictly,
x is used but corrected if necessary, y is ignored).
dir1 : Base.Vector
dir2 : Base.Vector
dir3 : Base.Vector
seq : str
Rotation(matrix)
Define from a matrix rotation in the 4D representation.
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.
coef : sequence of float</UserDocu>
</Documentation>
<Methode Name="invert">
<Documentation>
<UserDocu>invert() -> None
Sets the rotation to its inverse.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverted" Const="true">
<Documentation>
<UserDocu>inverted() -> Base.Rotation
Returns the inverse of the rotation.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isSame">
<Documentation>
<UserDocu>isSame(rotation, tol=0) -> bool
Checks if `rotation` perform the same transformation as this rotation.
rotation : Base.Rotation
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
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
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
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
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
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
Set the Euler angles in a given sequence for this rotation.
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>
</Documentation>
</Methode>
<Methode Name="toEulerAngles" Const="true">
<Documentation>
<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
Convert the rotation to a 4D matrix representation.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNull" Const="true">
<Documentation>
<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
Returns True if the rotation equals the 4D identity matrix.
tol : float
Tolerance used to check for identity.
If tol is negative or zero, no tolerance is used.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Q" ReadOnly="false">
<Documentation>
<UserDocu>The rotation elements (as quaternion).</UserDocu>
</Documentation>
<Parameter Name="Q" Type="Tuple" />
</Attribute>
<Attribute Name="Axis" ReadOnly="false">
<Documentation>
<UserDocu>The rotation axis of the quaternion.</UserDocu>
</Documentation>
<Parameter Name="Axis" Type="Object" />
</Attribute>
<Attribute Name="RawAxis" ReadOnly="true">
<Documentation>
<UserDocu>The rotation axis without normalization.</UserDocu>
</Documentation>
<Parameter Name="RawAxis" Type="Object" />
</Attribute>
<Attribute Name="Angle" ReadOnly="false">
<Documentation>
<UserDocu>The rotation angle of the quaternion.</UserDocu>
</Documentation>
<Parameter Name="Angle" Type="Float" />
</Attribute>
<ClassDeclarations>public:
RotationPy(const Rotation &amp; mat, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Rotation(mat),T){}
Rotation value() const
{ return *(getRotationPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -1,132 +0,0 @@
<?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="TypePy"
Twin="BaseType"
TwinPointer="BaseType"
Include="Base/Type.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
FatherNamespace="Base"
Delete="true">
<ForwardDeclarations>
namespace Base {
using BaseType = Type;
}</ForwardDeclarations>
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Type class</DeveloperDocu>
<UserDocu>BaseTypePy class.
This class provides functionality related to type management in the Base module. It's not intended for direct instantiation but for accessing type information and creating instances of various types. Instantiation is possible for classes that inherit from the Base::BaseClass class and are not abstract.</UserDocu>
</Documentation>
<Methode Name="fromName" Static="true">
<Documentation>
<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
Returns a type id object by key.
key : int</UserDocu>
</Documentation>
</Methode>
<Methode Name="getNumTypes" Static="true">
<Documentation>
<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
Returns an invalid type id.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAllDerivedFrom" Static="true">
<Documentation>
<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
Returns the parent type id.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isBad" Const="true">
<Documentation>
<UserDocu>isBad() -> bool
Checks if the type id is invalid.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isDerivedFrom" Const="true">
<Documentation>
<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
Returns all descendants from this type id.</UserDocu>
</Documentation>
</Methode>
<Methode Name="createInstance">
<Documentation>
<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
Creates an instance of the named type id.
name : str
load : bool
Load named type id module.</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Name" ReadOnly="true">
<Documentation>
<UserDocu>The name of the type id.</UserDocu>
</Documentation>
<Parameter Name="Name" Type="String" />
</Attribute>
<Attribute Name="Key" ReadOnly="true">
<Documentation>
<UserDocu>The key of the type id.</UserDocu>
</Documentation>
<Parameter Name="Key" Type="Long" />
</Attribute>
<Attribute Name="Module" ReadOnly="true">
<Documentation>
<UserDocu>Module in which this class is defined.</UserDocu>
</Documentation>
<Parameter Name="Module" Type="String"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,43 +0,0 @@
<?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="UnitPy"
Twin="Unit"
TwinPointer="Unit"
Include="Base/Unit.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
NumberProtocol="true"
RichCompare="true"
Constructor="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Unit
defines a unit type, calculate and compare.
The following constructors are supported:
Unit() -- empty constructor
Unit(i1,i2,i3,i4,i5,i6,i7,i8) -- unit signature
Unit(Quantity) -- copy unit from Quantity
Unit(Unit) -- copy constructor
Unit(string) -- parse the string for units
</UserDocu>
<DeveloperDocu>Unit</DeveloperDocu>
</Documentation>
<Attribute Name="Type" ReadOnly="true">
<Documentation>
<UserDocu>holds the unit type as a string, e.g. 'Area'.</UserDocu>
</Documentation>
<Parameter Name="Type" Type="String" />
</Attribute>
<Attribute Name="Signature" ReadOnly="true">
<Documentation>
<UserDocu>Returns the signature.</UserDocu>
</Documentation>
<Parameter Name="Signature" Type="Tuple" />
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -1,289 +0,0 @@
<?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="VectorPy"
Twin="Vector"
TwinPointer="Vector3d"
Include="Base/Vector3D.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Vector export class</DeveloperDocu>
<UserDocu>Base.Vector class.
This class represents a 3D float vector.
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
Vector(vector)
Copy constructor.
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
Serialization of Vector objects.</UserDocu>
</Documentation>
</Methode>
<Methode Name="add" Const="true">
<Documentation>
<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
Returns the difference of this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="negative" Const="true">
<Documentation>
<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
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
Multiplies in-place each component of this vector by a single factor.
Equivalent to scale(factor, factor, factor).
factor : float</UserDocu>
</Documentation>
</Methode>
<Methode Name="dot" Const="true">
<Documentation>
<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
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
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
Returns the angle in radians between this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="normalize">
<Documentation>
<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
Checks if the distance between the points represented by this vector
and `vector2` is less or equal to the given tolerance.
vector2 : Base.Vector
tol : float</UserDocu>
</Documentation>
</Methode>
<Methode Name="isParallel" Const="true">
<Documentation>
<UserDocu>isParallel(vector2, tol=0) -> bool
Checks if this vector and `vector2` are
parallel less or equal to the given tolerance.
vector2 : Base.Vector
tol : float</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNormal" Const="true">
<Documentation>
<UserDocu>isNormal(vector2, tol=0) -> bool
Checks if this vector and `vector2` are
normal 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
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.
point : Base.Vector
dir : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="projectToPlane">
<Documentation>
<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`.
base : Base.Vector
normal : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToPoint" Const="true">
<Documentation>
<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
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`.
base : Base.Vector
dir : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToLineSegment" Const="true">
<Documentation>
<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`.
point1 : Base.Vector
point2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToPlane" Const="true">
<Documentation>
<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`.
base : Base.Vector
normal : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Length" ReadOnly="false">
<Documentation>
<UserDocu>Gets or sets the length of this vector.</UserDocu>
</Documentation>
<Parameter Name="Type" Type="Float" />
</Attribute>
<Attribute Name="x" ReadOnly="false">
<Documentation>
<UserDocu>Gets or sets the X component of this vector.</UserDocu>
</Documentation>
<Parameter Name="x" Type="Float"/>
</Attribute>
<Attribute Name="y" ReadOnly="false">
<Documentation>
<UserDocu>Gets or sets the Y component of this vector.</UserDocu>
</Documentation>
<Parameter Name="y" Type="Float"/>
</Attribute>
<Attribute Name="z" ReadOnly="false">
<Documentation>
<UserDocu>Gets or sets the Z component of this vector.</UserDocu>
</Documentation>
<Parameter Name="z" Type="Float"/>
</Attribute>
<Sequence
sq_length="true"
sq_concat="false"
sq_repeat="false"
sq_item="true"
mp_subscript="true"
sq_ass_item="true"
mp_ass_subscript="false"
sq_contains="false"
sq_inplace_concat="false"
sq_inplace_repeat="false">
</Sequence>
<ClassDeclarations>public:
VectorPy(const Vector3d &amp; vec, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Vector3d(vec),T){}
VectorPy(const Vector3f &amp; vec, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Vector3d(vec.x,vec.y,vec.z),T){}
Vector3d value() const
{ return *(getVectorPtr()); }
private:
Py::List sequence;
</ClassDeclarations>
</PythonExport>
</GenerateModel>

View File

@@ -37,7 +37,7 @@ def compareFiles(file1, file2):
class TemplateClassPyExport(template.ModelTemplate):
# TODO: This is temporary, once all XML files are migrated, this can be removed.
def getPath(self, path):
if self.is_python:
if self.is_python and not self.export.Namespace in ["Base"]:
root, ext = os.path.splitext(path)
return f"{root}_{ext}"
return path