MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029648Community[OCCT] OCCT:Modeling Algorithmspublic2018-03-26 16:182018-04-03 15:03
Reportervengelgardt 
Assigned Tomsv 
PrioritynormalSeveritymajor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.2.0 
Target VersionFixed in Version 
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 Filespng file icon sw_iss.png (132,580 bytes) 2018-03-26 16:18
png file icon sweep1.png (66,649 bytes) 2018-04-03 15:02
png file icon sweep2.png (56,554 bytes) 2018-04-03 15:03

- Relationships

-  Notes
(0075150)
eryar (developer)
2018-04-03 15:02

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

- 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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker