mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Refactoring and cleaning up geom iterator filtering.
This commit is contained in:
committed by
Thomas Krijnen
parent
63b0488909
commit
d8a11dd096
@@ -391,7 +391,7 @@ int main(int argc, char** argv)
|
|||||||
std::string output_extension = output_filename.substr(output_filename.size()-4);
|
std::string output_extension = output_filename.substr(output_filename.size()-4);
|
||||||
boost::to_lower(output_extension);
|
boost::to_lower(output_extension);
|
||||||
|
|
||||||
Logger::SetOutput(&std::cout, &log_stream);
|
|
||||||
if (output_extension == ".xml") {
|
if (output_extension == ".xml") {
|
||||||
int exit_code = 1;
|
int exit_code = 1;
|
||||||
try {
|
try {
|
||||||
@@ -428,7 +428,6 @@ int main(int argc, char** argv)
|
|||||||
settings.set(IfcGeom::IteratorSettings::APPLY_LAYERSETS, enable_layerset_slicing);
|
settings.set(IfcGeom::IteratorSettings::APPLY_LAYERSETS, enable_layerset_slicing);
|
||||||
settings.set(IfcGeom::IteratorSettings::NO_NORMALS, no_normals);
|
settings.set(IfcGeom::IteratorSettings::NO_NORMALS, no_normals);
|
||||||
settings.set(IfcGeom::IteratorSettings::GENERATE_UVS, generate_uvs);
|
settings.set(IfcGeom::IteratorSettings::GENERATE_UVS, generate_uvs);
|
||||||
settings.set(IfcGeom::IteratorSettings::TRAVERSE, traverse);
|
|
||||||
|
|
||||||
settings.set(SerializerSettings::USE_ELEMENT_NAMES, use_element_names);
|
settings.set(SerializerSettings::USE_ELEMENT_NAMES, use_element_names);
|
||||||
settings.set(SerializerSettings::USE_ELEMENT_GUIDS, use_element_guids);
|
settings.set(SerializerSettings::USE_ELEMENT_GUIDS, use_element_guids);
|
||||||
@@ -484,33 +483,15 @@ int main(int argc, char** argv)
|
|||||||
IfcGeom::Iterator<real_t> context_iterator(settings, input_filename);
|
IfcGeom::Iterator<real_t> context_iterator(settings, input_filename);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (include_entities) {
|
context_iterator.filter_entities(include_entities, entities, traverse);
|
||||||
context_iterator.includeEntities(entities);
|
|
||||||
} else {
|
|
||||||
context_iterator.excludeEntities(entities);
|
|
||||||
}
|
|
||||||
} catch (const IfcParse::IfcException& e) {
|
} catch (const IfcParse::IfcException& e) {
|
||||||
std::cout << "[Error] " << e.what() << std::endl;
|
std::cout << "[Error] " << e.what() << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (include_names) {
|
context_iterator.filter_entity_names(include_names, names, traverse);
|
||||||
context_iterator.include_entity_names(names);
|
context_iterator.filter_entity_guids(include_guids, guids, traverse);
|
||||||
} else {
|
context_iterator.filter_layer_names(include_layers, layers, traverse);
|
||||||
context_iterator.exclude_entity_names(names);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (include_guids) {
|
|
||||||
context_iterator.include_entity_guids(guids);
|
|
||||||
} else {
|
|
||||||
context_iterator.exclude_entity_guids(guids);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (include_layers) {
|
|
||||||
context_iterator.include_layer_names(layers);
|
|
||||||
} else {
|
|
||||||
context_iterator.exclude_layer_names(layers);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!serializer->ready()) {
|
if (!serializer->ready()) {
|
||||||
write_log();
|
write_log();
|
||||||
@@ -570,7 +551,7 @@ int main(int argc, char** argv)
|
|||||||
// geometrical entities are available. None of these functions throw
|
// geometrical entities are available. None of these functions throw
|
||||||
// exceptions, neither for parsing errors or geometrical errors. Upon
|
// exceptions, neither for parsing errors or geometrical errors. Upon
|
||||||
// calling next() the entity to be returned has already been processed, a
|
// calling next() the entity to be returned has already been processed, a
|
||||||
// true return value guarantees that a successfully processed product is
|
// non-null return value guarantees that a successfully processed product is
|
||||||
// available.
|
// available.
|
||||||
size_t num_created = 0;
|
size_t num_created = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ namespace IfcGeom {
|
|||||||
int total;
|
int total;
|
||||||
|
|
||||||
std::string unit_name;
|
std::string unit_name;
|
||||||
// double?
|
double unit_magnitude;
|
||||||
P unit_magnitude;
|
|
||||||
gp_XYZ bounds_min_;
|
gp_XYZ bounds_min_;
|
||||||
gp_XYZ bounds_max_;
|
gp_XYZ bounds_max_;
|
||||||
|
|
||||||
@@ -131,13 +131,21 @@ namespace IfcGeom {
|
|||||||
IfcSchema::IfcProject* project = *projects->begin();
|
IfcSchema::IfcProject* project = *projects->begin();
|
||||||
std::pair<std::string, double> length_unit = kernel.initializeUnits(project->UnitsInContext());
|
std::pair<std::string, double> length_unit = kernel.initializeUnits(project->UnitsInContext());
|
||||||
unit_name = length_unit.first;
|
unit_name = length_unit.first;
|
||||||
unit_magnitude = static_cast<P>(length_unit.second);
|
unit_magnitude = length_unit.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wildcard_filter
|
struct filter
|
||||||
{
|
{
|
||||||
|
/// Should the product be included (true) or excluded (false).
|
||||||
bool include;
|
bool include;
|
||||||
|
/// If traversal requested, traverse to the parents to see if they satisfy the criteria. E.g. we might be looking for
|
||||||
|
/// children of a storey named "Level 20", or children of entities that have no representation, e.g. IfcCurtainWall.
|
||||||
|
bool traverse;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct wildcard_filter : public filter
|
||||||
|
{
|
||||||
std::set<boost::regex> values;
|
std::set<boost::regex> values;
|
||||||
|
|
||||||
void populate(const std::set<std::string>& patterns)
|
void populate(const std::set<std::string>& patterns)
|
||||||
@@ -167,9 +175,8 @@ namespace IfcGeom {
|
|||||||
wildcard_filter guid_filter_;
|
wildcard_filter guid_filter_;
|
||||||
wildcard_filter layer_filter_;
|
wildcard_filter layer_filter_;
|
||||||
|
|
||||||
struct entity_filter
|
struct entity_filter : public filter
|
||||||
{
|
{
|
||||||
bool include;
|
|
||||||
std::set<IfcSchema::Type::Enum> values;
|
std::set<IfcSchema::Type::Enum> values;
|
||||||
|
|
||||||
void populate(const std::set<std::string>& types)
|
void populate(const std::set<std::string>& types)
|
||||||
@@ -180,9 +187,7 @@ namespace IfcGeom {
|
|||||||
try {
|
try {
|
||||||
ty = IfcSchema::Type::FromString(boost::to_upper_copy(type));
|
ty = IfcSchema::Type::FromString(boost::to_upper_copy(type));
|
||||||
} catch (const IfcParse::IfcException&) {
|
} catch (const IfcParse::IfcException&) {
|
||||||
std::stringstream ss;
|
throw IfcParse::IfcException("'" + type + "' does not name a valid IFC entity");
|
||||||
ss << "'" << type << "' does not name a valid IFC entity";
|
|
||||||
throw IfcParse::IfcException(ss.str());
|
|
||||||
}
|
}
|
||||||
values.insert(ty);
|
values.insert(ty);
|
||||||
// TODO: Add child classes so that containment in set can be in O(log n)
|
// TODO: Add child classes so that containment in set can be in O(log n)
|
||||||
@@ -346,66 +351,43 @@ namespace IfcGeom {
|
|||||||
|
|
||||||
const std::string& getUnitName() const { return unit_name; }
|
const std::string& getUnitName() const { return unit_name; }
|
||||||
|
|
||||||
P getUnitMagnitude() const { return unit_magnitude; }
|
/// @note Double always as per IFC specification.
|
||||||
|
double getUnitMagnitude() const { return unit_magnitude; }
|
||||||
|
|
||||||
std::string getLog() const { return Logger::GetLog(); }
|
std::string getLog() const { return Logger::GetLog(); }
|
||||||
|
|
||||||
IfcParse::IfcFile* getFile() const { return ifc_file; }
|
IfcParse::IfcFile* getFile() const { return ifc_file; }
|
||||||
|
|
||||||
/// @note Entity names are handled case-insensitively.
|
/// @note Entity names are handled case-insensitively.
|
||||||
void includeEntities(const std::set<std::string>& entities)
|
void filter_entities(bool include, const std::set<std::string>& entities, bool traverse)
|
||||||
{
|
{
|
||||||
entity_filter_.populate(entities);
|
entity_filter_.populate(entities);
|
||||||
entity_filter_.include = true;
|
entity_filter_.include = include;
|
||||||
}
|
entity_filter_.traverse = traverse;
|
||||||
|
|
||||||
/// @copydoc includeEntities()
|
|
||||||
void excludeEntities(const std::set<std::string>& entities)
|
|
||||||
{
|
|
||||||
entity_filter_.populate(entities);
|
|
||||||
entity_filter_.include = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @note Arbitrary names or wildcard expressions are handled case-sensitively.
|
/// @note Arbitrary names or wildcard expressions are handled case-sensitively.
|
||||||
void include_entity_names(const std::set<std::string>& names)
|
void filter_entity_names(bool include, const std::set<std::string>& names, bool traverse)
|
||||||
{
|
{
|
||||||
name_filter_.populate(names);
|
name_filter_.populate(names);
|
||||||
name_filter_.include = true;
|
name_filter_.include = include;
|
||||||
}
|
name_filter_.traverse = traverse;
|
||||||
|
|
||||||
/// @copydoc include_entity_names()
|
|
||||||
void exclude_entity_names(const std::set<std::string>& names)
|
|
||||||
{
|
|
||||||
name_filter_.populate(names);
|
|
||||||
name_filter_.include = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @note GUIDs (wildcard expressions allowed) are handled case-sensitively.
|
/// @note GUIDs (wildcard expressions allowed) are handled case-sensitively.
|
||||||
void include_entity_guids(const std::set<std::string>& guids)
|
void filter_entity_guids(bool include, const std::set<std::string>& guids, bool traverse)
|
||||||
{
|
{
|
||||||
guid_filter_.populate(guids);
|
guid_filter_.populate(guids);
|
||||||
guid_filter_.include = true;
|
guid_filter_.include = include;
|
||||||
}
|
guid_filter_.traverse = traverse;
|
||||||
|
|
||||||
/// @copydoc include_entity_guids()
|
|
||||||
void exclude_entity_guids(const std::set<std::string>& guids)
|
|
||||||
{
|
|
||||||
guid_filter_.populate(guids);
|
|
||||||
guid_filter_.include = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @note Arbitrary names or wildcard expressions are handled case-sensitively.
|
/// @note Arbitrary names or wildcard expressions are handled case-sensitively.
|
||||||
void include_layer_names(const std::set<std::string>& names)
|
void filter_layer_names(bool include, const std::set<std::string>& names, bool traverse)
|
||||||
{
|
{
|
||||||
layer_filter_.populate(names);
|
layer_filter_.populate(names);
|
||||||
layer_filter_.include = true;
|
layer_filter_.include = include;
|
||||||
}
|
layer_filter_.traverse = traverse;
|
||||||
|
|
||||||
/// @copydoc include_layer_names()
|
|
||||||
void exclude_layer_names(const std::set<std::string>& names)
|
|
||||||
{
|
|
||||||
layer_filter_.populate(names);
|
|
||||||
layer_filter_.include = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const gp_XYZ& bounds_min() const { return bounds_min_; }
|
const gp_XYZ& bounds_min() const { return bounds_min_; }
|
||||||
@@ -428,14 +410,17 @@ namespace IfcGeom {
|
|||||||
|
|
||||||
std::set<IfcSchema::IfcRepresentation*> mapped_representations_processed;
|
std::set<IfcSchema::IfcRepresentation*> mapped_representations_processed;
|
||||||
|
|
||||||
BRepElement<P>* create_shape_model_for_next_entity() {
|
struct shape_model { BRepElement<P>* element; IfcSchema::IfcProduct* product; };
|
||||||
|
|
||||||
|
shape_model create_shape_model_for_next_entity() {
|
||||||
|
shape_model ret = {0};
|
||||||
for (;;) {
|
for (;;) {
|
||||||
IfcSchema::IfcRepresentation* representation;
|
IfcSchema::IfcRepresentation* representation;
|
||||||
|
|
||||||
// Have we reached the end of our list of representations?
|
// Have we reached the end of our list of representations?
|
||||||
if ( representation_iterator == representations->end() ) {
|
if ( representation_iterator == representations->end() ) {
|
||||||
representations.reset();
|
representations.reset();
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
representation = *representation_iterator;
|
representation = *representation_iterator;
|
||||||
|
|
||||||
@@ -578,9 +563,6 @@ namespace IfcGeom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter the products based on the set of entities and/or names being included or excluded for processing.
|
// Filter the products based on the set of entities and/or names being included or excluded for processing.
|
||||||
// If traversal requested, traverse to the parents to see if they satisfy the criteria. E.g. we might be looking for
|
|
||||||
// children of a storey named "Level 20", or children of entities that have no representation, e.g. IfcCurtainWall.
|
|
||||||
const bool traverse = settings.get(IteratorSettings::TRAVERSE);
|
|
||||||
for (IfcSchema::IfcProduct::list::it jt = unfiltered_products->begin(); jt != unfiltered_products->end(); ++jt) {
|
for (IfcSchema::IfcProduct::list::it jt = unfiltered_products->begin(); jt != unfiltered_products->end(); ++jt) {
|
||||||
IfcSchema::IfcProduct* prod = *jt;
|
IfcSchema::IfcProduct* prod = *jt;
|
||||||
/// @todo Horrible copy-pasta, refactor.
|
/// @todo Horrible copy-pasta, refactor.
|
||||||
@@ -594,7 +576,7 @@ namespace IfcGeom {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type_found != entity_filter_.include && traverse) {
|
if (type_found != entity_filter_.include && entity_filter_.traverse) {
|
||||||
foreach(IfcSchema::Type::Enum type, entity_filter_.values) {
|
foreach(IfcSchema::Type::Enum type, entity_filter_.values) {
|
||||||
IfcSchema::IfcProduct* parent, *current = prod;
|
IfcSchema::IfcProduct* parent, *current = prod;
|
||||||
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
||||||
@@ -620,7 +602,7 @@ namespace IfcGeom {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name_found != name_filter_.include && traverse) {
|
if (name_found != name_filter_.include && name_filter_.traverse) {
|
||||||
foreach(const boost::regex& r, name_filter_.values) {
|
foreach(const boost::regex& r, name_filter_.values) {
|
||||||
IfcSchema::IfcProduct* parent, *current = prod;
|
IfcSchema::IfcProduct* parent, *current = prod;
|
||||||
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
||||||
@@ -647,7 +629,7 @@ namespace IfcGeom {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guid_found != guid_filter_.include && traverse) {
|
if (guid_found != guid_filter_.include && guid_filter_.traverse) {
|
||||||
foreach(const boost::regex& r, guid_filter_.values) {
|
foreach(const boost::regex& r, guid_filter_.values) {
|
||||||
IfcSchema::IfcProduct* parent, *current = prod;
|
IfcSchema::IfcProduct* parent, *current = prod;
|
||||||
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
while ((parent = static_cast<IfcSchema::IfcProduct*>(kernel.get_decomposing_entity(current))) != 0) {
|
||||||
@@ -680,7 +662,7 @@ namespace IfcGeom {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layer_found != layer_filter_.include && traverse) {
|
if (layer_found != layer_filter_.include && layer_filter_.traverse) {
|
||||||
foreach(const boost::regex& r, layer_filter_.values) {
|
foreach(const boost::regex& r, layer_filter_.values) {
|
||||||
for (lit = layers.begin(); lit != layers.end(); ++lit) {
|
for (lit = layers.begin(); lit != layers.end(); ++lit) {
|
||||||
IfcSchema::IfcProduct* parent, *current = prod;
|
IfcSchema::IfcProduct* parent, *current = prod;
|
||||||
@@ -714,25 +696,24 @@ namespace IfcGeom {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
IfcSchema::IfcProduct* product = *ifcproduct_iterator;
|
ret.product = *ifcproduct_iterator;
|
||||||
|
|
||||||
Logger::SetProduct(product);
|
Logger::SetProduct(ret.product);
|
||||||
|
|
||||||
BRepElement<P>* element;
|
|
||||||
if (ifcproduct_iterator == ifcproducts->begin() || !settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
if (ifcproduct_iterator == ifcproducts->begin() || !settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||||
element = kernel.create_brep_for_representation_and_product<P>(settings, representation, product);
|
ret.element = kernel.create_brep_for_representation_and_product<P>(settings, representation, ret.product);
|
||||||
} else {
|
} else {
|
||||||
element = kernel.create_brep_for_processed_representation(settings, representation, product, current_shape_model);
|
ret.element = kernel.create_brep_for_processed_representation(settings, representation, ret.product, current_shape_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::SetProduct(boost::none);
|
Logger::SetProduct(boost::none);
|
||||||
|
|
||||||
if ( !element ) {
|
if (!ret.element) {
|
||||||
_nextShape();
|
_nextShape();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return element;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,7 +729,19 @@ namespace IfcGeom {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool next() {
|
/// Returns what would be the product for the next shape representation
|
||||||
|
IfcSchema::IfcProduct* peek_next() const
|
||||||
|
{
|
||||||
|
if (ifcproducts && ifcproduct_iterator + 1 != ifcproducts->end()){
|
||||||
|
return *(ifcproduct_iterator + 1);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Moves to the next shape representation and returns the associated product.
|
||||||
|
/// Use get() to retrieve the created geometry.
|
||||||
|
IfcSchema::IfcProduct* next() {
|
||||||
// Increment the iterator over the list of products using the current
|
// Increment the iterator over the list of products using the current
|
||||||
// shape representation
|
// shape representation
|
||||||
if (ifcproducts) {
|
if (ifcproducts) {
|
||||||
@@ -811,10 +804,8 @@ namespace IfcGeom {
|
|||||||
return ifc_object;
|
return ifc_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool create() {
|
IfcSchema::IfcProduct* create() {
|
||||||
bool success = true;
|
shape_model next_shape_model = {0};
|
||||||
|
|
||||||
IfcGeom::BRepElement<P>* next_shape_model = 0;
|
|
||||||
IfcGeom::SerializedElement<P>* next_serialization = 0;
|
IfcGeom::SerializedElement<P>* next_serialization = 0;
|
||||||
IfcGeom::TriangulationElement<P>* next_triangulation = 0;
|
IfcGeom::TriangulationElement<P>* next_triangulation = 0;
|
||||||
|
|
||||||
@@ -822,37 +813,33 @@ namespace IfcGeom {
|
|||||||
next_shape_model = create_shape_model_for_next_entity();
|
next_shape_model = create_shape_model_for_next_entity();
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
|
||||||
if (next_shape_model) {
|
if (next_shape_model.element) {
|
||||||
if (settings.get(IteratorSettings::USE_BREP_DATA)) {
|
if (settings.get(IteratorSettings::USE_BREP_DATA)) {
|
||||||
try {
|
try {
|
||||||
next_serialization = new SerializedElement<P>(*next_shape_model);
|
next_serialization = new SerializedElement<P>(*next_shape_model.element);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Logger::Message(Logger::LOG_ERROR, "Getting a serialized element from model failed.");
|
Logger::Message(Logger::LOG_ERROR, "Getting a serialized element from model failed.");
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
} else if (!settings.get(IteratorSettings::DISABLE_TRIANGULATION)) {
|
} else if (!settings.get(IteratorSettings::DISABLE_TRIANGULATION)) {
|
||||||
try {
|
try {
|
||||||
if (ifcproduct_iterator == ifcproducts->begin() || settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
if (ifcproduct_iterator == ifcproducts->begin() || settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||||
next_triangulation = new TriangulationElement<P>(*next_shape_model);
|
next_triangulation = new TriangulationElement<P>(*next_shape_model.element);
|
||||||
} else {
|
} else {
|
||||||
next_triangulation = new TriangulationElement<P>(*next_shape_model, current_triangulation->geometry_pointer());
|
next_triangulation = new TriangulationElement<P>(*next_shape_model.element, current_triangulation->geometry_pointer());
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Logger::Message(Logger::LOG_ERROR, "Getting a triangulation element from model failed.");
|
Logger::Message(Logger::LOG_ERROR, "Getting a triangulation element from model failed.");
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free_shapes();
|
free_shapes();
|
||||||
|
|
||||||
current_shape_model = next_shape_model;
|
current_shape_model = next_shape_model.element;
|
||||||
current_serialization = next_serialization;
|
current_serialization = next_serialization;
|
||||||
current_triangulation = next_triangulation;
|
current_triangulation = next_triangulation;
|
||||||
|
|
||||||
return success;
|
return next_shape_model.product;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
void _initialize() {
|
void _initialize() {
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ namespace IfcGeom
|
|||||||
GENERATE_UVS = 1 << 12,
|
GENERATE_UVS = 1 << 12,
|
||||||
/// Specifies whether to slice representations according to associated IfcLayerSets.
|
/// Specifies whether to slice representations according to associated IfcLayerSets.
|
||||||
APPLY_LAYERSETS = 1 << 13,
|
APPLY_LAYERSETS = 1 << 13,
|
||||||
/// Marks that include/exclude filtering should be applied also to the decomposition
|
|
||||||
/// and/or containment (IsDecomposedBy, HasOpenings, FillsVoid, ContainedInStructure)
|
|
||||||
/// of the filtered entity.
|
|
||||||
TRAVERSE = 1 << 14,
|
TRAVERSE = 1 << 14,
|
||||||
/// Number of different setting flags.
|
/// Number of different setting flags.
|
||||||
NUM_SETTINGS = 14
|
NUM_SETTINGS = 14
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ int main () {
|
|||||||
}
|
}
|
||||||
case NEXT: {
|
case NEXT: {
|
||||||
Next n; n.read(std::cin);
|
Next n; n.read(std::cin);
|
||||||
has_more = iterator->next();
|
has_more = iterator->next() != 0;
|
||||||
if (!has_more) {
|
if (!has_more) {
|
||||||
delete iterator;
|
delete iterator;
|
||||||
iterator = 0;
|
iterator = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user