mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 11:24:19 +00:00
ifcopenshell.validate to catch invalid entities used in entities attributes #6409
Example
```
For instance:
# 1 =IFCCARTESIANPOINT((5.,5.,nan.));
Entity with name 'nan.' not found in schema 'IFC4'
```
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
|
||||
FILE_NAME('','2022-10-01T16:31:47',(''),(''),'IfcOpenShell 0.7.0','IfcOpenShell 0.7.0','');
|
||||
FILE_SCHEMA(('IFC4'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1=IFCCARTESIANPOINT((5.,5.,nan.));
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
@@ -726,7 +726,7 @@ void IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::enti
|
||||
context.push(simple_type_instance);
|
||||
simple_type_instance->file_ = this;
|
||||
} catch (IfcException& e) {
|
||||
Logger::Message(Logger::LOG_ERROR, e.what());
|
||||
Logger::Message(Logger::LOG_ERROR, std::string(e.what()) + " at offset " + std::to_string(next.startPos));
|
||||
// #4070 We didn't actually capture an aggregate entry, undo length increment.
|
||||
return_value--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user