Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Shape manipulation class. More...
Public Types | |
enum | FillingTypeEnum { FLATTEST = 0 , MEDIUM = 1 , MOST_CURVED = 2 } |
The type of filling to use. More... | |
enum | SmoothingMethod { INTERPOLATE = 0 , APPROXIMATE = 1 , NONE = 2 } |
Smoothing method used for BSpline curve creation. More... | |
Public Types inherited from SComp | |
enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } |
Visible criteria. More... | |
Public Member Functions | |
Object | Explode () |
Explode the CAD object. More... | |
SShape () | |
Default constructor. More... | |
SShape (SMultiline multiline, SmoothingMethod method) | |
Construct a new BSpline curve by smoothing (interpolation or approximation) a SMultiline. More... | |
SShape (SShape other) | |
Construct a SShape by copying the SShape Other. More... | |
string | toString () |
Get the type of the variable. More... | |
string | ValuesToString () |
Get a debug string representation of the shape. More... | |
Public Member Functions inherited from SComp | |
AddToDoc () | |
Add the object to the document. More... | |
ApplyTransformation (SMatrix matrix) | |
Apply a geometric transformation to the current object by making a product with the given matrix. More... | |
Object | GetBoundingBox (SMatrix ucs=null) |
Calculate the bounding box of the object. More... | |
Object | GetColors () |
Get the colors of the object. More... | |
string | GetFolderName () |
Get the name of the folder containing the object. More... | |
string | GetName () |
Return the object's name. More... | |
string | GetPath () |
Return the full path of a SComp in the tree. More... | |
Invert () | |
Invert the normal of the object. More... | |
boolean | IsInDoc () |
Return if the object is in the document or not. More... | |
boolean | IsVisible () |
Get the visibility of the object. More... | |
MoveToGroup (string groupPath, boolean moveInsideTopParent=true) | |
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 () | |
Remove the object from the document. More... | |
SetClippable (boolean clipping) | |
Set clippable or not. More... | |
SetColors (number red, number green, number blue) | |
Set the colors of the object. More... | |
SetName (string objectName) | |
Set the object's name. More... | |
SetTransparency (number alpha) | |
Set the transparency of the object. More... | |
SetVisibility (boolean visible) | |
Set the object to be visible, or not visible. More... | |
string | toString () |
Get the type of the variable. More... | |
Translate (SVector vector) | |
Make a translation of the current object with an SVector. More... | |
Static Public Member Functions | |
static Object | AddHoles (SShape surface, Array< SShape > linearTable) |
Create holes to a CAD Surface from closed CAD edge and CAD wire. More... | |
static Object | AddRestriction (SShape surface, SShape wireRestriction) |
Create restriction to a CAD Surface from a closed CAD wire. More... | |
static Array< SShape > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
Get all the SShape in the document. More... | |
static SShape | CreateCompound (Array< SShape > others) |
Construct a SShape compound from the given shape list. More... | |
static SShape | CreateTriangulatedSurface (SPoly poly) |
Construct a SShape triangulated surface by converting a SPoly. More... | |
static Object | CreateWire (Array< SShape > edgeTable) |
Construct a new CAD wire by connecting all CAD edges. More... | |
static Object | ExtractCurve (Array< SShape > compTable) |
Extract free border from surfacic SShape as curves. More... | |
static Object | ExtractWire (Array< SShape > compTable) |
Extract free borders from surfacic SShape as wire. More... | |
static Object | Fill (SShape wire, FillingTypeEnum fillingType) |
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 Object | FitOnMesh (SShape surface, SPoly mesh, boolean immobileUMin, boolean immobileUMax, boolean immobileVMin, boolean immobileVMax, boolean projBadPtsOnCloud) |
Fit a CAD Surface on a mesh. More... | |
static Object | FromClick () |
Launch an interaction to select a SShape in the scene. More... | |
static Array< SShape > | FromName (string name) |
Search all the SShape with the given name. More... | |
static Array< SShape > | FromSel () |
Get all the selected SShape. More... | |
static Object | LinearExtrusion (number length, SVector direction, boolean closeExtremities, Array< SComp > shapes) |
Compute CAD face(s) corresponding to the extrusion of profile(s) along a direction, with a given length. More... | |
static SShape | New (SMultiline multiline, SmoothingMethod method) |
Construct a new BSpline curve by smoothing (interpolation or approximation) a SMultiline. More... | |
static SShape | New (SShape other) |
Construct a SShape by copying the SShape Other. More... | |
static Object | PipeTubeAlongPath (number radius, boolean closeExtremities, Array< SComp > shapes) |
Compute CAD face(s) corresponding to the extrusion of a circle with a given radius along a given path. More... | |
static Object | ProfileAlongPath (SComp profile, SComp path, boolean makePerpendicular, boolean startAtProfilePosition, boolean closeExtremities) |
Compute CAD face corresponding to the extrusion of a given profile along a given path. More... | |
static Object | Sew (Array< SShape > compTable, number sewingTolerance) |
Sew surfacic SShape according to a given tolerance. More... | |
Static Public Member Functions inherited from SComp | |
static Array< SComp > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
Get all the SComp in the document. More... | |
static Object | FromClick () |
Launch an interaction to select a SComp in the scene. More... | |
static Array< SComp > | FromName (string name) |
Search all the SComp with the given name. More... | |
static Array< SComp > | FromSel () |
Get all the selected SComp. More... | |
Shape manipulation class.
SShape::SShape | ( | ) |
Default constructor.
SShape::SShape | ( | SMultiline | multiline, |
SmoothingMethod | method | ||
) |
Construct a new BSpline curve by smoothing (interpolation or approximation) a SMultiline.
multiline | (SMultiline) The SMultiline to interpolate or approximate |
method | (SmoothingMethod) The smoothing method for BSpline curve creation
|
SShape::SShape | ( | SShape | other | ) |
Create holes to a CAD Surface from closed CAD edge and CAD wire.
surface | (SShape) The surface to add holes in. |
linearTable | (Array<SShape>) The table of edges and wires used for the holes. |
ret.ErrorCode | (number) The error code
|
ret.Shape | (SShape) The computed surface |
Create restriction to a CAD Surface from a closed CAD wire.
surface | (SShape) The surface to restrict |
wireRestriction | (SShape) The wire used for the restriction |
ret.ErrorCode | (number) The error code
|
ret.Shape | (SShape) The restricted surface |
|
static |
Get all the SShape in the document.
visCrit | (VisibilityEnum) Visible selection criteria
|
|
static |
Object SShape::Explode | ( | ) |
Explode the CAD object.
ret.ErrorCode | (number) The error code
|
ret.ShapeTbl | (Array<SShape>) The exploded CAD object table. |
|
static |
|
static |
|
static |
Create a filling surface from CAD wire. You have to enter the command with a closed wire composed of 3 or 4 edges.
wire | (SShape) The wire to fill |
fillingType | (FillingTypeEnum) The filling method to use
|
ret.ErrorCode | (number) The error code
|
ret.Shape | (SShape) The filled surface |
|
static |
Fit a CAD Surface on a mesh.
surface | (SShape) The surface to fit |
mesh | (SPoly) The mesh to fit on |
immobileUMin | (boolean) If true, poles on the edges UMin must stay immobile. Otherwise they can move |
immobileUMax | (boolean) If true, poles on the edges UMax must stay immobile. Otherwise they can move |
immobileVMin | (boolean) If true, poles on the edges VMin must stay immobile. Otherwise they can move |
immobileVMax | (boolean) If true, poles on the edges VMax must stay immobile. Otherwise they can move |
projBadPtsOnCloud | (boolean) If true, control points with bad projection will be fit on cloud instead |
ret.ErrorCode | (number) The error code
|
ret.Shape | (SShape) The surface fitted on the mesh |
|
static |
Launch an interaction to select a SShape in the scene.
|
static |
|
static |
|
static |
Compute CAD face(s) corresponding to the extrusion of profile(s) along a direction, with a given length.
length | (number) The length of the extrusion. |
direction | (SVector) The direction of the extrusion. |
closeExtremities | (boolean) True if extremities of the extruded comp have to be closed. Profiles must be planar to close the extremities. |
shapes | (Array<SComp>) All the profiles to extrude. Only the linear CADs will be considered for extrusion. |
ret.ErrorCode | (number) The error code
|
ret.CompTbl | (Array<SComp>) The extruded shapes. |
|
static |
Construct a new BSpline curve by smoothing (interpolation or approximation) a SMultiline.
multiline | (SMultiline) The SMultiline to interpolate or approximate |
method | (SmoothingMethod) The smoothing method for BSpline curve creation
|
|
static |
Compute CAD face(s) corresponding to the extrusion of a circle with a given radius along a given path.
radius | (number) The radius of the circle to extrude. |
closeExtremities | (boolean) True if extremities of the extruded comp have to be closed. |
shapes | (Array<SComp>) All the paths to follow. Only the linear CADs will be considered for extrusion. |
ret.ErrorCode | (number) The error code
|
ret.ShapeTbl | (Array<SShape>) The extruded shapes. |
|
static |
Compute CAD face corresponding to the extrusion of a given profile along a given path.
profile | (SComp) The profile to extrude |
path | (SComp) The extrusion path |
makePerpendicular | (boolean) True if the profile to extrude has to be perpendicular to the first vector of the path |
startAtProfilePosition | (boolean) True if the extrusion has to begin at profile and not at path position |
closeExtremities | (boolean) True if extremities of the extruded comp have to be closed. The specified profile must be planar to close the extremities |
|
static |
string SShape::toString | ( | ) |
Get the type of the variable.
string SShape::ValuesToString | ( | ) |
Get a debug string representation of the shape.