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

janehu at mcs.anl.gov janehu at mcs.anl.gov
Thu Dec 18 14:30:57 CST 2008


Author: janehu
Date: 2008-12-18 14:30:56 -0600 (Thu, 18 Dec 2008)
New Revision: 2492

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Working on finding a solution to create incircle of 3 curves.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-12-18 20:03:40 UTC (rev 2491)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-12-18 20:30:56 UTC (rev 2492)
@@ -4826,7 +4826,22 @@
                                           Curve* curve3, 
                                           bool full  )
 { 
+  GeometryType type1 = CAST_TO(curve1, OCCCurve)->geometry_type();
+  GeometryType type2 = CAST_TO(curve2, OCCCurve)->geometry_type();
+  GeometryType type3 = CAST_TO(curve3, OCCCurve)->geometry_type();
+  if(type1 != STRAIGHT_CURVE_TYPE || type2 != STRAIGHT_CURVE_TYPE ||
+     type3 != STRAIGHT_CURVE_TYPE)
+  {
+    PRINT_WARNING("Need three straight curves to calculate incenter.\n");
+    return (Curve*) NULL;
+  } 
   
+  //0.check that non of the curves are parallel of each other.
+  //1.find the angle between each of the two curves
+  //2.create curves to bisection each of the angle passing through the vertices
+  //of the triangle
+  //3. find the intersection of each of the bisection curve with the third curve
+  //4. use the 3 intersection points to find the arc or circle.
 }
 
 //===============================================================================




More information about the cgma-dev mailing list