Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
The scripting environment is composed of two main elements:
Most of scripting classes inherit from SComp which represents a generic object and contains common functions such as SComp.GetBoundingBox().
While browsing the documentation, you may encounter three types of functions:
A member function refers to a class instance, therefore it can only be called from class objects and not from their class name.
It is called through the following syntax: VariableName.MemberFunction().
A static function is a class function, therefore it can only be called from its class and not class objects themselves.
It is called through the following syntax: ClassName.MemberFunction().
Static functions are identifiable in documentation thanks to keyword "static" at the beginning, such as SPoint.FromSel.
Namespaces contain functions that are not linked to a specific object or class.
It can be seen as a place to store functions having a common field of application.
The code syntax is similar to static functions.
Most of data processing methods (except constructors for instance) follow a common scheme, they return a map containing:
The function SPoly.Explode illustrates this rule:
An enumeration provides access to a set of predifined values that can be used as functions parameters.
For readability purpose, they are always written in upper case.