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

These are CAD objects manipulation and utility functions. More...

Functions

static Array Convert (SFeature iFeature)
 Convert a feature into a CAD object. More...
 
Array Discretize (SShape iSShape)
 To convert the SShape into a discretized SPoly and a discretized SMultiline. More...
 
static Array Export (String iFilename, Array< SShape > iCompTable, SMatrix iCoordinateSystemMatrix={})
 Export a table of CAD objects in a IGES or STEP file. More...
 
static Array Import (String iFilename)
 Import a IGES or STEP file into a CAD object. More...
 
String toString ()
 Get the type of the variable. More...
 

Detailed Description

These are CAD objects manipulation and utility functions.

Warning
How to use function from namespace SCADUtil ?
Use name of the namespace before to call function.
var result = SCADUtil.Discretize(myShape);
These are CAD objects manipulation and utility functions.
Definition: ZSCADUtil.h:29

Function Documentation

◆ Convert()

static Array SCADUtil::Convert ( SFeature  iFeature)
static

Convert a feature into a 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.ShapeThe converted CAD object.
Parameters
[in]iFeatureThe feature to convert

◆ Discretize()

Array SCADUtil::Discretize ( SShape  iSShape)

To convert the SShape into a discretized SPoly and a discretized SMultiline.

Return values
Array.ErrorCodeThe error code:
  • 0: No error
  • 1: An error occurred
Array.PolyThe discretized SPoly
Array.MultiTblThe array of discretized SMultiline

◆ Export()

static Array SCADUtil::Export ( String  iFilename,
Array< SShape iCompTable,
SMatrix  iCoordinateSystemMatrix = {} 
)
static

Export a table of CAD objects in a IGES or STEP file.

Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 No IGES or STEP file name
  • 2 Not all CAD objects can be save
  • 3 Problem during saving file
Parameters
[in]iFilenameIGES or STEP filename
[in]iCompTableThe table of CAD objects to export
iCoordinateSystemMatrixthe matrix to define a UCS used for the export (or identity to use the WCS)

◆ Import()

static Array SCADUtil::Import ( String  iFilename)
static

Import a IGES or STEP file into a CAD object.

Warning
In Javascript, when you write strings the '\' character is an escape character, you need to use '\\' or '/' instead. Pay especially attention to this when writing file paths in your scripts. For example :
var res = SCADUtil.Import( 'C:/MyCAD.igs' ); // Valid syntax\n
var res2 = SCADUtil.Import( 'C:\\MyCAD.igs' ); // Valid syntax\n
var res3 = SCADUtil.Import( 'C:\MyCAD.igs' ); // Invalid syntax
Return values
Array.ErrorCodeThe error code
  • 0 No error
  • 1 No IGES or STEP file name
  • 2 Failed to retrieve file, waiting too much time!
  • 3 Error occurred while loading the file
  • 4 A general error occurred
Array.ShapeThe imported CAD object.
Parameters
[in]iFilenameIGES or STEP filename

◆ toString()

String SCADUtil::toString ( )

Get the type of the variable.