Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2023.
Loading...
Searching...
No Matches
SClippingPlane Class Reference

Provide clipping plane edition and creation methods. More...

Inheritance diagram for SClippingPlane:
SClipping SComp

Public Member Functions

number GetCurvilinearAbscissa ()
 Return the current curvilinear abscissa of the SClippingPlane along its path. More...
 
number GetDepth ()
 Return the depth of the SClippingPlane. More...
 
Object GetDirection ()
 Return the directions of the SClippingPlane. More...
 
Object GetPath ()
 Return the path of the SClippingPlane as a polyline. More...
 
SPoint GetPosition ()
 Return the center of the SClippingPlane. More...
 
number GetStep ()
 Return the step of the SClippingPlane. More...
 
boolean HasPath ()
 Does the SClippingPlane have a path? More...
 
SMatrix Move (number distance)
 Move the SClippingPlane to a given distance along its normal or its path if defined. More...
 
SMatrix MoveInDirectionOf (SPoint targetPoint, boolean reprojectPoint=true)
 Move the SClippingPlane in direction of a given point along its normal or its path if defined. More...
 
 SClippingPlane ()
 Default constructor to create an empty new SClippingPlane. More...
 
 SClippingPlane (SClippingPlane other)
 Construct a SClippingPlane by copying another SClippingPlane. More...
 
 SClippingPlane (SMultiline path)
 Construct a SClippingPlane from a path. More...
 
 SClippingPlane (SPlane plane)
 Construct a SClippingPlane from a plane. More...
 
 SClippingPlane (SPoint center, SVector normal)
 Construct a SClippingPlane from a given center and normal direction. More...
 
 SetDepth (number depth)
 Set the depth of the SClippingPlane. More...
 
 SetDirection (SVector normal, SVector xDir=null)
 Set the normal of the SClippingPlane. More...
 
 SetPosition (SPoint newCenter)
 Set the center of the SClippingPlane. More...
 
 SetStep (number step)
 Set the step of the SClippingPlane. More...
 
string toString ()
 Get the type of the variable. More...
 
- Public Member Functions inherited from SClipping
 ActivateInAllScenes ()
 Activate the clipping object in all scenes. More...
 
 ActivateInScene (number sceneIndex)
 Activate the clipping object in the given scene. More...
 
 Clip (SComp comp)
 Clip a SComp. More...
 
 ClipAll ()
 Clip all SComp in the current document. More...
 
 ClipTable (Array< SComp > compTable)
 Clip a table of SComp. More...
 
 DeactivateInAllScenes ()
 Deactivate the clipping object in all scenes. More...
 
 DeactivateInScene (number sceneIndex)
 Deactivate the clipping object in a given scene. More...
 
boolean IsActivatedInAllScenes ()
 Return if the SClipping is activated in all scenes. More...
 
boolean IsActivatedInScene (number sceneIndex)
 Return if the SClipping is activated in a given scene. More...
 
boolean IsClipped (SComp comp)
 Return if the SComp is clipped or not. More...
 
string toString ()
 Get the type of the variable. More...
 
 Unclip (SComp comp)
 Unclip a SComp. More...
 
 UnclipAll ()
 Unclip all SComp in the current document. More...
 
 UnclipTable (Array< SComp > compTable)
 Unclip a table of SComp. More...
 
- Public Member Functions inherited from SComp
 AddToDoc ()
 Add the object to the document. More...
 
 ApplyTransformation (SMatrix matrix)
 Apply a geometric transformation to the current object by making a product with the given matrix. More...
 
Object GetBoundingBox ()
 Calculate the bounding box of the object. More...
 
Object GetColors ()
 Get the colors of the object. More...
 
string GetFolderName ()
 Get the name of the folder containing the object. More...
 
string GetName ()
 Return the object's name. More...
 
string GetPath ()
 Return the full path of a SComp in the tree. More...
 
 Invert ()
 Invert the normal of the object. More...
 
boolean IsInDoc ()
 Return if the object is in the document or not. More...
 
boolean IsVisible ()
 Get the visibility of the object. More...
 
 MoveToGroup (string groupPath, boolean moveInsideTopParent=true)
 Move the object to the document group represent by the given path. If some groups, in the path, don't exist, they will be created. More...
 
 RemoveFromDoc ()
 Remove the object from the document. More...
 
 SetClippable (boolean clipping)
 Set clippable or not. More...
 
 SetColors (number red, number green, number blue)
 Set the colors of the object. More...
 
 SetName (string objectName)
 Set the object's name. More...
 
 SetTransparency (number alpha)
 Set the transparency of the object. More...
 
 SetVisibility (boolean visible)
 Set the object to be visible, or not visible. More...
 
