Flexibility of sketches for the future of FreeCAD?

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!
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Flexibility of sketches for the future of FreeCAD?

Post by Hologram »

Just to start a discussion on the subject: I personally always liked the way Fusion 360 treats sketches in that they are not consumed by the features you create off of them. Sketches are located in a sketch folder as opposed to nested in each successive feature in the tree. That way, you always know where to find one, as you can just show and hide each sketch. Moreover, the sketches are listed in order of creation.
Overall, this allows you to re-use a single sketch more easily to construct various bodies. This gives you a lot of freedom to change the sketch up later or make edits to the model by adding a few more lines to the sketch to draw that hole that you wanted to extrude (so no need to create a new sketch for it later on). For Architectural modelling, it would also be helpful, because you can easily locate the various sketches you used to constrain a larger model. Back when I learnt Fusion 360, I also found it easier to learn due to the way it handles sketches. It coincided with how I learnt to model in architecture.

To summarise, what do people think about:
1. Leaving sketches in a sketch folder within a part
2. Leave sketches untouched by feature creation
3. Abandon the Single Solid Rule in which you can only create a single solid from a sketch (has a tight relation with 4.)
3. Would this be feasible to implement in FreeCAD, perhaps as a new non-CSG workbench?


P.S. For this discussion, I think it's best not to consider a history time-line, nor the idea of using components like Fusion 360 (wherein components can both be parts and assemblies). These things would need separate consideration, I would assume. This also is not meant to be a thread to make FreeCAD like Fusion, but rather a discussion about what it would bring to FreeCAD if sketches were more flexible in their use.
Last edited by Hologram on Sat Feb 04, 2023 12:15 pm, edited 1 time in total.
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Flexibility of sketches for the future of FreeCAD?

Post by Bance »

openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Flexibility of sketches for the future of FreeCAD?

Post by openBrain »

Can't get it. Sketches are absolutely not consumed by features. You can reuse them for as many features as you want. :?
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Flexibility of sketches for the future of FreeCAD?

Post by saso »

1. FC already allows you to do all of that
2. FC follows a more flexible workflow (allows the users to model in different ways) because it is meant to be used by different users with different cad / engineering / design needs and backgrounds
3. The CSG paradigm in FC is a complete nonsense, FC is based on an BREP kernel

Below is an example done in PD, in other workbenches it is the same, even easier...

PD_sketches_in_group.jpg
PD_sketches_in_group.jpg (14.79 KiB) Viewed 941 times
Attachments
PD_sketches_in_group.FCStd
(17.09 KiB) Downloaded 12 times
Last edited by saso on Sat Feb 04, 2023 11:55 am, edited 1 time in total.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Flexibility of sketches for the future of FreeCAD?

Post by onekk »

Hologram wrote: Sat Feb 04, 2023 10:29 am ...
3. Abandon the CSG modelling paradigm in which you can only create a single solid from a sketch (has a tight relation with 4.)
...

In fact Part Design is not using the CSG paradigm, as it is base concepts are "Features".

Probably you are referring to the "single solid rule", that is discussed a lot. There are pro and cons, but even in this state you could model decently with FreeCAD.

A general consideration, IMHO:

And probably, trying to put "too much things on fire" as you are doing, now it is not the "proper time", better to concentrate in some "atomic changes", discuss pro and cons and "possible solutions" to "real blocking problems", as bugs or "UI inconsistencies" than to " change all the way FreeCAD is now".

It is "evolution" and evolution is slow, expecially if someone has to considerate how to code the proposed changes.

I could guess the impatience, but now the main problem is to integrate some "big code changes" that are blocking the "evolution" of FreeCAD.

Easing the transition to other softwares that have passed to "pay per use" politics, is not the main goal of an OpenSource program.

If you want to speed up things, probably a real discussion focused on "few problems" that could be "solved with little modification" or even only on "inconsistencies" will be a "better service" to FreeCAD evolution.

I have appreciated yours experiments and results in "theming FreeCAD" to appear like a Blender, as you have done a good analysis on what is lacking to permit a better customisation is a step in this direction.

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/
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Re: Flexibility of sketches for the future of FreeCAD?

Post by Hologram »

@onekk my experience may be different from yours, but usually controversial topics, such as this one, gain a lot of views from people who all contribute to the discussion. Usually, this then leads to a few good new ideas or general directions to solve existing problems. Which then also helps the software grow, plus it can lead to good community engagement.
onekk wrote: Sat Feb 04, 2023 11:31 am A general consideration, IMHO:

