View Issue Details

IDProjectCategoryView StatusLast Update
0029648CommunityOCCT:Modeling Algorithmspublic2018-04-03 15:03
Reportervengelgardt Assigned Tomsv 
PrioritynormalSeveritymajor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2015 
Product Version7.2.0 
Summary0029648: Sweeping circle along polyline produces 'bad' shape
DescriptionCircle swept along polyline (3 lines). In result we get disconnected shell (opened wires > 2 for closed profile), sweep do not report any error in that case.

Attached image contains swept shape (with transformed and right corner transition), profile and path (green)
Steps To ReproducePaste this to void CModelingDoc::OnWire() and include <BRepOffsetAPI_MakePipeShell.hxx>

TopoDS_Wire profile;

    {

        const gp_Ax2 axis(gp_Pnt(0, 0, 0), gp_Vec(0, 0, 1));
        BRepBuilderAPI_MakeEdge edge_maker(gp_Circ(axis, 3));
        BRepBuilderAPI_MakeWire wire_maker;

        wire_maker.Add(edge_maker.Edge());

        profile = wire_maker.Wire();
    }

    TopoDS_Wire path;

    {
        BRep_Builder builder;
        TopoDS_Vertex verts[4];

        builder.MakeVertex(verts[0], gp_Pnt(0, 0, 0), Precision::Confusion());
        builder.MakeVertex(verts[1], gp_Pnt(0, 1, 14), Precision::Confusion());
        builder.MakeVertex(verts[2], gp_Pnt(0, 20, 10), Precision::Confusion());
        builder.MakeVertex(verts[3], gp_Pnt(0, 12, 31), Precision::Confusion());

        BRepBuilderAPI_MakeEdge line1(verts[0], verts[1]);
        BRepBuilderAPI_MakeEdge line2(verts[1], verts[2]);
        BRepBuilderAPI_MakeEdge line3(verts[2], verts[3]);
        BRepBuilderAPI_MakeWire wire_maker;

        wire_maker.Add(line1.Edge());
        wire_maker.Add(line2.Edge());
        wire_maker.Add(line3.Edge());

        path = wire_maker.Wire();
    }

    BRepOffsetAPI_MakePipeShell sweep(path);

    sweep.SetTransitionMode(BRepBuilderAPI_TransitionMode::BRepBuilderAPI_RightCorner);
    sweep.Add(profile, Standard_False, Standard_False);
    sweep.Build();

    Handle(AIS_Shape) ais_profile = new AIS_Shape(profile);
    myAISContext->SetColor(ais_profile,Quantity_NOC_GREEN,Standard_False);
    myAISContext->Display(ais_profile,Standard_False);

    Handle(AIS_Shape) ais_path = new AIS_Shape(path);
    myAISContext->SetColor(ais_path,Quantity_NOC_GREEN,Standard_False);
    myAISContext->Display(ais_path,Standard_False);

    Handle(AIS_Shape) ais_prism = new AIS_Shape(sweep.Shape());
    myAISContext->SetColor(ais_prism,Quantity_NOC_RED,Standard_False);
    myAISContext->SetTransparency(ais_prism, 0.6, Standard_False);
    myAISContext->Display(ais_prism,Standard_False);
TagsNo tags attached.
Test case number

Attached Files

  • sw_iss.png (132,580 bytes)
  • sweep1.png (66,649 bytes)
  • sweep2.png (56,554 bytes)

Activities

vengelgardt

2018-03-26 16:18

reporter  

sw_iss.png (132,580 bytes)

eryar

2018-04-03 15:02

developer   ~0075150

Hint: use "pload ALL" command to load standard commands
Draw[1]> polyline p 0 0 0 0 1 14 0 20 10 0 12 31
Draw[2]> circle c 0 0 0 0 0 1 3
Draw[3]> mkedge e c
Draw[4]> wire w e
Draw[5]> mksweep p
Draw[6]> addsweep w
Draw[7]> buildsweep r -C
Draw[8]> vdisplay p w r
Draw[9]> buildsweep r -R
Draw[10]> vdisplay r

eryar

2018-04-03 15:02

developer  

sweep1.png (66,649 bytes)

eryar

2018-04-03 15:03

developer  

sweep2.png (56,554 bytes)

Issue History

Date Modified Username Field Change
2018-03-26 16:18 vengelgardt New Issue
2018-03-26 16:18 vengelgardt Assigned To => msv
2018-03-26 16:18 vengelgardt File Added: sw_iss.png
2018-04-03 15:02 eryar Note Added: 0075150
2018-04-03 15:02 eryar File Added: sweep1.png
2018-04-03 15:03 eryar File Added: sweep2.png