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

ClippingBox manipulation class. The SClippingBox creation can be done by calling the static functions:
. More...

#include <SClippingBox.h>

Inheritance diagram for SClippingBox:
SClipping SComp SObject

Public Slots

static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
static Array FromClick ()
 Launches a click interaction to select a SComp in the scene. More...
 
static Array FromName (String Name)
 Search all the component with the given name. More...
 
static Array FromSel ()
 To get all the selected SComp. More...
 
SVector GetAxisX ()
 
SVector GetAxisY ()
 
SVector GetAxisZ ()
 
SPoint GetCenter ()
 Set the center of the clipping box. More...
 
Number GetHeight ()
 
Number GetLength ()
 
SPoint GetLowerPoint ()
 Returns the lower point of the clipping box. More...
 
SPoint GetUpperPoint ()
 Returns the upper point of the clipping box. More...
 
Number GetVolume ()
 
Number GetWidth ()
 
static SClippingBox New ()
 Default constructor to create a default clipping box of size 1. More...
 
static SClippingBox New (Array< SComp > TblElm)
 Constructs a new SClippingBox corresponding to the bounding box of all the table of element. More...
 
static SClippingBox New (SClippingBox Other)
 Constructs an SBox by copying the SClippingBox Other. More...
 
static SClippingBox New (SPoint iFirstPt, SPoint iSecondPt, SPoint iThirdPt, SPoint iFourthPt)
 Constructs a new SClippingBox by 3 points. More...
 
 SetCenter (SPoint iNewCenter)
 Set the center of the clipping box. More...
 
 SetHeight (Number iHeight)
 Set the height (extent along the Z axis) for the clipping box. More...
 
 SetLength (Number iLength)
 Set the length (extent along the X axis) for the clipping box. More...
 
 SetWidth (Number iWidth)
 Set the width (extent along the Y axis) for the clipping box. More...
 
String toString ()
 Get the type of the variable. More...
 
static String toString ()
 Get the type of the variable. More...
 
- Public Slots inherited from SClipping
 ActivateInAllScenes ()
 Activate the clipping object in all scenes of its document. More...
 
 ActivateInScene (uint iSceneIndex)
 Activate the clipping object in a given scene. More...
 
static Array All (Number VisCrit)
 To get all the SClipping in the document. 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 of its document. More...
 
 DeactivateInScene (uint iSceneIndex)
 Deactivate the clipping object in a given scene. More...
 
static Array FromClick ()
 Launches a click interaction to select a SClipping in the scene. More...
 
static Array FromName (String Name)
 Search all the component with the given name. More...
 
static Array FromSel ()
 To get all the selected SClipping. More...
 
static Array GetAllActivated (Number VisCrit)
 To get all activated SClipping in the document in the current scene. More...
 
String toString ()
 Get the type of the variable. More...
 
static 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 Slots inherited from SComp
 AddToDoc ()
 To add the object to the document. More...
 
static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
 ApplyTransformation (SMatrix iMatrix)
 To apply a geometric transformation to the current object by making a product with the given matrix. More...
 
 Clear ()
 To deallocate object memory. More...
 
static Array FromClick ()
 Launches a click interaction to select a SComp in the scene. More...
 
static Array FromName (String Name)
 Search all the component with the given name. More...
 
static Array FromSel ()
 To get all the selected SComp. More...
 
Array GetBoundingBox ()
 Calculates the bounding box of the component. More...
 
Array GetColors ()
 To get the colors of the component. More...
 
String GetFolderName ()
 The component containing folder's name. More...
 
String GetName ()
 The component's name. More...
 
String GetPath ()
 To get the full path of a comp in the tree. More...
 
 Invert ()
 Normal of the component is inverted. More...
 
Boolean IsInDoc ()
 Return if the component is in the document or not. More...
 
Boolean IsVisible ()
 
 MoveToGroup (String GroupPath, Boolean MoveInsideTopParent)
 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 ()
 To remove the object from the document. More...
 
 SetClippable (Boolean clipping)
 Set clippable or not. More...
 
 SetColors (Number Red, Number Green, Number Blue)
 Sets the colors of the component. More...
 
 SetName (String ComponentName)
 To set the component's name. More...
 
 SetRepresentationType (RepresentationTypeEnum Representation)
 The shading type of the component is modified. More...
 
 SetTransparency (Number Alpha)
 Sets the transparency of the component. More...
 
 SetVisibility (Boolean Visible)
 Sets the component to be visible, or not visible. More...
 
String toString ()
 Get the type of the variable. More...
 
String toString ()
 Get the type of the variable. More...
 
 Translate (SVector Vector)
 To make a translation of the current object with an SVector. More...
 
- Public Slots inherited from SObject
 Clear ()
 To deallocate memory of the object. More...
 
String toString ()
 Get the type of the variable. More...
 

Additional Inherited Members

- Public Types inherited from SComp
enum  RepresentationTypeEnum {
  SMOOTH , FLAT , WIRE , SMOOTH_WIRE ,
  FLAT_WIRE , SMOOTH_ROTWIRE , FLAT_ROTWIRE , TEXTURE ,
  INSPECTION
}
 The different representation types for inherited classes.
Use (inherited class).SMOOTH. Example: for a cloud, use SCloud.SMOOTH. More...
 

Detailed Description

