[cgma-dev] r2467 - cgm/trunk/geom/OCC
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Thu Dec 4 11:32:31 CST 2008
Author: janehu
Date: 2008-12-04 11:32:31 -0600 (Thu, 04 Dec 2008)
New Revision: 2467
Modified:
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
Log:
Fixed the problem of transformation for surface's points when drawing.
Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2008-12-04 16:44:16 UTC (rev 2466)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2008-12-04 17:32:31 UTC (rev 2467)
@@ -273,6 +273,8 @@
TopLoc_Location L;
Handle_Poly_Triangulation facets = BRep_Tool::Triangulation(*Topo_Face, L);
+ gp_Trsf tf = L.Transformation();
+
if(facets.IsNull() || facets->NbTriangles() == 0)
{
//do triangulation
@@ -336,6 +338,9 @@
for (int i = 0; i < number_points ; i ++)
{
gp_Pnt gp_pnt = points.Value(i);
+ if( !L.IsIdentity())
+ gp_pnt.Transform(tf);
+
GPoint gPnt;
gPnt.x = gp_pnt.X();
gPnt.y = gp_pnt.Y();
More information about the cgma-dev
mailing list