Part compound vs. Std Part

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!
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Part compound vs. Std Part

Post by Roy_043 »

I am wondering if Part Compound has become obsolete with the introduction of Std Part. What are the typical use cases of a Part Compound?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part compound vs. Std Part

Post by openBrain »

Actually a Compound is a base type. Eg. all boolean operations of Part WB lead to a Compound (IIRC).
Also a Boolean Fragments (for example) leads to a Compound on which you can eg. apply a Compound Filter.
This isn't possible with a Part container.
Also Compound doesn't create a LCS but lives in the current system. ;)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Part compound vs. Std Part

Post by vocx »

Roy_043 wrote: Fri Jan 17, 2020 3:17 pm I am wondering if Part Compound has become obsolete with the introduction of Std Part. What are the typical use cases of a Part Compound?
As far as I can tell, a compound (Part_MakeCompound) is a basic object defined by underlying OCCT classes, so it's kind of like a boolean operation, which groups various objects but without fusing them.

Compounds are used internally by scripted objects to group various Shapes into a single object. For example, Draft_Arrays are compounds of copies of a base object; in the tree view the array appears as a single object.

If you are talking about the field of mechanical assembly, then yes, Std_Parts have basically supplanted compounds. But the basic Part compound (a collection of shapes) is still used internally by different tools in all workbenches.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: Part compound vs. Std Part

Post by Roy_043 »

Thanks for your answers.
openBrain wrote: Fri Jan 17, 2020 3:25 pm Also Compound doesn't create a LCS but lives in the current system.
Is this really the case? In terms of LCS (Local Coordinate System) a compound does seem similar to a Std Part. At least it does not behave as an Arch BuildingPart. But maybe I have misunderstood.

EDIT: Typo.
Last edited by Roy_043 on Sat Jan 18, 2020 9:18 am, edited 1 time in total.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Part compound vs. Std Part

Post by chrisb »

A compound has indeed its local coordinate system, as it has its own placement, which is in (0,0,0) after creation. But compound does not expose it any further by means of an Origin, like StdPart does.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part compound vs. Std Part

Post by openBrain »

chrisb wrote: Fri Jan 17, 2020 10:35 pm A compound has indeed its local coordinate system, as it has its own placement, which is in (0,0,0) after creation. But compound does not expose it any further by means of an Origin, like StdPart does.
I would say a Compound doesn't have an LCS. It has a placement inside the current one. ;)
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: Part compound vs. Std Part

Post by Roy_043 »

As I understand it the placement of an unnested compound is expressed in the GCS. The objects nested in the compound use the compound's LCS.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part compound vs. Std Part

Post by openBrain »

I have no computer now to test, but one can easily try.

Compound together a Part/Sphere and a Part/Cube, then move the Compound and check if the primitive items moved together with the Compound or stay at their original locations. ;)
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Part compound vs. Std Part

Post by chrisb »

They move, even the Transform tool is available and works.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part compound vs. Std Part

Post by openBrain »

chrisb wrote: Sat Jan 18, 2020 12:32 pm They move, even the Transform tool is available and works.
Thx for testing. ;) This is interesting. Does the primitive objects stay @(0,0,0) or do their placements follow the one of the Compound?
Post Reply