Part::Compound / Compound: Links go out of the allowed scope

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!
vocx
Posts: 3349
Joined: Thu Oct 18, 2018 9:18 pm

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby vocx » Tue Apr 23, 2019 10:13 pm

iogui wrote:
Tue Apr 23, 2019 5:31 pm
...
My feeling was: if check Geometry is displaying errors, that's bad and I have to fix it, otherwise it can break things in future constructions on my model.
Which is why you need to define what you intend to do. If you don't have problems, then there is no need to worry about it.
All the forum topics that I've read seems to be indicating that Make Compound is the right operation for uniting objects that are meant to be together since they are just separate objects that may be together as if they were glued and that's exactly what I've trying to do. In fact, this model is a module of a cabinet so it will be constructed exactly in this way in the real world. It's different parts will be glued together either by using glue or screws.
This is exactly what an "assembly" is. It's a collection of different objects (parts) that are put together in some way.

"Assembly" or "product" is the most common term used in mechanical CAD programs like Catia or SolidWorks.
What do you think is better for what I'm building, a compound or a Std Part container (this one I didn't know about till now)?
Reading Std Part wiki page now it seems to me that I should be using Std Part instead of Compound as it states:
"As an assembly container that groups objects to be manufactured separately then glued or screwed together, like a wooden table."
I would personally use... whichever.

I've not used either much. To me Part Coumpounds are sort of "dumb" assemblies. You just put pieces together, and don't worry about the relationships between them; you just want them to stay together.

I would use Std Part when I really want to align things properly, as the Std Part has its own local system of coordinates, so you can align different bodies with respect to this local coordinate system.

An assembly is supposed to be a finished product, part, object, or however you want to call it. Therefore, you typically don't need to perform further boolean operations with it. You use the boolean operations on the individual bodies that comprise such assembly. Therefore, your initial statement, "I want to remove the intersection errors, because they don't allow me to perform further boolean operations", doesn't make much sense to me. If you want to perform boolean operations on the compound, then you haven't finished the assembly, you are still working on a solid body that is part of the assembly. In that case, I wouldn't create a compound, I would fuse the parts, and then keep doing boolean operations.

------

My advice to you is then, use a Compound when you just want to put things together quickly, and use Std Part when you really intend to do an assembly.

When you say that "in the forum everybody says that I should use Compounds", this sounds to me like a bit outdated information. The Part Workbench is a basic layer that exposes the primitives of the OpenCascade (OCCT) geometric kernel. It provides basic functions to create solids (like cubes, cylinders, torus, etc.) and to perform boolean operations with them. This way of working was the traditional way CAD systems used to work when they first appeared in the 1970s. You just added a bunch of primitive objects and fused them together (and subtracted them) to obtain a particular shape. It's an old way of working, so to speak.

The PartDesign Workbench is a more modern way of doing those same operations by "feature editing", that is, by sequentially adding parametric transformations of a base solid. It's a more modern approach.

So, by using the Part Workbench, you are using "primitive" functions. When you read information about the Part Workbench, take it with care. There are usually more modern approaches to the same process. Ultimately, however, the PartDesign Workbench (and every workbench in FreeCAD) also uses the Part primitives under the hood.

Despite this, there are some users in this forum that will just say "don't use PartDesign, use Part, it's simpler". In many cases they do it because they are stuck in their old ways of doing things, and they don't want to try newer approaches. So, beware of the information that you get.

Now, for your specific case, since you are working with simple shapes (cuboids), it makes perfect sense to use Part Boxes; that's the fastest and simplest way of creating your individual bodies. There is little advantage to using a PartDesign Body, a Sketch and PartDesign Pad, or a PartDesign AdditiveBox; you get the same basic shapes, so it's the same result. However, the final assembly seems to me better handled with a Std Part, than a compound.
Yes, I intend to study those too. But when I open the Freecad list of available addons, Assemby 3 is not in the list, just Assembly 2 that I have already installed. What's the main difference between A2plus and Assembly 2 (or 3)?
Don't use Assembly2 because it's obsolete. Nobody is maintaining that code, and possibly won't work with newer versions of FreeCAD. Use A2plus, which is its direct successor.

Assembly3 is based on a forked version of FreeCAD. The author of Assembly3 is adding new core components to his own version of FreeCAD in order to facilitate the production of assemblies, and to fix other things, such as the "topological naming" problem (features are internally renamed and things break). Since these are sensitive changes, the author decided to work on a fork, so as to not affect the main FreeCAD code. Eventually, some of his improvements may be merged into the main FreeCAD code, so that everybody will have access to those features. In that moment, some features of A2plus and Assembly3 may be merged to become the "official" assembly workbench of FreeCAD.

