diff --git a/CMakeLists.txt b/CMakeLists.txt index fdb3a1c..35f19f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -356,6 +356,7 @@ endforeach() endif() add_executable(voxec_exe voxec_main.cpp progress.h) +target_link_options(voxec_exe PRIVATE "/NOIMPLIB") target_link_libraries(voxec_exe libvoxec) set_property(TARGET voxec_exe PROPERTY OUTPUT_NAME voxec) diff --git a/voxec.h b/voxec.h index 5b12ae6..3e07d93 100644 --- a/voxec.h +++ b/voxec.h @@ -616,7 +616,10 @@ class op_create_geometry : public voxel_operation { abort(); } - std::random_shuffle(geometries->begin(), geometries->end()); + std::random_device rd; + std::mt19937 g(rd()); + + std::shuffle(geometries->begin(), geometries->end(), g); return geometries; } @@ -2103,7 +2106,7 @@ namespace { if (attr.type() == IfcUtil::Argument_DOUBLE) { auto op = p.second.at(0); auto v = p.second.substr(1); - auto attr_type = inst->declaration().attribute_by_index(idx); + auto attr_type = inst->declaration().as_entity()->attribute_by_index(idx); #ifdef IFCOPENSHELL_08 double d0 = attr; #else