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

HowTo:Determine the type of an ENTITY?

From DocR19

Jump to: navigation, search

Every ENTITY has an is function associated with it. The following set of functions in acistype.hxx are used to determine if an ENTITY is a topological type, and upper case geometrical type or an attribute.

Contents

Signatures

logical is_BODY(const ENTITY* ent);
logical is_WIRE(const ENTITY* ent);
logical is_LUMP(const ENTITY* ent);
logical is_SHELL(const ENTITY* ent);
logical is_SUBSHELL(const ENTITY* ent);
logical is_FACE(const ENTITY* ent);
logical is_LOOP(const ENTITY* ent);
logical is_EDGE(const ENTITY* ent);
logical is_COEDGE(const ENTITY* ent);
logical is_VERTEX(const ENTITY* ent);
logical is_APOINT(const ENTITY* ent);
logical is_CURVE(const ENTITY* ent);
logical is_PCURVE(const ENTITY* ent);
logical is_STRAIGHT(const ENTITY* ent);
logical is_ELLIPSE(const ENTITY* ent);
logical is_INTCURVE(const ENTITY* ent);
logical is_HELIX(const ENTITY* ent);
logical is_SURFACE(const ENTITY* ent);
logical is_PLANE(const ENTITY* ent);
logical is_CONE(const ENTITY* ent);
logical is_SPHERE(const ENTITY* ent);
logical is_TORUS(const ENTITY* ent);
logical is_SPLINE(const ENTITY* ent);
logical is_ATTRIB(const ENTITY* ent);
logical is_ATTRIB_ST(const ENTITY* ent);

Header Files

#include "acistype.hxx"

Example

if (!is_BODY(body_ptr)) return NULL;

Scheme Commands

There is number of Scheme extensions for these functions :

body?
coedge?
curve?
edge?
face?
lump?
loop?
point?
shell?
surface?
vertex?
wire?
; body?
;
; create a solid block
(define block1 (solid:block (position 0 0 0)(position 15 15 15)))
;
; determine if the solid block is a body
(body? block1)
;; #t

Related Content

See also: Category:FAQs
Personal tools