Synopsis
PDX_MSGT gcr_Cone2(long option, MDA_PTR orig_db_ptr, MTH_3DPNT center, MTH_3DVEC axis_vec, MTH_3DVEC ref_vec, double radius, double angle, double top_parm, int gdx_model, MDA_PTR *gdx_cone_ptr)
Purpose
Create a GDX Cone.
Description
Given a point on the cone axis, a cone axis vector, the radius of the cone, the side angle, and the U parametrization reference vector, create a GDX cone entity.
The top_parm field in the GDX Cone is for internal use. If top_parm is greater than 0.0, then that value is used as the bound. Otherwise, the cone is considered to be unbounded.
The radius must be >= 0.0.
The angle must be > the current GDX ANGLE_TOL and < MTH_HALF_PI - the current GDX ANGLE_TOL.
If ref_vec is not NULL, the corresponding magnitude of the given vector must be > the current GDX NORMAL_MAG_TOL. If the given vector is not perpendicular to the cone axis vector within the current GDX ANGLE_TOL, the closest perpendicular vector is used.
If the ref_vec is NULL, an arbitrary ref_vec (perpendicular to the given axis_vec) will be determined and stored in the entity.
If the magnitude of the axis_vec cone axis vector is less than the current GDX NORMAL_MAG_TOL, the cone's axis vector is defaulted to be the Z axis.
\fBRules\fR .IP • 3 radius >= 0.0 .IP • 3 0.0 < angle < MTH_HALF_PI .IP • 3 top_parm > 0.0 (Cone is bounded in v direction) .IP • 3 top_parm < 0.0 (Cone is infinite in v direction) .IP • 3 ref_vec magnitude > 0.0 (if ref_vec not NULL) .LP
Input
option
GCR_NOVALIDATE
No validation will occur on the input data.
orig_db_ptr
The original entities orig_db_ptr as obtained from the mda_GetOrigDbptr function call, or MDA_NULL_PTR
center
The cone center point
axis_vec
The center axis of the cone
ref_vec
The U parametric axis reference vector, or NULL
radius
The cone radius at the cone center point
angle
The angle in radians of the cone side to the axis vector.
top_parm
The bound of the cones height (v). Positive value means cone is bounded, Negative value means cone is to be unbounded.
gdx_model
The GDX model for entity creation
Output
gdx_cone_ptr
Entity database pointer of the GDX Cone
Tolerances
NORMAL_MAG_TOL
ANGLE_TOL
ZERO_TOL
.fi
Return
GCR_NOERR
GCR_CONE_RADIUS
GCR_CONE_BOUNDS
GCR_CONE_U_REF_VECTOR
Low level error return
.fi