The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)
HowTo:Determine if two planes are equivalent?
From DocR19
A plane is determined by its normal vector and a point on the plane with this information, one can write an equation which is true for a point if and only if it is on the plane: such an equation is
where
is the test point,
is the base point (which could be any point on the plane), and
is the normal vector.
Given two such equations, one can test if they describe the same plane in two steps: first check that the normal vectors are parallel (in ACIS this can be done using parallel); then check that each base point lies on the opposite plane.
The parallel function will return false for antiparallel vectors; therefore this method will distinguish between planes with opposing normals. The parallel function uses a default tolerance of SPAresnor; this tolerance means that the distance between two planes with normals regarded as parallel will vary by less than SPAresabs over a region the size of the maximum supported model size.
Header Files
#include "pladef.hxx" #include "vector.hxx"
Example
logical same_planes = FALSE; plane* pl1 = some_plane; plane* pl2 = some_other_plane; if ( parallel( pl1->normal, pl2->normal ) ) same_planes = fabs( (pl2->root_point - pl1->root_point) % pl1->normal ) < SPAresabs;
