mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
partial_success_is_success #6589
This commit is contained in:
@@ -212,6 +212,7 @@ ifcopenshell::geometry::kernels::AbstractKernel* ifcopenshell::geometry::kernels
|
|||||||
|
|
||||||
for (auto it = kernels.begin(); it != kernels.end(); ++it) {
|
for (auto it = kernels.begin(); it != kernels.end(); ++it) {
|
||||||
(**it).propagate_exceptions = it == kernels.begin();
|
(**it).propagate_exceptions = it == kernels.begin();
|
||||||
|
(**it).partial_success_is_success = it == kernels.end() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kernels.empty()) {
|
if (!kernels.empty()) {
|
||||||
@@ -225,7 +226,9 @@ ifcopenshell::geometry::kernels::AbstractKernel* ifcopenshell::geometry::kernels
|
|||||||
bool ifcopenshell::geometry::kernels::AbstractKernel::convert_impl(const taxonomy::collection::ptr collection, IfcGeom::ConversionResults& r) {
|
bool ifcopenshell::geometry::kernels::AbstractKernel::convert_impl(const taxonomy::collection::ptr collection, IfcGeom::ConversionResults& r) {
|
||||||
auto s = r.size();
|
auto s = r.size();
|
||||||
for (auto& c : collection->children) {
|
for (auto& c : collection->children) {
|
||||||
convert(c, r);
|
if (!partial_success_is_success && !convert(c, r)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (auto i = s; i < r.size(); ++i) {
|
for (auto i = s; i < r.size(); ++i) {
|
||||||
if (collection->matrix) {
|
if (collection->matrix) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace ifcopenshell {
|
|||||||
Settings settings_;
|
Settings settings_;
|
||||||
public:
|
public:
|
||||||
bool propagate_exceptions = false;
|
bool propagate_exceptions = false;
|
||||||
|
bool partial_success_is_success = true;
|
||||||
|
|
||||||
AbstractKernel(const std::string& geometry_library, const Settings& settings)
|
AbstractKernel(const std::string& geometry_library, const Settings& settings)
|
||||||
: geometry_library_(geometry_library)
|
: geometry_library_(geometry_library)
|
||||||
|
|||||||
Reference in New Issue
Block a user