Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2021.
SClippingPlane Class Reference

ClippingPlane manipulation class. The SClippingPlane creation can be done by calling the static functions:
. More...

Inheritance diagram for SClippingPlane:
SClipping SComp SObject

Public Slots

static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
static Array FromClick ()
 Displays a dialog box to select an 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...
 
Number GetCurvilinearAbscissa ()
 Get the current curvilinear abscissa of the plane along its path. More...
 
Number GetDepth ()
 Get the depth of the clipping plane. More...
 
Array GetDirection ()
 Get the directions of the clipping plane. More...
 
Array GetPath ()
 Get the path of the clipping plane as a polyline. More...
 
SPoint GetPosition ()
 Set the center of the clipping plane. More...
 
Number GetStep ()
 Get the step of the clipping plane. More...
 
Boolean HasPath ()
 Does the clipping have a path? More...
 
SMatrix Move (Number iDistance)
 Move the clipping plane to a certain distance along its normal or its path if defined. More...
 
SMatrix MoveInDirectionOf (SPoint iTargetPoint, Boolean iReprojectPoint)
 Move the clipping plane in direction of a given point along its normal or its path if defined. More...
 
static SClippingPlane New ()
 Default constructor to create an empty new SClippingPlane. More...
 
static SClippingPlane New (SClippingPlane _iOther)
 Constructs an SPlane by copying the SClippingPlane Other. More...
 
static SClippingPlane New (SMultiline _iPath)
 Constructs a new SClippingPlane by defining its path. More...
 
static SClippingPlane New (SPlane _iPlane)
 Constructs a new SClippingPlane by defining its plane. More...
 
static SClippingPlane New (SPoint iCenter, SVector iNormal)
 Constructs a new SClippingPlane by defining its data. More...
 
 SetDepth (Number iStep)
 Set the depth for the clipping plane. More...
 
 SetDirection (SVector iNormal, SVector iXDir)
 Set the normal of the clipping plane. More...
 
 SetPosition (SPoint iNewCenter)
 Set the center of the clipping plane. More...
 
 SetStep (Number iDepth)
 Set the step for the clipping plane. 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 ()
 Displays a dialog box to select an 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 ()
 Displays a dialog box to select an 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 ()
 
String GetName ()
 
 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

ClippingPlane manipulation class. The SClippingPlane creation can be done by calling the static functions:
.

  • New() to create your own empty SPlane.
  • New() to copy an existing SPlane.
  • New() to create a new SPlane by defining its center, normal, X axis, length and width.
    var center = SPoint.New(1, 1, 2);
    var normal = SVector.New(0, 1, 0);
    var dirX = SVector.New(0, 0, 1);
    var length = 25;
    var width = 12;
    var emptySPlane = SPlane.New();
    var mySPlane = SPlane.New(center, normal, dirX, length, width);
    var mySPlaneCopy = SPlane.New(mySPlane);

Member Function Documentation

◆ All

static Array SClippingPlane::All ( Number  VisCrit)
inlinestaticslot

To get all the SComp in the document.

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

◆ FromClick

static Array SClippingPlane::FromClick ( )
inlinestaticslot

Displays a dialog box to select an 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.ClippingPlanethe SClippingPlane selected

◆ FromName

static Array SClippingPlane::FromName ( String  Name)
inlinestaticslot

Search all the component with the given name.

Return values
Arrayall the SClippingPlane with the given name

◆ FromSel

static Array SClippingPlane::FromSel ( )
staticslot

To get all the selected SComp.

Return values
Arrayall the SClippingPlane selected

◆ GetCurvilinearAbscissa

Number SClippingPlane::GetCurvilinearAbscissa ( )
inlineslot

Get the current curvilinear abscissa of the plane along its path.

Note
If the clipping doesn't have a path, this value means nothing.

◆ GetDepth

Number SClippingPlane::GetDepth ( )
inlineslot

Get the depth of the clipping plane.

