0022870: EDF 10111 GEOM: MakePipe of a wire along an edge fails.

This commit is contained in:
skv 2015-12-24 10:30:49 +03:00
parent 80a0257573
commit c389c09498

View File

@ -108,6 +108,8 @@
#define GROUP_SIDE2 3 #define GROUP_SIDE2 3
#define GROUP_OTHER 4 #define GROUP_OTHER 4
static const Standard_Real TolPipeSurf = 5.e-4;
static bool FillGroups(const TopTools_SequenceOfShape *theGroups, static bool FillGroups(const TopTools_SequenceOfShape *theGroups,
const TopTools_IndexedMapOfShape &theIndices, const TopTools_IndexedMapOfShape &theIndices,
Handle(TColStd_HArray1OfInteger) *theGroupIds); Handle(TColStd_HArray1OfInteger) *theGroupIds);
@ -182,7 +184,8 @@ static Standard_Boolean BuildPipeShell(BRepOffsetAPI_MakePipeShell &theBuilder)
Standard_Boolean isDone = theBuilder.IsDone(); Standard_Boolean isDone = theBuilder.IsDone();
if (!isDone) { if (!isDone ||
theBuilder.ErrorOnSurface() > TolPipeSurf) {
// Try to use Descrete Trihedron mode. // Try to use Descrete Trihedron mode.
theBuilder.SetDiscreteMode(); theBuilder.SetDiscreteMode();
theBuilder.Build(); theBuilder.Build();
@ -3124,7 +3127,7 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
GeomFill_Trihedron theBestMode = EvaluateBestSweepMode(aWirePath); GeomFill_Trihedron theBestMode = EvaluateBestSweepMode(aWirePath);
BRepOffsetAPI_MakePipe aMkPipe(aWirePath, aShapeBase, theBestMode); BRepOffsetAPI_MakePipe aMkPipe(aWirePath, aShapeBase, theBestMode);
if (aMkPipe.IsDone()) { if (aMkPipe.IsDone() && aMkPipe.ErrorOnSurface() <= TolPipeSurf) {
aShape = aMkPipe.Shape(); aShape = aMkPipe.Shape();
if (!CreateGroups(aShapeBase, aWirePath, aMkPipe, aCI)) { if (!CreateGroups(aShapeBase, aWirePath, aMkPipe, aCI)) {