I do need to sort my circles by radius. I do found a solution to sort them by radius by I can’t find a way to separate them and group by radius. I tried Dispatch and some branch manipulation but I don’t understand what else I need to do from here to get the actual circles grouped by radius.
Thank you very much. It is working. Anyway, as I see the Explode Tree complained that there are more branches than this component has output parameters. Creating more outputs solved the problem. It is there a way to automatically create as many outputs as existing data branches?
You have already sort+seperate+group them here in 3 groups.
By exploding them you can view them seperately, but explode component are more used to debug and check data.If you have 10000 circles with 100 different radius, you don’t really want to show 100 outputs here, because it is meaningless.But if you want to show them, right click on the explode component and you will see match outputs.
Actually I do need to sort them by diameter and depth and put them in separate layers that have a notation like Depth_Diameter, because for every diameter I need to use the according drill diameter to make the hole up to the dept required by each mechanisation. So, load of fun for me.
When you have more experience on GH, you will see one don’t have to explode data tree to get his target data, you can just have it in a data structure.
Here is an example.
You have a dictionary, and you don’t have to tear them apart page by page and tile them all on the ground to check for words every time.
Just hold the dictionary and you can easily find target page by context
That way was easier for me to visualize the circles. Because before I had a solution that didn’t worked very well, grouping the 5mm radius circles with the 2.5mm ones.
The actual depth I do calculate from the 3D object by measuring the distance between the top of the surface and the bottom of the hole. Now the holes have different diameters and depths and I need to sort and group them accordingly. After that I need to bake them into layers because the CAM software of my CNC machine this is how he can interpret a DXF file.
I suggest stop using some lazy plugin like vipers when you are new to GH.
This will make sure you understand basic GH data structure rule and manipulation really late in the game.
I know, but in production environment I need to find the solutions as fast as possible. I used Vipers components because that was the fastest way to convert curves to circles. This definition initially gave me errors making wrong groups because in my file I do have two different kind of construction circles, so I rebuilt them initially.
Yes, I can understand it.
Anyway, once you have some spare time to actually learn this. I suggest remove these plugins and have a nice and steady process on learning it.
If and only if you really want to master it, instead of dealing with work assignment.
Some plugins are nice and not really “lazy”:
Human/Elefront etc.
GH is difficult, and one sunday is not enough clearly. Even you have got some basic years ago, GH has updated a lot for years.
I think the more difficult thing is how to balance urgent work assignment and your personal knowledge structure.
If you have plenty of time and no one(teacher/boss) is asking you to do anything too difficult and in a rush, you will have a stable and solid knowledge structure like pyramid.
But if not, your pyramid will be hollow and like cheese, not cool.
So I guess the most difficult thing is to balance ideal and reality.
Good luck again.
In my case I do need to do the oposite. To calculate the existing hole depths (this 2D contours are extracted from a 3D object) and after I apply the first sort by diameter, I do need to sort again by depth of the holes. Same diameter can have multiple hole depths. After that I do need to create some logic and to bake the result in layers that contains the depth and the hole diameter. Names something like Holes_<Depth>_<Diameter>. So, if I have a dozen different diameters/depths I do need to create dinamically all that layers. And this is only the circles. I found extremely difficult to find a solution to extract just the ouside contour of the parts. It was a lot of fun finding something that really works in any situation. After that I do need to find a way to extend the edges of the pockets that are touching the exterior contour outside of the shape, so I can have clear cuts without rounded corners in that spots. A lot of fun, if you ask-me.
the on-screen visualization of the data ( D x.x - H xx ) is just there to show that the algorithm actually recognizes a given hole with its right diameter and its right depth (double checked a few of them, looks right)
what you see on the last panel is the best part of having a data-tree, things like:
{1;0}
0. D3.0 H18.0
{1;1}
0. D3.0 H18.0
{1;2}
0. D3.0 H18.0
{A;B}
data
A = index of Brep the hole is on
B = unique hole number on that brep
data = D, hole diameter and H, hole depth
if you want to bake circles per diameter per depth (using for instance Elefront) the fastest way is to just bake everything in a layer named as their data:
it won’t exactly serve your purpose “as it is”, I believe you want to apply this to breps that you have already sort of nested on the XY plane: at the moment it finds both circles that define top and bottom of any hole
From this model, I do need to create the holes and contours and create the layers for DXF export.
The overall shape will go into the “contour” layer, the other mechanizations into their respective layers. The holes will be sorted like “Hole_10_5”, after that the inside cutouts will go into “Pocket_10.5_E7” where E7 it is the number of the tool that I will use to cut the pockets.
All this information, grouped in 2D layers I do import in Mastercam who have a DXF processor, basically it reads all the shapes and based on the names of the layers, assigns automatically respective mechanizations that I do created the technologies for.