[brlcad-commits] SF.net SVN: brlcad:[59533] brlcad/trunk/src/librt/primitives/eto/eto_brep. cpp
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2014-01-27 15:33:32
|
Revision: 59533 http://sourceforge.net/p/brlcad/code/59533 Author: starseeker Date: 2014-01-27 15:33:27 +0000 (Mon, 27 Jan 2014) Log Message: ----------- If eip->eto_C is parallel to eip->eto_N, the brep conversion routine has problems. Try the x and y vectors if eto_C is parallel - one of them should work... Modified Paths: -------------- brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp Modified: brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp 2014-01-27 14:58:06 UTC (rev 59532) +++ brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp 2014-01-27 15:33:27 UTC (rev 59533) @@ -60,6 +60,15 @@ // and scale it. VCROSS(v1, eip->eto_C, eip->eto_N); + if (NEAR_ZERO(MAGNITUDE(v1), VUNITIZE_TOL)) { + vect_t dir_vect; + VSET(dir_vect, 0, 1, 0); + VCROSS(v1, dir_vect, eip->eto_N); + if (NEAR_ZERO(MAGNITUDE(v1), VUNITIZE_TOL)) { + VSET(dir_vect, 1, 0, 0); + VCROSS(v1, dir_vect, eip->eto_N); + } + } point_t temp; VMOVE(temp, v1); VCROSS(v1a, v1, eip->eto_N); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |