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

The SFeature class is an abstract class. More...

#include <SFeature.h>

Inheritance diagram for SFeature:
SComp SObject SCircle SCone SCylinder SLine SPlane SRoundSlot SSphere SSquareSlot

Public Slots

static Array All (Number VisCrit)
 To get all the SComp in the document. More...
 
Array Compare (SCloud iMeasCloud, 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 ()
 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...
 
SPoint GetCenter ()
 
SVector GetNormal ()
 
 SetCenter (SPoint iCenter)
 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 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

The SFeature class is an abstract class.

Member Function Documentation

◆ All

static Array SFeature::All ( Number  VisCrit)
inlinestaticslot

To get all the SComp in the document.

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

◆ Compare

Array SFeature::Compare ( SCloud  iMeasCloud,
Number  DistMax,
Number  MappingObject,
Number  maxCosAngle = -2 
)
slot

Calculates the distances between 2 components for further inspection purpose (color mapping)

Note
The distance is measured by projecting component iMeasCloud on 'this'. 'This' is considered as the reference object while iMeasCloud is considered as the measure to project on 'this'.
The floating value returned on each vertex are >0 if measured points are "over" this (that is: in the way of the normal), otherwise <0 if measured points are under the surface.
Return values
Array.ErrorCodeThe error code.
  • 0 No error.
  • 1 An error occurred.
Array.CloudThe new SCloud, which is the result of the comparison, if MappingObject is set to 2. else Array.Cloud is Undefined
Array.PolyThe new SPoly, which is the result of the comparison, if MappingObject is set to 1. else Array.Poly is Undefined
Array.ReportDataThe new SReportData, which contains the view set with the inspected component.
Parameters
[in]iMeasCloudSCloud considered as the measured object to project on this
[in]DistMaxignore point having a distance greater than this one.
[in]MappingObject1 means color mapping is done on a mesh representing this, else 2 the color mapping is done on iMeasCloud.
[in]maxCosAnglemax cos value for the angle between the triangle and the scanning dir if the cloud contains scanning direction, this parameter can be used to reject points which scanning direction is not valid according to this threshold.
For a value lower than -1, the scanning direction will never invalidate a point For a value equal to 0, the scanning direction and the triangle must be oriented in the same way

◆ FromBfcFile

static Array SFeature::FromBfcFile ( String  iFilePath)
staticslot

To load a .bfc file.

Note
Contours, NPolygons, STUD are not implemented
Warning
File saved using 32 bits architecture cannot be read on 64 bits architecture neither is the opposite possible.
Return values
Array.NominalTbltable containing the nominal features.
Array.MeasuredTbltable containing the measured features.
Array.ErrCodecontains the error code : 0 - Success, 1 - An error occured.
Parameters
[in]iFilePathPath of the file to load

◆ FromClick

static Array SFeature::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.Featurethe SFeature selected

◆ FromName

static Array SFeature::FromName ( String  Name)
inlinestaticslot

Search all the component with the given name.

Return values
Arrayall the SFeature with the given name

◆ FromSel

static Array SFeature::FromSel ( )
staticslot

To get all the selected SComp.

Return values
Arrayall the SFeature selected

◆ GetCenter

SPoint SFeature::GetCenter ( )
slot
Returns
The SFeature center point

◆ GetNormal

SVector SFeature::GetNormal ( )
slot
Returns
The SFeature's normal

◆ SetCenter

SFeature::SetCenter ( SPoint  iCenter)
slot

To set a new center to the SFeature.

Parameters
[in]iCenterThe new center to use

◆ SetNormal

SFeature::SetNormal ( SVector  Normal)
slot

To set a new normal to the SFeature.

Parameters
[in]NormalThe new normal to use

◆ toString [1/2]

String SFeature::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SFeature::toString ( )
staticslot

Get the type of the variable.