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!
Locked
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 Features!
+ PartDesign Additive shape container
+ PartDesign Subtractive shape container

They are somewhat similar to PartDesign Booleans, but I think they are a bit more useful. Here's an example of why you might need them.

Let's say you are modeling a flange, with a non-circular opening. Lets use a slot. We want screw holes around the opening...
subtractiveshape-01.png
subtractiveshape-01.png (313.89 KiB) Viewed 2562 times
There is no PartDesign pattern (AFAIR) that can produce the necessary holes, but there is a handy tool in Draft workbench that can help, Draft PathArray. This is where PoM Subtractive Shape comes in.
* Create Subtractive shape container. You will be presented with an empty screen, where you should model the shape that cuts the holes.
* Add shapebinder of the sketch that was padded (select Sketch in tree, and click PoM Shapebinder).
* From Sketcher workbench, create a new sketch, and constrain up a slot that goes through the centers of future screwholes.
* From Part workbench, add a cylinder, and set it up to have the right radius, and enough height to penetrate all the way through. Leave it at the origin
* Select Cylinder, Sketch001, and apply Draft PathArray
subtractiveshape-02.png
subtractiveshape-02.png (280.57 KiB) Viewed 2562 times
* Done! Leave the container to get back into Body (e.g. use PoM Leave command, or double-click Body in tree).
You may need to click Recompute button to see the result. Also, there is a chance Tip property of SubtractiveShape isn't pointing to the actual shape to use for cutting (PathArray). In that case, you can fix it by using PoM Set as Tip command.
subtractiveshape-03.png
subtractiveshape-03.png (289.56 KiB) Viewed 2562 times
subtractiveshape-example.FCStd
(29.97 KiB) Downloaded 60 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic (again)

Post by triplus »

DeepSOIC wrote:Upstream meaning merge into master FreeCAD? Maybe, but only when automatic sorting of new objects into active group is implemented. What workbench should they land to? Assembly? or spread over various containers across workbenches?

As for feature hierarchy, I don't know why does it behave like it does (flattens out everything). In C++ version of Module, I didn't have that problem. I think fixing it is most likely a C++ work.
If it would be only about Part Container i could give you a simple answer. But i feel there will be (much) more to it. Therefore i guess lets wait and see what the future brings.
New Features!
Nice additions. As for placing such features in current PartDesign NEXT workflow. Ouch!
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again)

Post by nemesis »

DeepSOIC wrote:New Features!
+ PartDesign Additive shape container
+ PartDesign Subtractive shape container
Didn't test it yet, but that's exactly what I was looking for!!
Thanks a lot!!
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Part-o-magic (again) [new features: PartDesign add/sub shape containers]

Post by ickby »

Interesting idea. It is really nice to see for what those extension can be used! I wonder if we should change the boolean op in PartDesign to be a container. It would be like your new objects with the only difference that one can choose Add/Sub/Common. May be moreusefull than it is now.
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 features: PartDesign add/sub shape containers]

Post by DeepSOIC »

ickby wrote:It is really nice to see for what those extension can be used!
Yea, extensions are great, thanks for making them happen! Now I can knock out a container almost for anything in no time at all :mrgreen: , and even make it attachable (possibly, I haven't tried yet).
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again) [new features: PartDesign add/sub shape containers]

Post by nemesis »

ickby wrote:Interesting idea. It is really nice to see for what those extension can be used! I wonder if we should change the boolean op in PartDesign to be a container. It would be like your new objects with the only difference that one can choose Add/Sub/Common. May be moreusefull than it is now.
+10
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 features: PartDesign add/sub shape containers]

Post by DeepSOIC »

New feature!
* Exporter
It is an object you add to the project, and it can automatically export an object into a file whenever it changes. It can export Parts and Groups, but limited to a single level nesting (child Part containers are fed to FreeCAD's exporter, but FC's exporters usually ignore them).
I hope that this picture explains well what it does.
exporter-feature.png
exporter-feature.png (86.01 KiB) Viewed 2468 times
Exporter checks that model has no features in an error state, will refuse to export if it finds errors.

BLUE = edits
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Part-o-magic (again) [new feature: Exporter]

Post by cox »

DeepSOIC wrote:New feature!
This is really nifty, DeepSOIC :D
Need help? Feel free to ask, but please read the guidelines first
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 »

DeepSOIC wrote:
easyw-fc wrote:4) ability to select an App::Part root node and export the assembled/children components as STEP
4) I'm afraid I won't be able to do it
Well, it looks like I just did it to some extent, almost by accident :P
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Part-o-magic (again)

Post by easyw-fc »

DeepSOIC wrote:Well, it looks like I just did it to some extent, almost by accident :P
Great! I see it preserves colors too ;)
Better day by day! :D
Locked