In summary, A2plus runs on the standard FreeCAD, and can be installed from the AddonManager. To use Assembly3 you need to download and compile a special fork of FreeCAD. It cannot be installed from the Addon Manager. See external workbenches.

Code: Select all

FreeCAD ----> Assembly --> official assembly workbench, never truly developed
|       |
|       | --> Assembly2 --> first attempt at real assembly, unmaintained since 2016
|                |
|                | --> A2plus --> fork of Assembly2, spiritual successor, and still in development and maintenance
|
|--> FreeCAD fork --> Assembly3 --> required changes to the core of FreeCAD to produce assemblies
                 |
                 |--> Assembly4 --> a new attempt at producing assemblies without relying on constraints
Yes, that's true. But what I'm really doing is testing use casses as a new FreeCAD user (that I really am) to know how likely one would adhere to FreeCAD to model furniture so that I know what features I should implement in a possibly new furniture workbench. I'm really trying to understand what are the pitfalls and what is the best approach to make FreeCAD attractive from a woodworker point of view.
...
I honestly don't see what is so special about furniture modelling. It seems the same thing as any other type of mechanical modelling. You create individual bodies (flat panels, doors, handles, screws, bolts, nuts, washers, springs), and then you assemble them together.

If I were to create an assembly, I'd use Part Boxes for simple geometrical bodies, and PartDesign for more complicated shapes (screws, handles, rounded cushions).
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
vocx
Posts: 3349
Joined: Thu Oct 18, 2018 9:18 pm

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby vocx » Tue Apr 23, 2019 10:25 pm

chrisb wrote:
Tue Apr 23, 2019 6:19 pm
...

@vocx: The point of view that coplanar issues show problems because they cannot share the same space is interesting. Can you elaborate on this? I mean if they overlap it should be worse, but usually it is better. I had always thought it was due to rounding issues that it is not possible which face is above the other, because sometimes it is one of them and sometimes it's the other, but that was a shot in the dark too.
FreeCAD_coplanar_objects.png
FreeCAD_coplanar_objects.png (5.42 KiB) Viewed 481 times
If you have two objects, one has a top face at z=0, and the other has a bottom face at z=0, these two faces are mathematically co-planar.

However, when you move the objects so that one is on top of the other, how do you determine which face should be exactly defined at z=0? Mathematically, it's possible to define them this way, but in reality, one face should always be above the other, as the edge of the object has a real thickness, and cannot occupy the same space as another edge.

In CAD software, the faces of a body are represented by perfect planes. Planes have no thickness, only area. However, in reality a perfect plane never exists due to microscopic imperfections (surface roughness). So, necessarily a plane should be defined as being shifted up or down, to avoid intersections.
FreeCAD_coplanar_objects_on_top.png
FreeCAD_coplanar_objects_on_top.png (4.63 KiB) Viewed 481 times
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
iogui
Posts: 94
Joined: Tue Mar 19, 2019 3:44 pm
Location: São Paulo
Contact:

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby iogui » Wed Apr 24, 2019 12:04 am

vocx wrote:
Tue Apr 23, 2019 10:13 pm
Which is why you need to define what you intend to do. If you don't have problems, then there is no need to worry about it.
What I intended is already defined. I've explained in my previous comments.

vocx wrote:
Tue Apr 23, 2019 10:13 pm
This is exactly what an "assembly" is. It's a collection of different objects (parts) that are put together in some way.
Yes, I know.

vocx wrote:
Tue Apr 23, 2019 10:13 pm
Therefore, your initial statement, "I want to remove the intersection errors, because they don't allow me to perform further boolean operations", doesn't make much sense to me.
That's not exactly what I meant to say. What I meant to say is "It is not normal to have errors. As a general rule, when I see an error, I try to solve it because I know that ignored erros can bite me in the butt in the future."
I understand that what you are saying is that those errors can be ignored because the problem that they indicate will not happen as I will not execute Boolean operations with the "assembly" object in the future but when I first opened this thread I didn't knew that as I'm pretty new to FreeCAD. I had some knowledge about those kind of errors but from a parcial view. It was not clear to me what exactly was the extension of the Make Compound functionality not even I knew about Std Part (a cool functionality but with a not so intuitive name).

vocx wrote:
Tue Apr 23, 2019 10:13 pm
My advice to you is then, use a Compound when you just want to put things together quickly, and use Std Part when you really intend to do an assembly.
It is clear for me now. I've changed my document, stripped off the compound and replaced it with Std Part. It makes more sense and I don't even have to think about those self intersect errors anymore.

