Box¶
Inheritance diagram¶

Classes¶
Box¶
- class ORSModel.ors.Box¶
Bases:
Shape3DBox manipulation services.
- clip(self, pBox: ORSModel.ors.Box)¶
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) ORSModel.ors.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) ORSModel.ors.Rectangle¶
Gets the bounded plane for a given direction2 index.
- Parameters:
sliceIndex (int) – the index in the direction2 of the box (a uint32_t)
- Returns:
output (ORSModel.ors.Rectangle) – the bounded plane (a Rectangle)
- getBoxInBoxReferential(self, inRefBox: ORSModel.ors.Box) ORSModel.ors.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, inVect: ORSModel.ors.Vector3) ORSModel.ors.Vector3¶
Transforms the given point (which is expressed in the box referential) in the world 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)
- getCenterHalfVoxel(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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 (a 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) ORSModel.ors.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 (a 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) ORSModel.ors.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 (a 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) ORSModel.ors.Vector3¶
Get the direction of the maximal size.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirectionMid(self) ORSModel.ors.Vector3¶
Get the direction of the middle size.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirectionMin(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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.
- getHasSameGridIdentity(self, pBox: ORSModel.ors.Box) bool¶
Gets if the receiver lives in the same Grid as the givenBox. It means they share the same orientation and spacings and their origin are at an integer number of steps.
- Parameters:
pBox (ORSModel.ors.Box) – a box to compare (a Box)
- Returns:
output (bool) – true if they share the same Grid, false otherwise (a bool)
- 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) ORSModel.ors.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)¶
Gets the intersection of the receiver with the given line.
- Parameters:
aLine (ORSModel.ors.Line) – a line (a Line)
aLineSegmentOutput (ORSModel.ors.LineSegment) – the output line segment (a LineSegment)
- getIntersectionWithLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3¶
Gets the box origin position.
Note
The origin is in world coordinates.
- Returns:
output (ORSModel.ors.Vector3) – the origin (an Vector3)
- getOriginOpposite(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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)
- getRectangleOfIntersectionClipped(self, aClipingRectangle: ORSModel.ors.Rectangle) ORSModel.ors.Rectangle¶
Computes the bounded plane (with the same direction vector and spacing has the clipingRectangle ) of the intersection of the receiver with a plane, clipped to the extent of the clipingRectangle.
Note
The rectangle will have an area of zero if the plane does not intersect the box.
- Parameters:
aClipingRectangle (ORSModel.ors.Rectangle) – a rectangle (an Rectangle)
- Returns:
output (ORSModel.ors.Rectangle) – a rectangle plane (a Rectangle)
- getRotationMatrix(self) ORSModel.ors.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.
See also
ORSModel.ors.Box.getDirection0Spacing(),ORSModel.ors.Box.getDirection1Spacing(),ORSModel.ors.Box.getDirection2Spacing()- 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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3¶
Gets the (minDirection0, minDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmmp(self) ORSModel.ors.Vector3¶
Gets the (minDirection0, minDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmpm(self) ORSModel.ors.Vector3¶
Gets the (minDirection0, maxDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmpp(self) ORSModel.ors.Vector3¶
Gets the (minDirection0, maxDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitpmm(self) ORSModel.ors.Vector3¶
Gets the (maxDirection0, minDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitpmp(self) ORSModel.ors.Vector3¶
Gets the (maxDirection0, minDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitppm(self) ORSModel.ors.Vector3¶
Gets the (maxDirection0, maxDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitppp(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Matrix4x4¶
Gets the transformation from the unit box to the receiver.
- Returns:
output (ORSModel.ors.Matrix4x4)
- grow(self, growSize: ORSModel.ors.Vector3)¶
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)¶
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)¶
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)¶
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)¶
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)¶
Orthonormalizes the directions of the box.
- setCenter(self, newCenter: ORSModel.ors.Vector3)¶
Set the center of the box.
- Parameters:
newCenter (ORSModel.ors.Vector3) – a vector that specify the center of the box
- setDirection(self, index: int, pVect: ORSModel.ors.Vector3)¶
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)¶
Sets the box direction0.
Note
The direction0 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection0Size(self, aSize: float)¶
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)¶
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)¶
Sets the box direction1.
Note
The direction1 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection1Size(self, aSize: float)¶
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)¶
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)¶
Sets the box direction2.
Note
The direction2 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection2Size(self, aSize: float)¶
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)¶
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)¶
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)¶
Sets the direction size as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirectionSpacing(self, index: int, aSpacing: float)¶
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)¶
Sets the direction spacing as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setOrigin(self, pVect: ORSModel.ors.Vector3)¶
Sets the box origin position.
Note
The origin should be in world coordinates.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
Shape3D¶
- class ORSModel.ors.Shape3D
Bases:
Shape- getCenter(self) ORSModel.ors.Vector3
Gets the geometrical middle of the shape.
- Returns:
output (ORSModel.ors.Vector3) – a shape center position (an Vector3)
- 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) ORSModel.ors.Rectangle
- Returns:
output (ORSModel.ors.Rectangle)
Shape¶
- class ORSModel.ors.Shape
Bases:
UnmanagedShape manipulation services.
- copy(self) ORSModel.ors.Unmanaged
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Unmanaged) – a shape
- getCanBeUsedForProjection(self) bool
- Returns:
output (bool)
- 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) ORSModel.ors.Shape
- Parameters:
axisOfRotation (ORSModel.ors.Vector3)
rotationCenter (ORSModel.ors.Vector3)
angle (float)
- Returns:
output (ORSModel.ors.Shape)
- getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Shape
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4)
- Returns:
output (ORSModel.ors.Shape)
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
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:
ORSBaseClassAbstract class for objects that are not managed by the core library. Unmanaged objects are transient objects.
- 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) – an unmanaged 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) ORSModel.ors.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)
- 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)
- 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)
ORSBaseClass¶
- class ORSModel.ors.ORSBaseClass
An abstract class from which all objects issued from the ORS Core Library inherit.
- isManaged(self) bool
- Returns:
output (bool)
- isNone(self) bool
- Returns:
output (bool)
