Box¶
Inheritance diagram¶
Classes¶
Box¶
-
class
ORSModel.ors.Box¶ Bases:
ORSModel.ors.Shape3Dbrief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010
-
clip(self, pBox: ORSModel.ors.Box) → None¶ Clip the box with the given box if both box are aligned, do nothing otherwise.
Parameters: pBox (ORSModel.ors.Box) – a box (a Box)
-
createFromPythonRepresentation(aPythonRepresentation: str) → Box¶ Create aBox object from a Python string representation a static method.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a string) Returns: output (ORSModel.ors.Box) – a box (a Box)
-
getBoundedPlaneOfSlice(self, sliceIndex: int) → Rectangle¶ Gets the bounded plane for a given direction2 index.
Parameters: sliceIndex (int) – the index in the direction2 of the box (an uint32_t) Returns: output (ORSModel.ors.Rectangle) – the bounded plane (a Rectangle)
-
getBoxInBoxReferential(self, inRefBox: ORSModel.ors.Box) → Box¶ Gets a copy of the receiver in the argument referential.
Parameters: inRefBox (ORSModel.ors.Box) – a box, the destination referential (an Box) Returns: output (ORSModel.ors.Box) – a box, a copy of the receiver in the argument referential (an Box)
-
getBoxToWorld(self, intVect: ORSModel.ors.Vector3) → Vector3¶ Transforms the given point (which is expressed in the box referential) in the world referential.
Note
Here the spacing is not considered.
Parameters: intVect (ORSModel.ors.Vector3) – a point (an Vector3) Returns: output (ORSModel.ors.Vector3) – a point (an Vector3)
-
getCenter(self) → Vector3¶ Gets the geometrical middle of the box.
Returns: output (ORSModel.ors.Vector3) – a box center position (an Vector3)
-
getCenterHalfVoxel(self) → Vector3¶ Gets the middle of the voxel in the middle of the box.
Returns: output (ORSModel.ors.Vector3) – a box center position (an Vector3)
-
getClassNameStatic() → str¶ getClassNameStatic
Returns: output (str) –
-
getContainsBox(self, aBox: ORSModel.ors.Box) → bool¶ Gets if the given box is totally contained in the receiver.
Parameters: aBox (ORSModel.ors.Box) – a box (a Box) Returns: output (bool) – TRUE if the given box is totally contained in the receiver, FALSE otherwise
-
getDirection(self, index: int) → Vector3¶ Gets a box direction.
Note
The direction vector is normalized.
Parameters: index (int) – the side index (a uint16_t) Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection0(self) → Vector3¶ Gets the box direction0.
Note
The direction0 vector is normalized.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection0Size(self) → float¶ Gets the box direction0 side length.
Note
This is the size in meters of the box side 0.
Returns: output (float) – the side 0 length (a double)
-
getDirection0SizeInVoxel(self) → int¶ Gets the direction0 size in voxels.
Returns: output (int) – the size in voxels (an uint32_t)
-
getDirection0Spacing(self) → float¶ Gets the box direction0 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Returns: output (float) – the side 0 spacing (a double)
-
getDirection1(self) → Vector3¶ Gets the box direction1.
Note
The direction1 vector is normalized.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection1Size(self) → float¶ Gets the box direction1 side length.
Note
This is the size in meters of the box side 1.
Returns: output (float) – the side 1 length (a double)
-
getDirection1SizeInVoxel(self) → int¶ Gets the direction1 size in voxels.
Returns: output (int) – the size in voxels (an uint32_t)
-
getDirection1Spacing(self) → float¶ Gets the box direction1 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Returns: output (float) – the side 1 spacing (a double)
-
getDirection2(self) → Vector3¶ Gets the box direction2.
Note
The direction2 vector is normalized.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection2Size(self) → float¶ Gets the box direction2 side length.
Note
This is the size in meters of the box side 2.
Returns: output (float) – the side 2 length (a double)
-
getDirection2SizeInVoxel(self) → int¶ Gets the direction2 size in voxels.
Returns: output (int) – the size in voxels (an uint32_t)
-
getDirection2Spacing(self) → float¶ Gets the box direction2 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Returns: output (float) – the side 2 spacing (a double)
-
getDirectionMax(self) → Vector3¶ Get the direction of the maximal size.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionMid(self) → Vector3¶ Get the direction of the middle size.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionMin(self) → Vector3¶ Get the direction of the minimal size.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionSize(self, index: int) → float¶ Gets a box direction side length.
Note
This is the size in meters of the box side.
Parameters: index (int) – the side index (a uint16_t) Returns: output (float) – the side length (a double)
-
getDirectionSizeMax(self) → float¶ Get the maximal direction size of the box.
Returns: output (float) – the side length (a double)
-
getDirectionSizeMid(self) → float¶ Get the middle direction size of the box.
Returns: output (float) – the side length (a double)
-
getDirectionSizeMin(self) → float¶ Get the minimal direction size of the box.
Returns: output (float) – the side length (a double)
-
getDirectionSizeVector(self) → Vector3¶ Gets the direction size as a vector.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionSpacing(self, index: int) → float¶ Gets the box direction spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: index (int) – the side index (a uint16_t) Returns: output (float) – the side spacing (a double)
-
getDirectionSpacingVector(self) → Vector3¶ Gets the direction spacing as a vector.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getEnclosingBox(self, dir0: ORSModel.ors.Vector3, dir1: ORSModel.ors.Vector3) → Box¶ Makes the box containing the receiver, oriented with the provided directions.
Parameters: - dir0 (ORSModel.ors.Vector3) – direction0 of the new box (a Vector3)
- dir1 (ORSModel.ors.Vector3) – direction1 of the new box (a Vector3)
Returns: output (ORSModel.ors.Box) – the box containing the receiver (a Box)
-
getFace(self, faceIndex: int) → Rectangle¶ Gets the bounded plane of a face.
Parameters: faceIndex (int) – the side index (a uint16_t) Returns: output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
-
getFaceOutwardNormal(self, faceIndex: int) → Rectangle¶ Gets the bounded plane of a face with normal pointing outside of box.
Parameters: faceIndex (int) – the side index (a uint16_t) Returns: output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
-
getFirstIntersectingFace(self, aLine: ORSModel.ors.Line) → int¶ Gets the face index of intersection closest to the origin of a line.
Parameters: aLine (ORSModel.ors.Line) – a line (a Line) Returns: output (int) – the side index (a short). This value is -1 if there is no intersection between the receiver and the given line.
-
getHasSameOrientation(self, pBox: ORSModel.ors.Box) → bool¶ Gets if the receiver has the same orientation as the given box.
Parameters: pBox (ORSModel.ors.Box) – a box to compare (a Box) Returns: output (bool) – TRUE if the receiver has the same orientation, FALSE otherwise (a bool)
-
getHasSameOrthonormalBase(self, pBox: ORSModel.ors.Box) → bool¶ Gets if the receiver has the same orthonormal base as the given box.
Parameters: pBox (ORSModel.ors.Box) – a box to compare (a Box) Returns: output (bool) – TRUE if the receiver has the same orthonormal base, FALSE otherwise (a bool)
-
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → LineSegment¶ Gets the intersection of the receiver with the given line.
Parameters: aLine (ORSModel.ors.Line) – a line (a Line) Returns: output (ORSModel.ors.LineSegment) – the line segment at the intersection of the box with the given line (a LineSegment)
-
getIntersectionWithLineProvidingOutput(self, aLine: ORSModel.ors.Line, aLineSegmentOutput: ORSModel.ors.LineSegment) → None¶ Parameters: - aLine (ORSModel.ors.Line) –
- aLineSegmentOutput (ORSModel.ors.LineSegment) –
-
getIntersectionWithLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → LineSegment¶ Gets the intersection of the receiver with the given line segment.
Parameters: inputLineSegment (ORSModel.ors.LineSegment) – a line segment (a LineSegment) Returns: output (ORSModel.ors.LineSegment) – the line segment at the intersection of the box with the given line segment (a LineSegment)
-
getIsEqualTo(self, aBox: ORSModel.ors.Box) → bool¶ Checks for equality to another box.
Parameters: aBox (ORSModel.ors.Box) – a box (an Box) Returns: output (bool) – TRUE if the boxes are equal, FALSE otherwise
-
getIsIntersectingBox(self, aBox: ORSModel.ors.Box) → bool¶ Gets if the receiver intersects the given box.
Parameters: aBox (ORSModel.ors.Box) – a box to intersect with the receiver (a Box) Returns: output (bool) – TRUE if the receiver intersects the box, FALSE otherwise (a bool)
-
getIsIntersectingLine(self, aLine: ORSModel.ors.Line) → bool¶ Gets if the receiver intersects the given line.
Parameters: aLine (ORSModel.ors.Line) – a line (a Line) Returns: output (bool) – TRUE if the box intersects the line, FALSE otherwise (a bool)
-
getIsIntersectingLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → bool¶ Gets if the receiver intersects the given line segment.
Parameters: inputLineSegment (ORSModel.ors.LineSegment) – a line segment (a LineSegment) Returns: output (bool) – TRUE if the box intersects the line segment, FALSE otherwise (a bool)
-
getIsIntersectingPlane(self, aPlane: ORSModel.ors.Plane) → bool¶ Gets if the receiver intersects the given plane.
Parameters: aPlane (ORSModel.ors.Plane) – a plane (a Plane) Returns: output (bool) – TRUE if the box intersects the plane, FALSE otherwise (a bool)
-
getIsIntersectingRectangle(self, aBplane: ORSModel.ors.Rectangle) → bool¶ Gets if the receiver intersects the given bounded plane.
Parameters: aBplane (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle) Returns: output (bool) – TRUE if the box intersects the bounded plane, FALSE otherwise (a bool)
-
getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) → bool¶ Gets if the receiver intersects the given shape.
Parameters: aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape) Returns: output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
-
getIsIsotropic(self) → bool¶ Checks is box is isotrope.
Returns: output (bool) – TRUE if the all direction spacings are equal, FALSE otherwise
-
getMostSimilarDirectionIndex(self, pVect: ORSModel.ors.Vector3) → int¶ Gets the index of the direction vector closest to the vector given.
Parameters: pVect (ORSModel.ors.Vector3) – a direction (a Vector3) Returns: output (int) – the direction vector index (a uint16_t)
-
getNearestPointOnBoxSurfaceFromLineOnPlane(self, aPlane: ORSModel.ors.Plane, aLine: ORSModel.ors.Line, insideDeep: float) → Vector3¶ Gets the closest point located on the box surface to the given line on the given plane.
Parameters: - aPlane (ORSModel.ors.Plane) – a plane (a Plane)
- aLine (ORSModel.ors.Line) – a line (a Line)
- insideDeep (float) – a displacement distance to add in the direction from the point found at the surface of the box to the closest point on the line (a double)
Returns: output (ORSModel.ors.Vector3) – the point on the box (an Vector3)
-
getNearestPointOnBoxSurfaceFromPointOnPlane(self, aPlane: ORSModel.ors.Plane, aPoint: ORSModel.ors.Vector3, insideDeep: float) → Vector3¶ Gets the closest point located on the box surface to the given point on the given plane.
Parameters: - aPlane (ORSModel.ors.Plane) – a plane (a Plane)
- aPoint (ORSModel.ors.Vector3) – a point (a Vector3)
- insideDeep (float) – a displacement distance to add in the direction from the point found at the surface of the box to the provided point (a double)
Returns: output (ORSModel.ors.Vector3) – the point on the box (an Vector3)
-
getOrigin(self) → Vector3¶ Gets the box origin position.
Note
The origin is in world coordinates.
Returns: output (ORSModel.ors.Vector3) – the origin (an Vector3)
-
getOriginOpposite(self) → Vector3¶ Gets the position of the corner opposite to the origin.
Note
The origin opposite is in world coordinates.
Returns: output (ORSModel.ors.Vector3) – the origin opposite (an Vector3)
-
getOutwardFacePlane(self, faceIndex: int) → Plane¶ Returns the given face index plane with outward normal.
Parameters: faceIndex (int) – the side index (a uint16_t) Returns: output (ORSModel.ors.Plane) – a plane (a Plane)
-
getPlaneInBoxReferential(self, pPlane: ORSModel.ors.Plane) → Plane¶ Transforms the plane provided in the receiver referential.
Parameters: pPlane (ORSModel.ors.Plane) – a plane (a Plane) Returns: output (ORSModel.ors.Plane) – a plane in the box referential (a Plane)
-
getPlaneTranslatedSoThatItIntersect(self, aPlane: ORSModel.ors.Plane) → Plane¶ Gets a translated plane intersecting the box at its closest location.
Parameters: aPlane (ORSModel.ors.Plane) – a plane (a Plane) Returns: output (ORSModel.ors.Plane) – the translated plane intersecting the box (a Plane)
-
getRectangleOfIntersection(self, cutPlane: ORSModel.ors.Plane, upVector: ORSModel.ors.Vector3) → Rectangle¶ Computes the bounded plane (with direction 1 vector equal to the up vector provided) of the intersection of the receiver with a plane.
Note
The bounded plane will have an area of zero if the plane does not intersect the box.
Parameters: - cutPlane (ORSModel.ors.Plane) – a plane (an Plane)
- upVector (ORSModel.ors.Vector3) – an up vector (an Vector3)
Returns: output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
-
getRotationMatrix(self) → Matrix4x4¶ Get the rotation matrix define by the box.
Returns: output (ORSModel.ors.Matrix4x4) – the rotation matrix (a Matrix4x4)
-
getSpacingInDirection(self, aDirection: ORSModel.ors.Vector3) → float¶ Gets the spacing in the specified direction.
Parameters: aDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3) Returns: output (float) – the spacing (a double)
-
getSubBoxForIndex(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int) → Box¶ Get a subbox for the given index.
Parameters: - minX (int) – the smallest index in direction0 (an int32_t)
- minY (int) – the smallest index in direction1 (an int32_t)
- minZ (int) – the smallest index in direction2 (an int32_t)
- maxX (int) – the biggest index in direction0 (an int32_t)
- maxY (int) – the biggest index in direction1 (an int32_t)
- maxZ (int) – the biggest index in direction2 (an int32_t)
Returns: output (ORSModel.ors.Box) – the subbox (a Box)
-
getSummit(self, maxDirection0: bool, maxDirection1: bool, maxDirection2: bool) → Vector3¶ Gets the position of one of the summits of the box.
Parameters: - maxDirection0 (bool) – TRUE to get maxDirection0, FALSE to get minDirection0
- maxDirection1 (bool) – TRUE to get maxDirection1, FALSE to get minDirection1
- maxDirection2 (bool) – TRUE to get maxDirection2, FALSE to get minDirection2
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitmmm(self) → Vector3¶ Gets the (minDirection0, minDirection1, minDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitmmp(self) → Vector3¶ Gets the (minDirection0, minDirection1, maxDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitmpm(self) → Vector3¶ Gets the (minDirection0, maxDirection1, minDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitmpp(self) → Vector3¶ Gets the (minDirection0, maxDirection1, maxDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitpmm(self) → Vector3¶ Gets the (maxDirection0, minDirection1, minDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitpmp(self) → Vector3¶ Gets the (maxDirection0, minDirection1, maxDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitppm(self) → Vector3¶ Gets the (maxDirection0, maxDirection1, minDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSummitppp(self) → Vector3¶ Gets the (maxDirection0, maxDirection1, maxDirection2) summit position.
Returns: output (ORSModel.ors.Vector3) – a summit position (a Vector3)
-
getSurface(self) → float¶ Gets the surface of the receiver.
Returns: output (float) – a surface (a double)
-
getTransformationToGoTo(self, pIBox: ORSModel.ors.Box) → Matrix4x4¶ Gets the 4x4 matrix transforming the receiver into the argument.
Note
The transformation can include: translation, rotation and scaling.
Parameters: pIBox (ORSModel.ors.Box) – a box (an Box) Returns: output (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
-
getVolume(self) → float¶ Gets the volume of the receiver.
Returns: output (float) – a volume (a double)
-
getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) → Vector3¶ Gets the position of a given voxel.
Note
Only useful if the spacing of the direction vectors have been defined.
Parameters: anIndex (ORSModel.ors.Vector3) – a voxel position (an Vector3) Returns: output (ORSModel.ors.Vector3) – the position in world coordinates (an Vector3)
-
getWorldToBox(self, inVect: ORSModel.ors.Vector3) → Vector3¶ Transforms the given point in the box referential.
Note
Here the spacing is not considered.
Parameters: inVect (ORSModel.ors.Vector3) – a point (an Vector3) Returns: output (ORSModel.ors.Vector3) – a point (an Vector3)
-
getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) → Vector3¶ Gets the position of a given world coordinate.
Note
Only useful if the spacing of the direction vectors have been defined.
Parameters: pPointInWorld (ORSModel.ors.Vector3) – a world coordinate position vector (an Vector3) Returns: output (ORSModel.ors.Vector3) – the position in local coordinates (an Vector3)
-
getWorldTranformation(self) → Matrix4x4¶ Gets the transformation from the unit box to the receiver.
Returns: output (ORSModel.ors.Matrix4x4) –
-
grow(self, growSize: ORSModel.ors.Vector3) → None¶ Grows or shrinks the receiver, arount its center.
Parameters: growSize (ORSModel.ors.Vector3) – a vector with the amount of growth of each direction vector length (an Vector3)
-
growToContain(self, aShape: ORSModel.ors.Shape3D) → None¶ Grows to include a given box.
Note
The receiver will grow to contain the provided box, but it will never shrink.
Parameters: aShape (ORSModel.ors.Shape3D) – a box (a Box)
-
growToIncludePoint(self, aPoint: ORSModel.ors.Vector3) → None¶ Grows the receiver as to include the provided point.
Parameters: aPoint (ORSModel.ors.Vector3) – a point to be included in the box (an Vector3)
-
makeAbleToContain(self, aShape: ORSModel.ors.Shape3D) → None¶ Makes the box able to contain a givenShape3D.
Note
The receiver will grow or shrink to fit on the provided box.
Parameters: aShape (ORSModel.ors.Shape3D) – a Shape 3d (an Shape3D)
-
moveFaceSoThatPlaneIncludesPoint(self, faceIndex: int, pVect: ORSModel.ors.Vector3) → None¶ Moves the face at the given index so that the given point lie on the face plane.
Parameters: - faceIndex (int) – the side index (a uint16_t)
- pVect (ORSModel.ors.Vector3) – a point to be contained by the face plane (an Vector3)
-
orthonormalizeDirections(self) → None¶ Orthonormalizes the directions of the box.
-
setDirection(self, index: int, pVect: ORSModel.ors.Vector3) → None¶ Sets a box direction.
Note
The direction vector will be normalized.
Parameters: - index (int) – the side index (a uint16_t)
- pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection0(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the box direction0.
Note
The direction0 vector will be normalized.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection0Size(self, aSize: float) → None¶ Sets the box direction0 vector length.
Note
This is the size in meters of the box side 0.
Parameters: aSize (float) – the side 0 length (a double)
-
setDirection0Spacing(self, aSpacing: float) → None¶ Sets the box direction0 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: aSpacing (float) – the side 0 spacing (a double)
-
setDirection1(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the box direction1.
Note
The direction1 vector will be normalized.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection1Size(self, aSize: float) → None¶ Sets the box direction1 vector length.
Note
This is the size in meters of the box side 1.
Parameters: aSize (float) – the side 1 length (a double)
-
setDirection1Spacing(self, aSpacing: float) → None¶ Sets the box direction1 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: aSpacing (float) – the side 1 spacing (a double)
-
setDirection2(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the box direction2.
Note
The direction2 vector will be normalized.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection2Size(self, aSize: float) → None¶ Sets the box direction2 vector length.
Note
This is the size in meters of the box side 2.
Parameters: aSize (float) – the side 2 length (a double)
-
setDirection2Spacing(self, aSpacing: float) → None¶ Sets the box direction2 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: aSpacing (float) – the side 2 spacing (a double)
-
setDirectionSize(self, index: int, aSize: float) → None¶ Sets a box direction vector length.
Note
This is the size in meters of the box side.
Parameters: - index (int) – the side index (a uint16_t)
- aSize (float) – the side length (a double)
-
setDirectionSizeVector(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the direction size as a vector.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirectionSpacing(self, index: int, aSpacing: float) → None¶ Sets a box direction spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: - index (int) – the side index (a uint16_t)
- aSpacing (float) – the side spacing (a double)
-
setDirectionSpacingVector(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the direction spacing as a vector.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setOrigin(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the box origin position.
Note
The origin should be in world coordinates.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
shape¶
-
Shape3D¶
-
class
ORSModel.ors.Shape3D Bases:
ORSModel.ors.Shape-
getCanBeUsedForProjection(self) → bool Returns: output (bool) –
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getIsPointInside(self, aPosition: ORSModel.ors.Vector3) → bool Verifies if a point is inside the shape.
Parameters: aPosition (ORSModel.ors.Vector3) – a point (an Vector3) Returns: output (bool) – TRUE if the point is inside the shape, FALSE otherwise
-
getIsPointInsideFromComponents(self, aPositionX: float, aPositionY: float, aPositionZ: float) → bool Verifies if a point is inside the shape.
Parameters: - aPositionX (float) – a point X component (a double)
- aPositionY (float) – a point Y component (a double)
- aPositionZ (float) – a point Z component (a double)
Returns: output (bool) – TRUE if the point is inside the shape, FALSE otherwise
-
getProjectionRectangle(self) → Rectangle Returns: output (ORSModel.ors.Rectangle) –
-
none() → Shape3D Returns: output (Shape3D) –
-
Shape¶
-
class
ORSModel.ors.Shape Bases:
ORSModel.ors.Unmanagedbrief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2017
-
copy(self) → Unmanaged Gets a copy of the receiver.
Returns: output (ORSModel.ors.Unmanaged) – a shape
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) → bool Gets if the receiver intersects the given shape.
Parameters: aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape) Returns: output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
-
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Shape Parameters: - axisOfRotation (ORSModel.ors.Vector3) –
- rotationCenter (ORSModel.ors.Vector3) –
- angle (float) –
Returns: output (ORSModel.ors.Shape) –
-
getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) → Shape Parameters: aMatrix (ORSModel.ors.Matrix4x4) – Returns: output (ORSModel.ors.Shape) –
-
none() → Shape Returns: output (Shape) –
-
rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float) → None Applies a rotation to the receiver.
Note
The box is a right handed bounded referential.
Parameters: - axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
- aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
- angleInRadian (float) – an angle in radian (a double)
-
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None Applies a transformation to the receiver.
Note
The transformation can include: translation, rotation and scaling.
Parameters: transformationMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
-
Unmanaged¶
-
class
ORSModel.ors.Unmanaged Bases:
ORSModel.ors.ORSBaseClassbrief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
atomicLoad(sFilename: str) → Unmanaged Creates an object from a file where an object was saved.
Parameters: sFilename (str) – path of the file to load Returns: output (Unmanaged) – a managed object, or none() if the load fails
-
atomicSave(self, aFilename: str) → int Saves the object to a file.
Parameters: aFilename (str) – path of the file to save Returns: output (int) – 0 if successful, otherwise an error code
-
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged Create aUnmanaged Object from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Unmanaged) –
-
fromPythonRepresentation(self, aPythonRepresentation: str) → bool Create aUnmanaged object from a Python string representation.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a string) Returns: output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
-
classmethod
getAllSubclasses(outputCollection=None)
-
classmethod
getClassDenomination()
-
static
getClassFromProgId(progId)
-
getClassName(self) → str Retrieves the class name of the core object wrapped by this Interface object.
Returns: output (str) –
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getDataChecksum(self) → str Returns: output (str) –
-
getIsInstanceOf(self, pProgId: str) → bool Queries the object to know if it is an instance of a certain class.
Parameters: pProgId (str) – Returns: output (bool) –
-
classmethod
getIsSubclassOf(parentClass)
-
getPythonRepresentation(self) → str Gets a Python evaluable string representation.
Returns: output (str) –
-
isNone(self) → bool Checks if the receiver is none.
Returns: output (bool) –
-
isNotNone(self) → bool Checks if the receiver is not none.
Returns: output (bool) –
-
none() → Unmanaged Returns: output (Unmanaged) –
-
ORSBaseClass¶
-
class
ORSModel.ors.ORSBaseClass brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
getPythonTraceBack() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged(self) → bool Returns: output (bool) –
-
isNone(self) → bool Returns: output (bool) –
-
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-