- if(aType == STANDARD_TYPE(Geom_Line)
- || aType == STANDARD_TYPE(Geom_Conic)
- || aType == STANDARD_TYPE(Geom_Circle)
- || aType == STANDARD_TYPE(Geom_Ellipse)
- || aType == STANDARD_TYPE(Geom_Hyperbola)
- || aType == STANDARD_TYPE(Geom_Parabola)) {
- isFound = true;
+ if(aType == STANDARD_TYPE(Geom_Line)
+ || aType == STANDARD_TYPE(Geom_Conic)
+ || aType == STANDARD_TYPE(Geom_Circle)
+ || aType == STANDARD_TYPE(Geom_Ellipse)
+ || aType == STANDARD_TYPE(Geom_Hyperbola)
+ || aType == STANDARD_TYPE(Geom_Parabola)) {
+ return true;
+ }
+ return false;
+ };
+
+ if(aShapeType == TopAbs_WIRE){
+ //check if wire consist of only one edge
+ int aNbEdges = 0;
+ TopExp_Explorer anExp(aShape, TopAbs_EDGE);
+ for (TopExp_Explorer anExp(aShape, TopAbs_EDGE); anExp.More(); anExp.Next()) {
+ aNbEdges++;
+ if(aNbEdges == 1){
+ const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
+ isFound = checkEdge(anEdge);
+ }
+ else{
+ //if more than one edge, check is not valid
+ isFound = false;
+ break;
+ }
+ }
+ }
+ else if(aShapeType == TopAbs_EDGE){
+ isFound = checkEdge(aShape);