OpenSCAD import / importCSG: support for SVG?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenSCAD import / importCSG: support for SVG?

Post by keithsloan52 »

chennes wrote: Tue Aug 09, 2022 2:35 am
keithsloan52 wrote: Mon Aug 08, 2022 6:10 pm Wondering if there is a way to have it create a single object rather than insert n objects into a doc.
Did you get this resolved?
Hi Chris

No, I assumed the answer was probably no and created a temporary FreeCAD document from the SVG file and then processed that to produce a
single Compound from all the Objects in the temporary document, switched the Active Document back to the one being used for import and returned the compound object to the parser on its stack then deleted the temporary doc.

Would you like me to make the same changes to the FreeCAD 0.20 ../Mod/OpenSCAD/importCSG.py and then send you the file, so you can merge into main Github, can't be faffed with updating my FreeCAD repro and creating a pull request etc etc.

However, If you look at the code in the Alternate importer and make the changes, least that means a buddy check gets done and you can create a new test case etc.
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: OpenSCAD import / importCSG: support for SVG?

Post by chennes »

Right, I'll take care of merging this code into the main dev branch -- I looked through it last night, but didn't have a chance to test it (OpenSCAD is terminally broken on my home PC and I haven't been able to resolve the issue).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenSCAD import / importCSG: support for SVG?

Post by keithsloan52 »

chennes wrote: Tue Aug 09, 2022 2:41 pm OpenSCAD is terminally broken on my home PC and I haven't been able to resolve the issue
If you test with svg-test.csg and svg.test.svg you don't need a working OpenSCAD, as the csg was already created by OpenSCAD
and as the file does not use minkowski or hull it should not need to call OpenSCAD.

But as a main supporter of the OpenSCAD workbench you really need to resolve your issue.
Post Reply