mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Add warning #109
This commit is contained in:
@@ -154,6 +154,11 @@ namespace IfcGeom {
|
|||||||
initUnits();
|
initUnits();
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
|
||||||
|
std::set<std::string> allowed_context_types;
|
||||||
|
allowed_context_types.insert("model");
|
||||||
|
allowed_context_types.insert("plan");
|
||||||
|
allowed_context_types.insert("notdefined");
|
||||||
|
|
||||||
std::set<std::string> context_types;
|
std::set<std::string> context_types;
|
||||||
if (!settings.get(IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) {
|
if (!settings.get(IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) {
|
||||||
// Really this should only be 'Model', as per
|
// Really this should only be 'Model', as per
|
||||||
@@ -192,6 +197,10 @@ namespace IfcGeom {
|
|||||||
if (context->hasContextType()) {
|
if (context->hasContextType()) {
|
||||||
std::string context_type = context->ContextType();
|
std::string context_type = context->ContextType();
|
||||||
boost::to_lower(context_type);
|
boost::to_lower(context_type);
|
||||||
|
|
||||||
|
if (allowed_context_types.find(context_type) == allowed_context_types.end()) {
|
||||||
|
Logger::Message(Logger::LOG_ERROR, std::string("ContextType '") + context->ContextType() + "' not allowed:", context->entity);
|
||||||
|
}
|
||||||
if (context_types.find(context_type) != context_types.end()) {
|
if (context_types.find(context_type) != context_types.end()) {
|
||||||
filtered_contexts->push(context);
|
filtered_contexts->push(context);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user