SvgEditor Paste bug

Hi @CallumSykes,

i’ve been working on my icons recently and found that the svg editor does shift certain svg elements into wrong positions once i paste my svg code. This has been working fine for the recent months. Here is an example svg code i try to paste into the editor:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" width="48.0" height="48.0" viewBox="0 0 48.0 48.0" xmlns="http://www.w3.org/2000/svg"><defs /><g id="Default"><path d="M14.833333,33.166668 L33.166668,33.166668 L33.166668,14.833333 L14.833333,14.833333 z" stroke="#000000" stroke-width="0.99999994" stroke-linecap="round" stroke-linejoin="round" fill="none" /><path d="M5.6666665,42.333332 L42.333332,42.333332 L42.333332,5.6666665 L5.6666665,5.6666665 z" stroke="#000000" stroke-width="0.99999994" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g><circle cx="33.17" cy="33.17" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="14.83" cy="14.83" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="42.33" cy="5.667" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="5.667" cy="5.667" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="5.667" cy="42.33" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="14.83" cy="33.17" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="42.33" cy="42.33" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /><circle cx="33.17" cy="14.83" r="3.25" stroke="#000000" stroke-width="1.5" fill="#FFFFFF" fill-opacity="1" /></svg>

If i save this code as svg file, which is the result of capturing it from Rhino 8, the svg looks fine:

CaptureAreaToSvg

once i paste the svg code, it looks like this in the editor:

If i use the File > Open menu and open it, it looks ok:

After pasting the svg code, i can click on the filled circles and move them individually which is kinda cool, but if i Ok the editor once and later want to edit the filled circle, it does not allow to select it anymore. Editing the circles seems not to be available if the svg icon is opened from the file menu.

(8.17.25043.10001, 2025-02-12)

_
c.

Thanks for this one @clement,

1. Shifting

I’ll fix this up.
The reason for the shift is so when you paste something it’s not directly on top. But I shouldn’t include this shift if you haven’t copied.

2. Paste vs Open

It seems that Paste pastes but doesn’t check for “Unknown elements” such as defs/groups that aren’t currently supported so you get some image and some editable elements (a bug).

Ticket:
https://mcneel.myjetbrains.com/youtrack/issue/RH-86092/SVG-Editor-Paste-shifts-unnecessarily-and-doesnt-check-for-Unknowns

1 Like

RH-86092 is fixed in Rhino 8 Service Release 18 Release Candidate