vocx wrote:
Tue Apr 23, 2019 10:13 pm
When you say that "in the forum everybody says that I should use Compounds", this sounds to me like a bit outdated information.
Again that's not exactly what I've said. I've said: "All the forum topics that I've read seems to be indicating that Make Compound is the right operation for uniting objects(...)".
And yes, probably all those topics were outdated information because now that you've told me about Std Part, I've made a small search and I know that this feature (in the original meaning of the word) was officially introduced just in 0.17 version.

vocx wrote:
Tue Apr 23, 2019 10:13 pm
The Part Workbench is a basic layer that exposes the primitives of the OpenCascade (OCCT) geometric kernel. It provides basic functions to create solids (like cubes, cylinders, torus, etc.) and to perform boolean operations with them. This way of working was the traditional way CAD systems used to work when they first appeared in the 1970s. You just added a bunch of primitive objects and fused them together (and subtracted them) to obtain a particular shape. It's an old way of working, so to speak.

The PartDesign Workbench is a more modern way of doing those same operations by "feature editing", that is, by sequentially adding parametric transformations of a base solid. It's a more modern approach.

So, by using the Part Workbench, you are using "primitive" functions. When you read information about the Part Workbench, take it with care. There are usually more modern approaches to the same process. Ultimately, however, the PartDesign Workbench (and every workbench in FreeCAD) also uses the Part primitives under the hood.
Pretty instructive! I've really enjoyed PartDesign Workbench and I've been using it a lot. Of course that I will not use it to produce simple cuboids though as it is an overkill.

vocx wrote:
Tue Apr 23, 2019 10:13 pm
Don't use Assembly2 because it's obsolete. Nobody is maintaining that code, and possibly won't work with newer versions of FreeCAD. Use A2plus, which is its direct successor.

Assembly3 is based on a forked version of FreeCAD. The author of Assembly3 is adding new core components to his own version of FreeCAD in order to facilitate the production of assemblies, and to fix other things, such as the "topological naming" problem (features are internally renamed and things break). Since these are sensitive changes, the author decided to work on a fork, so as to not affect the main FreeCAD code. Eventually, some of his improvements may be merged into the main FreeCAD code, so that everybody will have access to those features. In that moment, some features of A2plus and Assembly3 may be merged to become the "official" assembly workbench of FreeCAD.

In summary, A2plus runs on the standard FreeCAD, and can be installed from the AddonManager. To use Assembly3 you need to download and compile a special fork of FreeCAD. It cannot be installed from the Addon Manager. See external workbenches.
That's a really good information!

vocx wrote:
Tue Apr 23, 2019 10:13 pm
I honestly don't see what is so special about furniture modelling. It seems the same thing as any other type of mechanical modelling. You create individual bodies (flat panels, doors, handles, screws, bolts, nuts, washers, springs), and then you assemble them together.

