case BRepBuilderAPI_FaceDone:
DBRep::Set(a[1],aMF.Face());
break;
- case BRepLib_NoFace:
+ case BRepBuilderAPI_NoFace:
theDI << "Error. mkplane has been finished with \"No Face\" status.\n";
break;
- case BRepLib_NotPlanar:
+ case BRepBuilderAPI_NotPlanar:
theDI << "Error. mkplane has been finished with \"Not Planar\" status.\n";
break;
- case BRepLib_CurveProjectionFailed:
+ case BRepBuilderAPI_CurveProjectionFailed:
theDI << "Error. mkplane has been finished with \"Fail in projection curve\" status.\n";
break;
- case BRepLib_ParametersOutOfRange:
+ case BRepBuilderAPI_ParametersOutOfRange:
theDI << "Error. mkplane has been finished with \"Parameters are out of range\" status.\n";
break;
default:
DrawTrSurf_CurveColor(col);
Sprintf(name,"%s_%d",a[1],i);
- DrawTrSurf::Set(name,new Geom2d_TrimmedCurve(c,f,l));
+ Standard_Real fr = c->FirstParameter(), lr = c->LastParameter();
+ Standard_Boolean IsPeriodic = c->IsPeriodic();
+ if (c->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
+ {
+ const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (c)->BasisCurve();
+ IsPeriodic = aC->IsPeriodic();
+ fr = aC->FirstParameter();
+ lr = aC->LastParameter();
+ }
+ if(!IsPeriodic &&
+ ((fr - f > Precision::PConfusion()) || (l - lr > Precision::PConfusion())))
+ {
+ DrawTrSurf::Set(name, c);
+ }
+ else
+ {
+ DrawTrSurf::Set(name,new Geom2d_TrimmedCurve(c,f,l));
+ }
}
DrawTrSurf_CurveColor(savecol);
Standard_Real f,l;
const Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface
(TopoDS::Edge(SE),TopoDS::Face(SF),f,l);
+ Standard_Real fr = c->FirstParameter(), lr = c->LastParameter();
+ Standard_Boolean IsPeriodic = c->IsPeriodic();
+ if (c->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
+ {
+ const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (c)->BasisCurve();
+ IsPeriodic = aC->IsPeriodic();
+ fr = aC->FirstParameter();
+ lr = aC->LastParameter();
+ }
col = DBRep_ColorOrientation(SE.Orientation());
DrawTrSurf_CurveColor(col);
- DrawTrSurf::Set(a[1],new Geom2d_TrimmedCurve(c,f,l));
+ if(!IsPeriodic &&
+ ((fr - f > Precision::PConfusion()) || (l - lr > Precision::PConfusion())))
+ {
+ DrawTrSurf::Set(a[1], c);
+ }
+ else
+ {
+ DrawTrSurf::Set(a[1],new Geom2d_TrimmedCurve(c,f,l));
+ }
DrawTrSurf_CurveColor(savecol);
}
else {