View Issue Details

IDProjectCategoryView StatusLast Update
0030825CommunityOCCT:Modeling Algorithmspublic2020-01-22 10:12
Reporterabezotosniy Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.3.0 
Fixed in Version7.4.0 
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

  • path_profile.brep (1,688 bytes)

Activities

abezotosniy

2019-07-02 15:49

reporter  

path_profile.brep (1,688 bytes)

abezotosniy

2020-01-21 13:54

reporter   ~0089981

Fixed in 7.4.0

msv

2020-01-21 15:16

developer   ~0089983

Then I propose to close it.

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
2020-01-21 13:54 abezotosniy Note Added: 0089981
2020-01-21 15:16 msv Note Added: 0089983
2020-01-21 15:16 msv Assigned To msv => bugmaster
2020-01-21 15:16 msv Status new => feedback
2020-01-22 10:12 bugmaster Status feedback => closed
2020-01-22 10:12 bugmaster Resolution open => fixed
2020-01-22 10:12 bugmaster Fixed in Version => 7.4.0