Sphere¶
Inheritance diagram¶

Classes¶
Sphere¶
- class ORSModel.ors.Sphere¶
Bases:
Shape3DSphere services.
- copy(self) ORSModel.ors.Sphere¶
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Sphere) – a shape
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Sphere¶
Create aSphere from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Sphere) –
- fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection)¶
set a sphere from a set of (at least 3) points
- Parameters:
aPointCollection (ORSModel.ors.SequenceableCollection) –
- getClassNameStatic() str¶
getClassNameStatic
- Returns:
output (str) –
- getFibonacciDistributedPointsOnSurface(self, nbPoints: int) ORSModel.ors.ArrayDouble¶
- Parameters:
nbPoints (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getIntersectionWithLine(self, aLine: ORSModel.ors.Line) ORSModel.ors.LineSegment¶
- Parameters:
aLine (ORSModel.ors.Line) –
- Returns:
output (ORSModel.ors.LineSegment) – a vector (an Vector3) or none if not intersecting
- getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.LineSegment¶
- Parameters:
aLineSegment (ORSModel.ors.LineSegment) –
- Returns:
output (ORSModel.ors.LineSegment) – a vector (an Vector3) or none if not intersecting
- getIsEqualTo(self, Sphere: ORSModel.ors.Sphere) bool¶
Verifies equality between the receiver and a givenSphere.
- Parameters:
Sphere (ORSModel.ors.Sphere) –
- Returns:
output (bool) – true if the argument Sphere is equal to the receiver, false otherwise
- 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)
- getPhiOffset(self) float¶
- Returns:
output (float) –
- getProjectionType(self) int¶
- Returns:
output (int) –
- getRadius(self) float¶
- Returns:
output (float) –
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Sphere¶
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Sphere) –
- getSurface(self) float¶
Gets the surface.
- Returns:
output (float) – a surface (a double)
- getThetaOffset(self) float¶
- Returns:
output (float) –
- getVolume(self) float¶
Gets the volume.
- Returns:
output (float) – a volume (a double)
- getWorldPositionFromUV(self, u: float, v: float, x: float, y: float, z: float)¶
- Parameters:
u (float) –
v (float) –
x (float) –
y (float) –
z (float) –
- 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)
- setCenter(self, center: ORSModel.ors.Vector3)¶
- Parameters:
center (ORSModel.ors.Vector3) –
- setPhiOffset(self, anOffset: float)¶
- Parameters:
anOffset (float) –
- setProjectionType(self, aProjectionType: int)¶
- Parameters:
aProjectionType (int) –
- setRadius(self, radius: float)¶
- Parameters:
radius (float) –
- setThetaOffset(self, anOffset: float)¶
- Parameters:
anOffset (float) –
- 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)
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.
- getPythonTraceBack() List[str]
Set the python traceback for a call from python.
- Returns:
output (List[str]) –
- isManaged(self) bool
- Returns:
output (bool) –
- isNone(self) bool
- Returns:
output (bool) –
- setPythonTraceBack(tb: List[str])
Set the python traceback for a call from python.
- Parameters:
tb (List[str]) –