Home

Construct Bodies
[Construct Entities]

Collaboration diagram for Construct Bodies:
Defined at <cstrapi.hxx>, SPAcstr. More...

Functions

outcome api_body (BODY *&body, AcisOptions *ao=NULL)
 Creates an empty body.
outcome api_make_cuboid (double x, double y, double z, BODY *&body, AcisOptions *ao=NULL)
 Creates cuboid of given width (x), depth (y) and height (z).
outcome api_make_frustum (double height, double radius1, double radius2, double top, BODY *&frust, AcisOptions *ao=NULL)
 Creates an elliptical cone or cylinder of given height and radii.
outcome api_make_prism (double height, double radius1, double radius2, int nsides, BODY *&prism, AcisOptions *ao=NULL)
 Creates an elliptical prism of given height, radii, and number of sides.
outcome api_make_pyramid (double height, double radius1, double radius2, double top, int nsides, BODY *&pyramid, AcisOptions *ao=NULL)
 Creates an elliptical pyramid of given height, radii, and number of sides.
outcome api_make_sphere (double radius, BODY *&sph, AcisOptions *ao=NULL)
 Creates a sphere of given radius, centered at the origin.
outcome api_make_spline (const spline &this_spline, BODY *&body, AcisOptions *ao=NULL)
 Creates a body consisting of a single-sided face that is the whole of a given spline surface.
outcome api_make_torus (double major_radius, double minor_radius, BODY *&tor, AcisOptions *ao=NULL)
 Creates a torus of given major and minor radii centered at the origin.
outcome api_sheet_from_ff (int num_faces, FACE *faces[], BODY *&body, AcisOptions *ao=NULL)
 Creates a sheet body as a copy of a face.
outcome api_solid_block (const SPAposition &pt1, const SPAposition &pt2, BODY *&block, AcisOptions *ao=NULL)
 Creates a solid block given two positions on a diagonal of the block.
outcome api_solid_cylinder_cone (const SPAposition &pt1, const SPAposition &pt2, double major_radius, double minor_radius, double top_radius, const SPAposition *xpt, BODY *&cyl_or_cone, AcisOptions *ao=NULL)
 Creates a solid cylinder or cone given two positions on the axis.
outcome api_solid_sphere (const SPAposition &center, double radius, BODY *&sph, AcisOptions *ao=NULL)
 Creates a solid sphere given the center position and radius.
outcome api_solid_torus (const SPAposition &center, double major_radius, double minor_radius, BODY *&tor, AcisOptions *ao=NULL)
 Creates a solid torus given the center as well as major and minor radii.
outcome api_wiggle (double width, double depth, double height, int low_v_type, int high_v_type, int low_u_type, int high_u_type, logical height_given, BODY *&wiggle, AcisOptions *ao=NULL)
 Creates a body having one B-spline face, for testing purposes.

Detailed Description

Defined at <cstrapi.hxx>, SPAcstr.


Function Documentation

outcome api_body ( BODY *&  body,
AcisOptions ao = NULL 
)

Creates an empty body.



Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body empty body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_cuboid ( double  x,
double  y,
double  z,
BODY *&  body,
AcisOptions ao = NULL 
)

Creates cuboid of given width (x), depth (y) and height (z).



Role: This API function constructs a cuboid centered at the origin. All arguments must be greater than SPAresabs.

Errors: Width, depth, or height not greater than SPAresabs.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
x size in x coordinate direction.
y size in y coordinate direction.
z size in z coordinate direction.
body cuboid returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_frustum ( double  height,
double  radius1,
double  radius2,
double  top,
BODY *&  frust,
AcisOptions ao = NULL 
)

Creates an elliptical cone or cylinder of given height and radii.



Role: Centers the frustum at the origin, with main axis along the z-axis and one axis (major or minor) of its cross-section in the z = 0 plane along the x-axis.

All arguments must be greater than SPAresabs.

Errors: Either height, radius1, or radius2 is not greater than SPAresabs, or top is not greater than or equal to 0.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
height height.
radius1 radius in x-direction at base.
radius2 radius in y-direction at base.
top radius in x-direction at top.
frust frustum returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_prism ( double  height,
double  radius1,
double  radius2,
int  nsides,
BODY *&  prism,
AcisOptions ao = NULL 
)

Creates an elliptical prism of given height, radii, and number of sides.



Role: Centers the prism at the origin, aligned the z-axis, and with one face perpendicular to the positive x-axis.

Errors: Either height, radius1, or radius2 is less than SPAresabs or nsides is less than 3.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
height height of prism.
radius1 major radius of circumscribed elliptical cylinder.
radius2 minor radius of circumscribed elliptical cylinder.
nsides number of sides.
prism prism body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_pyramid ( double  height,
double  radius1,
double  radius2,
double  top,
int  nsides,
BODY *&  pyramid,
AcisOptions ao = NULL 
)

Creates an elliptical pyramid of given height, radii, and number of sides.



Role: Centers the pyramid at the origin, aligned with the z-axis, and with one side of the base perpendicular to the positive x-axis. If the height is zero, the resulting body consists of one polygonal, double-sided, sheet face, lying in the xy plane.

Errors: Either radius1 or radius2 is less than SPAresabs or height is greater than zero and less than SPAresabs or top is less than -SPAresabs or nsides is less than 3.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
height height of pyramid.
radius1 major radius of base.
radius2 minor radius of base.
top major radius of top.
nsides number of sides.
pyramid pyramid body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_sphere ( double  radius,
BODY *&  sph,
AcisOptions ao = NULL 
)

