Hey all, I have a bit of a tricky one, I've been looking around the place for some examples of this but I can't seem to get anything together which works how I want.
I've attached some example lines here, there's a red polyline which is the duct and the rest of the polylines which are cables which run through the ducts, north to south. There's also some cables which are running across the duct east to west which I don't want to select. These lines are not always simple straight two vertex polylines and sometimes have extra vertexes, e.g. on the right.
The goal is to select all cables which are 'in' the red ducts - i.e. polylines that are running 'under' another polyline, but only along the length of it, and with some 'fuzz factor' as the lines are not always in the same place (they could be drawn slightly offset) and not always running parallel (sometimes they drawn on a slight angle).
Essentially I want to pick the lines underneath the red line (duct) but only include lines which are running along the length of the red line, not any crossing it in another direction, and include lines that are expanded.
A imagine perhaps a script which picks the middle two vertexes of the red line, and does a small box selection (the 'fuzz factor') on each and compares the two lists to return a list where it only includes the objects that are in both might work, however I'm not very good with curve/vertex functions so I haven't been able to figure out how to get the 'middle' vertexes which could also be the 'start/end' vertexes for a 2-point polyline.
Any pointers to some example functions to do this stuff would be greatly appreciated.