# Sorting solids in list based on position between 2 lines

Hi,

So I want to put all solids in a list if they are placed between two (green) lines. I suppose I could create some sort of solid/hatch/plane between those lines and check if they intesect with those solids but I don’t know how I should create that structure.

Does someone have a clue about how you can do this?

Can you post your dataset and what you have so far?

Can you please upload the dwg? If you have alignment and profile I would approach a more dynamic way. Something like this.

If you only have a polyline you can get the intersection point with the green ones and loft a solid between.

1 Like

Hi,

Sorry, I can’t share any file here. The size of it is larger dan 8 mb, if you want I can share it with you personally.

I assume that this part of your script creates the rectangle that is visibele in your GIF?

What do you mean by “if you have alignment and profile”? I don’t know what you mean with the profile part.

I mean that, alignment is 2D object, but if you have Profile you can sweep the rectangle on a 3D curve from selected chainage values as shown in the gif. The rectangle is created with: PlaneByOriginNormal on start point and RectangleByWidthLength. What you can see is the whole script.

Hi,

This is what I have so far, I want to make it visibile which of the solids are between which lines.
In the “Select object” slot I put a hatch, just to check if it would do something. The result I got can be seen in the image below:

Ah ha, I believe I can do something with that. I will look into it, you can create that plane on intersection point’s between a selected line and the alignment?

Yes you can. You take the white line geometry, the green line geometry, find intersections (Pn), vector by two points (Vn=Pn-Pn+1), Plane.ByOriginNormal (Pn,Vn), then rectangle as above

Okay, I have seen that I don’t have a profile. You said “If you only have a polyline you can get the intersection point with the green ones and loft a solid between.”, does this work tho? Because those lines have a elevation of zero, and the already existing solids do have a elevation.

You can loft the solid on 0 with the needed height. It isn’t pretty, but should do the job.
Or put all the lines to the approx. elevation in Acad, may be easier than in dynamo.

It isn’t needed to be pretty, just functionally. Would it be possible to make a solid filled rectangle on a set top and bottom elevation, so that it would intersect with each solid within that area?