Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2025.
Loading...
Searching...
No Matches
SRegularPolygon Class Reference
Inheritance diagram for SRegularPolygon:
SFeature SComp

Public Member Functions

number GetInnerDiameter ()
 Return the inner diameter of the regular polygon.
 
number GetNumberOfSides ()
 Return the number of sides of regular polygon.
 
number GetOuterDiameter ()
 Return the outer diameter of regular polygon.
 
 Revert ()
 Revert the normal of the polygon.
 
 SetInnerDiameter (number inner diameter)
 Set the inner diameter.
 
 SetNumberOfSides (number numberOfSides)
 Set the number of sides of the regular polygon (>3)
 
 ShowNormal (boolean boolean)
 Display or not the normal of the polygon.
 
 SRegularPolygon ()
 Default constructor to create an empty new SRegularPolygon.
 
 SRegularPolygon (SPoint point, SVector normal, SVector xDir, number numberOfSides, number innerDiameter)
 Construct an SRegularPolygon from several parameters.
 
 SRegularPolygon (SRegularPolygon other)
 Construct an SRegularPolygon by copying another SRegularPolygon.
 
string toString ()
 Get the type of the variable.
 
- Public Member Functions inherited from SFeature
Object Compare (SCloud measCloud, number distMax, number mappingObject=1, number maxCosAngle=-2)
 Calculate the distances between 2 components for further inspection purpose (color mapping)
 
SPoint GetCenter ()
 Return the center of the feature.
 
SVector GetNormal ()
 Return the normal of the feature.
 
 SetCenter (SPoint center)
 Set the center.
 
 SetNormal (SVector normal)
 Set the normal.
 
string toString ()
 Get the type of the variable.
 
- Public Member Functions inherited from SComp
 AddToDoc ()
 Add the object to the document.
 
 ApplyTransformation (SMatrix matrix)
 Apply a geometric transformation to the current object by making a product with the given matrix.
 
Object GetBoundingBox (SMatrix ucs=null)
 Calculate the bounding box of the object.
 
Object GetColors ()
 Get the colors of the object.
 
string GetFolderName ()
 Get the name of the folder containing the object.
 
string GetName ()
 Return the object's name.
 
string GetPath ()
 Return the full path of an SComp in the tree.
 
 Invert ()
 Invert the normal of the object.
 
boolean IsInDoc ()
 Return if the object is in the document or not.
 
boolean IsVisible ()
 Get the visibility of the object.
 
 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.
 
 RemoveFromDoc ()
 Remove the object from the document.
 
 SetClippable (boolean clipping)
 Set clippable or not.
 
 SetColors (number red, number green, number blue)
 Set the colors of the object.
 
 SetName (string objectName)
 Set the object's name.
 
 SetTransparency (number alpha)
 Set the transparency of the object.
 
 SetVisibility (boolean visible)
 Set the object to be visible, or not visible.
 
string toString ()
 Get the type of the variable.
 
 Translate (SVector vector)
 Make a translation of the current object with an SVector.
 

Static Public Member Functions

static Array< SRegularPolygonAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SRegularPolygon in the document.
 
static Object FromClick ()
 Launch an interaction to select a SRegularPolygon in the scene.
 
static Array< SRegularPolygonFromName (string name)
 Search all the SRegularPolygon with the given name.
 
static Array< SRegularPolygonFromSel ()
 Get all the selected SRegularPolygon.
 
static SRegularPolygon New ()
 Default constructor to create an empty new SRegularPolygon.
 
static SRegularPolygon New (SPoint point, SVector normal, SVector xDir, number numberOfSides, number innerDiameter)
 Construct an SRegularPolygon from several parameters.
 
static SRegularPolygon New (SRegularPolygon other)
 Construct an SRegularPolygon by copying another SRegularPolygon.
 
- Static Public Member Functions inherited from SFeature
static Array< SFeatureAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SFeature in the document.
 
static Object FromBfcFile (string filePath)
 Load a .bfc file.
 
