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["solid"] = Solid;
- MyShapeTypes["plane"] = Plane;
- MyShapeTypes["shell"] = Shell;
+ 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())
return MyShapeTypes[aType];
-
+
Events_Error::send("Shape type defined in XML is not implemented!");
return AnyShape;
}
case Face:
aValid = theShape->isFace();
break;
+ case Shell:
+ aValid = theShape->shapeType() == GeomAPI_Shape::SHELL;
+ break;
case Solid:
aValid = theShape->isSolid() || theShape->isCompSolid() ||
theShape->isCompoundOfSolids();
break;
- case Shell:
- aValid = theShape->shapeType() == GeomAPI_Shape::SHELL;
+ case CompSolid:
+ aValid = theShape->shapeType() == GeomAPI_Shape::COMPSOLID;
+ break;
case Compound:
aValid = theShape->isCompound();
break;