ClippingBox manipulation class. The SClippingBox creation can be done by calling the static functions:
.

  • New() to create your own empty Clipping box.
  • New() to copy an existing Clipping box.
  • New() to create a new Clipping box with a table of SComp.
  • New() to create a new Clipping box by a corner and 3 points for the 3 directions.
    var simpleClip = SClippingBox.New();
    var clip = SClippingBox.New(
    SPoint.New(10, 10, 10), SPoint.New(15, 0, 0), SPoint.New(10, -20, 10), SPoint.New(10, 10, -25));
    var copyClip = SClippingBox.New(clip);
    var sphere = SSphere.New(SPoint.New(1, 1, 1), 10);
    var clipByComp = SClippingBox.New([sphere]);

Member Function Documentation

◆ All

static Array SClippingBox::All ( Number  VisCrit)
inlinestaticslot

To get all the SComp in the document.

Return values
Arrayall the SClippingBox contained in the document
Parameters
[in]VisCritVisible selection criteria
  • 0 Keep if not visible
  • 1 Keep if visible
  • 2 (Default) Indifferent

◆ FromClick

static Array SClippingBox::FromClick ( )
inlinestaticslot

Launches a click interaction to select a SComp in the scene.

Warning
This function will break the script, and wait for user interaction.
Return values
Array.ErrorCodeThe error code
  • 0: Success, the SComp is selected.
  • 1: Nothing is selected.
  • 2: The ESCape key has been pressed
Array.ClippingBoxthe SClippingBox selected

◆ FromName

static Array SClippingBox::FromName ( String  Name)
inlinestaticslot

Search all the component with the given name.

Return values
Arrayall the SClippingBox with the given name

◆ FromSel

static Array SClippingBox::FromSel ( )
staticslot

To get all the selected SComp.

Return values
Arrayall the SClippingBox selected

◆ GetAxisX

SVector SClippingBox::GetAxisX ( )
inlineslot
Return values
Returnsthe normed axis of the length box

◆ GetAxisY

SVector SClippingBox::GetAxisY ( )
inlineslot
Return values
Returnsthe normed axis of the width box

◆ GetAxisZ

SVector SClippingBox::GetAxisZ ( )
inlineslot
Return values
Returnsthe normed axis of the height box

◆ GetCenter

SPoint SClippingBox::GetCenter ( )
inlineslot

Set the center of the clipping box.

◆ GetHeight

Number SClippingBox::GetHeight ( )
inlineslot
Return values
Returnsthe height (extent along the Z axis) of the clipping box

◆ GetLength

Number SClippingBox::GetLength ( )
inlineslot
Return values
Returnsthe length (extent along the X axis) of the clipping box

◆ GetLowerPoint

SPoint SClippingBox::GetLowerPoint ( )
slot

Returns the lower point of the clipping box.

Note
The lower point is the origin of the box.
Return values
Returnsthe lower point.

◆ GetUpperPoint

SPoint SClippingBox::GetUpperPoint ( )
slot

Returns the upper point of the clipping box.

Note
The upper point is the point opposite to the origin of the box. It is given by the formula: origin + x axis * length + y axis * width + z axis * height.
Return values
Returnsthe upper point.

◆ GetVolume

Number SClippingBox::GetVolume ( )
inlineslot
Return values
Returnsthe volume of the box

◆ GetWidth

Number SClippingBox::GetWidth ( )
inlineslot
Return values
Returnsthe width (extent along the Y axis) of the clipping box

◆ New [1/4]

static SClippingBox SClippingBox::New ( )
staticslot

Default constructor to create a default clipping box of size 1.

◆ New [2/4]

static SClippingBox SClippingBox::New ( Array< SComp TblElm)
staticslot

Constructs a new SClippingBox corresponding to the bounding box of all the table of element.

◆ New [3/4]

static SClippingBox SClippingBox::New ( SClippingBox  Other)
staticslot

Constructs an SBox by copying the SClippingBox Other.

◆ New [4/4]

static SClippingBox SClippingBox::New ( SPoint  iFirstPt,
SPoint  iSecondPt,
SPoint  iThirdPt,
SPoint  iFourthPt 
)
staticslot

Constructs a new SClippingBox by 3 points.

Parameters
[in]iFirstPtFirst point of the box (this point will define a vertex of the box)
[in]iSecondPtSecond point (this point will define the length and the axis X)
[in]iThirdPtThird point (this point will define the width and the axis Y)
[in]iFourthPtFourth point (this point will define the height and the axis Z)

◆ SetCenter

SClippingBox::SetCenter ( SPoint  iNewCenter)
inlineslot

Set the center of the clipping box.

Parameters
[in]iNewCenterThe new center

◆ SetHeight

SClippingBox::SetHeight ( Number  iHeight)
inlineslot

Set the height (extent along the Z axis) for the clipping box.

Parameters
[in]iHeightThe new height of the clipping box

◆ SetLength

SClippingBox::SetLength ( Number  iLength)
inlineslot

Set the length (extent along the X axis) for the clipping box.

Parameters
[in]iLengthThe new length of the clipping box

◆ SetWidth

SClippingBox::SetWidth ( Number  iWidth)
inlineslot

Set the width (extent along the Y axis) for the clipping box.

Parameters
[in]iWidthThe new width of the clipping box

◆ toString [1/2]

String SClippingBox::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SClippingBox::toString ( )
staticslot

Get the type of the variable.