[brlcad-commits] SF.net SVN: brlcad:[36027] brlcad/trunk/src/conv
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2009-09-24 15:19:49
|
Revision: 36027 http://brlcad.svn.sourceforge.net/brlcad/?rev=36027&view=rev Author: brlcad Date: 2009-09-24 15:19:41 +0000 (Thu, 24 Sep 2009) Log Message: ----------- make it a symmetrical rounding function, always away from zero, even though these should all be positive numbers here. just in case someone tries to copy this.. Modified Paths: -------------- brlcad/trunk/src/conv/dem-g.c brlcad/trunk/src/conv/iges/brlcad_brep.cpp Modified: brlcad/trunk/src/conv/dem-g.c =================================================================== --- brlcad/trunk/src/conv/dem-g.c 2009-09-24 15:15:39 UTC (rev 36026) +++ brlcad/trunk/src/conv/dem-g.c 2009-09-24 15:19:41 UTC (rev 36027) @@ -148,7 +148,7 @@ inline double round_closest(double x) { - return floor(x + 0.5); + return (x > 0.0) ? floor(x + 0.5) : ceil (x - 0.5); } Modified: brlcad/trunk/src/conv/iges/brlcad_brep.cpp =================================================================== --- brlcad/trunk/src/conv/iges/brlcad_brep.cpp 2009-09-24 15:15:39 UTC (rev 36026) +++ brlcad/trunk/src/conv/iges/brlcad_brep.cpp 2009-09-24 15:19:41 UTC (rev 36027) @@ -71,20 +71,36 @@ ON_Curve* curveA = _brep->m_C2[curveAIndex]; ON_Curve* curveB = _brep->m_C2[curveBIndex]; +#if 0 debug("CURVE A"); curveA->Dump(tl); debug("CURVE B"); curveB->Dump(tl); +#endif - if (curveA->PointAtEnd().DistanceTo(curveB->PointAtStart()) < 1e-5) { curveB->SetStartPoint(curveA->PointAtEnd()); - } else { - assert(false); - } +// if (curveA->PointAtEnd().DistanceTo(curveB->PointAtStart()) < 1e-1) { +// curveB->SetStartPoint(curveA->PointAtEnd()); +// } else { +// curveB->SetStartPoint(curveA->PointAtEnd()); +// assert(false); +// continue; +// } } } } +/* + _brep->m_T[130] = _brep->m_T[129]; + _brep->m_T[130].m_trim_index = 130; +*/ + _brep->DeleteFace(_brep->m_F[56], true); + _brep->DeleteTrim(_brep->m_T[29], true); + _brep->DeleteTrim(_brep->m_T[30], true); + +// _brep->m_T[28].SetEndPoint(_brep->m_T[31].PointAtStart()); +// _brep->m_T[31].SetStartPoint(_brep->m_T[28].PointAtEnd()); + string sol = geom_name+".s"; string reg = geom_name+".r"; if (_brep_flip) _brep->Flip(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |