Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visicut doesn't align layers from svg correctly #731

Open
Roycinger opened this issue Sep 11, 2024 · 7 comments
Open

Visicut doesn't align layers from svg correctly #731

Roycinger opened this issue Sep 11, 2024 · 7 comments

Comments

@Roycinger
Copy link

Roycinger commented Sep 11, 2024

Hi,
I was preparing a drawing in Inkscape like this:
image
After importing in Visicut, the 2 layers (outline and text) are distorted / misplaced:
image

Is there anything I'm missing?
This should be 2 jobs for engraving and cutting

edit: Yes, I'm using the Inkscape extension to open it in Visicut

@t-oster
Copy link
Owner

t-oster commented Sep 13, 2024

could you upload the SVG, so we can investigate?

@Roycinger
Copy link
Author

could you upload the SVG, so we can investigate?

Sorry for getting back late, I missed the email notification.
I think I trashed the initial file from the screenshot but I still got another similar file with quite the same issue.
I'll append it to this post
177mm
Thanks for having a look!

@t-oster
Copy link
Owner

t-oster commented Oct 5, 2024

@Roycinger this file works as expected on my machine (R)
screenshot-0
screenshot

@Roycinger
Copy link
Author

Looks like this for me:
image
In your first screenshot, there's a small portion of the text as well right on the top

@t-oster
Copy link
Owner

t-oster commented Oct 6, 2024

You are right. The XML Structure is:
screenshot-1

and visicut seems to interpret the text-nodes correctly and the tspan nodes in the text as additional text on the wrong position. I will investigate further.

@t-oster
Copy link
Owner

t-oster commented Oct 6, 2024

until then it will help if you convert the text to objects in inkscape (which should be done by the visicut inkscape plugin imho)

@t-oster
Copy link
Owner

t-oster commented Oct 6, 2024

If we just ignore tspan element, this particular file works. However since tspan elements can have their own attributes (https://developer.mozilla.org/en-US/docs/Web/SVG/Element/tspan) we should handle them correctly.
We probably should treat the text-node the same as a group node (aka ignore the node itself, only use the attributes in the hierarchy) but we have to wrap all text in text nodes without tspans in some artifical tspan object.

Maybe we should collect a few test files for this, before start implementing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants