The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)

HowTo:Evaluate the curve from an EDGE?

From DocR19

Jump to: navigation, search

To evaluate a position, tangent or curvature for the curve of an EDGE, use one of the functions in geometry.hxx. Alternatively, you can access the curve and evaluate it directly, but take care to consider the reverse bit. To evaluate the start of end of an EDGE, refer to HowTo:Evaluate_the_start_or_end_point_of_an_EDGE?.

Contents

Signature

Position evaluations:

SPAposition edge_start_pos(EDGE *,
			   SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAposition edge_mid_pos(EDGE *,
			 SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAposition edge_end_pos(EDGE *,
		         SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAposition edge_param_pos(EDGE *,
			   double,
			   SPAtransf const & = *(SPAtransf *)NULL_REF);

Tangent Evaluations:

SPAunit_vector edge_start_dir(EDGE *,
			      SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAunit_vector edge_mid_dir(EDGE *,
			    SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAunit_vector edge_end_dir(EDGE *,
			    SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAunit_vector edge_param_dir(EDGE *,
			      double,
			      SPAtransf const & = *(SPAtransf *)NULL_REF);

Curvature Evaluations:

SPAvector edge_start_curv(EDGE *,
			  SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAvector edge_mid_curv(EDGE *,
			SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAvector edge_end_curv(EDGE *,
			SPAtransf const & = *(SPAtransf *)NULL_REF);
 
SPAvector edge_param_curv(EDGE *,
			  double,
			  SPAtransf const & = *(SPAtransf *)NULL_REF);

Header Files

#include "geometry.hxx"
#include "edge.hxx"

Example

EDGE* edge = someedge;
SPAposition pos = edge_param_pos(edge, 0.5);
SPAtransf tr = sometransform;
SPAunit_vector dir = edge_param_dir(edge, 0.5, tr);

Scheme Commands

The following Scheme commands are available:

Scheme Example

(define ell_ed (edge:ellipse (position 0 0 0) (gvector 0 0 10) (gvector 10 0 0) 0.5 0 90))
; ell_ed
(define ell_cur (curve:from-edge ell_ed))
; ell_cur
(edge:reverse ell_ed)
; the edge and the underlying curve have reverse senses so the start and ends of the 
; edge are the opposite to the curve
(curve:start-pos ell_ed)
; #[ position 0 5 0 ]
(curve:start-pos ell_cur)
; #[ position 10 0 0 ]
(curve:end-pos ell_ed)
; #[ position 10 0 0 ]
(curve:end-pos ell_cur)
; #[ position 0 5 0 ]
(edge:start-dir ell_ed)
; #[ gvector 10 0 0 ]
acis>
Personal tools