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

Shape manipulation class. The SShape creation can be done by calling the static function New() to copy an existing SShape. More...

Inheritance diagram for SShape:
SComp SObject

Public Types

enum  FillingType { FLATTEST , MEDIUM , MOST_CURVED }
 The type of filling to use. More...
 
enum  SmoothingMethod { INTERPOLATE , APPROXIMATE }
 Smoothing method used for BSpline curve creation. More...
 
- 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...
 

Public Slots

static Array AddHoles (SShape iSurface, Array< SShape > iLinearTable)
 Create holes to a CAD Surface from closed CAD edge and CAD wire. More...
 
static Array AddRestriction (SShape iSurface, SShape iWireRestriction)
 Create restriction to a CAD Surface from a closed CAD wire. More...
 
static Array All (Number VisCrit)
 To get all the SShape in the document. More...
 
static SShape CreateCompound (Array< SShape > iOthers)
 Constructs a SShape compound from the given shape list. More...
 
static SShape CreateTriangulatedSurface (SPoly iPoly)
 Constructs a SShape triangulated surface by converting a SPoly. More...
 
static Array CreateWire (Array< SShape > iEdgeTable)
 Construct a new CAD wire by connecting all CAD edges. More...
 
Array Explode ()
 Explode the CAD object. More...
 
static Array ExtractCurve (Array< SShape > iCompTable)
 Extract free border from surfacic SShape as curves. More...
 
static Array ExtractWire (Array< SShape > iCompTable)
 Extract free borders from surfacic SShape as wire. More...
 
static Array Fill (SShape iWire, FillingType iFillingType)
 Create a filling surface from CAD wire. You have to enter the command with a closed wire composed of 3 or 4 edges. More...
 
static Array FitOnMesh (SShape iSurface, SPoly iMesh, Boolean iImmobileUMin, Boolean iImmobileUMax, Boolean iImmobileVMin, Boolean iImmobileVMax, Boolean iProjBadPtsOnCloud)
 Fit a CAD Surface on a mesh. More...
 
static Array FromClick ()
 Displays a dialog box to select an SShape in the scene. More...
 
static Array FromName (String Name)
 Search all the SShape with the given name. More...
 
static Array FromSel ()
 To get all the selected SShape. More...
 
static Array LinearExtrusion (Number iLength, SVector iDirection, Boolean iCloseExtremities, Array< SComp > iShapes)
 Compute CAD face(s) corresponding to the extrusion of profile(s) along a direction, with a given length. More...
 
static SShape New (SMultiline iMultiline, SmoothingMethod iMethod)
 Constructs a new BSpline curve by smoothing (interpolation or approximation) a SMultiline. More...
 
static SShape New (SShape Other)
 Constructs a SShape by copying Other. More...
 
static Array PipeTubeAlongPath (Number iRadius, Boolean iCloseExtremities, Array< SComp > iShapes)
 Compute CAD face(s) corresponding to the extrusion of a circle with a given radius along a given path. More...
 
static Array ProfileAlongPath (SComp iProfile, SComp iPath, Boolean iMakePerpendicular, Boolean iStartAtProfilePosition, Boolean iCloseExtremities)
 Compute CAD face corresponding to the extrusion of a given profile along a given path. More...
 
static Array Sew (Array< SShape > iCompTable, Number iSewingTolerance)
 Sew surfacic SShape according to a given tolerance. 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 ()
 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...
 

Detailed Description

Shape manipulation class. The SShape creation can be done by calling the static function New() to copy an existing SShape.

Member Enumeration Documentation

◆ FillingType

The type of filling to use.

Enumerator
FLATTEST 

to have the flattest patch

MEDIUM 
MOST_CURVED 

to have the most rounded patch

◆ SmoothingMethod

Smoothing method used for BSpline curve creation.

Enumerator
INTERPOLATE 

smoothing by interpolation

APPROXIMATE 

smoothing by approximation (with automatic tolerance)

Member Function Documentation

◆ AddHoles

static Array SShape::AddHoles ( SShape  iSurface,
Array< SShape iLinearTable 
)
staticslot

Create holes to a CAD Surface from closed CAD edge and CAD wire.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 Wrong inputs type
  • 2 Wire or edge is open
  • 3 An error occured
Array.Shapethe computed surface
Parameters
[in]iSurfaceThe surface to add holes in
[in]iLinearTableThe table of edges and wires used for the holes

◆ AddRestriction

static Array SShape::AddRestriction ( SShape  iSurface,
SShape  iWireRestriction 
)
staticslot

Create restriction to a CAD Surface from a closed CAD wire.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 Wrong inputs type
  • 2 Wire is open
  • 3 An error occured
Array.Shapethe restricted surface
Parameters
[in]iSurfaceThe surface to restrict
[in]iWireRestrictionThe wire used for the restriction

◆ All

static Array SShape::All ( Number  VisCrit)
inlinestaticslot

To get all the SShape in the document.

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

◆ CreateCompound

static SShape SShape::CreateCompound ( Array< SShape iOthers)
staticslot

Constructs a SShape compound from the given shape list.

Note
You need a valid AEC license to access this feature.

◆ CreateTriangulatedSurface

static SShape SShape::CreateTriangulatedSurface ( SPoly  iPoly)
staticslot

Constructs a SShape triangulated surface by converting a SPoly.

Note
You need a valid AEC license to access this feature.

◆ CreateWire

static Array SShape::CreateWire ( Array< SShape iEdgeTable)
staticslot

Construct a new CAD wire by connecting all CAD edges.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 An error occured
Array.Shapethe created wire
Parameters
[in]iEdgeTableThe table of edges to be connected

◆ Explode

Array SShape::Explode ( )
slot

Explode the CAD object.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0: No error.
  • 1: An error occurred.