string toString ()
 Get the type of the variable. More...
 
 Translate (SVector vector)
 Make a translation of the current object with an SVector. More...
 

Static Public Member Functions

static Array< SClippingPlaneAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SClippingPlane in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SClippingPlane in the scene. More...
 
static Array< SClippingPlaneFromName (string name)
 Search all the SClippingPlane with the given name. More...
 
static Array< SClippingPlaneFromSel ()
 Get all the selected SClippingPlane. More...
 
static SClippingPlane New ()
 Default constructor to create an empty new SClippingPlane. More...
 
static SClippingPlane New (SClippingPlane other)
 Construct a SClippingPlane by copying another SClippingPlane. More...
 
static SClippingPlane New (SMultiline path)
 Construct a SClippingPlane from a path. More...
 
static SClippingPlane New (SPlane plane)
 Construct a SClippingPlane from a plane. More...
 
static SClippingPlane New (SPoint center, SVector normal)
 Construct a SClippingPlane from a given center and normal direction. More...
 
- Static Public Member Functions inherited from SClipping
static Array< SClippingAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SClipping in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SClipping in the scene. More...
 
static Array< SClippingFromName (string name)
 Search all the SClipping with the given name. More...
 
static Array< SClippingFromSel ()
 Get all the selected SClipping. More...
 
static Array< SClippingGetAllActivated (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the activated SClipping in the document. More...
 
- Static Public Member Functions inherited from SComp
static Array< SCompAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SComp in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SComp in the scene. More...
 
static Array< SCompFromName (string name)
 Search all the SComp with the given name. More...
 
static Array< SCompFromSel ()
 Get all the selected SComp. More...
 

Additional Inherited Members

- Public Types inherited from SComp
enum  VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 }
 Visible criteria. More...
 

Detailed Description

Provide clipping plane edition and creation methods.

Constructor & Destructor Documentation

◆ SClippingPlane() [1/5]

SClippingPlane::SClippingPlane ( )

Default constructor to create an empty new SClippingPlane.

◆ SClippingPlane() [2/5]

SClippingPlane::SClippingPlane ( SClippingPlane  other)

Construct a SClippingPlane by copying another SClippingPlane.

Parameters
other(SClippingPlane) The SClippingPlane to copy

◆ SClippingPlane() [3/5]

SClippingPlane::SClippingPlane ( SMultiline  path)

Construct a SClippingPlane from a path.

Parameters
path(SMultiline) The path

◆ SClippingPlane() [4/5]

SClippingPlane::SClippingPlane ( SPlane  plane)

Construct a SClippingPlane from a plane.

Parameters
plane(SPlane) The plane

◆ SClippingPlane() [5/5]

SClippingPlane::SClippingPlane ( SPoint  center,
SVector  normal 
)

Construct a SClippingPlane from a given center and normal direction.

Parameters
center(SPoint) Plane center
normal(SVector) Plane normal

Member Function Documentation

◆ All()

static Array< SClippingPlane > SClippingPlane::All ( VisibilityEnum  visCrit = SComp.ANY_VISIBILITY)
static

Get all the SClippingPlane in the document.

Parameters
visCrit(VisibilityEnum) Visible selection criteria
Returns
(Array<SClippingPlane>) Array of all the SClippingPlane contained in the document, that fulfill the visibility criteria

◆ FromClick()

static Object SClippingPlane::FromClick ( )
static

Launch an interaction to select a SClippingPlane in the scene.

Warning
This function will pause the script, and wait for user interaction
Return values
ret.ErrorCode(number) The error code
  • 0: No error, the SClippingPlane is selected.
  • 1: Nothing is selected.
  • 2: The ESCape key has been pressed
ret.ClippingPlane(SClippingPlane) The selected SClippingPlane

◆ FromName()

static Array< SClippingPlane > SClippingPlane::FromName ( string  name)
static

Search all the SClippingPlane with the given name.

Parameters
name(string) The name to find
Returns
(Array<SClippingPlane>) All the SClippingPlane with the given name

◆ FromSel()

static Array< SClippingPlane > SClippingPlane::FromSel ( )
static

Get all the selected SClippingPlane.

Returns
(Array<SClippingPlane>) All the selected SClippingPlane

◆ GetCurvilinearAbscissa()

number SClippingPlane::GetCurvilinearAbscissa ( )

Return the current curvilinear abscissa of the SClippingPlane along its path.

Note
If the SClippingPlane doesn't have a path, this value means nothing.
Returns
(number) The curvilinear abscissa of the SClippingPlane

◆ GetDepth()

number SClippingPlane::GetDepth ( )

Return the depth of the SClippingPlane.

Returns
The depth of the SClippingPlane
Return values
0No depth, it's a single clipping plane
>0 The distance between the 2 planes

