diff --git a/CHANGELOG.md b/CHANGELOG.md index fce70d0..c828b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ Changelog New sketch features: * Extrude, lathe, translate and rotate groups can now use the "assembly" boolean operation, to increase performance. + * Translate and rotate groups can create n-dimensional arrays using + the "difference" and "assembly" boolean operations. New export/import features: * Three.js: allow configuring projection for exported model, and initially diff --git a/src/group.cpp b/src/group.cpp index b1206e5..f459dd4 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -471,6 +471,9 @@ void Group::Generate(IdList *entity, } case Type::TRANSLATE: { + // inherit meshCombine from source group + Group *srcg = SK.GetGroup(opA); + meshCombine = srcg->meshCombine; // The translation vector AddParam(param, h.param(0), gp.x); AddParam(param, h.param(1), gp.y); @@ -498,6 +501,9 @@ void Group::Generate(IdList *entity, return; } case Type::ROTATE: { + // inherit meshCombine from source group + Group *srcg = SK.GetGroup(opA); + meshCombine = srcg->meshCombine; // The center of rotation AddParam(param, h.param(0), gc.x); AddParam(param, h.param(1), gc.y); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 97f374d..081477a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -54,6 +54,7 @@ set(testsuite_SOURCES request/line_segment/test.cpp request/ttf_text/test.cpp group/translate_asy/test.cpp + group/translate_nd/test.cpp ) add_executable(solvespace_testsuite diff --git a/test/group/translate_nd/normal.png b/test/group/translate_nd/normal.png new file mode 100644 index 0000000..4f5ee2c Binary files /dev/null and b/test/group/translate_nd/normal.png differ diff --git a/test/group/translate_nd/normal.slvs b/test/group/translate_nd/normal.slvs new file mode 100644 index 0000000..691b57e Binary files /dev/null and b/test/group/translate_nd/normal.slvs differ diff --git a/test/group/translate_nd/test.cpp b/test/group/translate_nd/test.cpp new file mode 100644 index 0000000..ccea849 --- /dev/null +++ b/test/group/translate_nd/test.cpp @@ -0,0 +1,7 @@ +#include "harness.h" + +TEST_CASE(normal_roundtrip) { + CHECK_LOAD("normal.slvs"); + CHECK_RENDER("normal.png"); + CHECK_SAVE("normal.slvs"); +}