MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030825Community[OCCT] OCCT:Modeling Algorithmspublic2019-07-02 15:492019-07-02 15:49
Reporterabezotosniy 
Assigned Tomsv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0030825: Crash during use BRepOffsetAPI_MakePipeShell
DescriptionI got a crash at the time when I expect a result or an error message when using BRepOffsetAPI_MakePipeShell for attached input data.
Steps To Reproduce1. Download path_profile.brep and put it into ${opencascade-7.3.0}\data\occ

2. Replace corresponding method in ${opencascade-7.3.0}\samples\mfc\standard\02_Modeling\src\ModelingDoc.cpp

void CModelingDoc::OnPipe()
{
    AIS_ListOfInteractive aList;
    myAISContext->DisplayedObjects(aList);
    AIS_ListIteratorOfListOfInteractive aListIterator;
    for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
        myAISContext->Remove (aListIterator.Value(), Standard_False);
    }

    // Read arguments
    TopoDS_Shape compound;
    {
        std::filebuf aFileBuf;
        std::istream aStream(&aFileBuf);

        CString tool_file;
        tool_file.GetEnvironmentVariable(L"CSF_OCCTDataPath");
        tool_file += "\\occ\\path_profile.brep";

        if(!aFileBuf.open(tool_file, ios::in))
        {
            AfxMessageBox(L"File not found");
            return;
        }

        BRep_Builder aBuilder;
        BRepTools::Read(compound, aStream, aBuilder);
    }

    std::vector<TopoDS_Shape> path_profile;
    for(TopoDS_Iterator exp(compound); exp.More(); exp.Next())
    {
        path_profile.push_back(exp.Value());
    }

    if(path_profile.size() != 2)
    {
        AfxMessageBox(L"Invalid number of arguments");
        return;
    }

    TopoDS_Shape path = path_profile[0];
    {
        Handle(AIS_Shape) ais = new AIS_Shape(path);
        myAISContext->SetColor(ais, Quantity_NOC_GREEN, Standard_False);
        myAISContext->Display(ais, Standard_False);
        Fit();
        Sleep(1000);
    }

    TopoDS_Shape profile = path_profile[1];
    {
        Handle(AIS_Shape) ais = new AIS_Shape(profile);
        myAISContext->SetColor(ais, Quantity_NOC_MATRABLUE, Standard_False);
        myAISContext->Display(ais, Standard_False);
        Fit();
        Sleep(1000);
    }

    TopoDS_Wire path_wire = TopoDS::Wire(path);
    BRepOffsetAPI_MakePipeShell sweep(path_wire);

    TopExp_Explorer exp(path, TopAbs_EDGE);
    TopoDS_Vertex vertex = TopExp::FirstVertex(TopoDS::Edge(exp.Current()), Standard_True);

    sweep.SetTransitionMode(BRepBuilderAPI_TransitionMode::BRepBuilderAPI_RightCorner);
    sweep.Add(profile, vertex, Standard_False, Standard_False);
    sweep.Build();
}
TagsNo tags attached.
Test case number
Attached Files? file icon path_profile.brep (1,688 bytes) 2019-07-02 15:49

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-07-02 15:49 abezotosniy New Issue
2019-07-02 15:49 abezotosniy Assigned To => msv
2019-07-02 15:49 abezotosniy File Added: path_profile.brep


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker