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 vectors are the same?
From DocR19
Call the function same_vector in vector.hxx.
Contents |
Signature
logical same_vector(SPAvector const& v1, SPAvector const& v2, const double res = SPAresabs);
Header Files
#include "vector.hxx"
Example
SPAvector v1 = some_vector1; SPAvector v2 = some_vector2; logical same_vec = same_vector( v1, v2 );
Scheme Commands
; There is no direct Scheme interface: (define g1 (gvector 2 0 0)) (define g2 (gvector 2 0 0)) (define g3 (gvector:- g1 g2)) (test:less-than 1e-6 (gvector:length g3) "g1 and g2 are the same") ;*** Error: g1 and g2 are the same 0.000001 !< 0.000000 ;#f
Notes
- Two vectors are deemed to be the same if the vector of the difference between the two vectors (that is, a - b) has length less than the given tolerance.
- The default tolerance used is SPAresabs.
Related Content
- Other information on FAQs on Determine if two vectors are the same?.
