View Full Version : Combining 2 sets of 2D data - to end up with a single 3D spline

03-01-2015, 04:51 PM
Sorry for the cryptic heading - not sure what to call it. I have a 2d alignment of a road. Separately I have the profile of the road showing elevation. The two are referenced to each other by the horizontal distance along the centerline. So if there is a horizontal curve 150 feet along the centerline - the profile will call out a station (which is the distance) as well as the elevation. What I need to end up with is a 3D spline that I can rail extrude the roadway. It has to be accurately done. So somehow I need to take the X and Z numbers from one object and the Y info from the other to combine. I'd just do it by hand - but it's 15 miles worth of road! I'm stumped....HELP!!

03-01-2015, 05:38 PM
You could put the vector data of the points into a list and then use this to create a new spline.


03-02-2015, 07:29 AM
Thanks Ernest - I'll take a look at it. Not sure how to get the two data sets to merge though.....

03-02-2015, 08:05 AM
Via a script you should be able to write out the point vectors to a text file. Then via a python script you could combine the two lists into one. I tried to do the first part yesterday but I'm not that familiar with the Modeler end of lscript. I wasn't getting a proper number of points in my iteration loop.

How did you get the two curves to begin with?

03-02-2015, 12:10 PM
Are you at liberty to share the files? It might be an interesting exercise to process the data into a format that ernpchan's script can work with.


03-02-2015, 12:15 PM
Sadly - no I can't share the files. I would - but my boss would think it's the end of the world and we'd all cease to exist - and it would all be my fault. I can't handle that much responsibility.... ;-)
I appreciate the offer though. I may have a way to get it done using Civ3D and acad. I'll know more tomorrow.

03-02-2015, 01:02 PM
I was gonna write the vectors to a text file out of layout. Then use a python script to combine the two lists into one.