maptek.vulcan.point

Interface for Vulcan design points. These functions work with a location of screen click as a new, unassociated point object (or array of them).

To download all the example scripts, click here.


distance(self, other: "point") -> double

Use this to find the distance between two points and return as a double.

# Filename: point_distance.py
# Purpose:  Find the distance between two points.
# Returns:  Double.

from maptek import vulcan_gui

# create two separate point objects
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Pick first point') # pick the point

pick2 = vulcan_gui.pick_point() # creates a point object
pick2.set_single_point() # set property to select only one point
pt2 = pick2.pick('Pick second point') # pick the point

# determine the distance between the two points
print(f"Distance between points: {pt1[0].distance(pt2[0])}")
name(self) -> std::string

Get the name of a point and return as a string.

# Filename: point_name.py
# Purpose:  Point name.
# Returns: String.

from maptek import vulcan_gui

# select location of point
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Pick point') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to set point name:
pt1[0].name = 'point a'

# to get point name:
n = pt1[0].name
print(n)
xyz(self) -> double

Generator for the x/y/z portion of a point. This function is written to be used in a loop.

# Filename: point_xyz.py
# Purpose: Generator for the x/y/z portion of a point.
# Returns: Point x/y/z properties.

from maptek import vulcan_gui

# select object from the screen
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Pick point') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to get xyz propeties:
for pt in pt1[0].xyz:
    print(pt)
w(self) -> double

Property: w value.

# Filename: point_w.py
# Purpose: Point w value.
# Returns: Double.

from maptek import vulcan_gui

# select location of point
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Select location of new point') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to set w value:
pt1[0].w = 6

# to get w value:
n = pt1[0].w
print(n)
x(self) -> double
y(self) -> double
z(self) -> double

Property: x,y,z values.

# Filename: point_x.py
# Purpose: Get x,y,z values for location clicked on the screen.
# Returns: Double.

from maptek import vulcan_gui

# select object from the screen
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Click any location on the screen.') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to get x,y,z value:
ptx = pt1[0].x
pty = pt1[0].y
ptz = pt1[0].z
print(ptx, pty, ptz)
t(self, t: "int const &") -> void

Property: Point t (0/1 = connection)

# Filename: point_t.py
# Purpose:  Point t (0/1 = connection).
# Returns: Integer.

from maptek import vulcan_gui

# select location of point
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Pick point') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to set point connection:
pt1[0].t = 1

# to get point connection:
n = pt1[0].t
print(n)