How to do something ( anything ) with an SVG path

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
openBrain
Posts: 1128
Joined: Fri Nov 09, 2018 5:38 pm

Re: How to do something ( anything ) with an SVG path

Postby openBrain » Tue Jun 11, 2019 6:25 pm

Kunda1 wrote:
Tue Jun 11, 2019 5:24 pm
Just wondering if there are any tutorials that come to anyone's mind showing this process of using draft wb down grade or draft2sketch etc...? (which would be especially useful for the gimp folks)
The related wiki page I can found is quite light and outdated : https://www.freecadweb.org/wiki/Import_ ... m_Inkscape :|
chrisb
Posts: 15780
Joined: Tue Mar 17, 2015 9:14 am

Re: How to do something ( anything ) with an SVG path

Postby chrisb » Tue Jun 11, 2019 10:02 pm

Kunda1 wrote:
Tue Jun 11, 2019 5:24 pm
(which would be especially useful for the gimp folks)
Gimp or Inkscape?

One of Roland's videos dealt with this. They are still useful but users have to to have quite some solid knowledge about the current PartDesign workbench and its relationship with Part to benefit from it.
freman
Posts: 324
Joined: Tue Nov 27, 2018 10:30 pm

Re: How to do something ( anything ) with an SVG path

Postby freman » Thu Jun 13, 2019 7:52 pm

chrisb wrote:
Tue Jun 11, 2019 4:58 pm
You can extrude ear-path in Part workbench. Or you can downgrade and create a sketch with the DraftToSketch tool. Move the sketch into a body (attach it) and work with it as if you had manually created the sketch yourself.
open brain:
You have to choose a consistent workflow between Part & PartDesign.
In the attached file the 2 ways of doing things.
With Part : extrude the sketch & the wire and do a boolean cut between the 2 extrusions
With PartDesign : convert the wire to a sketch, pad the base then pocket the ear
Thanks for all these comments. I didn't realise how fundamentally incompatible Part and Part Design are. I thought it was like Sketch, Draw etc where you switch around according to what tools you need.

I have imported by ear segment gone down the D,N and draft2sketch route and made pocket, so there should be no trouble making a tool path to engrave that now. Cheers.

The image itself breaks down into a bunch of separate paths, which I probably don't want to manipulate individually. I'd guess Draw is the place to combine them but I don't see any tools to do that. Some of the paths touch , is that likely to mess up the path tools later?

thanks.
chrisb
Posts: 15780
Joined: Tue Mar 17, 2015 9:14 am

Re: How to do something ( anything ) with an SVG path

Postby chrisb » Thu Jun 13, 2019 11:33 pm

freman wrote:
Thu Jun 13, 2019 7:52 pm
I'd guess Draw is the place to combine them but I don't see any tools to do that. Some of the paths touch , is that likely to mess up the path tools later?
Do you mean Drawing workbench? That's deprecated in favor of TechDraw. Both have no influence on tool paths.
User avatar
roerich_64
Posts: 647
Joined: Thu May 21, 2015 7:00 pm

Re: How to do something ( anything ) with an SVG path

Postby roerich_64 » Thu Jun 13, 2019 11:56 pm

@Freman:

It is so easy to do anything with FreeCAD!
You came here as an elephant in a glass shop!

So, go and learn the basics of FreeCAD...

Sorry, but
freman wrote:
Thu Jun 13, 2019 7:52 pm
chrisb wrote:
Tue Jun 11, 2019 4:58 pm
You can extrude ear-path in Part workbench. Or you can downgrade and create a sketch with the DraftToSketch tool. Move the sketch into a body (attach it) and work with it as if you had manually created the sketch yourself.
open brain:
You have to choose a consistent workflow between Part & PartDesign.
In the attached file the 2 ways of doing things.
With Part : extrude the sketch & the wire and do a boolean cut between the 2 extrusions
With PartDesign : convert the wire to a sketch, pad the base then pocket the ear
Thanks for all these comments. I didn't realise how fundamentally incompatible Part and Part Design are. I thought it was like Sketch, Draw etc where you switch around according to what tools you need.

I have imported by ear segment gone down the D,N and draft2sketch route and made pocket, so there should be no trouble making a tool path to engrave that now. Cheers.

The image itself breaks down into a bunch of separate paths, which I probably don't want to manipulate individually. I'd guess Draw is the place to combine them but I don't see any tools to do that. Some of the paths touch , is that likely to mess up the path tools later?

