Home › Forums › Programming › Export only outline/contour in SVG
- This topic has 6 replies, 3 voices, and was last updated 2 years ago by Ivan Lyubovnikov.
-
AuthorPosts
-
2022-08-18 at 9:27 pm #55019carlskyParticipant
Hello!
I am using SVG Renderer in a project, to convert 3D object to 2D, but the SVG Renderer is exporting whole wireframe.
My goal is to convert this SVG to DXF and use it on a laser cutter, so I need only contours without inner edges/verices.
Is there a way to export only an outline/contour of objects?2022-08-22 at 3:18 pm #55096Ivan LyubovnikovStaffHi, can you provide a link or a project to test that?
There’s an example of using SVG renderer here: https://cdn.soft8soft.com/demo/examples/index.html?q=svg#svg_sandbox – but it only renders edges occasionally for semi-transparent objects.
Co-founder and lead developer at Soft8Soft.
2022-08-22 at 7:56 pm #55098carlskyParticipantYou see,
when we open the exported .svg in the browser the drawing is filled and we can not see the wireframe, but when we open .svg in CAD Application eg. FreeCAD then wireframe is visible (gray color inside object). See attachements.I have found this package:
https://github.com/neurofuzzy/three-plotter-rendererbut I must try to webpack it, and test it in browser. This package may be a solution ?!?!
Attachments:
You must be logged in to view attached files.2022-08-24 at 2:56 pm #55204Ivan LyubovnikovStaffI have found this package:
https://github.com/neurofuzzy/three-plotter-rendererYeah, I tested that package and it works. I made a simple app as an example: plot_render.zip
Unfortunately it lacks performance and can hang for a while for medium/heavy-poly objects.Attachments:
You must be logged in to view attached files.Co-founder and lead developer at Soft8Soft.
2022-08-25 at 10:19 am #55236carlskyParticipantThank you for the response!
I will test it out on my complicated models and check the execution time :)
All the best !!2022-11-03 at 4:58 pm #57072kazufenParticipantHello Ivan,
first of all thank you for preparing the SVG test app. I think that is exactly what I am looking for for my Verge 3D project, because I am currently trying to verify if we can add in a feature to output a technical drawing into a product configurator.
Unfortunately, when I hit the “Download” button in the app that you kindly provided, I get a .svg which I can not open. I always get an error. Please find my screenshot attached. I also can’t open the .svg in Illustrator. I use Verge 4.0.1 by the way. Should your ZIP file work out of the box or do I need to set some things up first?
Cheers! :)
Attachments:
You must be logged in to view attached files.2022-11-07 at 6:42 am #57106Ivan LyubovnikovStaffHi kazufen,
The three-plotter-renderer package used for generating SVGs adds certain attributes specific to inkscape, so I guess that’s the problem. To solve that you can open the downloaded SVG file in inkscape and save it as a plain SVG file to get rid of such attributes.
Or you can also comment them out in the source code and rebuild the package: https://github.com/neurofuzzy/three-plotter-renderer/blob/main/src/plotter-renderer.js#L80-L97
Co-founder and lead developer at Soft8Soft.
-
AuthorPosts
- You must be logged in to reply to this topic.