Array.ShapeTblThe exploded CAD object table.

◆ ExtractCurve

static Array SShape::ExtractCurve ( Array< SShape iCompTable)
staticslot

Extract free border from surfacic SShape as curves.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 An error occurred
Array.ShapeTblThe extracted curves table.
Parameters
[in]iCompTableThe table of surfacic SShape to extract

◆ ExtractWire

static Array SShape::ExtractWire ( Array< SShape iCompTable)
staticslot

Extract free borders from surfacic SShape as wire.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 An error occurred
Array.ShapeTblThe extracted wires table.
Parameters
[in]iCompTableThe table of surfacic SShape to extract

◆ Fill

static Array SShape::Fill ( SShape  iWire,
FillingType  iFillingType 
)
staticslot

Create a filling surface from CAD wire. You have to enter the command with a closed wire composed of 3 or 4 edges.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 Wrong input
  • 2 Wire is open
  • 3 Wire must be composed of 3 or 4 edges
  • 4 An error occured
Array.Shapethe filled surface
Parameters
[in]iWireThe wire to fill
[in]iFillingTypeThe filling method to use

◆ FitOnMesh

static Array SShape::FitOnMesh ( SShape  iSurface,
SPoly  iMesh,
Boolean  iImmobileUMin,
Boolean  iImmobileUMax,
Boolean  iImmobileVMin,
Boolean  iImmobileVMax,
Boolean  iProjBadPtsOnCloud 
)
staticslot

Fit a CAD Surface on a mesh.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 Wrong inputs
  • 2 An error occured
Array.Shapethe surface fitted on the mesh
Parameters
[in]iSurfaceThe surface to fit
[in]iMeshThe mesh to fit on
[in]iImmobileUMinIf true, poles on the edges UMin must stay immobile. Otherwise they can move
[in]iImmobileUMaxIf true, poles on the edges UMax must stay immobile. Otherwise they can move
[in]iImmobileVMinIf true, poles on the edges VMin must stay immobile. Otherwise they can move
[in]iImmobileVMaxIf true, poles on the edges VMax must stay immobile. Otherwise they can move
[in]iProjBadPtsOnCloudIf true, control points with bad projection will be fit on cloud instead

◆ FromClick

static Array SShape::FromClick ( )
inlinestaticslot

Displays a dialog box to select an SShape in the scene.

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

◆ FromName

static Array SShape::FromName ( String  Name)
inlinestaticslot

Search all the SShape with the given name.

Return values
Arrayall the SShape with the given name

◆ FromSel

static Array SShape::FromSel ( )
staticslot

To get all the selected SShape.

Return values
Arrayall the SShape selected

◆ LinearExtrusion

static Array SShape::LinearExtrusion ( Number  iLength,
SVector  iDirection,
Boolean  iCloseExtremities,
Array< SComp iShapes 
)
staticslot

Compute CAD face(s) corresponding to the extrusion of profile(s) along a direction, with a given length.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe generated error code:
  • 0 : no error occurred
  • 1 : an error occurred
Array.CompTblExtruded comps
Parameters
[in]iLengththe length of the extrusion
[in]iDirectionthe direction of the extrusion
[in]iCloseExtremitiestrue if extremities of the extruded comp have to be closed. Profiles must be planar to close extremities
[in]iShapesall the profiles to extrude

◆ New [1/2]

static SShape SShape::New ( SMultiline  iMultiline,
SmoothingMethod  iMethod 
)
staticslot

Constructs a new BSpline curve by smoothing (interpolation or approximation) a SMultiline.

Parameters
[in]iMultilineThe SMultiline to interpolate or approximate
[in]iMethodThe smoothing method for BSpline curve creation

◆ New [2/2]

static SShape SShape::New ( SShape  Other)
staticslot

Constructs a SShape by copying Other.

◆ PipeTubeAlongPath

static Array SShape::PipeTubeAlongPath ( Number  iRadius,
Boolean  iCloseExtremities,
Array< SComp iShapes 
)
staticslot

Compute CAD face(s) corresponding to the extrusion of a circle with a given radius along a given path.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe generated error code:
  • 0 : no error occurred
  • 1 : an error occurred
Array.ShapeTblExtruded shapes
Parameters
[in]iRadiusthe radius of the circle to extrude
[in]iCloseExtremitiestrue if extremities of the extruded comp have to be closed
[in]iShapesall the paths to follow

◆ ProfileAlongPath

static Array SShape::ProfileAlongPath ( SComp  iProfile,
SComp  iPath,
Boolean  iMakePerpendicular,
Boolean  iStartAtProfilePosition,
Boolean  iCloseExtremities 
)
staticslot

Compute CAD face corresponding to the extrusion of a given profile along a given path.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe generated error code:
  • 0 : no error occurred
  • 1 : bad iProfile or iPath type
  • 2 : computation error
Array.CompExtruded comp
Parameters
[in]iProfilethe profile
[in]iPaththe path
[in]iMakePerpendiculartrue if the profile to extrude has to be perpendicular to the first vector of the path
[in]iStartAtProfilePositiontrue if the extrusion has to begin at profile and not at path position
[in]iCloseExtremitiestrue if extremities of the extruded comp have to be closed. iProfile must be planar to close extremities

◆ Sew

static Array SShape::Sew ( Array< SShape iCompTable,
Number  iSewingTolerance 
)
staticslot

Sew surfacic SShape according to a given tolerance.

Note
You need a valid AEC license to access this feature.
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 Wrong input type
  • 2 An error occurred
Array.ShapeSewed shape, can be a SShape compound
Parameters
[in]iCompTableThe table of SShape to sew
[in]iSewingToleranceTolerance used for sewing

◆ toString [1/2]

String SShape::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SShape::toString ( )
staticslot

Get the type of the variable.