thanks.
i can not more read of your incompetence...
freman
Posts: 324
Joined: Tue Nov 27, 2018 10:30 pm

Re: How to do something ( anything ) with an SVG path

Postby freman » Fri Jun 14, 2019 6:53 am

@Walter: congratulations, your English has just got a lot better and easier to understand. I'm glad you have cured your own shortcomings. If you don't wish to reply that's fine. No need to be rude.

chrisb wrote:
Thu Jun 13, 2019 11:33 pm
freman wrote:
Thu Jun 13, 2019 7:52 pm
I'd guess Draw is the place to combine them but I don't see any tools to do that. Some of the paths touch , is that likely to mess up the path tools later?
Do you mean Drawing workbench? That's deprecated in favor of TechDraw. Both have no influence on tool paths.
My apologies, I mean Draft ( WB ) not Draw. In fact the existing paths give problems with the path tools already since they produce "multiple solids" which is not currently supported. It seems I'll need to hand edit them. Editing the B-spline model is computationally very slow ( it takes about 15s just remove one tiny line segment ) and I have not found a way to create something acceptable to Pad.

I tried combining the two paths giving a problem. That produces something what should be suitable for a pocket but same problem creating a pocket.
I split the sketch at the two points where it forks and joined the ends with a straight line. Still not acceptable.

The wiki seems a little light in this area, can you suggest how to tackle this?
Thanks.
Attachments
svg-test.fcstd
(183 KiB) Downloaded 4 times
chrisb
Posts: 15780
Joined: Tue Mar 17, 2015 9:14 am

Re: How to do something ( anything ) with an SVG path

Postby chrisb » Fri Jun 14, 2019 11:31 am

You should explain what you are talking about. When you talk about Path tools I would guess it is something from Path workbench. When you import SVG (paths) they become wires or faces in FreeCAD.
freman
Posts: 324
Joined: Tue Nov 27, 2018 10:30 pm

Re: How to do something ( anything ) with an SVG path

Postby freman » Fri Jun 14, 2019 11:54 am

Sorry for the lack of clarity. I included the file above.

I imported a ( plain ) SVG file produced by Inkscape, selecting using as geometry.
I then applied D,G to simply to a wire.
I applied a scale in Draft WB.
I then converted with draftToSketch tool.

I dragged that to my base object and tried to use Part Design : pad.
I attempted to modify the path in Sketch WB.
chrisb
Posts: 15780
Joined: Tue Mar 17, 2015 9:14 am

Re: How to do something ( anything ) with an SVG path

Postby chrisb » Fri Jun 14, 2019 9:11 pm

I have no problems padding sketch-body (BTW: it's always helpful if you call the sketches, pads and pockets by their name). Nevertheless if possible you should simplify your SVG-path in inkscape.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16933 (Git)
Build type: Release
Branch: master
Hash: 4494d384a6b7e183dd4ae12baadfcf6972039c45
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
Attachments
Bildschirmfoto 2019-06-14 um 23.09.45.png
Bildschirmfoto 2019-06-14 um 23.09.45.png (18.09 KiB) Viewed 101 times
freman
Posts: 324
Joined: Tue Nov 27, 2018 10:30 pm

Re: How to do something ( anything ) with an SVG path

Postby freman » Sat Jun 15, 2019 6:27 am

Thanks for looking into this.

I was able to get that far, the aim is to use Sketch-inner to preserve the middle part and to end up with an engraved path which is roughly the same width throughout. This is derived from a hand-drawn line artwork. The somewhat complex irregular form of the path is intentionally retained to keep the character of the original work.

It is when I try to preserve that little island of material that I get a pocket which has a loop, the path has two forks in it as it goes around this form. That is what seems to create problems for FreeCAD.

I may need to split this up in Inkskape but I need to understand the limitations and requirements of FreeCAD to know what is required, and to be sure this is not just me not knowing how to achieve the result in FreeCAD.

I tried two strategies:
1. making 1mm pad on "sketch inner" to get the body path to preserver it.
2. combining the two lines in Sketchcombo.

I was not able to get the path tools to work on either method. Either by creating a pocket or by directly engraving the outline.

For example, I can get pad and pocket to work on Sketchcombo but I don't see the depth in the 3D view. No errors but I don't see it created. I can not get any of the path tools to work on such a pocket.

That looks like an undetected error in the pocket tool to me but could just as easily be me being dumb ;)

It is quite slow to do the pocket/pad operations due to the complexity of the sketch. Just changing the depth seems to take about 10s to finish.