And probably, trying to put "too much things on fire" as you are doing, now it is not the "proper time", better to concentrate in some "atomic changes", discuss pro and cons and "possible solutions" to "real blocking problems", as bugs or "UI inconsistencies" than to " change all the way FreeCAD is now".

It is "evolution" and evolution is slow, expecially if someone has to considerate how to code the proposed changes.
I very much agree with you on this. I'm certainly not advocating to get rid of the way things work now. Mostly questioning whether it could work another way. Could be that I missed certain tutorials in which this was addressed. In that case, please point them out to me :)
I'm experienced in using lots of software packages, so I find it helpful to note things down as I come across them with the idea that a complete beginner would be confused about the same things for sure. Unless they follow an awful lot of tutorials. Usually these first major roadblocks tend to get ignored the longer you use the software, because you know it works in a certain way and therefore stop wondering whether that's indeed the most efficient way. ;)
onekk wrote: Sat Feb 04, 2023 11:31 am
Hologram wrote: Sat Feb 04, 2023 10:29 am ...
3. Abandon the CSG modelling paradigm in which you can only create a single solid from a sketch (has a tight relation with 4.)
...
E: Another motive for dropping the Single Contiguous Solid rule for bodies is that this prevents you from working with surfaces and solids during the design process. If you eventually shell a surface and end up with solids, then why shouldn't that be possible is what I'm asking as well?


In fact Part Design is not using the CSG paradigm, as it is base concepts are "Features".

Probably you are referring to the "single solid rule", that is discussed a lot. There are pro and cons, but even in this state you could model decently with FreeCAD.
Yes, that's what I meant.
onekk wrote: Sat Feb 04, 2023 11:31 am I have appreciated yours experiments and results in "theming FreeCAD" to appear like a Blender, as you have done a good analysis on what is lacking to permit a better customisation is a step in this direction.
Thanks!
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Flexibility of sketches for the future of FreeCAD?

Post by onekk »

This is what discussion are meant to do: exchanging opinions.

You could not do BREP (shell and surfaces) with Part Design paradigm, but you can do with FreeCAD.

It is simply a matter to see things as a whole.

ie Part Design is not the only way to use FreeCAD as many are lead to think when reading many discussion and following tutorial.

And probably Part Design paradigm is not well suited to do that sort of things.

My preceding was an advice or better what I consider a good approach, as you are interacting with humans and not with bots, and probably first impression is important.

I could see your enthusiasm but if you end in to be considered a "bothering man" probably what you are trying to achieve will be more difficult to reach. :D


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/
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Flexibility of sketches for the future of FreeCAD?

Post by drmacro »

The single solid rule, even though much maligned, makes perfect sense when you consider it is the Part Design workbench paradigm and not Part workbench.