◆ GetDirection()

Object SClippingPlane::GetDirection ( )

Return the directions of the SClippingPlane.

Return values
ret.Normal(SVector) The normal of the plane
ret.XDir(SVector) The X direction to orient the plane. It can be (0,0,0) if not defined yet.

◆ GetPath()

Object SClippingPlane::GetPath ( )

Return the path of the SClippingPlane as a polyline.

Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
ret.Multi(SMultiline) The path of the SClippingPlane

◆ GetPosition()

SPoint SClippingPlane::GetPosition ( )

Return the center of the SClippingPlane.

Returns
(SPoint) The center of the SClippingPlane

◆ GetStep()

number SClippingPlane::GetStep ( )

Return the step of the SClippingPlane.

Return values
0No step, clipping plane movements using the mouse wheel are computed automatically
>0 The fixed distance used to move the clipping plane using the mouse wheel

◆ HasPath()

boolean SClippingPlane::HasPath ( )

Does the SClippingPlane have a path?

Return values
trueThe SClippingPlane has a path
falseThe SClippingPlane doesn't have a path

◆ Move()

SMatrix SClippingPlane::Move ( number  distance)

Move the SClippingPlane to a given distance along its normal or its path if defined.

Note
If a step constraint is defined (> 0), then the movement is restricted to the nearest multiple of the step (0 is accepted). For example, let's say the step = 10: Move(2.5) -> will not move (round to 0); Move(17) -> move a distance of 15 (rounded)
Parameters
distance(number) The distance for movement
Returns
(SMatrix) The distance effectively traveled which may differ from the input 'distance' in 2 cases:
A step constraint is defined (see rules above).
The clipping plane has a path which has a beginning and an end

◆ MoveInDirectionOf()

SMatrix SClippingPlane::MoveInDirectionOf ( SPoint  targetPoint,
boolean  reprojectPoint = true 
)

Move the SClippingPlane in direction of a given point along its normal or its path if defined.

Parameters
targetPoint(SPoint) The target point
reprojectPoint(boolean) Should we re-project 'targetPoint' onto the clipping plane's normal or path?
CAUTION: if 'reprojectPoint = false', 'targetPoint' must already be onto the clipping plane's normal or path
Returns
(SMatrix) The transformation SMatrix of the movement.

◆ New() [1/5]

static SClippingPlane SClippingPlane::New ( )
static

Default constructor to create an empty new SClippingPlane.

Returns
(SClippingPlane) The new SClippingPlane.

◆ New() [2/5]

static SClippingPlane SClippingPlane::New ( SClippingPlane  other)
static

Construct a SClippingPlane by copying another SClippingPlane.

Parameters
other(SClippingPlane) The SClippingPlane to copy
Returns
(SClippingPlane) The new SClippingPlane.

◆ New() [3/5]

static SClippingPlane SClippingPlane::New ( SMultiline  path)
static

Construct a SClippingPlane from a path.

Parameters
path(SMultiline) The path
Returns
(SClippingPlane) The new SClippingPlane.

◆ New() [4/5]

static SClippingPlane SClippingPlane::New ( SPlane  plane)
static

Construct a SClippingPlane from a plane.

Parameters
plane(SPlane) The plane
Returns
(SClippingPlane) The new SClippingPlane.

◆ New() [5/5]

static SClippingPlane SClippingPlane::New ( SPoint  center,
SVector  normal 
)
static

Construct a SClippingPlane from a given center and normal direction.

Parameters
center(SPoint) Plane center
normal(SVector) Plane normal
Returns
(SClippingPlane) The new SClippingPlane.

◆ SetDepth()

SClippingPlane::SetDepth ( number  depth)

Set the depth of the SClippingPlane.

Parameters
depth(number) The depth to set

◆ SetDirection()

SClippingPlane::SetDirection ( SVector  normal,
SVector  xDir = null 
)

Set the normal of the SClippingPlane.

Parameters
normal(SVector) The normal to set
xDir(SVector) The X direction to orient the plane

◆ SetPosition()

SClippingPlane::SetPosition ( SPoint  newCenter)

Set the center of the SClippingPlane.

Note
The center may be repositioned to be at the middle of the bounding box of the clipped objects.
Parameters
newCenter(SPoint) The center to set

◆ SetStep()

SClippingPlane::SetStep ( number  step)

Set the step of the SClippingPlane.

Parameters
step(number) The step to set
  • > 0: The fixed distance used to move the clipping plane using the mouse wheel
  • <= 0: No step, clipping plane movements using the mouse wheel are computed automatically

◆ toString()

string SClippingPlane::toString ( )

Get the type of the variable.

Returns
(string) The type name