- if( aMakeFace.IsDone() ) {
- aBuilder.Add( aCompound, aMakeFace.Face() );
+ if( aMakeFace.IsDone() )
+ {
+ Handle(ShapeAnalysis_Wire) aSAW = new ShapeAnalysis_Wire(aW, aMakeFace.Face(), Precision::Confusion());
+ if (!aSAW->CheckSelfIntersection())
+ aSeq.Append( aMakeFace.Face() );
+ else
+ {
+ anErrStat = true;
+ theErrorMsg = "Can't create landcover on the given polyline\nSelf-intersection of wire(s) have been detected";
+ }