Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Provide polyline edition and creation methods. More...
Public Types | |
enum | MultilineRepresentationTypeEnum { MULTILINE_SEGMENTS = 0 , MULTILINE_VERTICES = 1 , MULTILINE_INSPECTION = 2 } |
The different representation types for multilines. More... | |
enum | OffsetSideEnum { OTHER_SIDE = 0 , SAME_SIDE = 1 } |
To know on which side the offset is computing depending of a define point. More... | |
enum | RepairAutoIntersectionPolicyEnum { SUPPRESS_SMALL_LOOPS_FIRST = 0 , SUPPRESS_LONG_LOOPS_FIRST = 1 , SUPPRESS_IN_VERTEX_ORDER = 2 } |
Enum the autointersection reparation policy. More... | |
enum | SmoothEnum { SMOOTH_TYPE1 = 0 , SMOOTH_TYPE2 = 1 , SMOOTH_BSPLINE = 2 } |
Enum the smoothing type. More... | |
Public Types inherited from SComp | |
enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } |
Visible criteria. More... | |
Public Member Functions | |
AddArrows (boolean reverse=false) | |
Add two arrows at the extremities of the SMultiline. More... | |
AddArrows (number nbArrow, number position) | |
Add some arrows along the SMultiline. More... | |
Clear () | |
Clear to deallocate memory. More... | |
Close () | |
Close a SMultiline. More... | |
Object | ClosestPoint (SPoint point) |
Find the point in the current SMultiline that is the closest from an input point. More... | |
Object | CloseWithCurvedJunction (number nbPoints=30, boolean makePlanarJunction=false) |
Close a SMultiline with a curved junction. More... | |
Object | Compare (SMultiline measuredMulti, number distMax, SVector projectionDir=SVector(), number mappingObject=1, boolean ignoreEdge=false, boolean ptToPt=false, boolean inPlane=false) |
Calculate the distances between 2 SMultilines for further inspection purpose (color mapping). More... | |
Object | GetAutoIntersections (number lenghtTol) |
Check whether a SMultiline contains autointersections. More... | |
SPoint | GetCentroidLinear () |
Compute the barycenter of the current line considering the line having a constant linear density all along the polyline. More... | |
Object | GetColorGradient () |
Get the color gradient of the SMultiline. More... | |
number | GetDeviation (number index) |
Get deviation value of a point on the SMultiline. More... | |
Object | GetDeviations () |
Return all deviation values of the SMultiline. More... | |
number | GetLength () |
Compute the length of the current 3D SMultiline. More... | |
Object | GetNormal () |
Calculate the normal plane of the current SMultiline. More... | |
number | GetNumber () |
Get the number of vertices inside the SMultiline. More... | |
SPoint | GetPoint (number index) |
Get the point coordinates at position "Index". More... | |
Object | GetPointAtDistance (number distanceToOrigin, boolean interpolateOnSegments=true) |
Return the point at a given distance on the current SMultiline. More... | |
Object | InsertFirst (SPoint pointToCopy, number absoluteAccuracy=0) |
Add a point at the beginning of the SMultiline. More... | |
Object | InsertLast (SPoint pointToCopy, number absoluteAccuracy=0) |
Add a point at the end of the SMultiline. More... | |
Object | IntersectionWithMesh (SPoly poly) |
Calculate intersections with 1 poly. More... | |
Object | IntersectionWithOtherPlanarMulti (SMultiline multi) |
Calculate intersections between 2 planar multilines. More... | |
Object | IntersectionWithPlane (SPlane plane) |
Calculate intersection with a plane. More... | |
boolean | IsClosed () |
Return if the SMultiline is closed or not. More... | |
boolean | IsPlanar () |
Return if the SMultiline is planar or not. More... | |
Object | LoadColorGradient (string filePath) |
Load the color gradient from a file (*.rsi binary file). More... | |
Object | MultilineArea (SVector projDir) |
Compute the area of a closed SMultiline projected with a direction. More... | |
Object | Offset (SVector direction, number distOffset, OffsetSideEnum goodSide, SPoint sidePt) |
Compute the parallel contour of a SMultiline according to a direction. More... | |
Object | Proj3D (SPoint point) |
Search the closest 3D projection of a SPoint on this SMultiline. The projection can occur on a segment or a vertex. More... | |
Object | ProjDir (SPoint point, SVector projDir, number aperture) |
Search the closest projection along a direction on this SMultiline. The projection can occur on a segment or a vertex. More... | |
Object | Reduce (number nbPoint, number maxDeviation=1.79769e+308, boolean optimizePosition=true) |
Reduce the current SMultiline to have a certain number of points while keeping the best points. More... | |
Object | RepairAutoIntersections (number lengthTol, number loopMaxLength=-1, RepairAutoIntersectionPolicyEnum policy=SMultiline.SUPPRESS_SMALL_LOOPS_FIRST) |
Repair the autointersections if there were by suppressing the smallest loop bounded by autointersection point. More... | |
Reverse () | |
Reverse the current SMultiline. More... | |
Object | RightAngle (number threshold) |
Modify the vertex of the SMultiline in order to get right angles on the SMultiline. More... | |
Object | Save (string filePath, SMatrix coordinateSystemMatrix=SMatrix()) |
Save the SMultiline into a file. More... | |
Object | SaveColorGradient (string filePath) |
Save the color gradient into a file (*.rsi binary file). More... | |
SetLineWidth (number width) | |
Change the thickness of the SMultiline. More... | |
SetMultilineRepresentation (MultilineRepresentationTypeEnum representation) | |
Modify the representation of the SMultiline. More... | |
ShowName (boolean showName) | |
Control whether the name of the SMultiline is shown or not in the scene. More... | |
Object | Smooth (number para1, number smoothIntens, SmoothEnum smoothingType, number maxiDeviation) |
Recalculate new vertices to smooth the current SMultiline. More... | |
SMultiline () | |
Default constructor to create an empty new SMultiline. More... | |
SMultiline (SMultiline other) | |
Construct a SMultiline by copying the SMultiline Other. More... | |
Object | SuppressSmallLines (number lengthTol) |
Define a SMultiline suppressing the lines which have a length smaller than a tolerance length. More... | |
string | toString () |
Get the type of the variable. More... | |
string | ValuesToString () |
Get a debug string representation of the SMultiline. 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 Array< SMultiline > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
Get all the SMultiline in the document. More... | |
static Object | Chain (Array< SMultiline > tableLine, number maxiSegmentLength=0, number accuracy=0, boolean close=false) |
Chain all the SMultiline by creating new segments between nearest SMultiline extremities. Optionally try to close it. More... | |
static Object | ComputeNeutralAxis (SComp tubularShape, SComp helpLine, boolean isCircle, number approxDiameter, number approxWidth, number approxLength, SVector direction, number calculationAccuracy, number smoothNeutralAxis, boolean reconstructPipe) |
Compute the neutral axis of a SCloud or SPoly or surfacic SShape. More... | |
static Object | CurvedJunction (SMultiline firstMultiline, SMultiline secondMultiline, number nPoints=30, boolean makePlanarJunction=false, boolean chainWithInput=true) |
Create a curved junction between two SMultiline. More... | |
static Object | Cut (SMultiline multiline, SPoint point) |
Cut the SMultiline by creating new segments between nearest SMultiline extremities. More... | |
static Object | FromClick () |
Launch an interaction to select a SMultiline in the scene. More... | |
static Object | FromFile (string fileName) |
Import a set of polylines from a file and create the associated SMultiline objects. More... | |
static Array< SMultiline > | FromName (string name) |
Search all the SMultiline with the given name. More... | |
static Array< SMultiline > | FromSel () |
Get all the selected SMultiline. More... | |
static Object | MedianLine (Array< SMultiline > tableMulti, number nbPt=0) |
Compute the median line between several SMultiline. More... | |
static Object | MultilinesIntersections (Array< SMultiline > tableMulti, number desiredAccuracy) |
Compute the set of intersections between an arbitrary number of SMultilines. More... | |
static SMultiline | New () |
Default constructor to create an empty new SMultiline. More... | |
static SMultiline | New (SMultiline other) |
Construct a SMultiline by copying the SMultiline Other. 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... | |
Provide polyline edition and creation methods.
Multiline are represented as an ordered list of points
The different representation types for multilines.
Enumerator | |
---|---|
MULTILINE_SEGMENTS | Only segments are displayed. |
MULTILINE_VERTICES | Segments and vertices are displayed. |
MULTILINE_INSPECTION | Colors ares based on an inspection value on each point. Only available if the SMultiline contains inspection information. |
Enum the autointersection reparation policy.
Enum the smoothing type.
Enumerator | |
---|---|
SMOOTH_TYPE1 | Order 1 filter. Very smooth filter. The small radii are becoming greater. Smoothing an opened SMultiLine with a very high SmoothIntens will converge to a straight segment between first and last point. Smoothing a closed SMultiline with a very high SmoothIntens will converge to a point, which is the gravity center of the SMultiline. |
SMOOTH_TYPE2 | Order 2 filter. More complex filter based on first derivative that allows to limit as much as possible increasing the radii. Smoothing an opened SMultiline with a very high SmoothIntens will NOT converge to a straight segment. Smoothing a closed SMultiLine with a very high SmoothIntens will NOT converge to a point. |
SMOOTH_BSPLINE | B-spline smoothing. |
SMultiline::SMultiline | ( | ) |
Default constructor to create an empty new SMultiline.
SMultiline::SMultiline | ( | SMultiline | other | ) |
Construct a SMultiline by copying the SMultiline Other.
other | (SMultiline) The other SMultiline to copy. |
SMultiline::AddArrows | ( | boolean | reverse = false | ) |
Add two arrows at the extremities of the SMultiline.
reverse | (boolean) To know if arrows are reversed or not.
|
SMultiline::AddArrows | ( | number | nbArrow, |
number | position | ||
) |
Add some arrows along the SMultiline.
nbArrow | (number) Number of arrows to be drawn. Negative value means on each segment. |
position | (number) The place where arrow should be displayed inside [0 1].
|
|
static |
Get all the SMultiline in the document.
visCrit | (VisibilityEnum) Visible selection criteria
|
|
static |
Chain all the SMultiline by creating new segments between nearest SMultiline extremities. Optionally try to close it.
tableLine | (Array<SMultiline>) The SMultiline table to chain |
maxiSegmentLength | (number) The maximum size of new segments created to make junctions between polylines. If 0, no size limit. |
accuracy | (number) The comparison "equality" accuracy. If 0, the comparison value used is 1.e-5. |
close | (boolean) Try to close the polylines. |
ret.ErrorCode | (number) The error code
|
ret.MultiTbl | (Array<SMultiline>) An SMultiline table with contours, else if the SMultilines are impossible to chain returns an empty Array |
SMultiline::Clear | ( | ) |
Clear to deallocate memory.
SMultiline::Close | ( | ) |
Close a SMultiline.
Object SMultiline::ClosestPoint | ( | SPoint | point | ) |
Find the point in the current SMultiline that is the closest from an input point.
point | (SPoint) The point from which the closest has to be found |
ret.ErrorCode | (number) The error code.
|
ret.Index | (number) The index number (0 <= index < Number) of the closest vertex from the initial point. |
ret.SqDistance | (number) The square distance found. |
Object SMultiline::CloseWithCurvedJunction | ( | number | nbPoints = 30 , |
boolean | makePlanarJunction = false |
||
) |
Close a SMultiline with a curved junction.
nbPoints | (number) The number of points that should be created on the junction. |
makePlanarJunction | (boolean) Should the junction be planar? |
ret.ErrorCode | (number) The error code
|
Object SMultiline::Compare | ( | SMultiline | measuredMulti, |
number | distMax, | ||
SVector | projectionDir = SVector() , |
||
number | mappingObject = 1 , |
||
boolean | ignoreEdge = false , |
||
boolean | ptToPt = false , |
||
boolean | inPlane = false |
||
) |
Calculate the distances between 2 SMultilines for further inspection purpose (color mapping).
measuredMulti | (SMultiline) SMultiline considered as the measured object to project on this |
distMax | (number) Ignore point having a distance greater than this one. |
projectionDir | (SVector) The direction of the 2D comparison (requires both polylines in a same plane) |
mappingObject | (number) 1 means color mapping is done on 'this', else 2 the color mapping is done on measuredMulti. |
ignoreEdge | (boolean) What should be done with points on edges ?
|
ptToPt | (boolean) WARNING: if true the two SMultilines MUST have the same point number. Project each point on it corresponding point. |
inPlane | (boolean) True if the inspection can be done in a plane, so the result can be signed |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The new SMultiline, which is the result of the comparison. Each point of the output SMultiline has an associated value, which is the distance found between the two vertices, or undefined if this distance could not be computed or is not relevant. |
ret.ReportData | (SReportData) The new SReportData, which contains the view set with the inspected component. |
|
static |
Compute the neutral axis of a SCloud or SPoly or surfacic SShape.
tubularShape | (SComp) The SCloud, SPoly or surfacic SShape on which the neutral axis is computed |
helpLine | (SComp) The help line (SMultiLine, linear SShape) used to create sections on object to compute neutral axis, If null, then it is automatically computed |
isCircle | (boolean) True : Circle, false : SquareSlot |
approxDiameter | (number) An estimation of the diameter of the circle. If <= 0.0 the diameter is automatically computed |
approxWidth | (number) Estimation of the width of the square slot. if <= 0.0 the width is automatically computed |
approxLength | (number) An estimation of the length of the square slot. If <= 0.0 the length is automatically computed |
direction | (SVector) An estimation of the direction of the length of the square slot. If null the direction is automatically computed |
calculationAccuracy | (number) The number of sections along the polyline between 10 - 500 |
smoothNeutralAxis | (number) The smoothing value between 0 - 15 |
reconstructPipe | (boolean) If true, the pipe will be reconstructed according to the computed neutral axis |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The smoothed neutral axis |
ret.Comp | (SComp) The reconstructed pipe |
|
static |
Create a curved junction between two SMultiline.
firstMultiline | (SMultiline) The first SMultiline to join |
secondMultiline | (SMultiline) The second SMultiline to join |
nPoints | (number) The number of points that should be created on the junction. |
makePlanarJunction | (boolean) Should the junction be planar? |
chainWithInput | (boolean) Should the result SMultiline be chained with the input SMultiline? |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The result SMultiline, else if an error occurred, returns an empty Array |
|
static |
Cut the SMultiline by creating new segments between nearest SMultiline extremities.
multiline | (SMultiline) The SMultiline to cut. |
point | (SPoint) The point where to cut. |
ret.ErrorCode | (number) The error code
|
ret.MultiTbl | (Array<SMultiline>) A table with all resulting polylines. |
|
static |
Launch an interaction to select a SMultiline in the scene.
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The selected SMultiline |
|
static |
Import a set of polylines from a file and create the associated SMultiline objects.
fileName | (string) The file name path. |
ret.ErrorCode | (number) The error code
|
ret.MultiTbl | (Array<SMultiline>) The loaded SMultiline array. |
|
static |
Search all the SMultiline with the given name.
name | (string) The name to find |
|
static |
Get all the selected SMultiline.
Object SMultiline::GetAutoIntersections | ( | number | lenghtTol | ) |
Check whether a SMultiline contains autointersections.
lenghtTol | (number) The tolerance to detect autointersections. An intersection is detected when the lines have their bounding boxes intersecting and their distances less than lengthTol |
ret.ErrorCode | (number) The error code
|
ret.PointTbl | (Array<SPoint>) The list of points at autointersection. |
SPoint SMultiline::GetCentroidLinear | ( | ) |
Compute the barycenter of the current line considering the line having a constant linear density all along the polyline.
Object SMultiline::GetColorGradient | ( | ) |
Get the color gradient of the SMultiline.
ret.ErrorCode | (number) The error code.
|
ret.Gradient | (SColorGradient) The SColorGradient associated to the current SMultiline |
number SMultiline::GetDeviation | ( | number | index | ) |
Get deviation value of a point on the SMultiline.
index | (number) index of the point for which the deviation value will be returned |
Object SMultiline::GetDeviations | ( | ) |
Return all deviation values of the SMultiline.
ret.ErrorCode | (number) The error code
|
ret.ValueTbl | (Array<number>) The deviation values |
number SMultiline::GetLength | ( | ) |
Compute the length of the current 3D SMultiline.
Object SMultiline::GetNormal | ( | ) |
Calculate the normal plane of the current SMultiline.
ret.ErrorCode | (number) The error code:
|
ret.Vector | (SVector) The normal of the SMultiline. |
ret.Point | (SPoint) A point on the plane. |
number SMultiline::GetNumber | ( | ) |
Get the number of vertices inside the SMultiline.
SPoint SMultiline::GetPoint | ( | number | index | ) |
Get the point coordinates at position "Index".
index | (number) Position of the point in the SMultiline. 0<= index < Number |
Object SMultiline::GetPointAtDistance | ( | number | distanceToOrigin, |
boolean | interpolateOnSegments = true |
||
) |
Return the point at a given distance on the current SMultiline.
distanceToOrigin | (number) the distance from the origin of the SMultiline |
interpolateOnSegments | (boolean) Interpolate the tangent on segments. If false, the tangent of a segment will be its direction. |
ret.ErrorCode | (number) The error code:
|
ret.Point | (SPoint) The point on the current SMultiline at the expected distance. |
ret.Vector | (SVector) The tangent of the SMultiline at the expected distance. |
Object SMultiline::InsertFirst | ( | SPoint | pointToCopy, |
number | absoluteAccuracy = 0 |
||
) |
Add a point at the beginning of the SMultiline.
pointToCopy | (SPoint) The point to add at the beginning of the SMultiline. |
absoluteAccuracy | (number) The comparison's 'equality' accuracy. Two points are considered as equal if their distance is lower than this value. If Accuracy=0, the comparison value is by 1.e-5. |
ret.ErrorCode | (number) The error code:
|
Object SMultiline::InsertLast | ( | SPoint | pointToCopy, |
number | absoluteAccuracy = 0 |
||
) |
Add a point at the end of the SMultiline.
pointToCopy | (SPoint) The point to add at the end of the SMultiline. |
absoluteAccuracy | (number) The comparison's 'equality' accuracy. Two points are considered as equal if their distance is lower than this value. If Accuracy=0, the comparison value is by 1.e-5. |
ret.ErrorCode | (number) The error code:
|
Object SMultiline::IntersectionWithMesh | ( | SPoly | poly | ) |
Object SMultiline::IntersectionWithOtherPlanarMulti | ( | SMultiline | multi | ) |
Calculate intersections between 2 planar multilines.
multi | (SMultiline) The multi to calculate intersections with. |
Object SMultiline::IntersectionWithPlane | ( | SPlane | plane | ) |
boolean SMultiline::IsClosed | ( | ) |
Return if the SMultiline is closed or not.
boolean SMultiline::IsPlanar | ( | ) |
Return if the SMultiline is planar or not.
Object SMultiline::LoadColorGradient | ( | string | filePath | ) |
Load the color gradient from a file (*.rsi binary file).
filePath | (string) The complete file path to load from |
ret.ErrorCode | (number) The error code.
|
ret.Gradient | (SColorGradient) The color gradient associated to the current SMultiline |
|
static |
Compute the median line between several SMultiline.
tableMulti | (Array<SMultiline>) Table of SMultiline |
nbPt | (number) Number of point of the final median line (nbPt > 1). |
ret.ErrorCode | (number) The error code.
|
ret.Multi | (SMultiline) The computed median line. |
Object SMultiline::MultilineArea | ( | SVector | projDir | ) |
Compute the area of a closed SMultiline projected with a direction.
projDir | (SVector) The projection direction. |
ret.ErrorCode | (number) The error code:
|
ret.Surface | (number) The area of the SMultiline. |
ret.Value | (number) The direction of the multiline.
|
|
static |
Compute the set of intersections between an arbitrary number of SMultilines.
tableMulti | (Array<SMultiline>) Collection of SMultiline between which the intersections are computed. |
desiredAccuracy | (number) Distance under which two segments are considered intersecting. |
ret.ErrorCode | (number) The error code
|
ret.IntersectionTbl | (Array<SPoint>) Table of SPoints containing the intersection points. |
|
static |
Default constructor to create an empty new SMultiline.
|
static |
Construct a SMultiline by copying the SMultiline Other.
other | (SMultiline) The other SMultiline to copy. |
Object SMultiline::Offset | ( | SVector | direction, |
number | distOffset, | ||
OffsetSideEnum | goodSide, | ||
SPoint | sidePt | ||
) |
Compute the parallel contour of a SMultiline according to a direction.
direction | (SVector) The offset is computed in the plane normal to this vector. This means that each point of the SMultiline is moved in a direction normal to this vector. If 0, the plane is assumed to be the best plane of the current SMultiline. |
distOffset | (number) The offset distance |
goodSide | (OffsetSideEnum) To know on which side the offset is computing depending of a define point.
|
sidePt | (SPoint) A point to know the side of the offset. |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The resulting offset contour. |
Object SMultiline::Proj3D | ( | SPoint | point | ) |
Search the closest 3D projection of a SPoint on this SMultiline. The projection can occur on a segment or a vertex.
point | (SPoint) The point to project. |
ret.ErrorCode | (number) The error code.
|
ret.Index | (number) The index number (0 <= index < Number) of the closest segment or point. If projection occurs on a segment, the point found is between point index and index+1. |
ret.Point | (SPoint) Return here the projected point found. |
Search the closest projection along a direction on this SMultiline. The projection can occur on a segment or a vertex.
point | (SPoint) The point to project. |
projDir | (SVector) The projection direction |
aperture | (number) The aperture distance. Significant only if computation occurs in a plane. Points are valid only if they are inside a cylinder of axis defined by point and projDir and a radius equal by this value. |
ret.ErrorCode | (number) The error code.
|
ret.Index | (number) The index number (0 <= index < Number) of the closest segment or point. If projection occurs on a segment, the point found is between point index and index+1. If Aperture is not zero, -1 can be returned if no point is valid. |
ret.Point | (SPoint) Return here the projected point found. |
Object SMultiline::Reduce | ( | number | nbPoint, |
number | maxDeviation = 1.79769e+308 , |
||
boolean | optimizePosition = true |
||
) |
Reduce the current SMultiline to have a certain number of points while keeping the best points.
nbPoint | (number) Number of points to get after reducing if input is 0, only the max deviation criterion is taken into account |
maxDeviation | (number) The maximum deviation allowed. If very high, there is no chance that this criterion is taken into account when reducing (default behavior) |
optimizePosition | (boolean) If true, optimization of points positions. Else reduce the line using existing points. |
ret.ErrorCode | (number) The error code
|
Object SMultiline::RepairAutoIntersections | ( | number | lengthTol, |
number | loopMaxLength = -1 , |
||
RepairAutoIntersectionPolicyEnum | policy = SMultiline.SUPPRESS_SMALL_LOOPS_FIRST |
||
) |
Repair the autointersections if there were by suppressing the smallest loop bounded by autointersection point.
lengthTol | (number) The tolerance to detect autointersections. An intersection is detected when the lines have their bounding boxes intersecting and their distances less than lengthTol |
loopMaxLength | (number) The maximal length of the loop which can be suppressed (-1 means 1/4 of the perimeter of the multiline) |
policy | (RepairAutoIntersectionPolicyEnum) Policy used to suppress the loops between autointersections.
|
ret.ErrorCode | (number) The error code
|
ret.Value | (number) The number of suppressed loops used to suppress them. |
ret.Multi | (SMultiline) The repaired SMultiline. |
SMultiline::Reverse | ( | ) |
Reverse the current SMultiline.
Object SMultiline::RightAngle | ( | number | threshold | ) |
Modify the vertex of the SMultiline in order to get right angles on the SMultiline.
threshold | (number) Threshold in degrees under which an angle is modified |
ret.ErrorCode | (number) The error code.
|
Save the SMultiline into a file.
filePath | (string) The complete file path to save into |
coordinateSystemMatrix | (SMatrix) The matrix to define a UCS used for the export (or identity to use the WCS) |
ret.ErrorCode | (number) The error code
|
Object SMultiline::SaveColorGradient | ( | string | filePath | ) |
Save the color gradient into a file (*.rsi binary file).
filePath | (string) The complete file path to save into |
ret.ErrorCode | (number) The error code.
|
SMultiline::SetLineWidth | ( | number | width | ) |
Change the thickness of the SMultiline.
width | (number) The width to set. |
SMultiline::SetMultilineRepresentation | ( | MultilineRepresentationTypeEnum | representation | ) |
Modify the representation of the SMultiline.
representation | (MultilineRepresentationTypeEnum) The different representation types for SMultiline.
|
SMultiline::ShowName | ( | boolean | showName | ) |
Control whether the name of the SMultiline is shown or not in the scene.
showName | (boolean) The new visibility state of the SMultiline |
Object SMultiline::Smooth | ( | number | para1, |
number | smoothIntens, | ||
SmoothEnum | smoothingType, | ||
number | maxiDeviation | ||
) |
Recalculate new vertices to smooth the current SMultiline.
para1 | (number) This parameter has two meaning depending on the value of SmoothingType:
|
smoothIntens | (number) The smoothing intensity. Should be between 1 and 20. |
smoothingType | (SmoothEnum) Filter type
|
maxiDeviation | (number) Maximum deviation if smoothing type SMOOTH_TYPE1 or SMOOTH_TYPE2 is selected. If not null, the distance between the vertices before and after smoothing must not exceed this value (after all the smoothing loops). If SmoothingType=SMOOTH_BSPLINE, this parameter is not used. |
ret.ErrorCode | (number) The error code
|
Object SMultiline::SuppressSmallLines | ( | number | lengthTol | ) |
Define a SMultiline suppressing the lines which have a length smaller than a tolerance length.
lengthTol | (number) The tolerance length defines the maximum length a segment can have to be suppressed. |
ret.ErrorCode | (number) The error code
|
ret.Value | (number) The number of suppressed segments. |
ret.Multi | (SMultiline) The repaired SMultiline. |
string SMultiline::toString | ( | ) |
Get the type of the variable.
string SMultiline::ValuesToString | ( | ) |
Get a debug string representation of the SMultiline.