Returns
Return values
0No depth, it's a single clipping plane
>0It's a Number clipping plane and the distance between the 2 planes is the depth.

◆ GetDirection

Array SClippingPlane::GetDirection ( )
slot

Get the directions of the clipping plane.

Return values
Array.NormalThe normal of the plane
Array.XDirThe X direction to orient the plane. can be (0,0,0)

◆ GetPath

Array SClippingPlane::GetPath ( )
slot

Get the path of the clipping plane as a polyline.

◆ GetPosition

SPoint SClippingPlane::GetPosition ( )
inlineslot

Set the center of the clipping plane.

Note
The center may repositioned to be at the middle of the bounding box of the clipped objects.
Return values
trueIf the center has been changed
falseIf the center didn't change because of step constraint or distance from last position null.

◆ GetStep

Number SClippingPlane::GetStep ( )
inlineslot

Get the step of the clipping plane.

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

◆ HasPath

Boolean SClippingPlane::HasPath ( )
inlineslot

Does the clipping have a path?

◆ Move

SMatrix SClippingPlane::Move ( Number  iDistance)
inlineslot

Move the clipping plane to a certain distance along its normal or its path if defined.

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

◆ MoveInDirectionOf

SMatrix SClippingPlane::MoveInDirectionOf ( SPoint  iTargetPoint,
Boolean  iReprojectPoint 
)
inlineslot

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

Parameters
[in]iTargetPointThe target point
[in]iReprojectPointShould we re-project 'iTargetPoint' onto the clipping plane's normal or path? CAUTION: set this boolean to 'false' only 'iTargetPoint' is already onto the clipping plane's normal or path.

◆ New [1/5]

static SClippingPlane SClippingPlane::New ( )
staticslot

Default constructor to create an empty new SClippingPlane.

◆ New [2/5]

static SClippingPlane SClippingPlane::New ( SClippingPlane  _iOther)
staticslot

Constructs an SPlane by copying the SClippingPlane Other.

◆ New [3/5]

static SClippingPlane SClippingPlane::New ( SMultiline  _iPath)
staticslot

Constructs a new SClippingPlane by defining its path.

◆ New [4/5]

static SClippingPlane SClippingPlane::New ( SPlane  _iPlane)
staticslot

Constructs a new SClippingPlane by defining its plane.

◆ New [5/5]

static SClippingPlane SClippingPlane::New ( SPoint  iCenter,
SVector  iNormal 
)
staticslot

Constructs a new SClippingPlane by defining its data.

Parameters
[in]iCenterThe plane's center
[in]iNormalThe plane's normal

◆ SetDepth

SClippingPlane::SetDepth ( Number  iStep)
inlineslot

Set the depth for the clipping plane.

Parameters
[in]iStepThe new depth of the clipping plane > 0 to define a Number clipping plane Otherwise the clipping plane has only 1 plane

◆ SetDirection

SClippingPlane::SetDirection ( SVector  iNormal,
SVector  iXDir 
)
inlineslot

Set the normal of the clipping plane.

Parameters
[in]iNormalThe normal of the plane
[in]iXDirIf not nullptr the X direction to orient the plane

◆ SetPosition

SClippingPlane::SetPosition ( SPoint  iNewCenter)
inlineslot

Set the center of the clipping plane.

Note
The center may repositioned to be at the middle of the bounding box of the clipped objects.
Return values
trueIf the center has been changed
falseIf the center didn't change because of step constraint or distance from last position null.
Parameters
[in]iNewCenterThe new center

◆ SetStep

SClippingPlane::SetStep ( Number  iDepth)
inlineslot

Set the step for the clipping plane.

Parameters
[in]iDepthThe new step of the clipping plane > 0 The fixed distance used to move the clipping plane using the mouse wheel No step, clipping plane movements using the mouse wheel are computed automatically

◆ toString [1/2]

String SClippingPlane::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SClippingPlane::toString ( )
staticslot

Get the type of the variable.