What's new in PartDesign Next

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

What's new in PartDesign Next

Post by DeepSOIC »

Hi!
I don't know why, I felt a desire to post an overview of changes to PartDesign, highlighting the most important differences from user perspective.

First of all, why old PartDesign is rubbish, and why I stopped using it:
1. parametric solid-to-solid relations are prohibited. I find it very natural to have parts in an assembly depend on each other, because they need to mate each other.
2. linear dependency graph is the best way to make parametric links broken
3. Sketches that must be attached to faces (faces are highly specific links prone to breakage), which adds to link instability problem. Yet, it is very often that a sketch is to lie on one of the base planes (XY, XZ, YZ; especially true when designing bodies of revolution).
4. (consequence of 2, 3, and the lack of topo naming) is it very hard to delete or substantially alter a feature in the middle of the history
5. Some pads or pockets can take long time to compute, because of the Boolean operations that are happening in the process. There's no way to postpone these operations (this is a limitation of FreeCAD as a whole, but it is especially a problem of PartDesign, because in Part, one can first design the individual features, and once happy with them, start the fusing process).
6. Pieces can't be moved without a long recomputation of all geometry (clones aside)

What's been changed:
1. Linear dependency graph is no longer enforced, because:
1.1 sketches can be attached to anything, including base planes, and other solids. Same applies to links to external geometry: anything that does not create a loop in dependency graph is allowed.
1.2 individual solids can depend on each other
1.3 Parts can have as many solids as needed
This can solve many link instability problems, by linking cleverly (generally, by linking to the earliest possible state, or by having special skeleton pieces and linking just to them)

2. Part and Body containers have been introduced.
Part keeps together all the stuff related to a part (a set of objects that are to be moved together during assembly). Part can contain PartDesign Bodies, Part-workbench objects, and other stuff.
Bodies keep chains of PartDesign features together. That is, a Body contains a chain of operations to build a single solid shape. As of now, Bodies are not moveable.
Parts and Bodies are made to:
2.1 keep the tree view nice and organized
2.2 features can be easily added into Bodies, and Body will present it's most recent state to the outside (this should solve the situations like "I have made a pocket in my part, why wasn't it's clone updated accordingly?")
2.3 Part can be placed. Everything contained in the Part is translated/rotated, without causing a recompute. The links to outside of Part will be as if the Part is at the origin, so even a forced recompute will not alter the geometry of the Part. (As far as I understand, this is the fundamental difference that was required to make Assembly work.)

3. The new dependent copy creation mechanism should keep the model tree nice and clean, as well as provide some possibility to rip parts off a complex design into a new document. (This is how I understand it, it is about the dialog when linking outside of Part, where there are three options)

4. Lots of new stuff was added to PartDesign:
4.1 Datum planes, lines and points, for use as sketch attachment, mirror planes, revolution axes, and otherwise help construct models.
4.2 Loft, Sweep and Thickness are now in PartDesign. Lofts and Sweeps in PartDesign support creation of pipes in one operation, unlike their Part wb versions.
4.3 Some geometric primitives are now in PartDesign
4.4 Mirrored , Polar Pattern, Linear Pattern and Multitransform now can transform multiple features at once.
4.5 Involute Gear is now attachable, like sketches. This also applies to a multitude of stuff from Draft workbench (to everything that is derived from Part::Part2DObject; it needs some attention).

Now, summarize how the "rubbish" points were improved
1.parametric solid-to-solid relations are prohibited. Allowed!
2. linear dependency graph is the best way to make parametric links broken. Linear dependency graph is no longer enforced!
3. Sketches that must be attached to faces (faces are highly specific links prone to breakage), which adds to link instability problem. Fixed!
4. (consequence of 2, 3, and the lack of topo naming) is it very hard to delete or substantially alter a feature in the middle of the history Still a problem, but much better now, because linear dependency graph is not enforced, and links between solids are allowed
5. Some pads or pockets can take long time to compute, because of the Boolean operations that are happening in the process. Not much improvement here, although now it is possible to split the model into simpler pieces and later merge them with Booleans, just like in Part wb.
6. Pieces can't be moved without a long recomputation of all geometry (clones aside) Fixed!

Feel free to correct me, and add something ;)
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: What's new in PartDesign Next

