[cgma-dev] r4803 - cgm/trunk/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Fri May 6 11:29:04 CDT 2011


Author: janehu
Date: 2011-05-06 11:29:02 -0500 (Fri, 06 May 2011)
New Revision: 4803

Added:
   cgm/trunk/geom/OCC/OCCQueryEngine.cpp_4735
Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
1. Rewrote make_Curve with points and tangents function, passed testing case in makept.cpp.
2. Changed spheric and toric mid-surface intersection function to used sheet body instead of solid body. Consistent with Acis functions.
3. Changed make body from surface function to copy surface and create a sheet body instead of returning its existing body for non-stand-along surfaces.
4. Passed all testcases.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2011-05-05 18:28:29 UTC (rev 4802)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2011-05-06 16:29:02 UTC (rev 4803)
@@ -38,6 +38,9 @@
 #include "TopAbs_Orientation.hxx"
 #include "TopOpeBRep_Point2d.hxx"
 #include "TColgp_Array1OfPnt.hxx"
+#include "TColgp_HArray1OfPnt.hxx"
+#include "TColStd_HArray1OfBoolean.hxx"
+#include "TColgp_Array1OfVec.hxx"
 #include "TColStd_Array1OfReal.hxx"
 #include "TColStd_Array1OfInteger.hxx"
 #include "GC_MakeArcOfCircle.hxx"
@@ -57,6 +60,7 @@
 #include "BRepFilletAPI_MakeFillet.hxx"
 #include "BRepFilletAPI_MakeChamfer.hxx"
 #include "BRepAdaptor_CompCurve.hxx"
+#include "GeomAPI_Interpolate.hxx"
 #include "BRepFilletAPI_MakeFillet2d.hxx"
 #include "ChFi2d_ConstructionError.hxx"
 #include "Geom_BezierCurve.hxx"
@@ -288,88 +292,58 @@
         return (Curve *)NULL;
     }
 
-    DLIList<Curve*> new_curves;
-   
-    CubitVector* start_vector = NULL;
-    CubitVector* end_vector = NULL;
-    CubitVector* tangent_vector;
-    gp_Pnt start_pt1, pt1, pt2;
-    int size = 2;
-    TColStd_Array1OfReal knots(1, 2);
-    knots.SetValue(1, 0.);
-    knots.SetValue(2, 1.);
-    TColStd_Array1OfInteger multiplicities(1, 2);
-    multiplicities.SetValue(1,2);
-    multiplicities.SetValue(2,2);
-    int degree = 1;
-    gp_Vec tangent;
-    tangent_vector = point_tangents.get();
-    BRepBuilderAPI_MakeWire aWire;
-    for (int i = 1 ; i < point_list.size(); i++)
+    if(point_list.size() < 2)
     {
+        PRINT_ERROR("    Can't create a curve with less than 2 points\n");
+        return (Curve *)NULL;
+    }
 
-        //use every two points to make a spline, so it passes the points.


More information about the cgma-dev mailing list