Hi,
I have a problem that I'm considering if it's possible to solve using iLogic. 🙂
I have a view with holes, and there's always a holes table associated with this view. In this case, my approach is to create a section through the centers of all TYPES of holes using the section tool.To illustrate what I mean, below is a video of my standard procedure:
![section.png section.png](https://forums.autodesk.com/t5/image/serverpage/image-id/1272848i27C2E26DABF3F1FF/image-size/large?v=v2&px=999)
And now I would like to automate this process, that is, for a view named "VIEW1," create such a section as I described.
It seems to me that we should approach the issue in the following way:
1.Based on the holes table, determine how many types of holes we have (e.g., using the DESCRIPTION column).
2.For each type of hole (within the same description), determine the point that has the minimum X coordinate (with the condition that each subsequent X must be at least R + 1mm larger, as otherwise creating a perpendicular line to the next hole center won't be possible).
3.If we have as many X values as types of holes, and they meet the condition that each subsequent one is larger than the previous one by at least R+1, then we have the coordinates of the hole centers. Each X corresponds to a Y value in the table.
4. We still need the starting and ending points, which, as it seems to me, could be determined as follows:
5.Once we have these points determined, we generate lines from the starting point through the first hole to the point (X+R+1,Y). Then, we draw perpendicular lines from that point to the next point (X1+R+1;Y1) and from there to the next point (X2-R-1;Y2), and so on.
My question is whether what I wrote makes sense and is it possible to translate it into rule code? The challenge will likely be determining the center points of the holes in such a way that the X coordinate is always sorted from the smallest to the largest, taking into account the type of holes. Additionally, dealing with the fact that sometimes some of them are singular, so it's not possible to determine another X (these would be dominant holes)
Has anyone done something similar and has a ready recipe?
Thanks in advance,
Regards,
ralfmja