[cgma-dev] r4481 - cgm/branches/merge-cubit12/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Thu Feb 3 13:19:49 CST 2011


Author: janehu
Date: 2011-02-03 13:19:48 -0600 (Thu, 03 Feb 2011)
New Revision: 4481

Modified:
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.hpp
Log:
Added make_Curve function that is specific to cubit12_merge system. Updated one imprint function with some new arguments. Haven't unit-test this function. There were some link problems.

Modified: cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-02 17:08:07 UTC (rev 4480)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-03 19:19:48 UTC (rev 4481)
@@ -38,11 +38,14 @@
 #include "TopAbs_Orientation.hxx"
 #include "TopOpeBRep_Point2d.hxx"
 #include "TColgp_Array1OfPnt.hxx"
+#include "TColStd_Array1OfReal.hxx"
+#include "TColStd_Array1OfInteger.hxx"
 #include "GC_MakeArcOfCircle.hxx"
 #include "GC_MakeCircle.hxx"
 #include "Geom_Circle.hxx"
 #include "Geom_SurfaceOfLinearExtrusion.hxx"
 #include "Geom_RectangularTrimmedSurface.hxx"
+#include "Geom_BSplineCurve.hxx"
 #include "Handle_Geom_RectangularTrimmedSurface.hxx"
 #include "GC_MakeArcOfHyperbola.hxx"
 #include "GC_MakeArcOfParabola.hxx"
@@ -266,6 +269,109 @@
 //===============================================================================
 // Function   : make_Curve
 // Member Type: PUBLIC
+// Description: make a  spline curve by using the points and tangents.
+//              size of point list and tangents must be the same.
+//              values in the tangent list may be null.
+// Author     : Jane Hu
+// Date       : 01/11
+//===============================================================================
+Curve* OCCModifyEngine::make_Curve( DLIList<CubitVector*>& point_list,
+                             DLIList<CubitVector*>& point_tangents) const
+{
+    if (point_list.size() != point_tangents.size())
+    {
+        PRINT_ERROR("    point list and tangent list must have same size\n");
+        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 i = 1;
+    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);


More information about the cgma-dev mailing list