]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.jcae.opencascade/src/Geom.i
Updated OpenCASCADE to 7.3.0
[simantics/3d.git] / org.jcae.opencascade / src / Geom.i
index 1f130889ba633f052d829af4cac06a5b52b664eb..393fda74bdaf2e78545fa82571741ab842ea0faf 100644 (file)
@@ -42,9 +42,15 @@ class Handle_Geom_Geometry
        Handle_Geom_Geometry()=0;
 };
 
-class Handle_Geom_Curve: public Handle_Geom_Geometry
+//FIXME: 7.3.0: this is a major flaw, handles cannot be directly casted. I've now added downcast() methods without testing..
+//class Handle_Geom_Curve: public Handle_Geom_Geometry
+class Handle_Geom_Curve
 {
-       Handle_Geom_Curve()=0;  
+       Handle_Geom_Curve()=0;
+       
+       Handle_Geom_Curve downcast() {
+          return (*self);
+       }       
 };
 
 %extend Handle_Geom_Curve
@@ -75,9 +81,15 @@ class Handle_Geom_Curve: public Handle_Geom_Geometry
        }
 }
 
-class Handle_Geom_Surface: public Handle_Geom_Geometry
+//FIXME: 7.3.0
+//class Handle_Geom_Surface: public Handle_Geom_Geometry
+class Handle_Geom_Surface
 {
        Handle_Geom_Surface()=0;
+       
+       Handle_Geom_Curve downcast() {
+          return (*self);
+       }       
 };
 
 %extend Handle_Geom_Surface
@@ -134,17 +146,37 @@ class Handle_Geom2d_Geometry
        Handle_Geom2d_Geometry()=0;
 };
 
-class Handle_Geom2d_Curve: public Handle_Geom2d_Geometry
+//FIXME: 7.3.0
+//class Handle_Geom2d_Curve: public Handle_Geom2d_Geometry
+class Handle_Geom2d_Curve
 {
        Handle_Geom2d_Curve()=0;
+       
+       Handle_Geom2d_Geometry downcast() {
+          return (*self);
+       }       
 };
 
-class Handle_Geom_BoundedCurve : public Handle_Geom_Curve {
+//FIXME: 7.3.0
+//class Handle_Geom_BoundedCurve : public Handle_Geom_Curve
+class Handle_Geom_BoundedCurve
+{
        Handle_Geom_BoundedCurve()=0;
+       
+       Handle_Geom_Curve downcast() {
+          return (*self);
+       }       
 };
 
-class Handle_Geom_BSplineCurve : public Handle_Geom_BoundedCurve {
+//FIXME: 7.3.0
+//class Handle_Geom_BSplineCurve : public Handle_Geom_BoundedCurve
+class Handle_Geom_BSplineCurve
+{
        Handle_Geom_BSplineCurve()=0;
+       
+       Handle_Geom_BoundedCurve downcast() {
+          return (*self);
+       }       
 };
 
 %extend Handle_Geom_BSplineCurve
@@ -278,6 +310,13 @@ class Handle_Geom_BSplineCurve : public Handle_Geom_BoundedCurve {
   
 }
 
-class Handle_Geom_TrimmedCurve : public Handle_Geom_BoundedCurve {
+//FIXME: 7.3.0
+//class Handle_Geom_TrimmedCurve : public Handle_Geom_BoundedCurve
+class Handle_Geom_TrimmedCurve
+{
        Handle_Geom_TrimmedCurve()=0;
+       
+       Handle_Geom_BoundedCurve downcast() {
+          return (*self);
+       }       
 };