mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
In-code changes for ADD2
This commit is contained in:
@@ -705,7 +705,7 @@ if(NOT SCHEMA_VERSIONS)
|
||||
# super arbitrarily try to keep size down at least a little bit
|
||||
set(SCHEMA_VERSIONS "2x3" "4")
|
||||
else()
|
||||
set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_tc1" "4x3_add1")
|
||||
set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_tc1" "4x3_add1" "4x3_add2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -641,6 +641,14 @@ Ifc4x3_add1::IfcStyledItem* create_styled_item(Ifc4x3_add1::IfcRepresentationIte
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
Ifc4x3_add2::IfcStyledItem* create_styled_item(Ifc4x3_add2::IfcRepresentationItem* item, Ifc4x3_add2::IfcPresentationStyle* style) {
|
||||
boost::shared_ptr<aggregate_of<Ifc4x3_add2::IfcPresentationStyle>> styles(new aggregate_of<Ifc4x3_add2::IfcPresentationStyle>());
|
||||
styles->push(style);
|
||||
return new Ifc4x3_add2::IfcStyledItem(item, styles, boost::none);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename Schema>
|
||||
void setSurfaceColour_2x3(IfcHierarchyHelper<Schema>& file, typename Schema::IfcRepresentation* rep, typename Schema::IfcPresentationStyleAssignment* style_assignment) {
|
||||
typename Schema::IfcRepresentationItem::list::ptr items = rep->Items();
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
#include "Ifc4x3_add1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
#include "Ifc4x3_add2.h"
|
||||
#endif
|
||||
|
||||
#include "IfcFile.h"
|
||||
#include "IfcGlobalId.h"
|
||||
@@ -313,6 +316,28 @@ void set_children_of_relation(Ifc4x3_add1::IfcRelAggregates* t, aggregate_of_ins
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
Ifc4x3_add2::IfcObjectDefinition* get_parent_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatingStructure();
|
||||
}
|
||||
|
||||
aggregate_of_instance::ptr get_children_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatedElements()->generalize();
|
||||
}
|
||||
|
||||
aggregate_of_instance::ptr get_children_of_relation(Ifc4x3_add2::IfcRelAggregates* t) {
|
||||
return t->RelatedObjects()->generalize();
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t, aggregate_of_instance::ptr& cs) {
|
||||
t->setRelatedElements(cs->as<Ifc4x3_add2::IfcProduct>());
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x3_add2::IfcRelAggregates* t, aggregate_of_instance::ptr& cs) {
|
||||
t->setRelatedObjects(cs->as<Ifc4x3_add2::IfcObjectDefinition>());
|
||||
}
|
||||
#endif
|
||||
|
||||
IfcUtil::IfcBaseClass* get_parent_of_relation(IfcUtil::IfcBaseClass* t) {
|
||||
return *t->data().getArgument(
|
||||
t->declaration().as_entity()->attribute_index("RelatingObject"));
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
#include "Ifc4x3_add1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
#include "Ifc4x3_add2.h"
|
||||
#endif
|
||||
|
||||
double IfcParse::IfcSIPrefixToValue(const std::string& v) {
|
||||
if (v == "EXA") {
|
||||
@@ -151,6 +154,9 @@ template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3>(Ifc4x3::IfcNam
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3_add1>(Ifc4x3_add1::IfcNamedUnit* named_unit);
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3_add2>(Ifc4x3_add2::IfcNamedUnit* named_unit);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@@ -187,5 +193,8 @@ template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3_tc1>(typename I
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3_add1>(typename Ifc4x3_add1::IfcNamedUnit* named_unit);
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
template double IFC_PARSE_API IfcParse::get_SI_equivalent<Ifc4x3_add2>(typename Ifc4x3_add2::IfcNamedUnit* named_unit);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
#include "Ifc4x3_add1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
#include "Ifc4x3_add2.h"
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -194,6 +197,9 @@ const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& n
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
Ifc4x3_add1::get_schema();
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
Ifc4x3_add2::get_schema();
|
||||
#endif
|
||||
|
||||
std::map<std::string, const IfcParse::schema_definition*>::const_iterator it = schemas.find(boost::to_upper_copy(name));
|
||||
if (it == schemas.end()) {
|
||||
@@ -252,6 +258,9 @@ void IfcParse::clear_schemas() {
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
Ifc4x3_add1::clear_schema();
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
Ifc4x3_add2::clear_schema();
|
||||
#endif
|
||||
|
||||
// clear any remaining registered schemas
|
||||
// we pop schemas until map is empty, because map iteration is invalidated after each erasure
|
||||
|
||||
Reference in New Issue
Block a user