When you create a PD Body, you have defined a container that will contain a single, solitary, cumulative solid. Each feature (Pad/Pocket/etc. operation) in the Body is cumulative (and the result of each feature is NOT an atomic solid). The result of each feature MUST result in a single solitary solid (that is an accumulation of it's predecessors).

The only thing that happens in Part Design, is, when you do a Pad it does an extrude to solid of the sketch (or shapebinder or other valid extrud-able geometry). If you make another Pad, it creates another extrude and then does a Boolean union between the first and the second (unbeknownst to you). If you now make a Pocket, it extrudes the sketch to a solid, then does a Boolean Cut between the previous result and the extrude of the previous Pockets/sketches.

Imagine if the first Pad created two solids with a gap in the middle. Now, the user attempts to do a pocket of a shape in the void between the two pieces of the Pad. The Pocket, by definition is invalid, because it is attempting to Boolean thin air.

If you want multiple solids, then Part workbench is the correct workflow and paradigm in FreeCAD.

Could the single body rule be changed? We know it can, the realthunder branch allows it. Is it a good overall workflow? IMO, in the paradigm of Part Design, no.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Re: Flexibility of sketches for the future of FreeCAD?

Post by Hologram »

drmacro wrote: Sat Feb 04, 2023 12:51 pm Could the single body rule be changed? We know it can, the realthunder branch allows it. Is it a good overall workflow? IMO, in the paradigm of Part Design, no.
I can relate to what you say to some extent. You could also argue that the user will see two separate bodies in the tree view and see two different bodies highlight when performing a selection. The way I see it is there are multiple ways that lead to Rome in this.

In that sense, I agree with the conclusion of a previous topic:
triplus wrote: Fri Mar 01, 2019 1:09 am In my opinion FreeCAD 0.19 development cycle will likely again start to provide more answers and progress. We sort of understand now, on where the most Part Design workflow related criticism is coming from. It's basically about supporting more use cases. Like the question that got this thread started.

For sure we can debate further, if Body should only allow single solid or not. But if there is a property, that supports both use cases. Frankly, what is there left to debate anymore? More use cases supported, more people accepting and loving the workflow, less criticism.
One of the things that I am not seeing is combining surfaces and solids to create a model. Such a workflow is not Part Design compatible due to its non-Single Contiguous Solid nature (surfaces =/= solids). But — unless I am missing something with regards to the workbenches paradigm — this then leaves you with a more manual modelling process by going from one workbench to another. Ideally, I want to continue building upon earlier modelling operations in parametric fashion. And (NURBS) surface modelling fits this paradigm too when used to create more intricate shapes than solid design. I know the toolset to do complex surfacing is still limited in FreeCAD (as is in most software to be frank). But I think it is important to take this into consideration that it may one day be possible.

For me this video of Fusion 360 really was an eye opener in terms of a flexible workflow that you can adapt to become fully parametric as well if he had not used T-splines but constrained sketches and surfacing tools: https://www.youtube.com/watch?v=NypRE2aFhh4. It too leads to a Single Contiguous Solid, one you'll have a hard time to recreate if you could only do boolean operations. That's what I mean with more flexible.

E: Sorry, the points I am making are getting too broad and less concrete and less on-topic :/
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Flexibility of sketches for the future of FreeCAD?

Post by drmacro »

Hologram wrote: Sat Feb 04, 2023 1:24 pm
drmacro wrote: Sat Feb 04, 2023 12:51 pm Could the single body rule be changed? We know it can, the realthunder branch allows it. Is it a good overall workflow? IMO, in the paradigm of Part Design, no.
I can relate to what you say to some extent. You could also argue that the user will see two separate bodies in the tree view and see two different bodies highlight when performing a selection. The way I see it is there are multiple ways that lead to Rome in this.
The point is there is a defined paradigm of the way Part Design currently works.

I find nothing wrong with it. If I want multiple solids, I use Part workbench. I know and understand the limits Part Design workbench puts on me and choose Part Design when I feel the design can deal with those limitations.
...

For sure we can debate further, if Body should only allow single solid or not. But if there is a property, that supports both use cases. Frankly, what is there left to debate anymore? More use cases supported, more people accepting and loving the workflow, less criticism.

One of the things that I am not seeing is combining surfaces and solids to create a model. Such a workflow is not Part Design compatible due to its non-Single Contiguous Solid nature (surfaces =/= solids). But — unless I am missing something with regards to the workbenches paradigm — this then leaves you with a more manual modelling process by going from one workbench to another. Ideally, I want to continue building upon earlier modelling operations in parametric fashion. And (NURBS) surface modelling fits this paradigm too when used to create more intricate shapes than solid design. I know the toolset to do complex surfacing is still limited in FreeCAD (as is in most software to be frank). But I think it is important to take this into consideration that it may one day be possible.
But, Part Design workbench isn't suited for this workflow. Until the Curves workbench was introduced there was little, if any, capabilities in this area. And, even now, after a couple years, Curves is considered experimental. But, it is best used with Part workbench.

For me this video of Fusion 360 really was an eye opener in terms of a flexible workflow that you can adapt to become fully parametric as well if he had not used T-splines but constrained sketches and surfacing tools: https://www.youtube.com/watch?v=NypRE2aFhh4. It too leads to a Single Contiguous Solid, one you'll have a hard time to recreate if you could only do boolean operations. That's what I mean with more flexible.

E: The points I am making are getting too broad and less concrete :/
The fact is FreeCAD is not, at least now, a surface modelling tool. What is shown in the video can be, and has been, done in FreeCAD, with Curves WB. But, me? I'd just use Blender and be done with it.

The FreeCAD workflow involves using multiple workbenches. If you want to do nurbs and such, then Part workbench is the better choice. Curves, Curved Shapes, and Surfaces (much of Surfaces is available in Part WB) is simply not integrated with Part Design. Part Design is really meant to be limited to single contiguous components.

You should really work through the Curves and Lattice workbench series by MangoJelly on YouTube. I think they count around 40 now.

It may be worth watching his 2 beginners series (again around 40 videos) first though to get more feel for how things fit together.

In both cases, not so much for those tools, but, to get a feel for thought processes.

You should also take some time to look at what can be done in Tools>Customize. I have a lot of tools from various workbenches added to my global toolbar that streamlines my workflow.

There is no doubt things in FreeCAD could be made to look more integrated, etc. But, many, having spent the effort to learn it as it is, are quite productive.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply