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

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

Inheritance diagram for SClippingBox:
SClipping SComp

Public Member Functions

SVector GetAxisX ()
 Return the normed axis of the length of the SClippingBox. More...
 
SVector GetAxisY ()
 Return the normed axis of the width of the SClippingBox. More...
 
SVector GetAxisZ ()
 Return the normed axis of the height of the SClippingBox. More...
 
SPoint GetCenter ()
 Return the center of the SClippingBox. More...
 
number GetHeight ()
 Return the height of the SClippingBox. More...
 
number GetLength ()
 Return the length of the SClippingBox. More...
 
SPoint GetLowerPoint ()
 Return the lower point of the SClippingBox. More...
 
SPoint GetUpperPoint ()
 Return the upper point of the SClippingBox. More...
 
number GetVolume ()
 Return the volume of the SClippingBox. More...
 
number GetWidth ()
 Return the width of the SClippingBox. More...
 
 SClippingBox ()
 Default constructor to create a SClippingBox of size 1. More...
 
 SClippingBox (Array< SComp > tblElm)
 Construct a new SClippingBox corresponding to the bounding box of all the table of elements. More...
 
 SClippingBox (SClippingBox other)
 Construct a SClippingBox by copying another SClippingBox. More...
 
 SClippingBox (SPoint firstPt, SPoint secondPt, SPoint thirdPt, SPoint fourthPt)
 Construct a new SClippingBox by 4 points. More...
 
 SetCenter (SPoint newCenter)
 Set the center of the SClippingBox. More...
 
 SetHeight (number height)
 Set the height (extent along the Z axis) of the SClippingBox. More...
 
 SetLength (number length)
 Set the length (extent along the X axis) of the SClippingBox. More...
 
 SetWidth (number width)
 Set the width (extent along the Y axis) of the SClippingBox. 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< SClippingBoxAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SClippingBox in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SClippingBox in the scene. More...
 
static Array< SClippingBoxFromName (string name)
 Search all the SClippingBox with the given name. More...
 
static Array< SClippingBoxFromSel ()
 Get all the selected SClippingBox. More...
 
static SClippingBox New ()
 Default constructor to create a SClippingBox of size 1. More...
 
static SClippingBox New (Array< SComp > tblElm)
 Construct a new SClippingBox corresponding to the bounding box of all the table of elements. More...
 
static SClippingBox New (SClippingBox other)
 Construct a SClippingBox by copying another SClippingBox. More...
 
static SClippingBox New (SPoint firstPt, SPoint secondPt, SPoint thirdPt, SPoint fourthPt)
 Construct a new SClippingBox by 4 points. 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 box edition and creation methods.

Constructor & Destructor Documentation

◆ SClippingBox() [1/4]

SClippingBox::SClippingBox ( )

Default constructor to create a SClippingBox of size 1.

◆ SClippingBox() [2/4]

SClippingBox::SClippingBox ( Array< SComp tblElm)

Construct a new SClippingBox corresponding to the bounding box of all the table of elements.

Parameters
tblElm(Array<SComp>) The table of elements

◆ SClippingBox() [3/4]

SClippingBox::SClippingBox ( SClippingBox  other)

Construct a SClippingBox by copying another SClippingBox.

Parameters
other(SClippingBox) The SClippingBox to copy

◆ SClippingBox() [4/4]

SClippingBox::SClippingBox ( SPoint  firstPt,
SPoint  secondPt,
SPoint  thirdPt,
SPoint  fourthPt 
)

Construct a new SClippingBox by 4 points.

Parameters
firstPt(SPoint) First point of the box (this point will define a vertex of the box)
secondPt(SPoint) Second point (this point will define the length and the axis X)
thirdPt(SPoint) Third point (this point will define the width and the axis Y)
fourthPt(SPoint) Fourth point (this point will define the height and the axis Z)

Member Function Documentation

◆ All()

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

Get all the SClippingBox in the document.

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

◆ FromClick()

static Object SClippingBox::FromClick ( )
static

Launch an interaction to select a SClippingBox 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 SClippingBox is selected.
  • 1: Nothing is selected.
  • 2: The ESCape key has been pressed
ret.ClippingBox(SClippingBox) The selected SClippingBox

