The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)
HowTo:Access a curve from an EDGE?
From DocR19
The EDGE curve is the primary geometric definition in the tolerant EDGE-COEDGE relationship. The curve can be accessed in several different ways including: a copy, a const pointer or a pointer for update. For each method proper consideration needs to be given to the transformation and reverse bit(s). In general a pointer for update is rarely used and can cause grief if not utilized carefully.
Contents |
To Access a Copy of the Curve
To generate a copy of the curve under an EDGE first access the CURVE from the EDGE via the geometry member function and then use the trans_curve member function of the CURVE class. Two functional parameters can be used to determine if the reverse bit or the transformation should be applied.
A copy is an inexpensive operation since "use counting" is applied (especially when no transformation is supplied as the first argument). In the case of an analytic curve, "use counting" is not applied as the data is light weight. It is the responsibility of the caller to trans_curve to delete the curve.
Signature
CURVE* EDGE::geometry() const; curve* CURVE::trans_curve(SPAtransf const &, logical) const;
Header Files
#include "edge.hxx" #include "curve.hxx"
Example
EDGE* ed = something; curve* cu = ed->geometry()->trans_curve(get_owner_transf(ed), ed->sense());
Scheme Commands
; Copy a transformed linear edge (define tr (transform:translation (gvector 30 30 0))) (define edge1 (edge:line (position 0 0 0) (position 30 30 0))) (entity:transform edge1 tr) (edge:copy edge1)
To Access a const Pointer to the Curve
To access a const pointer use the geometry member function of EDGE and then the equation member function of CURVE. With this method the sense bit or transformation is not taken into consideration.
Signature
CURVE* EDGE::geometry() const; const curve& CURVE::equation() const;
Header Files
#include "edge.hxx" #include "curve.hxx"
Example
EDGE* ed = something; const curve *cu = &edge->geometry()->equation();
To Access a Pointer for Update
To access a pointer for updating the curve, use the geometry member function of EDGE and then the equation_for_update member function of CURVE. With this method the sense bit or transformation is not taken into consideration.
Signature
CURVE* EDGE::geometry() const; curve& CURVE::equation_for_update();
Header Files
#include "edge.hxx" #include "curve.hxx"
Example
EDGE* ed = something; curve* cu = ed->geometry()->equation_for_update();
Related content
- Other information on FAQs on Access a curve from an EDGE?.
