Divide curve based on segment size
3429 2 1-
- stinzen
- Member
- 44 posts
- Joined: March 2014
- Offline
I'm trying to make a building where I only want windows on the side facing the street. I want to be able to place as many wall segments of a certain size that fits and then use the rest of the curve for the corner parts.
I used measure to get the perimeter, divided that by the segment width, rounded down to closest integer to get the amount of segments. Subtracted that from the total curve perimeter. I then tried using carve nodes First and Second U to cut out the leftover part for the corners. On the facade curve I used resample with the amount of segments from before but I can't really get it to work like it should. When I scale down the wall segment width it doesn't fill up like it should.
I think it might have to do with that I didn't manage to fit the “leftover” corner values in the right way to 0-1, but I'm really not sure!
I used measure to get the perimeter, divided that by the segment width, rounded down to closest integer to get the amount of segments. Subtracted that from the total curve perimeter. I then tried using carve nodes First and Second U to cut out the leftover part for the corners. On the facade curve I used resample with the amount of segments from before but I can't really get it to work like it should. When I scale down the wall segment width it doesn't fill up like it should.
I think it might have to do with that I didn't manage to fit the “leftover” corner values in the right way to 0-1, but I'm really not sure!
-
- anon_user_40689665
- Member
- 648 posts
- Joined: July 2005
- Offline
-
- stinzen
- Member
- 44 posts
- Joined: March 2014
- Offline
Thanks cpb, that is a much more elegant solution, will definitely implement some of it into my file.
In my case though I'm working with an already existing curve with a set length (from OSM data) so I won't be able to set the width in the same way as you, that's why I used the carve nodes. I also want to be able to use instanced meshes for the wall segments in the end, that is why I want to be able to fit as many wall segments of a certain width on the line and then use the rest for the corners. I realized that I had made a mistake in the math so I could actually get it to work the way I wanted to in the end but will look into using your method for creating the body when I have time to work on this again. Attached my new file with the segment placing even though the setup is a bit clumsy atm
In my case though I'm working with an already existing curve with a set length (from OSM data) so I won't be able to set the width in the same way as you, that's why I used the carve nodes. I also want to be able to use instanced meshes for the wall segments in the end, that is why I want to be able to fit as many wall segments of a certain width on the line and then use the rest for the corners. I realized that I had made a mistake in the math so I could actually get it to work the way I wanted to in the end but will look into using your method for creating the body when I have time to work on this again. Attached my new file with the segment placing even though the setup is a bit clumsy atm
Edited by stinzen - Sept. 17, 2019 11:34:30
-
- Quick Links