◆ FromName()

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

Search all the SClippingBox with the given name.

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

◆ FromSel()

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

Get all the selected SClippingBox.

Returns
(Array<SClippingBox>) All the selected SClippingBox

◆ GetAxisX()

SVector SClippingBox::GetAxisX ( )

Return the normed axis of the length of the SClippingBox.

Returns
(SVector) The normed axis of the length of the SClippingBox

◆ GetAxisY()

SVector SClippingBox::GetAxisY ( )

Return the normed axis of the width of the SClippingBox.

Returns
(SVector) The normed axis of the width of the SClippingBox

◆ GetAxisZ()

SVector SClippingBox::GetAxisZ ( )

Return the normed axis of the height of the SClippingBox.

Returns
(SVector) The normed axis of the height of the SClippingBox

◆ GetCenter()

SPoint SClippingBox::GetCenter ( )

Return the center of the SClippingBox.

Returns
(SPoint) The center of the SClippingBox

◆ GetHeight()

number SClippingBox::GetHeight ( )

Return the height of the SClippingBox.

Returns
(number) The height (extent along the Z axis) of the SClippingBox

◆ GetLength()

number SClippingBox::GetLength ( )

Return the length of the SClippingBox.

Returns
(number) The length (extent along the X axis) of the SClippingBox

◆ GetLowerPoint()

SPoint SClippingBox::GetLowerPoint ( )

Return the lower point of the SClippingBox.

Note
ie. the origin of the box
Returns
(SPoint) The lower point of the SClippingBox

◆ GetUpperPoint()

SPoint SClippingBox::GetUpperPoint ( )

Return the upper point of the SClippingBox.

Note
ie. the point opposite to the origin of the box given by the formula: origin + Xaxis * length + Yaxis * width + Zaxis * height
Returns
(SPoint) The upper point of the SClippingBox

◆ GetVolume()

number SClippingBox::GetVolume ( )

Return the volume of the SClippingBox.

Returns
(number) The volume of the SClippingBox

◆ GetWidth()

number SClippingBox::GetWidth ( )

Return the width of the SClippingBox.

Returns
(number) The width (extent along the Y axis) of the SClippingBox

◆ New() [1/4]

static SClippingBox SClippingBox::New ( )
static

Default constructor to create a SClippingBox of size 1.

Returns
(SClippingBox) The new SClippingBox.

◆ New() [2/4]

static SClippingBox SClippingBox::New ( Array< SComp tblElm)
static

Construct a new SClippingBox corresponding to the bounding box of all the table of elements.

Parameters
tblElm(Array<SComp>) The table of elements
Returns
(SClippingBox) The new SClippingBox.

◆ New() [3/4]

static SClippingBox SClippingBox::New ( SClippingBox  other)
static

Construct a SClippingBox by copying another SClippingBox.

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

◆ New() [4/4]

static SClippingBox SClippingBox::New ( SPoint  firstPt,
SPoint  secondPt,
SPoint  thirdPt,
SPoint  fourthPt 
)
static

Construct a new SClippingBox by 4 points.

Parameters
firstPt(SPoint) First point of the box (this point will define a vertex of the box)
secondPt(SPoint) Second point (this point will define the length and the axis X)
thirdPt(SPoint) Third point (this point will define the width and the axis Y)
fourthPt(SPoint) Fourth point (this point will define the height and the axis Z)
Returns
(SClippingBox) The new SClippingBox.

◆ SetCenter()

SClippingBox::SetCenter ( SPoint  newCenter)

Set the center of the SClippingBox.

Parameters
newCenter(SPoint) The center to set

◆ SetHeight()

SClippingBox::SetHeight ( number  height)

Set the height (extent along the Z axis) of the SClippingBox.

Parameters
height(number) The height to set

◆ SetLength()

SClippingBox::SetLength ( number  length)

Set the length (extent along the X axis) of the SClippingBox.

Parameters
length(number) The length to set

◆ SetWidth()

SClippingBox::SetWidth ( number  width)

Set the width (extent along the Y axis) of the SClippingBox.

Parameters
width(number) The width to set

◆ toString()

string SClippingBox::toString ( )

Get the type of the variable.

Returns
(string) The type name