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

Circle manipulation class. The SCircle creation can be done by calling the static functions:
. More...

Inheritance diagram for SCircle:
SFeature SComp SObject

Public Slots

static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
Array Discretize (Number deflection, Number meanPointDistance)
 To convert the continuous feature into a discretized SMultiline. To use the deflection, put a positive value and set -1 to meanPointDistance To use the mean distance between points, put a positive value and set 0 to deflection To use default value, set 0 in deflection or meanPointDistance. More...
 
Number Distance (SPoint Point, Boolean CalcIn3D)
 Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outside the feature. 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 GetPerimeter ()
 Returns the perimeter of the feature. More...
 
Number GetRadius ()
 
static SCircle New ()
 Default constructor to create an empty new SCircle. More...
 
static SCircle New (SCircle Other)
 Constructs an SCircle by copying Other. More...
 
static SCircle New (SLine tang1, SLine tang2, SPoint Pt, Boolean LargeQ)
 Constructs a new SCircle tangent to the two FLines and passing through Pt. More...
 
static SCircle New (SPoint Center, SVector Normal, Number Radius)
 Constructs a new SCircle by defining its data. More...
 
static SCircle New (SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt)
 Constructs a new SCircle by 3 points. More...
 
SCircle NewC (SCloud inCloud)
 
 SetRadius (Number Radius)
 To set a new radius to the SCircle. More...
 
String toString ()
 Get the type of the variable. More...
 
static String toString ()
 Get the type of the variable. More...
 
- Public Slots inherited from SFeature
static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
Array Compare (SCloud MeasCloud, Number DistMax, Number MappingObject, Number maxCosAngle=-2)
 Calculates the distances between 2 components for further inspection purpose (color mapping) More...
 
static Array FromBfcFile (String iFilePath)
 To load a .bfc file. 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...
 
SPoint GetCenter ()
 
SVector GetNormal ()
 
 SetCenter (SPoint Center)
 To set a new center to the SFeature. More...
 
 SetNormal (SVector Normal)
 To set a new normal to the SFeature. More...
 
String toString ()
 Get the type of the variable. More...
 
static String toString ()
 Get the type of the variable. 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 Matrix)
 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

Circle manipulation class. The SCircle creation can be done by calling the static functions:
.

  • New() to create your own empty SCircle.
  • New() to copy an existing SCircle.
  • New() to create a new SCircle by defining its center, normal and radius.
    var center = SPoint.New(1, 1, 2);
    var normal = SVector.New(0, 1, 0);
    var radius = 25;
    var emptySCircle = SCircle.New();
    var mySCircle = SCircle.New(center, normal, radius);
    var mySCircleCopy = SCircle.New(mySCircle);

Member Function Documentation

◆ All

static Array SCircle::All ( Number  VisCrit)
inlinestaticslot

To get all the SComp in the document.

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

◆ Discretize

Array SCircle::Discretize ( Number  deflection,
Number  meanPointDistance 
)
slot

To convert the continuous feature into a discretized SMultiline. To use the deflection, put a positive value and set -1 to meanPointDistance To use the mean distance between points, put a positive value and set 0 to deflection To use default value, set 0 in deflection or meanPointDistance.

Return values
Array.ErrorCodeThe error code:
  • 0: No error
  • 1: An error occurred
Array.MultiThe discretized SMultiline
Parameters
[in]deflectionmax deviation between the ideal shape and the discretized element
[in]meanPointDistanceMean distance between points/vertices

◆ Distance

Number SCircle::Distance ( SPoint  Point,
Boolean  CalcIn3D 
)
slot

Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outside the feature.

Parameters
[in]Pointthe point from which the distance to the feature has to be calculated
[in]CalcIn3Dshould we calculate the deviation in 3D

◆ FromClick

static Array SCircle::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.Circlethe SCircle selected

◆ FromName

static Array SCircle::FromName ( String  Name)
inlinestaticslot

Search all the component with the given name.

Return values
Arrayall the SCircle with the given name

◆ FromSel

static Array SCircle::FromSel ( )
inlinestaticslot

To get all the selected SComp.

Return values
Arrayall the SCircle selected

◆ GetPerimeter

Number SCircle::GetPerimeter ( )
slot

Returns the perimeter of the feature.

◆ GetRadius

Number SCircle::GetRadius ( )
slot
Returns
The SCircle's radius

◆ New [1/5]

static SCircle SCircle::New ( )
staticslot

Default constructor to create an empty new SCircle.

◆ New [2/5]

static SCircle SCircle::New ( SCircle  Other)
staticslot

Constructs an SCircle by copying Other.

◆ New [3/5]

static SCircle SCircle::New ( SLine  tang1,
SLine  tang2,
SPoint  Pt,
Boolean  LargeQ 
)
staticslot

Constructs a new SCircle tangent to the two FLines and passing through Pt.

Note
The two lines are assumed to intersect
Even though also for not intersecting lines a result will be produced
Parameters
[in]tang1The first tangent
[in]tang2The second tangent
[in]PtThe point through which the circle passes
[in]LargeQReturn the large circle or the small one?

◆ New [4/5]

static SCircle SCircle::New ( SPoint  Center,
SVector  Normal,
Number  Radius 
)
staticslot

Constructs a new SCircle by defining its data.

Parameters
[in]CenterThe SCircle center
[in]NormalThe SCircle normal, (not null)
[in]RadiusThe SCircle radius

◆ New [5/5]

static SCircle SCircle::New ( SPoint  FirstPt,
SPoint  SecondPt,
SPoint  ThirdPt 
)
staticslot

Constructs a new SCircle by 3 points.

Note
The 3 points must be not identical.
If you want to construct a circle with more than 3 points, use SCloud.BestCircle().
Parameters
[in]FirstPtFirst point on the circle
[in]SecondPtSecond point on the circle
[in]ThirdPtThird point on the circle

◆ NewC

SCircle SCircle::NewC ( SCloud  inCloud)
slot

◆ SetRadius

SCircle::SetRadius ( Number  Radius)
slot

To set a new radius to the SCircle.

Parameters
[in]RadiusThe new radius to use

◆ toString [1/2]

String SCircle::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SCircle::toString ( )
staticslot

Get the type of the variable.