View Issue Details

IDProjectCategoryView StatusLast Update
0026283CommunityOCCT:Modeling Algorithmspublic2015-08-26 11:27
Reportersraymond Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
PlatformMacOSOS 
Product Version6.9.0 
Summary0026283: Fusing BRepOffsetAPI_MakePipeShell and BRepPrimAPI_MakeRevol Fails
DescriptionFusing the shapes generated by this tow function fails. But if the same shape is also generated by BRepOffsetAPI_MakePipeShell, fuse operation works.
Steps To Reproduce    double R1 = 100, R2 = 20;

    gp_Circ circleSection1(gp_Ax2(gp_Pnt(R1,0,0),gp_Dir(0,1,0)),R2);
    gp_Circ circleSpine(gp_Ax2(gp_Pnt(),gp_Dir(0,0,1)),R1);
    TopoDS_Wire section1Wire = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circleSection1));
    TopoDS_Wire spine1Wire = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circleSpine,0,M_PI));
    BRepOffsetAPI_MakePipeShell pipeBuilder1(spine1Wire);
    pipeBuilder1.Add(section1Wire);
    pipeBuilder1.Build();
    pipeBuilder1.MakeSolid();

    gp_Circ circleSection2(gp_Ax2(gp_Pnt(R1-R2,0,0),gp_Dir(0,1,0)),R2/3.);
    TopoDS_Wire section2Wire = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circleSection2));
    gp_Trsf rotZ;
    rotZ.SetRotation(gp_Ax1(gp_Pnt(),gp_Dir(0,0,1)),M_PI_4);
    section2Wire.Move(rotZ);
    BRepPrimAPI_MakeRevol revol(section2Wire,gp_Ax1(gp_Pnt(),gp_Dir(0,0,1)), M_PI_2);

    BRepAlgoAPI_Fuse fuseOp1(pipeBuilder1.Shape(),revol.Shape());
    bool isOk1 = fuseOp1.IsDone();
    if(isOk1) std::cout << "fuseOp1 ok";

    TopoDS_Wire spine2Wire = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(circleSpine,M_PI_4,3 * M_PI_4));
    BRepOffsetAPI_MakePipeShell pipeBuilder2(spine2Wire);
    pipeBuilder2.Add(section2Wire);
    pipeBuilder2.Build();
    pipeBuilder2.MakeSolid();

    BRepAlgoAPI_Fuse fuseOp2(pipeBuilder1.Shape(),pipeBuilder2.Shape());
    bool isOk2 = fuseOp2.IsDone();
    if(isOk2) std::cout << "fuseOp2 ok";
TagsNo tags attached.
Test case number

Attached Files

Activities

sraymond

2015-05-27 19:56

developer  

FuseIssue.png (200,820 bytes)   

ifv

2015-05-29 15:00

developer   ~0041732

class BRepPrimAPI_MakeRevol creates SHELL, when input parameter is WIRE, but operation "fuse" needs SOLID for input.
To create SOLID by revol it is necessary to use FACE as input, something like that:
...
  TopoDS_Face F = BRepBuilderAPI_MakeFace(section2Wire, Standard_True);
  //BRepPrimAPI_MakeRevol revol(section2Wire,gp_Ax1(gp_Pnt(),gp_Dir(0,0,1)), M_PI_2);
  BRepPrimAPI_MakeRevol revol(F,gp_Ax1(gp_Pnt(),gp_Dir(0,0,1)), M_PI_2);
...

sraymond

2015-05-29 15:04

developer   ~0041735

Thanks, sorry for the inconvenience.

Issue History

Date Modified Username Field Change
2015-05-27 19:56 sraymond New Issue
2015-05-27 19:56 sraymond Assigned To => msv
2015-05-27 19:56 sraymond File Added: FuseIssue.png
2015-05-28 09:27 msv Assigned To msv => ifv
2015-05-29 15:00 ifv Note Added: 0041732
2015-05-29 15:00 ifv Assigned To ifv => msv
2015-05-29 15:00 ifv Status new => resolved
2015-05-29 15:04 sraymond Note Added: 0041735
2015-05-29 15:58 msv Status resolved => reviewed
2015-05-29 15:58 msv Resolution open => no change required
2015-05-29 15:58 msv Assigned To msv => bugmaster
2015-05-29 16:15 bugmaster Status reviewed => closed
2015-08-26 11:27 abv Target Version 7.1.0 =>