FreeCAD / FreeCAD-Bundle

Stand-alone repo to Build and Deploy installable FreeCAD images
https://freecad.org
GNU Lesser General Public License v2.1
228 stars 58 forks source link

imported_objects = importSVG.insert(input_svg, doc.Name) returns None but works through GUI #266

Closed madhephaestus closed 3 weeks ago

madhephaestus commented 3 weeks ago

temp

I have attached the SVG i am using. I can import this SVG through the UI and see the lines. If i import the same SVG through a script, the operation to insert the SVG returns None. I can save the model file and see that the lines were in fact imported. Right now I search for a list of all the items before import, then compare to what exists after the import. It seems like importSVG.insert should return the objects that were inserted? Is that wrong? Is this a bug?

My goal here is to be able to pass an SVG and a pose to FreeCAD from the command line and have the script put a new sketch in the provided pose.

Here is the line in the script I am working on: https://github.com/CommonWealthRobotics/freecad-bowler-cli/blob/main/importSVGToPose.py#L92

adrianinsaval commented 3 weeks ago

this repo is about packaging of the application, the issue tracker is not a help desk either, please ask about this in the forum instead as it is very unlikely that someone will answer your question here, or create an issue on the main repo if you find that this is actually a bug in the software.