Creates a sphere of given radius, centered at the origin.



Errors: Radius not greater than SPAresabs.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
radius radius of desired sphere.
sph sphere returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_spline ( const spline this_spline,
BODY *&  body,
AcisOptions ao = NULL 
)

Creates a body consisting of a single-sided face that is the whole of a given spline surface.



Effect: Changes model

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
this_spline spline surface.
body single-sided face body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_make_torus ( double  major_radius,
double  minor_radius,
BODY *&  tor,
AcisOptions ao = NULL 
)

Creates a torus of given major and minor radii centered at the origin.



Role: This API function creates a solid torus given the major radius and the minor radius. The torus is centered at the origin; the axis of the torus is parallel to the z-axis of the active working coordinate system.

Errors: minor_radius not greater than SPAresabs.  major_radius not greater than minus the minor_radius, or 0.


Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
major_radius radius of spine of desired torus.
minor_radius radius of cross-section of ring.
tor torus body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_sheet_from_ff ( int  num_faces,
FACE faces[],
BODY *&  body,
AcisOptions ao = NULL 
)

Creates a sheet body as a copy of a face.



Errors: Entity in array is not a FACE.

Limitations: Currently only handles one face. The face is passed in an array to enable future expansion of functionality without changing the function signature.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
num_faces number of faces (must be 1).
faces array containing face.
body sheet-body returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_solid_block ( const SPAposition pt1,
const SPAposition pt2,
BODY *&  block,
AcisOptions ao = NULL 
)

Creates a solid block given two positions on a diagonal of the block.



Role: This API function creates a solid block aligned with the current WCS with corners at the specified points (pt1 and pt2). The edges of the block are parallel to the axes of the active WCS. If the Z-coordinates are equal, a sheet body will be created in the XY plane.

Errors: Two given positions are identical. X- and/or Y-coordinates of the two points are equal (only Z-coordinates may be equal).

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
pt1 first position.
pt2 position diagonally opposite pt1.
block block returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_solid_cylinder_cone ( const SPAposition pt1,
const SPAposition pt2,
double  major_radius,
double  minor_radius,
double  top_radius,
const SPAposition xpt,
BODY *&  cyl_or_cone,
AcisOptions ao = NULL 
)

Creates a solid cylinder or cone given two positions on the axis.



Role: This API function creates a solid cylinder or cone. The cylinder or cone may be circular or elliptical.

For a circular cylinder or cone, specify the same values for major_radius and minor_radius. For an elliptical cylinder or cone, specify two different values.

For a cylinder, specify the same values for top_radius and major_radius. For a cone, specify two different values.

When creating an elliptical cone or cylinder, control the orientation of the major axis of the ellipse with xpt. If xpt is non-NULL, then xpt projects onto the plane defined by pt1 and the major axis is in the direction of the projection of xpt. If xpt is NULL, the system determines the orientation of the major axis from the active WCS.

Errors: Two given positions are identical. Any of the given radii is zero. Position in direction of major axis is provided on the cone axis.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
pt1 position at the bottom.
pt2 position at the top.
major_radius major radius at the bottom.
minor_radius minor radius at the bottom.
top_radius major radius at the top.
xpt position in direction of the major axis or NULL.
cyl_or_cone cylinder or cone returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_solid_sphere ( const SPAposition center,
double  radius,
BODY *&  sph,
AcisOptions ao = NULL 
)

Creates a solid sphere given the center position and radius.



Errors: Radius is zero.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
center center position of the sphere.
radius radius of the sphere.
sph sphere returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_solid_torus ( const SPAposition center,
double  major_radius,
double  minor_radius,
BODY *&  tor,
AcisOptions ao = NULL 
)

Creates a solid torus given the center as well as major and minor radii.



Role: This API function creates a solid torus given the center, the major radius, and the minor radius. The axis of the torus is parallel to the z-axis of the active working coordinate system.

Errors: Any of the radii is zero.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
center center of the torus.
major_radius major radius.
minor_radius minor radius.
tor torus returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_wiggle ( double  width,
double  depth,
double  height,
int  low_v_type,
int  high_v_type,
int  low_u_type,
int  high_u_type,
logical  height_given,
BODY *&  wiggle,
AcisOptions ao = NULL 
)

Creates a body having one B-spline face, for testing purposes.



Role: This API function creates a body having a B-spline surface patch that is sufficiently "interesting" to make the body useful in testing. If a height is provided, the resulting body is a block whose other five faces are planes. Otherwise, the body consists of a single B-spline face.

The B-spline surface is derived from the four B-spline curves used to define its edges. Each curve is a cubic B-spline with two spans, passing through three colinear points. The curves' shapes are specified by integer arguments, where:

0 is a straight line
1 is an "s" shape, starting at low parameter value with a 45 degree upward (positive z) tangent, and ending at high parameter in the same direction.
2 is a double hump, starting going upwards and ending downwards.
-1 is the same as 1, but inverted.
-2 is the same as 2, but inverted.

Errors: Width, depth, or height not greater than zero.  Invalid curve specification.


Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
width width of wiggle.
depth depth of wiggle.
height height of wiggle.
low_v_type spline shape parameter.
high_v_type spline shape parameter.
low_u_type spline shape parameter.
high_u_type spline shape parameter.
height_given flags whether the body has a height.
wiggle wiggle body returned.
ao ACIS options.

include <cstrapi.hxx>