Part-o-magic [New: Selection tools, container duplication]

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic (again)

Post by triplus »

DeepSOIC wrote:I'm making a special independent container for that. Do you think I should merge them all into one mighty container? (the benefit of doing that is ability to switch container type after it's been made and populated).
Part Container i guess should have placement property and i guess it should by default be seen to the outside as a compound. Beyond that i don't know ATM what makes sense or not. And if i need things like Tip or not. Or if i really need any other property or not.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part-o-magic (again)

Post by NormandC »

shaise wrote:Then what is the meaning of a Cube inside a Body? (create a cube in Part WB, select it, then press the Body button from PartDesign)
This process imports any type of solid as base feature in a PartDesign body, so you can use PD tools with it.
shaise wrote:I still cant put sketches directly on it
Sure you can, but for some reason PartDesign still considers the cube a "foreign" object. So when trying to map a sketch to the cube, a dialog opens which says that selected geometries are not part of the active body, and to select a type of reference. The first two (Make independent copy/Make dependent copy) create a reference object, but "Create cross-reference" attaches the sketch directly to the cube.
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: Part-o-magic (again)

Post by shaise »

NormandC wrote:This process imports any type of solid as base feature in a PartDesign body, so you can use PD tools with it.
Thanks! I thought its something like that.
So at least there is some workaround to work with old/external parts.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part-o-magic (again)

Post by NormandC »

Yes! But the current method is not fail proof as it does not check for a valid shape first. Currently you can create a base shape from a sketch which creates problems. I reported it in issue #2862.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again)

Post by DeepSOIC »

New feature: ShapeGroup container. By default, it is a compound, but can be switched to fusion or common. Other modes ("Operation" property) not working yet.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic (again) [new feature - ShapeGroup(Compound) container]

Post by triplus »

I was able to create 2 shape groups and each has 2 part primitives in it. Resulting shape groups can be placed freely:
ShapeGroup.png
ShapeGroup.png (10.48 KiB) Viewed 1890 times
After i decided to test if i could apply Assembly 2 plane constraint between them. It worked as expected:
PlaneConstraint.png
PlaneConstraint.png (9.17 KiB) Viewed 1890 times
DeepSOIC wrote:Other modes ("Operation" property) not working yet.
I am guessing entering the shape group edit mode and doing whatever users wants instead isn't an option?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again) [new feature - ShapeGroup(Compound) container]

Post by DeepSOIC »

triplus wrote:I am guessing entering the shape group edit mode and doing whatever users wants instead isn't an option?
Actually, it is!
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Part-o-magic (again)

Post by easyw-fc »

DeepSOIC wrote:New feature: ShapeGroup container. By default, it is a compound, but can be switched to fusion or common. Other modes ("Operation" property) not working yet.
Great! Exactly what I was looking for! Thx
This is very useful for STEP assembly...
I tried to play with placement and it works correctly... and I can export as STEP the Group(s) assembled as in the PoM hierarchy :)
ATM I found a small issue... I can apply colors to sub-parts, but they get lost when exporting the file as STEP... Is there something that can be improved?
pom2.FCStd
(10.46 KiB) Downloaded 51 times
pom2.step
(16.32 KiB) Downloaded 46 times
Thx
Maurice
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again) [new feature - ShapeGroup(Compound) container]

Post by DeepSOIC »

I'm afraid, to support colors, I may have to move over to c++.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Part-o-magic (again) [new feature - ShapeGroup(Compound) container]

Post by easyw-fc »

DeepSOIC wrote:I'm afraid, to support colors, I may have to move over to c++.
If I can ask... please have a try.
I found this wb so useful for assembly road :D
Locked