These are CAD objects manipulation and utility functions.
More...
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
◆ 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.ErrorCode | The error code
- 0: No error.
- 1: An error occurred.
|
Array.Shape | The converted CAD object. |
- Parameters
-
[in] | iFeature | The feature to convert |
◆ Discretize()
Array SCADUtil::Discretize |
( |
SShape |
iSShape | ) |
|
To convert the SShape into a discretized SPoly and a discretized SMultiline.
- Return values
-
Array.ErrorCode | The error code:
- 0: No error
- 1: An error occurred
|
Array.Poly | The discretized SPoly |
Array.MultiTbl | The 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.ErrorCode | The 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] | iFilename | IGES or STEP filename |
[in] | iCompTable | The table of CAD objects to export |
| iCoordinateSystemMatrix | the 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' );
var res2 =
SCADUtil.Import(
'C:\\MyCAD.igs' );
var res3 =
SCADUtil.Import(
'C:\MyCAD.igs' );
- Return values
-
Array.ErrorCode | The 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.Shape | The imported CAD object. |
- Parameters
-
[in] | iFilename | IGES or STEP filename |
◆ toString()
String SCADUtil::toString |
( |
| ) |
|
Get the type of the variable.