- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings to everyone, I've manage to get the room boundary and place direct shapes as solids
However the arch team wants to use another element so it can be editable manually after running the add-in and close those gaps at the corners. Therefore, we came up with the idea of using railings.
Now the problem is to transform the direct shape data to railings.
After getting the direct shape bottom lines, I came up with the surprised that for some wall the lines are not arranged consecutively in a list:
Havin the data before, I wish to group them up like in the following picture, so afterwards I can manage to create curveloops for my railings
Is there any algorithm do you recommend to address this matter? the exercise can become more tedious for other rooms:
- Hallway:
This is what I've been working on. It's the 4 time I'm working on a new approach so let me know if sounds good or have some suggestions:
- Perhaps if I query the index neighbour for each line, I keep the pair key values in a dictionary, then I can do a first loop to find if there is another line that at least has 1 same number/neighbor for the current line
- Then, I might want to accumulate all the adjacent values in the first loop
- For a second loop, I can iterate between all of them in case I miss a line that belong to the current group
- (for instance, line number 14 must belong to group "0-14-2-1-13" but when I iterate over line 1 as a first loop, It will never identify line 14 because line1 neighbors follow as "1,2,13" although line14 has "0,2,14". However, in a 2° loop, all the values stored line1,line2 and line 13 will be "1,2,13" and line 14 has the 2 index as an adjacent value so it will be included this time.
- I can continue to loop again until there are no other lines with at least 1 adjacent value that match the ones stored till the previous loop.
if everything goes right, then I can check out @jeremy_tammik blog to order lines consecutively for each group so I can create the curveloops
All the best,
Miguel G.
by the way, direct shape was helpful to get room boundaries as the solid boolean operations allows us to avoid placing direct shape solids behind cabinets, wall openings, bathrooms and kitchen fixtures, and other appliances that we wish to susbtract their solid from the direct shape baseboard.
Solved! Go to Solution.
Developer Advocacy and Support +