MantisBT - Community
View Issue Details
0023600Community[OCCT] OCCT:Modeling Algorithmspublic2012-11-28 18:512012-11-28 18:51
flauzon 
jgv 
normalmajor 
newopen 
WindowsXP64 bits
[OCCT] 6.5.4 
 
0023600: GeomLib::ExtendSurfByLength doesn't work in some case
I have 2 very similar surfaces, when I do a extend by length on both of them, in 1 case it is working fine, on the other case the surface is extended way too much. I have include a snapshot showing initals surfaces and extended surfaces.

The first case work well, the face is extended by about 0.025mm

The second case work not so well, the face is extended by about 0.56mm, which is 22x more than asked.

You could probably easily reproduce the case in Draw, but I never really use it (I should probably start learning it!)
// read brep files
BRep_Builder aBuilder;
TopoDS_Shape aShape1,aShape2;
BRepTools::Read(aShape1,"./bug_extendByLength1.brep",aBuilder);
BRepTools::Read(aShape2,"./bug_extendByLength2.brep",aBuilder);

// extract faces
TopoDS_Face aFace1=TopoDS::Face(aShape1);
TopoDS_Face aFace2=TopoDS::Face(aShape2);

// extend face1 on all side by 0.025mm, works fine
Standard_Real extra=.025;
Handle_Geom_Surface aSurface1=BRep_Tool::Surface(aFace1);
Handle_Geom_BoundedSurface aBSurf1=Handle_Geom_BoundedSurface::DownCast(aSurface1);
GeomLib::ExtendSurfByLength(aBSurf1,extra,1,Standard_True,Standard_True);
GeomLib::ExtendSurfByLength(aBSurf1,extra,1,Standard_True,Standard_False);
GeomLib::ExtendSurfByLength(aBSurf1,extra,1,Standard_False,Standard_True);
GeomLib::ExtendSurfByLength(aBSurf1,extra,1,Standard_False,Standard_False);


// extend face2 on all side by 0.025mm, don't works fine
Handle_Geom_Surface aSurface2=BRep_Tool::Surface(aFace2);
Handle_Geom_BoundedSurface aBSurf2=Handle_Geom_BoundedSurface::DownCast(aSurface2);
GeomLib::ExtendSurfByLength(aBSurf2,extra,1,Standard_True,Standard_True);
GeomLib::ExtendSurfByLength(aBSurf2,extra,1,Standard_True,Standard_False);
GeomLib::ExtendSurfByLength(aBSurf2,extra,1,Standard_False,Standard_True);
GeomLib::ExtendSurfByLength(aBSurf2,extra,1,Standard_False,Standard_False);


It was doing the same in OCC Release 6.5.3
No tags attached.
7z bug_extendByLength.7z (216,272) 2012-11-28 18:51
https://tracker.dev.opencascade.org/
Issue History
2012-11-28 18:51flauzonNew Issue
2012-11-28 18:51flauzonAssigned To => jgv
2012-11-28 18:51flauzonFile Added: bug_extendByLength.7z

There are no notes attached to this issue.