Volume Primitives

The volume primitives are a set of basic geometeric shapes (spheres, boxes, etc.). These constructors accept simple parameters such as dimensions, points, and vectors. In Alpha_1, solid volumes are represented by their boundaries, and these primitives ultimately produce shells consisting of b-spline surfaces to represent those boundaries. Sometimes these primitives are a good place to begin to achieve a basic shape which can later be modified with other operators in the system. Users modeling mechanical parts should be sure to also read about the features package (Mechanical Features) which significantly extends this set.

To get a shell (shell_obj) out of a primitive use makegeom.


Table of Contents


Bounding Box Object

A bounding box is not a geometric primitive, in the sense that it can't be displayed nor do you construct other objects from it. However, bounding boxes can be used to position objects and to do simple intersection calculations. A bounding box is defined by two 3Dpts, representing the minimum and maximum xyz points. While a bounding box object does not have a display method, the data points can be accessed using the accessors.
bBoxObj( Obj )
Returns
<bounding box> Construct an axis-aligned bounding box given an object.
Obj
<object> The object to place the bounding box around. Note: Not all objects have bounding box methods. A partial list of objects which have bounding box methods includes: points, vectors, curves, surfaces, shells, and groups. Methods are not defined for: lines, arcs, and primitives.

Box Object

A box is defined by the vertex at one of the corners and three vectors specifying the height, width, and depth of the box relative to the vertex. The box may be arbitrarily oriented. It will have right angles at the corners only if the height, width and depth vectors are mutually perpendicular. The vectors should be ordered so that they form a right-handed coordinate system.

 

box( Vertex, Height, Width, Depth )
Returns
<box> Construct a parallelepiped given the lengths and orientations of each of its three axes.
Vertex
<euclidPoint> The reference corner of the box at which the three vectors are based.
Height, Width, Depth
<geomVector> The dimensions of the box. The vectors can have any orientation, but will produce a cube only if mutually perpendicular.
boxFromAnchor( Anchor, Height, Width, Depth )
Returns
<box> Construct a box given an anchor for position and orientation plus dimensions.
Anchor
<anchor> An anchor at the corner of the box.
Height
<number>0> Dimension for Y direction (with respect to Anchor).
Width
<number>0> Dimension for X direction (with respect to Anchor).
Depth
<number>0> Dimension for Z direction (with respect to Anchor).

Wedge Object

A right angle wedge is specified by a vertex point and the height, width, and depth vectors relative to the vertex. The wedge has a triangular cross section specified by the height and width vectors, and the vector connecting their endpoints (see figure below). 

 Like the box above, the wedge will only be a right angle wedge if the three vectors are mutually perpendicular. The vectors should be ordered so that they form a right-handed coordinate system.

rightAngleWedge( Vertex, Height, Width, Depth )
Returns
<wedge> Construct a wedge from a reference point and three dimensions.
Vertex
<euclidPoint> The reference point which serves as the base of the three dimension vectors.
Height, Width, Depth
<geomVector> The dimensions and orientation for the wedge. The wedge will be a right angle wedge only if the three vectors are mutually perpendicular.

Cylinder Object

The base point, height vector, and radius determine a rightCirCylinder.
rightCirCylinder( Vertex, Height, Radius )
Returns
<cylinder> Construct a cylindrical solid from a reference point and the cylinder's dimensions.
Vertex
<euclidPoint> The reference point which serves as the base for the vector and radius.
Height
<geomVector> The height and axis line of the cylinder.
Radius
<number> The radius of the cylinder.
cylinderFromAnchor( Anchor, Height, Radius )
Returns
<cylinder> Construct a cylindrical solid given an anchor for position and orientation plus dimensions.
Anchor
<anchor> An anchor at the center of the cylinder base.
Height
<number> Height of cylinder in Z direction (with respect to Anchor).
Radius
<number> The radius of the cylinder.

Cone Object

A truncRightCone is defined by the vertex at the center of the larger base, a height vector, and the radii of the larger and smaller bases, respectively.

truncRightCone( Vertex, Height, Bottom, Top )
Returns
<cone> Construct a cone from a reference point and dimensions.
Vertex
<euclidPoint> The reference point for the vector and radii.
Height
<geomVector> The height and axis line of the cone.
Bottom, Top
<number> The two radii of the cone.

Sphere Object

sphere( Center, Radius )
Returns
<sphere> Construct a sphere from a center and radius.
Center
<euclidPoint> The center of the sphere.
Radius
<number> The radius of the sphere.

Torus Object

A torus is defined by the vertex at its center, a normal to the plane in which the torus lies (the locus of centers of the circular cross sections lies in this plane), and two scalar radii. The first radius gives the distance from the center to the mid-point of the circular cross section. The second radius is the radius of the circular cross section. 
torus( Vertex, Normal, BigRadius, SmallRadius )
Returns
<torus> Construct a torus from a reference point and dimensions.
Vertex
<euclidPoint> The center of the torus.
Normal
<geomVector> A vector normal to the plane of the torus.
BigRadius
<number> The radius of the torus.
SmallRadius
<number> The radius of the cross section of the torus.

Ellipsoid Object

An ellipsoid of revolution is defined by the vertex at the center of the axis of revolution, a vector defining the axis of revolution relative to the vertex, and the radius of the circular cross-section at the vertex point. The length of the vector defining the axis of revolution will be the length of the semi-major or semi-minor axis (depending on whether it is larger or smaller than the cross-section radius).

 

ellipsoid( Vertex, Axis, Radius )
Returns
<ellipsoid> Construct an ellipsoid from a reference point, axis and cross section.
Vertex
<euclidPoint> The reference point which lies on the axis of revolution and is the center of the ellipsoid.
Axis
<geomVector> The direction defines the axis of revolution. This axis will be the semi-major axis if larger than the Radius, and the semi-minor axis otherwise.
Radius
<number> The raduis of the cross section (perpendicular to the Axis vector).

C_Shape_Edit User's Manual Home Page 
Alpha_1 User's Manual.
Copyright © 1998, University of Utah
a1-web@gr.cs.utah.edu