0
$\begingroup$

In a SVG file I have 2 (complex) paths. They're an exact copy of eachother except that one element is rotated (with svg's transform/rotate and the other one is not rotated. After importing the SVG and doing a z-rotation in Blender (simple selecting the unrotated curve) and do a z-rotation, and after that try to align the curves on top of eachother the blender rotated curve seems to be geometrically changed (see attached image). erratic tranform

Below the problametic SVG file, which can be directly imported in Blender. I also cross checked in Inkscape and there the paths show up perfectly the same. I'm using Blender Version 2.77 (2.77 2016-03-19, Blender Foundation). To me it looks like a bug, but maybe I'm wrong or there are ways to circumvent this behaviour?

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="300mm" height="150mm" viewBox="0.000 0.000 1100 600">
<g stroke="blue" stroke-width="0.300" fill="none" transform="scale(13.09) rotate(82,711,-115)">
  <path id="plank-back-si-rotate" class="real" d="M 1000.000 200.000  m 0 120 l 78.804 -10 c 3.828 -4.200 29.990 70.271 37.488 70.271 l 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 1.321 9 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 1.321 9 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 -8.905 1.307 -11.518 -16.503 -2.669 -18.191 c -0.267 -1.819 -34.520 -58.311 -37.488 -60.271 -0.297 -0.196 -56.084 10.800 -62.316 12 -6.232 -1.200 -62.019 -12.196 -62.316 -12 -2.968 1.960 -37.221 58.452 -37.488 60.271 l -2.669 18.191 -11.518 16.503 -8.905 -1.307 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 1.321 -9 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 1.321 -9 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 c 7.498 0 33.660 -74.471 37.488 -70.271 l 78.804 10 z"></path>
</g>
<g stroke="blue" stroke-width="0.300" fill="none" transform="scale(13.09)">
  <path id="plank-back-no-rotate" class="real" d="M 1000.000 200.000  m 0 120 l 78.804 -10 c 3.828 -4.200 29.990 70.271 37.488 70.271 l 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 1.321 9 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 1.321 9 14.841 -2.178 c 2.375 -0.348 8.047 -0.261 8.576 3.339 0.528 3.600 -4.880 5.313 -7.255 5.661 l -14.841 2.178 -8.905 1.307 -11.518 -16.503 -2.669 -18.191 c -0.267 -1.819 -34.520 -58.311 -37.488 -60.271 -0.297 -0.196 -56.084 10.800 -62.316 12 -6.232 -1.200 -62.019 -12.196 -62.316 -12 -2.968 1.960 -37.221 58.452 -37.488 60.271 l -2.669 18.191 -11.518 16.503 -8.905 -1.307 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 1.321 -9 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 1.321 -9 -14.841 -2.178 c -2.375 -0.348 -7.783 -2.061 -7.255 -5.661 0.528 -3.600 6.201 -3.687 8.576 -3.339 l 14.841 2.178 c 7.498 0 33.660 -74.471 37.488 -70.271 l 78.804 10 z"></path>
</g>
</svg>
$\endgroup$
  • $\begingroup$ I'm not sure why this is happening without you posting the Blender file post import. What are you trying to accomplish that couldn't be accomplished by duplicating the original curve (<kbd>shift</kbd>+<kbd>d</kbd>) ? $\endgroup$ – Kirbinator Feb 23 '17 at 21:41
1
$\begingroup$

Upon some testing it seems that it is not the rotation itself that is causing the distortion.

Eliminating the rotation transform from the first curve and importing again does make them overlap perfectly, but opening in Inkscape they both overlap perfectly regardless of rotation.

Scaling is the same for both objects, so that leaves only one culprit left: viewboxing

Your viewbox is causing distortions to your file as a whole, it becomes noticeable only in the transformed object.

If you manually edit your SVG file and remove the viewBox="0.000 0.000 1100 600" parameter, they both import fine and seem to overlap perfectly.

$\endgroup$
  • $\begingroup$ Thank you for your thorough deductive investigation and answer! $\endgroup$ – dr jerry Feb 24 '17 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.