aProfile->SetProfilePoints( aProfilePoints );
// Add profile to the stream
- isOK = AddProfile( aProfile ) && isOK;
+ bool isAdded = AddProfile( aProfile );
+ if ( !isAdded ) {
+ aProfile->Remove();
+ }
}
return isOK;
pointSeq.Append( gp_XYZ( aPoints[i], aPoints[i+1], aPoints[i+2] ) );
TopoDS_Shape aWire = HYDROData_PolylineXY::BuildWire( HYDROData_IPolyline::SECTION_SPLINE, false, pointSeq );
if ( !aWire.IsNull() )
- aBuilder.Add( aWire, aPreviewShape );
+ aBuilder.Add( aPreviewShape, aWire );
}
}