[brlcad-commits] SF.net SVN: brlcad:[35913] brlcad/trunk/src/librt/primitives/rhc/rhc_brep. cpp
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2009-09-16 08:37:22
|
Revision: 35913 http://brlcad.svn.sourceforge.net/brlcad/?rev=35913&view=rev Author: starseeker Date: 2009-09-16 00:46:31 +0000 (Wed, 16 Sep 2009) Log Message: ----------- Get closer to hyperbolic shape, still nowhere near correct. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp Modified: brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2009-09-15 14:29:08 UTC (rev 35912) +++ brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2009-09-16 00:46:31 UTC (rev 35913) @@ -75,11 +75,13 @@ // Next, create a hyperbolic curve corresponding to the shape of // the hyperboloid in the plane. Need the two end points and // need to solve for the focus of the hyperbola - point_t x_rev_dir, ep1, ep2, ep3, focus; + point_t x_rev_dir, ep1, ep2, ep3, tmppt; VREVERSE(x_rev_dir, x_dir); VADD2(ep1, p1_origin, x_rev_dir); - VADD2(ep2, p1_origin, eip->rhc_B); + VSCALE(tmppt, eip->rhc_B, 4); + VADD2(ep2, p1_origin, tmppt); + VSET(ep2, ep2[0], ep2[1]*4, ep2[2]); VADD2(ep3, p1_origin, x_dir); ON_3dPoint onp1 = ON_3dPoint(ep1); ON_3dPoint onp2 = ON_3dPoint(ep2); @@ -94,7 +96,7 @@ hypnurbscurve->SetCV(0,ON_3dPoint(ep1)); hypnurbscurve->SetCV(1,ON_3dPoint(ep2)); hypnurbscurve->SetCV(2,ON_3dPoint(ep3)); - hypnurbscurve->SetWeight(1,0.25); + hypnurbscurve->SetWeight(1,4); bu_log("Valid nurbs curve: %d\n", hypnurbscurve->IsValid(dump)); hypnurbscurve->Dump(*dump); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |