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

Need help, or want to share a macro? Post here!
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC » Fri Apr 06, 2018 7:08 pm

freecad-heini-1 wrote:
Fri Apr 06, 2018 2:30 pm
My Freecad-files:
FC017_part-o-magic_shapegroup_2.fcstd
FC017_part-o-magic_shapegroup_1.fcstd
1. Merge your two projects.
2. create any number of clones of ShapeGroup. Place them as you need. Do not move ShapeGroup itself.
3. Part Compound the clones.
4. select the compound, and apply Lattice Array From Shape: internal placements
5. Create a shapebinder/ghost of the baseplate object from shapegroup.
6. Select the array of placements, the shapebinder/ghost, and apply Lattice Populate Copies.
7. Part Cut the copies off of the chamfer ...
...
PROFIT :mrgreen:

Now you can move clones, and the cuts should update. You can even add more clones, add them to compound, and you'll have more cuts added automatically.
Attachments
PoM-Lattice instance hack.FCStd
(300.04 KiB) Downloaded 20 times
freecad-heini-1
Posts: 6407
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic

Post by freecad-heini-1 » Fri Apr 06, 2018 8:05 pm

Thank you so much Viktor.
Please can you explain from 4 to 6 a bit more in detail.
Which icons are the right ones for me?

Or this steps as a anim gif?
On Linux I use Peek for to create anim gifs.
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic

Post by DeepSOIC » Fri Apr 06, 2018 9:40 pm

freecad-heini-1 wrote:
Fri Apr 06, 2018 8:05 pm
Or this steps as a anim gif?
On Linux I use Peek for to create anim gifs.
OK, I found ScreenToGif, feels okay.
PoM-Lattice instance hack.gif
PoM-Lattice instance hack.gif (986.79 KiB) Viewed 906 times
freecad-heini-1
Posts: 6407
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic

Post by freecad-heini-1 » Sat Apr 07, 2018 6:06 am

DeepSOIC wrote:
Fri Apr 06, 2018 9:40 pm
freecad-heini-1 wrote:
Fri Apr 06, 2018 8:05 pm
Or this steps as a anim gif?
On Linux I use Peek for to create anim gifs.
OK, I found ScreenToGif, feels okay.
PoM-Lattice instance hack.gif
Thank you for your help Viktor.

An error appear if I select the group and chose array from shape internal placement:

Code: Select all

Error: 
'App.DocumentObjectGroup' object has no attribute 'Shape'
array_from_shape_internal_placement.gif
array_from_shape_internal_placement.gif (394.84 KiB) Viewed 890 times
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic

Post by DeepSOIC » Sat Apr 07, 2018 9:49 am

freecad-heini-1 wrote:
Sat Apr 07, 2018 6:06 am
An error appear if I select the group and chose array from shape internal placement:
Use Part Compound, not Group. I think I can add support for a group quite easily, btw.
freecad-heini-1
Posts: 6407
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic

Post by freecad-heini-1 » Sat Apr 07, 2018 6:06 pm

DeepSOIC wrote:
Sat Apr 07, 2018 9:49 am
freecad-heini-1 wrote:
Sat Apr 07, 2018 6:06 am
An error appear if I select the group and chose array from shape internal placement:
Use Part Compound, not Group. I think I can add support for a group quite easily, btw.
Thank you very much. Sorry, my fault, group instead of compound ... :oops:

Now I catched it! 8-)
For the flange I used also populate array and it worked.
I exported to step with color and imported it. The result is correct:
pom_test_fh-1_stock-list.png
pom_test_fh-1_stock-list.png (13.51 KiB) Viewed 851 times
The names are a bit strange for the stock-list, but rename will do the job.
POM_AND_LATTICE_SOLUTION.png
POM_AND_LATTICE_SOLUTION.png (52.21 KiB) Viewed 849 times
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [New tool: Replace Object]

Post by DeepSOIC » Sat Apr 21, 2018 1:41 pm

New tools:
* List Usages
* Replace Object

List Usages: select an object, click the tool. A message box will pop up, listing all links to and from the selected object.

Code: Select all

==== Cylinder uses: ====
(nothing)

====Links to Cylinder:====
Fusion.Shapes (Link)
Cut.Base (Link)
Box001.Length (Expression)
Spreadsheet.docDeps (Link)
Spreadsheet.C2 (CellExpression)
Cylinder_Edge0.Object (Link)
Cylinder_Edge0.SubLink (Sublink)
ShapeGroup.Group (Child)
ShapeGroup.Tip (Link)
Replace Object is a replacement for OpenSCAD ReplaceObject, featuring container compatibility, sublink and expression support, and selective replacement GUI.
pom-replace.png
pom-replace.png (123.58 KiB) Viewed 785 times
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [New tool: Replace Object]

Post by DeepSOIC » Fri May 18, 2018 1:03 pm

New tool!
* X-ray

You select the object that is in your way, and click X-ray. The object goes transparent and lets you select other objects inside.
You click X-ray again (when nothing is selected), to remove x-rays from all objects.
partomagic-xray-screencast.gif
partomagic-xray-screencast.gif (526.49 KiB) Viewed 710 times
User avatar
easyw-fc
Posts: 2770
Joined: Thu Jul 09, 2015 9:34 am

Re: Part-o-magic [New tool: Replace Object]

Post by easyw-fc » Fri May 18, 2018 7:12 pm

DeepSOIC wrote:
Fri May 18, 2018 1:03 pm
New tool!
* X-ray
X-tremely useful indeed :D
Thx
User avatar
easyw-fc
Posts: 2770
Joined: Thu Jul 09, 2015 9:34 am

Re: Part-o-magic [New tool: X-ray]

Post by easyw-fc » Fri May 18, 2018 9:20 pm

I'm playing a bit with X-ray tool...
would it be possible to keep the edge/face selected on first click as selected also when X-ray button is clicked?
I would need to select i.e. two edges (what i normally do as 'click' plus a second 'Ctrl'+'click') starting with selecting a first edge, then clicking on X-ray button for making this part untouchable, then 'Ctrl'+clicking on the i.e. second edge of the object under the first clicked one and finally launch my python action on the two selected objects... I mean if I just click on the second object, only one edge would be in count, instead if I 'Ctrl'+ click on the second object, also the first edge would be kept into selection list...
Locked

Who is online

Users browsing this forum: alberich and 7 guests