Hi, I’m making elevations from room boundary curves. However if people have tiles in bathroom rooms, it can create little kinky curves. Naughty little curves. Is there a way to simplify it to just make 4 closed curves? Hopefully the diagram below explains. Arrows is what its making the view to. If its a setout like on the left though I do want it to make 6 views on the walls instead. Just want to eliminate the kinks. Curve simply doesn’t seem to work in this case. Was thinking about a bounding box but there might be a kink in a room that needs 6 elevations on a wall and then itll just create 4.
Hi @vanman
How much of a link would be considered as removable? Sounds like you need to pencil down what your requirements are in a simple algorithm ![]()
Or…
Finding the intersection of the vector directions of the longest curves (within a certain length tolerance) closest to the bounding box perimeter curves?
Might look at something Monday ![]()
I was about to sit down now and do some sketches. I was thinking about removing any small kinks with curve length and then maybe grouping lines that are on the same vector within a certain distance to each other and removing one. Wasn’t sure what to do after but then I can try find vector intersections like you said. I’ll give it a bash tomorrow
why don’t you create 4 elevations or sections that pass through the center of the sketch? They will cover all sides you need. They will be 4 yes, but those 4 views will include the 6 sides. Hope you get me!
something like in this video.
Thanks Omar, but the script is designed to handle rooms that may have angled walls too. Got to try cater to all variations that could come up
I dont know how to measure along a vector to group vectors within a margin
. Sort of just got here but dosnt isolate one curve along each string of curves that are close together
Hi @vanman
Basically what you’re trying to do is get rid of those little lines and make a continuous one?
like this:

Yup
Maybe I can group lines by vector. Create a plane 90 degrees to each line group. Get a point from each line and project to the plane. This will group points close to each other from near parallel lines and use a point cluster node or or python to group the points and group the lines the same. Then get first item from each group to get one line in the direction and join
Well, I have an idea, just a quick thought. Get the start point (or the end point, really doesn’t matter) of the lines, then group those points by distance (spring package has this node, if I’m not mistaken). The distance you would specify, let’s say, for example, a margin of 30 cm (considering the project units in cm) to group the points. Then make a count to know how many points are grouped and just pick the groups which have just one point. Finally, make the lines with those points.
Thanks I’ll give it a go. Just thinking if there’s one kink along a line. Could this method end up with a slightly angled line and then a slightly angled elevation? ![]()
I don’t know to be honest haha
, it was just a quick thought. Needs to be tested.
Hi vanman,
I am currently not at a pc or laptop so I’ll try to convey my approach through text.
- Get the average midpoint of each room, then use that point to sort each line (or midpoint from those lines) around the x-axis.
- Then get the vector against the x-axis and make sure all those values are in clockwise order. Perhaps by getting the vector from the midpoint of the room to the midpoint of the line & the vector of the line itself. Then check if the angle between the two vectors is positive or negative.
- Round all values such that they are easily workable. Maybe also divide them by 45 or something if they aren’t perfectly aligned.
- Then group all keys if they have the same value as the one before , itertools has a handy python-loop for this.
- After that maybe get 10 points or so from each line and normalize the lists to level 2, so that you have the same levels as 4.
- Create new lines from these points and you’re done
Also I think getting rid of the short lines is a good start
before doing all this.
PS: if you’re working with angled walls a lot you could always lower the “dividing” value, maybe to 30 or 20.
Thanks Daan, it will take my brain awhile to understand that and give a go. In the mean time I’ve given my thing a go. This is a edit, think I’ve cracked it but will need to do testing on multiple rooms and other situations tomorrow. Also need to figure out how to join up the lines

room rectangle simplify2.dyn (123.3 KB)
Hi vanman,
Interesting approach, however I think this is quite prone to errors: i.e. when 2 consecutive lines are in a different direction by 180 degrees.
I’ve come across similar problems before myself, that’s why i came up with those specific steps. I’ll see if i can create something for you later today
Thanks Daan, updated my post. May have cracked it by getting rid of duplicates along same line but will do more testing tomorrow. Should go to bed
I also may not understand how your saying its prone to errors properly yet
With all the awesome stuff on the forums. Gone and done it!! ![]()
room rectangle simplify2.dyn (142.2 KB)
Sample room.rvt (452 KB)





