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.

Name
Type
Description

coordinates

List of longitude, latitude, altitude coordinates.

startColor

Start point color.

endColor

End point color.

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

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).

Name
Type
Description

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.

Name
Type
Description

startColor

Start point color.

endColor

End point color.

  • Return

    • true: Object setting successful.

    • false: Object setting failed.

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.

Name
Type
Description

startColor

Flow start color.

endColor

Flow end color.

segment

number

Number of points for flow composition.

interval

number

Interval of flow representation arrows.

  • Return

    • true: Object setting successful.

    • false: Object setting failed.

  • Sample

setFlowDisplay(type) → boolean

Sets the visibility of the internal flow representation of the 3D pipe.

Name
Type
Description

type

boolean

true for flow visualization. false for default visualization.

  • Return

    • true: Object setting successful.

    • false: Object setting failed.

  • Sample

setFlowWaitFrame(farme) → boolean

Sets the number of frames for updating the internal flow of the 3D pipe.

Frame (integer) component count > 0 is required.

Name
Type
Description

frame

number

Number of frames to update.

  • Return

    • true: Object setting successful.

    • false: Object setting failed.

  • Sample

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.

Name
Type
Description

range

number

Object precision representation distance

  • Return

    • true: Object setting successful.

    • false: Object setting failed.

  • Sample

Getter / Setter

getDescription(), setDescription(desc) → string

Set a description for the object.

Name
Type
Description

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
Type
Description

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.

Name
Type
Description

visible

boolean

true: Make the object visible. false: Hide the object.

  • Return

    • true: Object visible state.

    • false: Object hidden state.

Last updated