[Feature Request] 3D sketches

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
NewJoker
Veteran
Posts: 3022
Joined: Sun Oct 11, 2020 7:49 pm

[Feature Request] 3D sketches

Post by NewJoker »

Hi,

I think that the possibility to create 3D sketches in FreeCAD could be very useful. For me, the main use would be to create geometries for 3D frame and truss analyses in FEM module or external FEA software. But there are also other potential applications - mainly drawing paths for sweeps and creating lines to which weldment profiles can be applied (it's a common way of constructing frames in other CADs). Potentially also pipeline, duct and cabling design could benefit from this feature (not my area of work though).

I know that Draft Workbench allows for 3D drawings but they can't be converted to sketches and thus can't be used for the aforementioned operations. Maybe it's not necessary to introduce a whole new feature for 3D sketches and just an improvement to the existing Draft Workbench functionality (allowing for the conversion of 3D drawings to sketches) would be enough.

What are your thoughts on this topic ?
drmacro
Veteran
Posts: 8873
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] 3D sketches

Post by drmacro »

Have you use the Draft workbench?

You can draw lines in 3D space.

As for the Sketcher, I think you misunderstand the paradigm. For example, the concept is to draw a cross section of the shape and give it depth (the 3rd dimension).

To me it is actually far simpler to imagine the length and width, then apply a depth.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3022
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] 3D sketches

Post by NewJoker »

Yes, I’ve already tested drawing 3D lines in Draft Workbench. It’s quite good functionality but 3D lines drawn there can’t be used for sweeps and most likely for other purposes mentioned in my previous post (please correct me if I’m wrong).
drmacro
Veteran
Posts: 8873
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] 3D sketches

Post by drmacro »

Hmm...a 3D rectangle created in Draft WB, Extruded in Part WB:
Snip macro screenshot-0a23b2.png
Snip macro screenshot-0a23b2.png (28.51 KiB) Viewed 1201 times
Or, how about a Loft?:
Snip macro screenshot-21893a.png
Snip macro screenshot-21893a.png (47.91 KiB) Viewed 1189 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
onekk
Veteran
Posts: 6149
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Feature Request] 3D sketches

Post by onekk »

3D sketches? for what?

Each CAD system has his underlying paradigm, almost always this paradigm is related to the 3D engine, which have to do the "hard work".

FreeCAD has it's 3D engine (modeler or what do you want to call it).

His base paradigm to draw in 3D his to create Vertex, Edges, and Faces.

so having a 3D sketch would mean to have a way to define Vertexes that create edges and make faces, in 3D space.

A "3D sketch" to make a cube has to define eight vertexes, for complex things, you have to define maybe curves in 2D space, properly orient them and then limit this curves to form edges (boundary of faces) and join them.

A Sketch generally is a 2D drawing, you could define constraints, to make a sketch work and maybe when modifying the shape some elements are automagically recalculated.

see:

https://wiki.freecadweb.org/Sketcher_SketchObject

But in 3D such constraints are more complex, sometimes have no sense to define maybe a perpendicular constraint for a face that could be modified if a vertex is moved.

I don't know how other CAD solve these problems, but "simply" adopting a way to model is not everytime a "simple" solution if the underlying modelling engine is different.

Sadly there is no a proper wiki page to illustrate the modelling paradigm:

In FreeCAD you have the ability to use both CSG and BREP see wikipedia for more explanation, (not a scientific approach, but for having an idea it will suffice).

See however:

https://wiki.freecadweb.org/Getting_started/en

https://wiki.freecadweb.org/Part_TopoShape

https://wiki.freecadweb.org/App_DocumentObject

And more general:

https://wiki.freecadweb.org/OpenCASCADE/en

https://dev.opencascade.org/doc/occt-7. ... _data.html

To have an idea of "how things works".


This discussion has been done many times, but in general the answer is:

FreeCAD has his own way to do things, and using another modeling paradigm is difficult to implement and lead to many "assumptions" and overcomplications so better to learn the FreeCAD way than mimic the behaviour of some other program that maybe could bring to copyright infringments.

Hope it helps

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
NewJoker
Veteran
Posts: 3022
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] 3D sketches

Post by NewJoker »

Thanks for replies. It seems that it's actually possible to use the 3D lines created in Draft Workbench for spatial frame analysis (done internally or externally). I just had to apply boolean union from Part Workbench to those lines.

However, I wonder what is your way of modeling parts that are normally designed using sweep with 3D path. Here are some examples:

https://help.autodesk.com/cloudhelp/201 ... 24420D.png

https://www.cadtutor.net/forum/uploads/ ... 81de56.jpg

https://dddmodeling.files.wordpress.com ... =981&h=530

https://i.pinimg.com/564x/45/a0/ee/45a0 ... 730f98.jpg

Is it doable in FreeCAD ?
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: [Feature Request] 3D sketches

Post by Cekuhnen »

Good question about 3D curves and sweep.

I noticed that the Part and Part Design WB do not like mixing Sketcher WB and Curve WB paths
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] 3D sketches

Post by chrisb »

All of these can be done:
1) addon macro 3D parametric curve, or perhaps even helix (not quite clear from the image)
2), 4), see e.g. "Wilfried's trick": https://forum.freecadweb.org/viewtopic. ... 45#p165745
3) Helix, Arrays
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 8873
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] 3D sketches

Post by drmacro »

8-)
Snip macro screenshot-32ac41.png
Snip macro screenshot-32ac41.png (185.86 KiB) Viewed 1107 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3022
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] 3D sketches

Post by NewJoker »

Thank you guys, that's really informative. I wonder why macros like the one for parametric curves don't get implemented into FreeCAD. It shouldn't be difficult and it's better to have more built-in functions.

I tried performing a sweep along 3D path created by applying boolean union to 2 separate 2D sketches:
sketch.PNG
sketch.PNG (6.81 KiB) Viewed 1068 times

The result is wrong when I use Part Design sweep:
sweep 2.PNG
sweep 2.PNG (23.52 KiB) Viewed 1068 times

But it's fine when Part sweep is used:
sweep 3.PNG
sweep 3.PNG (67.87 KiB) Viewed 1068 times

Merging 2D sketches seems to work but it would be easier with 3D sketches like those offered by Draft Workbench.
Post Reply