static Object FromClick ()
 Launch an interaction to select a SFeature in the scene.
 
static Array< SFeatureFromName (string name)
 Search all the SFeature with the given name.
 
static Array< SFeatureFromSel ()
 Get all the selected SFeature.
 
- Static Public Member Functions inherited from SComp
static Array< SCompAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SComp in the document.
 
static Object FromClick ()
 Launch an interaction to select a SComp in the scene.
 
static Array< SCompFromName (string name)
 Search all the SComp with the given name.
 
static Array< SCompFromSel ()
 Get all the selected SComp.
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SRegularPolygon() [1/2]

SRegularPolygon::SRegularPolygon ( SPoint point,
SVector normal,
SVector xDir,
number numberOfSides,
number innerDiameter )

Construct an SRegularPolygon from several parameters.

Parameters
point(SPoint) The center of the regular polygon.
normal(SVector) The normal of the regular polygon.
xDir(SVector) The x direction of the regular polygon.
numberOfSides(number) The number of sides of the regular polygon.
innerDiameter(number) The inner diameter of the regular polygon.

◆ SRegularPolygon() [2/2]

SRegularPolygon::SRegularPolygon ( SRegularPolygon other)

Construct an SRegularPolygon by copying another SRegularPolygon.

Parameters
other(SRegularPolygon) The SRegularPolygon to copy.

Member Function Documentation

◆ All()

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

Get all the SRegularPolygon in the document.

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

◆ FromClick()

static Object SRegularPolygon::FromClick ( )
static

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

◆ FromName()

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

Search all the SRegularPolygon with the given name.

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

◆ FromSel()

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

Get all the selected SRegularPolygon.

Returns
(Array<SRegularPolygon>) All the selected SRegularPolygon

◆ GetInnerDiameter()

number SRegularPolygon::GetInnerDiameter ( )

Return the inner diameter of the regular polygon.

Returns
(number) The inner diameter of the regular polygon

◆ GetNumberOfSides()

number SRegularPolygon::GetNumberOfSides ( )

Return the number of sides of regular polygon.

Returns
(number) The number of sides of the regular polygon

◆ GetOuterDiameter()

number SRegularPolygon::GetOuterDiameter ( )

Return the outer diameter of regular polygon.

Returns
(number) The outer diameter of the regular polygon

◆ New() [1/3]

static SRegularPolygon SRegularPolygon::New ( )
static

Default constructor to create an empty new SRegularPolygon.

Returns
(SRegularPolygon) The new SRegularPolygon.

◆ New() [2/3]

static SRegularPolygon SRegularPolygon::New ( SPoint point,
SVector normal,
SVector xDir,
number numberOfSides,
number innerDiameter )
static

Construct an SRegularPolygon from several parameters.

Parameters
point(SPoint) The center of the regular polygon.
normal(SVector) The normal of the regular polygon.
xDir(SVector) The x direction of the regular polygon.
numberOfSides(number) The number of sides of the regular polygon.
innerDiameter(number) The inner diameter of the regular polygon.
Returns
(SRegularPolygon) The new SRegularPolygon.

◆ New() [3/3]

static SRegularPolygon SRegularPolygon::New ( SRegularPolygon other)
static

Construct an SRegularPolygon by copying another SRegularPolygon.

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

◆ SetInnerDiameter()

SRegularPolygon::SetInnerDiameter ( number inner diameter)

Set the inner diameter.

Parameters
innerdiameter (number) The inner diameter to set

◆ SetNumberOfSides()

SRegularPolygon::SetNumberOfSides ( number numberOfSides)

Set the number of sides of the regular polygon (>3)

Parameters
numberOfSides(number) The number of sides

◆ ShowNormal()

SRegularPolygon::ShowNormal ( boolean boolean)

Display or not the normal of the polygon.

Parameters
boolean(boolean) True if show false otherwise

◆ toString()

string SRegularPolygon::toString ( )

Get the type of the variable.

Returns
(string) The type name