Post by ickby »

Nice summary! I think you pretty much nailed it, I only have two additions which are not that user relevant, but may be nice for the overall context:

1. The main PartDesign changes you have listed as point 1 don't live "next" to the body/part introduction, but are a direct consequence. Only the introduction of a body container allowed to lift the restrictions you mentioned. This is IMHO an important fact to show that the original implementation was not super bad and overly restricted, it was for the most part just unfinished.

2. What was also new, at least to my knowledge, was the joint effort on this outside of the core team. Initiaded by and code from tanderson, a few rough implementations by me, large important pieces by deepsoic and now the cleanup, detailing and migration by Fat-Zer with all the ongoing discussions and decisions. This is a huge combined workload done by many non-core developpers together, I like this very much and hope for more of this :)
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: What's new in PartDesign Next

Post by tanderson69 »

ickby wrote:Initiaded by and code from tanderson
I had very little to do with it. You guys deserve all the credit!
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: What's new in PartDesign Next

Post by dubstar-04 »

Wow!!

This is a fantastic summary for those of us who find it difficult to keep on top of the latest development.

This is very exciting indeed, any indication of when this will land in trunk?

Thanks,

Dan
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: What's new in PartDesign Next

Post by DeepSOIC »

Thanks!
I have updated the summary, by adding a brief explanation of what Part and Body containers are for.
m.no
Posts: 10
Joined: Wed Oct 29, 2014 6:51 pm

Re: What's new in PartDesign Next

Post by m.no »

One thought on assembly itself.
Part keeps together [...] a set of objects that are to be moved together during assembly
In Solid Edge (my preferred CAD) assembly works in that way. Multi-body part, by default is inserted into assembly as one piece (yes, I know that there is export of multi-body part into single, but linked files).

I, personally prefer OnShape's approach. You can directly put into assembly single bodies from multi-body part.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: What's new in PartDesign Next

Post by triplus »

Nice summary but i wouldn't say current PartDesign is rubbish. You started using PartDesign NEXT mainly because new features where added allowing you to do more advanced stuff in PartDesign NEXT. Luckily you know how to code and you where able to add some of the features yourself. If you wouldn't code some of them there is a good chance it would not yet be implemented as there where some second thoughts if user should be allowed to do something or not. Once it was coded and observed it was easier to make conclusions stuff like that will happen anyway and it makes sense to happen.

As for the "breaking design" part rest assure nothing changed much in PartDesign NEXT. Users will still break their body/part/assembly if they will go back and change geometry instead of parameters of existing geometry. And you can't stay in "horizontal DAG design" forever because as soon as you add relation between two features you are already in "vertical DAG design" and for that the same things apply as for current PartDesign. Solutions on how to overcome that and to localize the issues when they happen are still lacking and will need to be implemented in the future.

Like with expressions where sketcher constraints are uniquely identified and if one is removed only that part in expression needs to be repaired. Once every face in the design tree will have unique identifier it could become easier to remove that face and only repair that sketch loosing support instead of loosing all the faces from that point on.

Anyway good job in making PartDesign Next and a big thank you to all the people involved. What is the plan to merge it in master?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: What's new in PartDesign Next

Post by DeepSOIC »

triplus wrote:Nice summary but i wouldn't say current PartDesign is rubbish.
:D I know, I was a little bit rude. But for marketing purposes (advertising the new) :P
triplus wrote:You started using PartDesign NEXT mainly because ...
I did not :oops: . Currently, I'm using Part workbench with unlimited links in sketcher. Quite a powerful thing, actually!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: What's new in PartDesign Next

Post by yorik »

ickby wrote:This is a huge combined workload done by many non-core developpers together, I like this very much and hope for more of this :)
Me too! Fantastic work guys... This "core developer" category doesn't really exist anymore, I think :) I hope we're not far from mergeable state!

Thanks for the synthesis DeepSOIC... It throws a lot of light for who doesn't follow the PartDesign development so close.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: What's new in PartDesign Next

Post by triplus »

DeepSOIC wrote:
triplus wrote:Nice summary but i wouldn't say current PartDesign is rubbish.
:D I know, I was a little bit rude. But for marketing purposes (advertising the new) :P
OK. I'll give it a go!
Post Reply