Base: Minor cleanups to base XML bindings.

This commit is contained in:
tritao
2025-02-08 13:11:57 +00:00
parent 2145b742eb
commit b83db107cd
6 changed files with 35 additions and 38 deletions

View File

@@ -64,7 +64,7 @@ max : Base.Vector, tuple
Invalidate the bounding box.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isValid">
<Methode Name="isValid" Const="true">
<Documentation>
<UserDocu>isValid() -> bool
@@ -90,9 +90,9 @@ z : float
Value to enlarge at z-direction.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPoint">
<Methode Name="getPoint" Const="true">
<Documentation>
<UserDocu>getPoint(index) ->Base.Vector
<UserDocu>getPoint(index) -> Base.Vector
Get the point of the given index.
The index must be in the range of [0, 7].
@@ -100,7 +100,7 @@ The index must be in the range of [0, 7].
index : int</UserDocu>
</Documentation>
</Methode>
<Methode Name="getEdge">
<Methode Name="getEdge" Const="true">
<Documentation>
<UserDocu>getEdge(index) -> tuple of Base.Vector
@@ -110,7 +110,7 @@ The index must be in the range of [0, 11].
index : int</UserDocu>
</Documentation>
</Methode>
<Methode Name="closestPoint">
<Methode Name="closestPoint" Const="true">
<Documentation>
<UserDocu>closestPoint(point) -> Base.Vector
closestPoint(x, y, z) -> Base.Vector

View File

@@ -99,7 +99,8 @@ tol : float</UserDocu>
</Methode>
<Methode Name="decompose" Const="true">
<Documentation>
<UserDocu>decompose() -> Base.Matrix, Base.Matrix, Base.Matrix, Base.Matrix\n
<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>

View File

@@ -29,38 +29,36 @@ Quantity(string) -- arbitrary mixture of numbers and chars defining a Quantity
</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>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
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
<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
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>
Return the Integral closest to x, rounding half toward even.
<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>

View File

@@ -88,7 +88,7 @@ coef : sequence of float</UserDocu>
Sets the rotation to its inverse.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverted">
<Methode Name="inverted" Const="true">
<Documentation>
<UserDocu>inverted() -> Base.Rotation
@@ -232,12 +232,11 @@ tol : float
</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>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

@@ -19,7 +19,7 @@ namespace Base {
<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>
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>

View File

@@ -15,16 +15,15 @@
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>
Unit
defines a unit type, calculate and compare.
<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
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>