Salome HOME
Issue #1366: Remove Sub-Shapes feature added.
[modules/shaper.git] / src / GeomValidators / GeomValidators_ShapeType.cpp
index 141839ed1213ac7bd43e073405fc51bed4466a06..f9a4e517de50d6dc3691d4501dd87259360c1efa 100755 (executable)
@@ -25,16 +25,18 @@ static EdgeTypes MyShapeTypes;
 GeomValidators_ShapeType::TypeOfShape GeomValidators_ShapeType::shapeType(const std::string& theType)
 {
   if (MyShapeTypes.size() == 0) {
-    MyShapeTypes["empty"]  = Empty;
-    MyShapeTypes["vertex"] = Vertex;
-    MyShapeTypes["edge"]   = Edge;
-    MyShapeTypes["line"]   = Line;
-    MyShapeTypes["circle"] = Circle;
-    MyShapeTypes["wire"]   = Wire;
-    MyShapeTypes["face"]   = Face;
-    MyShapeTypes["plane"]  = Plane;
-    MyShapeTypes["shell"]  = Shell;
-    MyShapeTypes["solid"]  = Solid;
+    MyShapeTypes["empty"]     = Empty;
+    MyShapeTypes["vertex"]    = Vertex;
+    MyShapeTypes["edge"]      = Edge;
+    MyShapeTypes["line"]      = Line;
+    MyShapeTypes["circle"]    = Circle;
+    MyShapeTypes["wire"]      = Wire;
+    MyShapeTypes["face"]      = Face;
+    MyShapeTypes["plane"]     = Plane;
+    MyShapeTypes["shell"]     = Shell;
+    MyShapeTypes["solid"]     = Solid;
+    MyShapeTypes["compsolid"] = CompSolid;
+    MyShapeTypes["compound"]  = Compound;
   }
   std::string aType = std::string(theType.c_str());
   if (MyShapeTypes.find(aType) != MyShapeTypes.end())
@@ -224,6 +226,9 @@ bool GeomValidators_ShapeType::isValidShape(const GeomShapePtr theShape,
       aValid = theShape->isSolid() || theShape->isCompSolid() ||
                theShape->isCompoundOfSolids();
       break;
+    case CompSolid:
+      aValid = theShape->shapeType() == GeomAPI_Shape::COMPSOLID;
+      break;
     case Compound:
       aValid = theShape->isCompound();
       break;