module documentation

Programmatically generate point clouds

Function bulb_flat Generate a bulb flat (aka Holland profile) stiffener
Function circle Undocumented
Function curved_wall Create a curved wall given by a second degree polynomial
Function cylinder Undocumented
Function disc Undocumented
Function draw_axes Draw and color-code the origin X axis is red Y axis is green Z axis is blue
Function ibeam Undocumented
Function noise Adds Gaussian noise to a point cloud to realistically simulate noise
Function plane Generate points lying on a plane of the given size Origin specifies the location of the southwest corner Roll pitch yaw correspond to phi theta psi by convention and rotate on the x, y, and z axes respectively...
Function prism Undocumented
Function rot_mat Returns rotation matrix Return rotation matrix described by a given roll, pitch, and yaw to rotate a point cloud about the x, y, and z axes by matrix multiplying it by the array coordinates
Function ship Generates a pre configured point cloud representing a ship
Function tbeam No summary
def bulb_flat(origin=[0, 0, 0], a=-1, b=2, c=-0.5, num_points=300, length=15, width=5, scale=1, roll=0, pitch=0, yaw=0, density=15):

Generate a bulb flat (aka Holland profile) stiffener

Parameters
origin:numpy arraylocation of the component
a:floatfirst coefficient of second degree polynomial
b:floatsecond coefficient of second degree polynomial
c:floatthird coefficient of second degree polynomial
num_pointsUndocumented
length:floatnumber of units long the flat is in point cloud space
width:floatnumber of units wide the component is in point cloud space
scaleUndocumented
rollUndocumented
pitchUndocumented
yawUndocumented
densityUndocumented
Returns
numpy.ndarray
Point cloud array of shape (n, 3) representing points
on the generated stiffener
def circle(origin=[0, 0, 0], resolution=360, radius=5, gap=0):

Undocumented

def curved_wall(a=1 / 2, b=0, c=0, origin=[0, 0, 0], roll=0, pitch=0, yaw=0, length=20, height=50, density=15):

Create a curved wall given by a second degree polynomial

Parameters
aas in a*x^2 + b*x + c
bas in a*x^2 + b*x + c
cas in a*x^2 + b*x + c
originposition of the object
rollUndocumented
pitchUndocumented
yawUndocumented
lengthUndocumented
heightUndocumented
densityUndocumented
Returns
numpy.ndarray
Point cloud array of shape (n, 3) representing points
on the generated curve
def cylinder(origin=[0, 0, 0], gap=np.pi / 4, length=5, density=50, radius=20):

Undocumented

def disc(resolution=6, radius_inner=2, radius_outer=5, yaw=0):

Undocumented

def draw_axes(size=1.0, origin=[0, 0, 0]):

Draw and color-code the origin X axis is red Y axis is green Z axis is blue

Args:
size: int representing length of axis lines

Returns
o3d.geometry.LineSetCan be plotted to show axes in an open3d cloud
def ibeam(origin=[0, 0, 0], length=10, height=8, width=5, thickness=1, roll=0, pitch=0, yaw=0, skip=[False] * 12):

Undocumented

def noise(cloud, std=0.01):

Adds Gaussian noise to a point cloud to realistically simulate noise

Parameters
cloud:numpy.ndarrayInput point cloud of shape (n, 3)
std:float, optionalStandard deviation of the Gaussian noise distribution. Defaults to 0.01.
Returns
numpy.ndarrayNoisy point cloud with the same shape as input
def plane(origin=[0, 0, 0], roll=0, pitch=0, yaw=0, length=5, width=20, density=20):

Generate points lying on a plane of the given size Origin specifies the location of the southwest corner Roll pitch yaw correspond to phi theta psi by convention and rotate on the x, y, and z axes respectively

Parameters
origin:listLocation of the southwest corner of the plane. Defaults to [0, 0, 0].
roll:floatRotation angle in radians around x-axis Defaults to 0.
pitch:floatRotation angle in radians around y-axis Defaults to 0.
yaw:floatRotation angle in radians around z-axis Defaults to 0.
length:floatLength of the plane in the x-direction. Defaults to 5.
width:floatWidth of the plane in the y-direction. Defaults to 20.
density:intPoints per unit length/width for sampling density. Defaults to 20.
Returns
numpy.ndarray
Point cloud array of shape (n, 3) representing points
on the generated plane
def prism(origin=[0, 0, 0], length=6, width=12, height=18, density=15):

Undocumented

def rot_mat(roll=0, pitch=0, yaw=0):

Returns rotation matrix Return rotation matrix described by a given roll, pitch, and yaw to rotate a point cloud about the x, y, and z axes by matrix multiplying it by the array coordinates

Roll, pitch, and yaw are rotations about the x, y, and z axes respectively

Parameters
rollrotation about x axis in radians
pitchrotation about y axis in radians
yawrotation about z axis in radians
Returns
A numpy array of shape (3,3) representing a rotation matrix
def ship():

Generates a pre configured point cloud representing a ship

Parameters
None
Returns
Numpy array representing X,Y,Z coordinates of point cloud points
def tbeam(origin=[0, 0, 0], length=10, width=5, height=10, thickness=2, roll=0, pitch=0, yaw=0, skip=[False] * 12, density=20):
Parameters
origin:listLocation of beam. Defaults to [0, 0, 0].
length:floatLength of the beam Defaults to 10.
width:floatWidth of the beam Defaults to 5.
height:floatWidth of the beam Defaults to 10.
thickness:floatThickness of the beam. Defaults to 2.
roll:floatRotation angle in radians around x-axis Defaults to 0.
pitch:floatRotation angle in radians around y-axis Defaults to 0.
yaw:floatRotation angle in radians around z-axis Defaults to 0.
skipUndocumented
density:intPoints per unit length in cloud space Defaults to 20.
Returns
numpy.ndarray
Point cloud array of shape (n, 3) representing points
on the generated beam