mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 07:38:37 +00:00
Make sure C++ exceptions do not crash the Python interpreter
This commit is contained in:
@@ -282,6 +282,9 @@
|
||||
kernel.setValue(IfcGeom::Kernel::GV_PRECISION, precision);
|
||||
|
||||
IfcGeom::BRepElement<double>* brep = kernel.create_brep_for_representation_and_product<double>(settings, representation, product);
|
||||
if (!brep) {
|
||||
throw IfcParse::IfcException("Failed to process shape");
|
||||
}
|
||||
if (settings.use_brep_data()) {
|
||||
IfcGeom::SerializedElement<double>* serialization = new IfcGeom::SerializedElement<double>(*brep);
|
||||
delete brep;
|
||||
|
||||
Reference in New Issue
Block a user