Skip to content

Commit 68c70c4

Browse files
committed
optional keyword arg for create_geometry()
1 parent 0b17e58 commit 68c70c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

voxec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class op_parse_ifc_file : public voxel_operation {
268268
class op_create_geometry : public voxel_operation {
269269
public:
270270
const std::vector<argument_spec>& arg_names() const {
271-
static std::vector<argument_spec> nm_ = { { true, "input", "ifcfile" }, { false, "include", "sequence"}, { false, "exclude", "sequence"} };
271+
static std::vector<argument_spec> nm_ = { { true, "input", "ifcfile" }, { false, "include", "sequence"}, { false, "exclude", "sequence"}, { false, "optional", "integer"} };
272272
return nm_;
273273
}
274274

@@ -466,7 +466,7 @@ class op_create_geometry : public voxel_operation {
466466

467467
}
468468

469-
if (!at_least_one_succesful) {
469+
if (scope.get_value_or<int>("optional", 0) == 0 && !at_least_one_succesful) {
470470
json_logger::message(json_logger::LOG_FATAL, "Failed to generate geometry");
471471
abort();
472472
}

0 commit comments

Comments
 (0)