mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
IfcGeomIterator: use fully qualified symbol for filter_t to fix SWIT code generation + fix getObject()
This commit is contained in:
committed by
Thomas Krijnen
parent
0383221d00
commit
5d7b392415
@@ -147,7 +147,7 @@ namespace IfcGeom {
|
|||||||
|
|
||||||
/// @todo public/private sections all over the place: move all public to the beginning of the class
|
/// @todo public/private sections all over the place: move all public to the beginning of the class
|
||||||
public:
|
public:
|
||||||
Iterator(const IteratorSettings& settings, const std::string& filename, std::vector<filter_t>& filters)
|
Iterator(const IteratorSettings& settings, const std::string& filename, std::vector<IfcGeom::filter_t>& filters)
|
||||||
: settings(settings)
|
: settings(settings)
|
||||||
, ifc_file(new IfcParse::IfcFile)
|
, ifc_file(new IfcParse::IfcFile)
|
||||||
, owns_ifc_file(true)
|
, owns_ifc_file(true)
|
||||||
@@ -318,8 +318,8 @@ namespace IfcGeom {
|
|||||||
|
|
||||||
IfcParse::IfcFile* getFile() const { return ifc_file; }
|
IfcParse::IfcFile* getFile() const { return ifc_file; }
|
||||||
|
|
||||||
const std::vector<filter_t>& filters() const { return filters_; }
|
const std::vector<IfcGeom::filter_t>& filters() const { return filters_; }
|
||||||
std::vector<filter_t>& filters() { return filters_; }
|
std::vector<IfcGeom::filter_t>& filters() { return filters_; }
|
||||||
|
|
||||||
const gp_XYZ& bounds_min() const { return bounds_min_; }
|
const gp_XYZ& bounds_min() const { return bounds_min_; }
|
||||||
const gp_XYZ& bounds_max() const { return bounds_max_; }
|
const gp_XYZ& bounds_max() const { return bounds_max_; }
|
||||||
@@ -589,12 +589,13 @@ namespace IfcGeom {
|
|||||||
gp_Trsf trsf;
|
gp_Trsf trsf;
|
||||||
int parent_id = -1;
|
int parent_id = -1;
|
||||||
std::string instance_type, product_name, product_guid;
|
std::string instance_type, product_name, product_guid;
|
||||||
|
IfcSchema::IfcProduct* ifc_product = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const IfcUtil::IfcBaseClass* ifc_entity = ifc_file->entityById(id);
|
const IfcUtil::IfcBaseClass* ifc_entity = ifc_file->entityById(id);
|
||||||
instance_type = IfcSchema::Type::ToString(ifc_entity->type());
|
instance_type = IfcSchema::Type::ToString(ifc_entity->type());
|
||||||
if ( ifc_entity->is(IfcSchema::Type::IfcProduct) ) {
|
if ( ifc_entity->is(IfcSchema::Type::IfcProduct) ) {
|
||||||
IfcSchema::IfcProduct* ifc_product = (IfcSchema::IfcProduct*)ifc_entity;
|
ifc_product = (IfcSchema::IfcProduct*)ifc_entity;
|
||||||
|
|
||||||
product_guid = ifc_product->GlobalId();
|
product_guid = ifc_product->GlobalId();
|
||||||
product_name = ifc_product->hasName() ? ifc_product->Name() : "";
|
product_name = ifc_product->hasName() ? ifc_product->Name() : "";
|
||||||
@@ -614,7 +615,7 @@ namespace IfcGeom {
|
|||||||
} catch(...) {}
|
} catch(...) {}
|
||||||
|
|
||||||
ElementSettings element_settings(settings, unit_magnitude, instance_type);
|
ElementSettings element_settings(settings, unit_magnitude, instance_type);
|
||||||
Element<P>* ifc_object = new Element<P>(element_settings, id, parent_id, product_name, instance_type, product_guid, "", trsf);
|
Element<P>* ifc_object = new Element<P>(element_settings, id, parent_id, product_name, instance_type, product_guid, "", trsf, ifc_product);
|
||||||
|
|
||||||
return ifc_object;
|
return ifc_object;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user