Hi,
to improve integration between FreeCAD and KiCad I developed a way to approximate BSplines in sketcher to Arcs (thanks to @wmayer for some improvements in FC) ... from that side I evolved my old macro Macro_DXF_to_Face_and_Sketch to add the ability to convert a shape or a dxf or a svg containing BSplines to a Sketch, where the sketch is obtained as an approximation of the BSplines to Arcs.
The new macro is included in the StepUp WB
This is also useful to convert i.e. a step model that has some spline to a 2D edge and then a Sketch for improve internal elaboration
BSplines to Shape2DView and Sketcher
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: BSplines to Shape2DView and Sketcher
Looking good.
Re: BSplines to Shape2DView and Sketcher
It would be great, if you could integrate your code in the Draft Workbench, where we have already a function Draft<->Sketch, which cannot handle BSplines.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: BSplines to Shape2DView and Sketcher
The Bspline approximation to Arcs is very useful for KiCad, because KiCad doesn't have bspline support.
For FreeCAD the best would be to convert the Edge to a real BSpline Sketcher
I asked Chris a support at this topic
Cuerves WB topic
Maurice
Re: BSplines to Shape2DView and Sketcher
Thanks to @Chris_G
The Sketch will keep BSplines, Ellipses, Arcs and Lines as they were in the Edges and the Sketch can then be pushed to KiCad.
The Pushing will approximate the pcb Edge with Arcs and Lines in KiCad, because there only Arcs and Lines are allowed entities.
Requirements: FC0.17
finally I can convert a SVG or a DXF file with BSplines, Ellipses, Arcs, Lines to a Sketch in FC.Chris_G wrote: Curve WB
The Sketch will keep BSplines, Ellipses, Arcs and Lines as they were in the Edges and the Sketch can then be pushed to KiCad.
The Pushing will approximate the pcb Edge with Arcs and Lines in KiCad, because there only Arcs and Lines are allowed entities.
Requirements: FC0.17
Re: BSplines to Shape2DView and Sketcher
The Draft<->Sketch conversion tool now supports BSplines curves.
Bezier Curves, which are not directly supported by sketcher, are converted to BSpline curves in the process.
Please note that the internal geometries of the BSplines (the control points) are not exposed by default, in order to keep the sketch cleaner and lighter.
For example, an imported SVG path with multiple curve segments, could lead to a rather heavy and messy sketch.
These internal geometries can be manually exposed for each BSpline curve with Sketch -> Sketcher tools -> show/hide internal geometry :
Re: BSplines to Shape2DView and Sketcher
Awesome!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.