src/toolsets/algorithmtoolset.cpp

changeset 1223
4f8fa42aed07
parent 1222
34def2630300
child 1224
5a31b6d4bf81
equal deleted inserted replaced
1222:34def2630300 1223:4f8fa42aed07
159 Vertex v = mo->position(); 159 Vertex v = mo->position();
160 Matrix t = mo->transform(); 160 Matrix t = mo->transform();
161 161
162 v.apply([&](Axis, double& a) 162 v.apply([&](Axis, double& a)
163 { 163 {
164 RoundToDecimals(a, config.roundPositionPrecision()); 164 a = RoundToDecimals(a, config.roundPositionPrecision());
165 }); 165 });
166 166
167 ApplyToMatrix(t, [&](int, double& a) 167 ApplyToMatrix(t, [&](int, double& a)
168 { 168 {
169 RoundToDecimals(a, config.roundMatrixPrecision()); 169 a = RoundToDecimals(a, config.roundMatrixPrecision());
170 }); 170 });
171 171
172 mo->setPosition(v); 172 mo->setPosition(v);
173 mo->setTransform(t); 173 mo->setTransform(t);
174 num += 12; 174 num += 12;
178 for (int i = 0; i < obj->numVertices(); ++i) 178 for (int i = 0; i < obj->numVertices(); ++i)
179 { 179 {
180 Vertex v = obj->vertex(i); 180 Vertex v = obj->vertex(i);
181 v.apply([&](Axis, double& a) 181 v.apply([&](Axis, double& a)
182 { 182 {
183 RoundToDecimals(a, config.roundPositionPrecision()); 183 a = RoundToDecimals(a, config.roundPositionPrecision());
184 }); 184 });
185 obj->setVertex(i, v); 185 obj->setVertex(i, v);
186 num += 3; 186 num += 3;
187 } 187 }
188 } 188 }

mercurial