JSPipe
API for creating and modifying Pipe objects.
Create a Pipe object with Module.createPipe API.
var object = Module.createPipe("ID");
Function
create(coordinates, startColor, endColor, segment, radius, width) → boolean
Creates a 3D pipe object.
Object settings through parameter variables.
A segment input value > 3 is required.
A radius input value > 0 is required.
segment
number
Number of sides for the cross-section.
radius
number
Radius.
width
number
Line thickness in line representation.
Return
true: Object creation was successful.
false: Object creation failed.
Sample
Refer to function createUndergroundFacility.
getExtent() → number
Returns the distance between Min-Max of the object boundary Box.
Return
number: Distance between Min-Max of the object boundary Box.
getId() → string
Returns the ID of the object.
Return
string: Successful return of the object's Key string.
null: If the object is null.
getPositions() → JSVec3Array
Returns a list of coordinates that make up a JSPipe object.
Return
JSVec3Array: Successfully returned a list of coordinates that make up a object.
null: Coordinate return failed.
getRadius() → number
Returns the radius of the pipe.
Return
Pipe radius applied to object (in meters)
moveVertically(altitude) → boolean
Sets the height of the 3D pipe.
Altitude input must be greater than -1000 (based on sea level altitude).
altitude
number
Height reset value.
Return
true: Object setting successful.
false: Object setting failed.
setColor(starColor, endColor) → boolean
Sets the color of the start and end points of the 3D pipe.
setFlow(startColor, endColor, segment, interval) → boolean
Sets the internal flow representation of the 3D pipe.
A segment (integer) input value >3 is required.
An interval (float) input value >0 is required.
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createUndergroundFacility.
setFlowDisplay(type) → boolean
Sets the visibility of the internal flow representation of the 3D pipe.
type
boolean
true for flow visualization. false for default visualization.
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createUndergroundFacility.
setFlowWaitFrame(farme) → boolean
Sets the number of frames for updating the internal flow of the 3D pipe.
Frame (integer) component count > 0 is required.
frame
number
Number of frames to update.
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createUndergroundFacility.
setSimplifyRange(range) → boolean
Sets the distance for simplified representation of the 3D pipe.
A range input value > 0 is required.
Simplified representation omits flow representation.
range
number
Object precision representation distance
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createPipe.
Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
Return
string: Successful return of the object's description string.
null: If the object is null.
getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
Return
string: Successful return of the object's name.
null: If the object is null.
getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
Return
true: Object visible state.
false: Object hidden state.
Last updated