Draft: importSVG - Approximation to arcs and lines#29142
Merged
Roy-043 merged 1 commit intoFreeCAD:mainfrom Apr 15, 2026
Merged
Draft: importSVG - Approximation to arcs and lines#29142Roy-043 merged 1 commit intoFreeCAD:mainfrom
Roy-043 merged 1 commit intoFreeCAD:mainfrom
Conversation
| App.closeDocument(hidden_doc.Name) | ||
| except: | ||
| FreeCAD.closeDocument(hidden_doc.Name) | ||
| except Exception: |
Contributor
Author
|
@maxwxyz Thank you |
Roy-043
requested changes
Apr 13, 2026
25ed35b to
c617b16
Compare
Contributor
|
I have tested the code now. It works fine for wires, but not for faces. That seems strange to me. Faces ('fills') are quite common in SVG files I think. |
74661c8 to
a357b56
Compare
cff98ff to
04f9264
Compare
Contributor
Author
Hope fixed now |
Contributor
|
I have taken the liberty of slightly editing the ui file:
|
Roy-043
reviewed
Apr 14, 2026
Contributor
|
Thanks for updating the code to also handle faces. Your solution works fine. Note that there is also a Bullseye face maker. It may be worth testing if it can be used here. It should handle island wires automatically.
|
e6523cf to
fcdd60e
Compare
Contributor
Author
|
Thanks |
Roy-043
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Curves
Ellipse,Hyperbola,Parabola,BezierCurveandBSplineCurvecreates a lot of problems and complicates work process in CAM workbenchSuggest to add ability to approximate such edges to
Part.Arc(s) andPart.Line(s) while import geometry from svg filesNew property
svgDeviationis used to adjust accuracyValue 0.0 disable approximation feature
Note
Method
approximateWire()already present in src/Mod/CAM/Path/Op/Util.py,but I do not know good way to exclude code duplication and do not add additional dependencies between CAM and Draft