I have a geometry and I am trying to divide its corner lines into points so I can connect those points to make floors. But those points make some irregular connected lines. For example, you can see in the picture below, that the lines should be almost perpendicular (green) but the lines I am getting are a bit inclined (around 45 degrees) because the points are interchanged (red lines).
Could you please provide me some guidance on it considering that the script should work parametrically and not just for this case?
(I was thinking something like using stream gate; if the line angle is greater than 70, it should connect otherwise move to the next point. It’s just an idea, I am not sure if it can be implemented, please provide your expert opinions)
For starters - why does your initial curve collection contain duplicates? You have 22 vertical curves, but your collection contains 44 curves - 22 curves one way and 22 curves with flipped start / end points. Even in your picture above you can see overlapping points in your point list.
Yes, actually it is due to the meshes I have ( I have no control over its generation). I have tried many things to cull the dup lines but they persist. I have other models as well which have the issue of duplicate lines but they do not cause any problem with the arrangement of points as there are no quick turns in the geometry. It is happening only on this portion of the geometry.
this is a fast and dirty sketch that tries to rebuild the external walls given the corner points, it doesn’t address anything else
it needs the point cloud and a start line (that I provided manually), it will search from the line-end for the closest point at +/-90 degrees (indeed assumes walls are always at 90 degress)
That’s so cool. I appreciate it Inno. However, it will involve drawing a manual line which I would like to avoid. Is there any alternative way for it?
Thank you so much
This seemed to work on the duplicates…no idea where it’s from though. I’m not getting the little info arrow that points to where the utility is from. Thought it was Pufferfish plugin but not sure. Maybe someone else can ID.
Your points are in the wrong order, and they’re probably getting their order (index #) from the order in which you put the curves into the list. If you’re gonna do this in GH you might need some way of ordering your data or telling GH how to reindex your data.
Yes, you’re right but the problem is my point order works for other models which do not have such abrupt and small changes in the direction. The arrangement is working in the anti-clockwise direction, I reckon, which considers the smaller angles, I believe, therefore, it connects it with the “wrong” point. Therefore, I am just wondering if we could control the arrangement of points based on the angle but with the local origin (not a global origin). For instance, every preceding point becomes the local origin for the next point. I do not know if it is applicable; my limited expertise encumbers me from developing on it.
In the top view sketch a polyline that approximates your desired layout (like you sketched your green lines in the picture). Reference that curve into GH. The discontinuities of that curve will be points that are correctly indexed (ie. the points will be in the order that you draw the curve). Use those points to re-index your curves.
(To be clear: You’re not using that sketched curve for the loft - you’re only using its discontinuity points to re-order your lines.)
That’s great. Thank you!
I completely understand your approach. Your script ends up with one surface, however, I was making different floors and every floor was a separate surface. That’s why you could see the No. of Floors node. I am trying to see if I can use your approach to get the desired result because the line you drew in Rhino can be extracted and I may use it to create a copy at every floor level and then make the loft. Let’s see if it works.
well, whatever method you might use to get an external-wall-line between two points of the cloud (I mean, a line that corresponds to a wall that exists for real) should work
I have deleted my previous comment because I mistakenly uploaded the GH file which I was not supposed to. Therefore, I am attaching the question asked in the deleted comment below in case anyone is reading the whole discussion. Thank you so much for your understanding
I have solved the issue by circumventing the arrangement of points whatsoever. I used the bottom boundary curve and then created offsets at increasing distances to draw floors and in the end, created loft surfaces for each floor (yayy).
However, I would like your expert help on one thing:
a) as you can see I am adding a yz-plane for directing the offset curves upwards which totally works for this specific model, however, when I add it for other models, it does not work (offset curves go downwards) and xz-plane works for them. Is there a way, I can always keep the offset curves upwards?