From bc2f04889b9fac39aad066541c2fcb21250529f3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 15 Aug 2022 11:42:26 +0200 Subject: [PATCH] Base: [skip ci] improve whitespaces --- src/Base/AxisPy.xml | 88 ++++----- src/Base/BoundBoxPy.xml | 426 ++++++++++++++++++++-------------------- src/Base/MatrixPy.xml | 24 +-- src/Base/QuantityPy.xml | 48 ++--- src/Base/RotationPy.xml | 162 +++++++-------- src/Base/UnitPy.xml | 48 ++--- src/Base/VectorPy.xml | 268 ++++++++++++------------- 7 files changed, 532 insertions(+), 532 deletions(-) diff --git a/src/Base/AxisPy.xml b/src/Base/AxisPy.xml index ca9d60aa86..e94b00ce53 100644 --- a/src/Base/AxisPy.xml +++ b/src/Base/AxisPy.xml @@ -1,19 +1,19 @@ - - - - Base.Axis class.\n + + + + Base.Axis class.\n An Axis defines a direction and a position (base) in 3D space.\n The following constructors are supported:\n Axis() @@ -25,46 +25,46 @@ Axis(base, direction) Define from a position and a direction. base : Base.Vector direction : Base.Vector - Axis - + Axis + > copy() -> Base.Axis\n Returns a copy of this Axis. - - - move(vector) -> None\n + + + move(vector) -> None\n Move the axis base along the given vector.\n vector : Base.Vector\n Vector by which to move the axis. - - - - - multiply(placement) -> Base.Axis\n + + + + + multiply(placement) -> Base.Axis\n Multiply this axis by a placement.\n placement : Base.Placement\n Placement by which to multiply the axis. - - - - - reversed() -> Base.Axis\n + + + + + reversed() -> Base.Axis\n Compute the reversed axis. This returns a new Base.Axis with the original direction reversed. - - - - - Base position vector of the Axis. - - - - - - Direction vector of the Axis. - - - - + + + + + Base position vector of the Axis. + + + + + + Direction vector of the Axis. + + + + diff --git a/src/Base/BoundBoxPy.xml b/src/Base/BoundBoxPy.xml index a7244eabb4..f7917f5cce 100644 --- a/src/Base/BoundBoxPy.xml +++ b/src/Base/BoundBoxPy.xml @@ -14,246 +14,246 @@ This is the BoundBox export class - Base.BoundBox class.\n -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.\n -The following constructors are supported:\n -BoundBox() -Empty constructor. Returns an invalid BoundBox.\n -BoundBox(boundBox) -Copy constructor. -boundBox : Base.BoundBox\n -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 -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. + Base.BoundBox class.\n +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.\n +The following constructors are supported:\n +BoundBox() +Empty constructor. Returns an invalid BoundBox.\n +BoundBox(boundBox) +Copy constructor. +boundBox : Base.BoundBox\n +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 +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. - setVoid() -> None\n -Invalidate the bounding box. + setVoid() -> None\n +Invalidate the bounding box. - isValid() -> bool\n -Checks if the bounding box is valid. + isValid() -> bool\n +Checks if the bounding box is valid. - add(minMax) -> None -add(x, y, z) -> None\n -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. + add(minMax) -> None +add(x, y, z) -> None\n +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. - getPoint(index) ->Base.Vector\n -Get the point of the given index. -The index must be in the range of [0, 7].\n -index : int + getPoint(index) ->Base.Vector\n +Get the point of the given index. +The index must be in the range of [0, 7].\n +index : int - getEdge(index) -> tuple of Base.Vector\n -Get the edge points of the given index. -The index must be in the range of [0, 11].\n -index : int + getEdge(index) -> tuple of Base.Vector\n +Get the edge points of the given index. +The index must be in the range of [0, 11].\n +index : int - 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. + 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. - intersect(boundBox2) -> bool -intersect(base, dir) -> bool\n -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 -boundBox2 : Base.BoundBox -base : Base.Vector, tuple -dir : Base.Vector, tuple - - - - - intersected(boundBox2) -> Base.BoundBox\n -Returns the intersection of this and the given bounding box.\n -boundBox2 : Base.BoundBox - - - - - united(boundBox2) -> Base.BoundBox\n -Returns the union of this and the given bounding box.\n -boundBox2 : Base.BoundBox - - - - - enlarge(variation) -> None\n -Decrease the minimum values and increase the maximum values by the given value. -A negative value shrinks the bounding box.\n -variation : float - - - - - - getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector\n -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. - - - - - 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. - - - - - 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. - - - - - transformed(matrix) -> Base.BoundBox\n -Returns a new BoundBox containing the transformed rectangular cuboid -represented by this BoundBox.\n -matrix : Base.Matrix\n Transformation matrix. - - - - - isCutPlane(base, normal) -> bool\n -Check if the plane specified by base and normal intersects (cuts) this bounding -box.\n -base : Base.Vector -normal : Base.Vector + intersect(boundBox2) -> bool +intersect(base, dir) -> bool\n +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 +boundBox2 : Base.BoundBox +base : Base.Vector, tuple +dir : Base.Vector, tuple - - - 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. - - - - - Center point of the bounding box. - - - - - - The maximum x boundary position. - - - - - - The maximum y boundary position. - - - - - - The maximum z boundary position. - - - - - - The minimum x boundary position. - - - - - - The minimum y boundary position. - - - - - - The minimum z boundary position. - - - - - - Length of the bounding box in x direction. - - - - - - Length of the bounding box in y direction. - - - - - - Length of the bounding box in z direction. - - - - - - Diagonal length of the bounding box. - - - + + + intersected(boundBox2) -> Base.BoundBox\n +Returns the intersection of this and the given bounding box.\n +boundBox2 : Base.BoundBox + + + + + united(boundBox2) -> Base.BoundBox\n +Returns the union of this and the given bounding box.\n +boundBox2 : Base.BoundBox + + + + + enlarge(variation) -> None\n +Decrease the minimum values and increase the maximum values by the given value. +A negative value shrinks the bounding box.\n +variation : float + + + + + + getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector\n +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. + + + + + 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. + + + + + 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. + + + + + transformed(matrix) -> Base.BoundBox\n +Returns a new BoundBox containing the transformed rectangular cuboid +represented by this BoundBox.\n +matrix : Base.Matrix\n Transformation matrix. + + + + + isCutPlane(base, normal) -> bool\n +Check if the plane specified by base and normal intersects (cuts) this bounding +box.\n +base : Base.Vector +normal : Base.Vector + + + + + 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. + + + + + Center point of the bounding box. + + + + + + The maximum x boundary position. + + + + + + The maximum y boundary position. + + + + + + The maximum z boundary position. + + + + + + The minimum x boundary position. + + + + + + The minimum y boundary position. + + + + + + The minimum z boundary position. + + + + + + Length of the bounding box in x direction. + + + + + + Length of the bounding box in y direction. + + + + + + Length of the bounding box in z direction. + + + + + + Diagonal length of the bounding box. + + + - + diff --git a/src/Base/MatrixPy.xml b/src/Base/MatrixPy.xml index 0e4122d010..7f53405601 100644 --- a/src/Base/MatrixPy.xml +++ b/src/Base/MatrixPy.xml @@ -1,18 +1,18 @@ + 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"> This is the Matrix export class diff --git a/src/Base/QuantityPy.xml b/src/Base/QuantityPy.xml index 225cb3714e..881b58a70b 100644 --- a/src/Base/QuantityPy.xml +++ b/src/Base/QuantityPy.xml @@ -1,21 +1,21 @@ - - - - Quantity + + + + Quantity defined by a value and a unit. The following constructors are supported: @@ -24,9 +24,9 @@ Quantity(Value) -- empty constructor Quantity(Value,Unit) -- empty constructor Quantity(Quantity) -- copy constructor Quantity(string) -- arbitrary mixture of numbers and chars defining a Quantity - - Quantity - + + Quantity + @@ -66,11 +66,11 @@ When an argument is passed, work like built-in round(x, ndigits). - - Numeric Value of the Quantity (in internal system mm,kg,s) - - - + + Numeric Value of the Quantity (in internal system mm,kg,s) + + + Unit of the Quantity diff --git a/src/Base/RotationPy.xml b/src/Base/RotationPy.xml index 572d404c52..120bd69221 100644 --- a/src/Base/RotationPy.xml +++ b/src/Base/RotationPy.xml @@ -1,22 +1,22 @@ - - - - This is the Rotation export class - Base.Rotation class.\n + FatherNamespace="Base"> + + + This is the Rotation export class + Base.Rotation class.\n A Rotation using a quaternion.\n The following constructors are supported:\n Rotation() @@ -68,13 +68,13 @@ 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 - - - - invert() -> None\n + + + + invert() -> None\n Sets the rotation to its inverse. - - + + inverted() -> Base.Rotation\n @@ -91,26 +91,26 @@ tol : float\n Tolerance used to compare both rotations. - - multiply(rotation) -> Base.Rotation\n + + multiply(rotation) -> Base.Rotation\n Right multiply this rotation with another rotation.\n rotation : Base.Rotation\n Rotation by which to multiply this rotation. - - + + - - multVec(vector) -> Base.Vector\n + + multVec(vector) -> Base.Vector\n Compute the transformed vector using the rotation.\n vector : Base.Vector\n Vector to be transformed. - - + + - - slerp(rotation2, t) -> Base.Rotation\n + + 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`. - - + + setYawPitchRoll(angle1, angle2, angle3) -> None\n @@ -121,12 +121,12 @@ angle3 : float\n Angle around roll axis in degrees. - - getYawPitchRoll() -> tuple\n + + getYawPitchRoll() -> tuple\n Get the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention. The angles are given in degrees. - - + + setEulerAngles(seq, angle1, angle2, angle3) -> None\n @@ -139,25 +139,25 @@ angle3 : float - - toEulerAngles(seq) -> list\n + + 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 all possible values of `seq`. Optional. - - + + - - toMatrix() -> Base.Matrix\n + + toMatrix() -> Base.Matrix\n Convert the rotation to a 4D matrix representation. - - + + - - isNull() -> bool\n + + isNull() -> bool\n Returns True if all values in the quaternion representation are zero. - - + + isIdentity() -> bool\n @@ -165,35 +165,35 @@ Returns True if the rotation equals the 4D identity matrix. - - The rotation elements (as quaternion). - - - - - - The rotation axis of the quaternion. - - - - - - The rotation axis without normalization. - - - - - - The rotation angle of the quaternion. - - - - - public: - RotationPy(const Rotation & mat, PyTypeObject *T = &Type) - :PyObjectBase(new Rotation(mat),T){} - Rotation value() const - { return *(getRotationPtr()); } - - + + The rotation elements (as quaternion). + + + + + + The rotation axis of the quaternion. + + + + + + The rotation axis without normalization. + + + + + + The rotation angle of the quaternion. + + + + + public: + RotationPy(const Rotation & mat, PyTypeObject *T = &Type) + :PyObjectBase(new Rotation(mat),T){} + Rotation value() const + { return *(getRotationPtr()); } + + diff --git a/src/Base/UnitPy.xml b/src/Base/UnitPy.xml index 484a9060a0..09ac932889 100644 --- a/src/Base/UnitPy.xml +++ b/src/Base/UnitPy.xml @@ -1,21 +1,21 @@ - - - - + + + + Unit defines a unit type, calculate and compare. @@ -26,14 +26,14 @@ Unit(Unit) -- copy constructor Unit(string) -- parse the string for units - Unit - - - - holds the unit type as a string, e.g. 'Area'. - - - + Unit + + + + holds the unit type as a string, e.g. 'Area'. + + + Returns the signature. diff --git a/src/Base/VectorPy.xml b/src/Base/VectorPy.xml index aed8f3c2c9..bf0bbbfa54 100644 --- a/src/Base/VectorPy.xml +++ b/src/Base/VectorPy.xml @@ -1,22 +1,22 @@ - - - - This is the Vector export class - Base.Vector class.\n + + + + This is the Vector export class + Base.Vector class.\n This class represents a 3D float vector. Useful to represent points in the 3D space.\n The following constructors are supported:\n @@ -30,7 +30,7 @@ vector : Base.Vector\n Vector(seq) Define from a sequence of float. seq : sequence of float. - + __reduce__() -> tuple\n @@ -38,77 +38,77 @@ Serialization of Vector objects. - - add(vector2) -> Base.Vector\n + + add(vector2) -> Base.Vector\n Returns the sum of this vector and `vector2`.\n vector2 : Base.Vector - - - - - sub(vector2) -> Base.Vector\n + + + + + sub(vector2) -> Base.Vector\n Returns the difference of this vector and `vector2`.\n vector2 : Base.Vector - - + + - - negative() -> Base.Vector\n + + negative() -> Base.Vector\n Returns the negative (opposite) of this vector. - - - - - scale(x, y, z) -> Base.Vector\n + + + + + 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. - - - - - multiply(factor) -> Base.Vector\n + + + + + multiply(factor) -> Base.Vector\n Multiplies in-place each component of this vector by a single factor. Equivalent to scale(factor, factor, factor).\n factor : float - - - - - dot(vector2) -> float\n + + + + + dot(vector2) -> float\n Returns the scalar product (dot product) between this vector and `vector2`.\n vector2 : Base.Vector - - - - - cross(vector2) -> Base.Vector\n + + + + + cross(vector2) -> Base.Vector\n Returns the vector product (cross product) between this vector and `vector2`.\n vector2 : Base.Vector - - - - - isOnLineSegment(vector1, vector2) -> bool\n + + + + + isOnLineSegment(vector1, vector2) -> bool\n Checks if this vector is on the line segment generated by `vector1` and `vector2`.\n vector1 : Base.Vector vector2 : Base.Vector - - - - - getAngle(vector2) -> float\n + + + + + getAngle(vector2) -> float\n Returns the angle in radians between this vector and `vector2`.\n vector2 : Base.Vector - - - - - normalize() -> Base.Vector\n + + + + + normalize() -> Base.Vector\n Normalizes in-place this vector to the length of 1.0. - - + + isEqual(vector2, tol=0) -> bool\n @@ -119,8 +119,8 @@ tol : float - - projectToLine(point, dir) -> Base.Vector\n + + projectToLine(point, dir) -> Base.Vector\n 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 @@ -129,96 +129,96 @@ The method modifies this vector instance according to result and does not depend on the vector itself.\n point : Base.Vector dir : Base.Vector - - - - - projectToPlane(base, normal) -> Base.Vector\n + + + + + projectToPlane(base, normal) -> Base.Vector\n Projects in-place this vector on a plane defined by a base point represented by `base` and a normal defined by `normal`.\n base : Base.Vector normal : Base.Vector - - - - - distanceToPoint(point2) -> float\n + + + + + distanceToPoint(point2) -> float\n Returns the distance to another point represented by `point2`.\n. point : Base.Vector - - - - - distanceToLine(base, dir) -> float\n + + + + + distanceToLine(base, dir) -> float\n 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 base : Base.Vector dir : Base.Vector - - - - - distanceToLineSegment(point1, point2) -> Base.Vector\n + + + + + distanceToLineSegment(point1, point2) -> Base.Vector\n 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 : Base.Vector point2 : Base.Vector - - - - - distanceToPlane(base, normal) -> float\n + + + + + distanceToPlane(base, normal) -> float\n 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 : Base.Vector normal : Base.Vector - - - - - Gets or sets the length of this vector. - - - - - - Gets or sets the X component of this vector. - - - - - - Gets or sets the Y component of this vector. - - - - - - Gets or sets the Z component of this vector. - - - - - - public: + + + + + Gets or sets the length of this vector. + + + + + + Gets or sets the X component of this vector. + + + + + + Gets or sets the Y component of this vector. + + + + + + Gets or sets the Z component of this vector. + + + + + + public: VectorPy(const Vector3d & vec, PyTypeObject *T = &Type) :PyObjectBase(new Vector3d(vec),T){} VectorPy(const Vector3f & vec, PyTypeObject *T = &Type) :PyObjectBase(new Vector3d(vec.x,vec.y,vec.z),T){} Vector3d value() const { return *(getVectorPtr()); } - - + +