If I were to create an assembly, I'd use Part Boxes for simple geometrical bodies, and PartDesign for more complicated shapes (screws, handles, rounded cushions).
There are some specificities. E.g.: In modern furniture building it's not so common to use solid wood anymore. Now the woodworker deal almost all the time with panels like MDF, plywood, OSB and so on. So to be able to automatically obtain from your model a cutting plain boosts your productivity but how would you do this in FreeCAD without a more specialized tool?
Another point: To build furniture with panels the woodworker have to build a model with lots of rectangular parts (see the file I've attached to this thread as an example) and the thickness of those rectangular parts is almost always the same in a project (maybe 2 or 3 different thickness by project). Taking those specificities into account I can imagine some ways to improve a furniture modelling productivity by specializing some tools.

If you want to know more, read this thread.

Anyway... thank you for all the useful information you've provided in this post.
@chrisb thank you too.
You guys provided many good information here and I'm grateful. Specially @vocx ! Thank you for your time.
Be the change you want to see in the world. - Mahatma Gandhi
vocx
Posts: 3349
Joined: Thu Oct 18, 2018 9:18 pm

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby vocx » Wed Apr 24, 2019 12:45 am

iogui wrote:
Wed Apr 24, 2019 12:04 am

There are some specificities. E.g.: In modern furniture building it's not so common to use solid wood anymore. Now the woodworker deal almost all the time with panels like MDF, plywood, OSB and so on. So to be able to automatically obtain from your model a cutting plain boosts your productivity but how would you do this in FreeCAD without a more specialized tool?
Another point: To build furniture with panels the woodworker have to build a model with lots of rectangular parts (see the file I've attached to this thread as an example) and the thickness of those rectangular parts is almost always the same in a project (maybe 2 or 3 different thickness by project). Taking those specificities into account I can imagine some ways to improve a furniture modelling productivity by specializing some tools.
It seems to me that what you want is very possible. I'd look at Flamingo and Arch workbenches.

Flamingo Workbench implements tools for creating frames and pipes, which are two types of objects which use regular profiles and shapes based on some standards. So, I presume your usage would be similar, defining some standardized wood panels that can then be inserted and assembled.

In the Arch Workbench I'd look at the implementation of Arch Panel, which creates panels from a wire outline.

I'd also look at Arch Window. It defines some basic windows programmatically, drawing the outlines in the Sketcher, and then extruding them. The Arch Window tool allows you to define custom windows as well, by defining which wires belong to a frame panel or to a glass panel, and so on. So, you could define some standard wood profiles and parts in similar way.
If you want to know more, read this thread.
...
Gah. Something I hate from this forum is people resurrecting old threads that are several years old, or that have several pages in length (10 or more). It's just weird.

The old posters talk about old FreeCAD versions, and the content doesn't match current reality. That particular thread is quite short, so it's no problem to read, but other threads that started 8 years ago are a nightmare to read because you don't know in which of the 20 pages you need to jump to get to the good stuff. It's maddening.

Personally, I would create a new thread, "Furniture Workbench in FreeCAD", make a reference to the old thread, and have a fresh start. Most forums on the internet have a policy of not necro-bumping, but FreeCAD is the opposite in that. The older the thread, the more it should be bumped. Oh, well.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
iogui
Posts: 94
Joined: Tue Mar 19, 2019 3:44 pm
Location: São Paulo
Contact:

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby iogui » Wed Apr 24, 2019 12:53 am

More good information, @vocx! I will link your post in the thread to share this knowledge with the other guys.
Be the change you want to see in the world. - Mahatma Gandhi
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby NormandC » Wed Apr 24, 2019 2:33 am

There is a fundamental difference between a Part Compound and a Std Part and I haven't seen it mentioned in this topic, or I overlooked it.

A Part Compound creates a completely new single shape out of its parent shapes. When you change the placement of a compound, the parent objects stay in their initial position; only the compound, which a single shape, is moved/rotated.

The Std Part container does not duplicate the objects it contains: it is really more like a Std Group with a placement property.
User avatar
iogui
Posts: 94
Joined: Tue Mar 19, 2019 3:44 pm
Location: São Paulo
Contact:

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby iogui » Wed Apr 24, 2019 2:18 pm

Good observation @NormandC!
Be the change you want to see in the world. - Mahatma Gandhi
User avatar
iogui
Posts: 94
Joined: Tue Mar 19, 2019 3:44 pm
Location: São Paulo
Contact:

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby iogui » Wed Apr 24, 2019 2:46 pm

Another observation:
Although I had taken a look at Assembly 2 before deciding I would not use it. The reason was that this add-on assumes one will use many different files for the different parts to be assembled and I think that creating many files with simple cuboids would be annoying and unnecessary. Now reading the A2plus github readme I found out that the same applies to A2plus. But I've not really studied those add-ons in depth to take this decision. I just wanted to start doing and learning in the process as I was studying Part workbench, PartDesign workbench and a little about Arch and Draft workbenches for some time before that.
Be the change you want to see in the world. - Mahatma Gandhi
jmaustpc
Posts: 9630
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Part::Compound / Compound: Links go out of the allowed scope

Postby jmaustpc » Wed Apr 24, 2019 4:00 pm

iogui wrote:
Wed Apr 24, 2019 2:46 pm
Another observation:
Although I had taken a look at Assembly 2 before deciding I would not use it. The reason was that this add-on assumes one will use many different files for the different parts to be assembled and I think that creating many files with simple cuboids would be annoying and unnecessary. Now reading the A2plus github readme I found out that the same applies to A2plus. But I've not really studied those add-ons in depth to take this decision. I just wanted to start doing and learning in the process as I was studying Part workbench, PartDesign workbench and a little about Arch and Draft workbenches for some time before that.
quick history, Assembly 2 was written according to the original developer as something like (I don't remember his exact words) a quick "hack" and a useful tool but only intended as a helper, a convenience, until the "real" assembly WB arrives. It was never intended as a real or long term solution. The original developer stopped maintaining Assembly2 and it no longer worked properly with newer FreeCAD versions. Another developer made A2Plus from Assembly2 so its pretty much Assembly2.

Personally I have not ever used either so I can't offer any detailed advice.