Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031296Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2020-01-13 14:092020-01-22 10:11
Assigned Tobugmaster 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031296: Possible bug in BRepBuilderAPI_MakeFace
DescriptionComplaint from the customer.

"There is a critical bug that we saw in generating face from wire that includes segments constructed by 3 points arc. We managed to isolate this bug into the sample project in C++.
So, the wire itself is good, but the face is bad. The interesting/weird thing is that when we take the face and make a prism with (BRepPrimAPI_MakePrism) we get it good again.
We need a solution for that ASAP. Version 7.3 works well with this code."
Steps To ReproduceBRepBuilderAPI_MakeWire makeWire;

        gp_Pnt2d P1(-103.26571872383029, 39.221900326227335);
        gp_Pnt2d P2(-102.8970266913477, 38.772686946689618);
        gp_Pnt2d P3(-102.34091531178649, 38.603966442024792);

        gp_Pnt2d P4(-102.34091531178649, 37.603966442024792);
        gp_Pnt2d P5(-103.45258251508518, 37.941238899401739);
        gp_Pnt2d P6(-104.18959825634157, 38.83921689386225);

        Handle(Geom2d_Curve) C = GCE2d_MakeArcOfCircle(P1, P2, P3).Value();
        BRepBuilderAPI_MakeEdge2d makeEdge2D(C);

        makeEdge2D.Init(GCE2d_MakeSegment(P3, P4).Value());

        C = GCE2d_MakeArcOfCircle(P4, P5, P6).Value();

        makeEdge2D.Init(GCE2d_MakeSegment(P6, P1).Value());

        Handle(AIS_Shape) ais = new AIS_Shape(makeWire.Wire());
        myAISContext->SetMaterial(ais, Graphic3d_NOM_ALUMINIUM, Standard_False);
        myAISContext->SetDisplayMode(ais, 1, Standard_False);
        myAISContext->Display(ais, Standard_True);

        BRepBuilderAPI_MakeFace fb(makeWire.Wire());
        ais = new AIS_Shape(fb.Face());
        myAISContext->SetMaterial(ais, Graphic3d_NOM_BRONZE, Standard_False);
        myAISContext->SetDisplayMode(ais, 1, Standard_False);
        myAISContext->Display(ais, Standard_True);

TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
ifv (developer)
2020-01-14 14:32

The code has a drawback: edges has no 3d curves, so result face, as well as initial wire are wrong.
To fix this it is enough to build 3d curves by method BRepLib::BuildCurves3d(...):

  TopoDS_Wire aWire = makeWire.Wire();

 and use updated wire to build face:

  BRepBuilderAPI_MakeFace fb(aWire);
msv (developer)
2020-01-14 15:18

It is not a bug. Please close.

- Issue History
Date Modified Username Field Change
2020-01-13 14:09 szy New Issue
2020-01-13 14:09 szy Assigned To => msv
2020-01-14 12:23 utverdov Assigned To msv => ifv
2020-01-14 14:32 ifv Note Added: 0089884
2020-01-14 14:32 ifv Assigned To ifv => msv
2020-01-14 14:32 ifv Status new => resolved
2020-01-14 15:18 msv Note Added: 0089886
2020-01-14 15:18 msv Assigned To msv => bugmaster
2020-01-14 15:18 msv Status resolved => feedback
2020-01-14 15:19 msv Resolution open => no change required
2020-01-22 10:11 bugmaster Status feedback => closed

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker