Skip to content
Snippets Groups Projects
Commit dbc2624f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix crash when trying to export brep/step and there's no internal occ model

parent 90a00aae
No related branches found
No related tags found
No related merge requests found
......@@ -1053,26 +1053,27 @@ int GModel::readOCCIGES(const std::string &fn)
int GModel::writeOCCBREP(const std::string &fn)
{
_occ_internals->buildShapeFromGModel(this);
if(!_occ_internals){
Msg::Error("No OpenCASCADE model found");
return 0;
}
else
else{
_occ_internals->buildShapeFromGModel(this);
_occ_internals->writeBREP(fn.c_str());
}
return 1;
}
int GModel::writeOCCSTEP(const std::string &fn)
{
_occ_internals->buildShapeFromGModel(this);
if(!_occ_internals){
Msg::Error("No OpenCASCADE model found");
return 0;
}
else
else{
_occ_internals->buildShapeFromGModel(this);
_occ_internals->writeSTEP(fn.c_str());
}
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment