Offset a polyline with Z value
-
Are you able to share a part of the road to have a look at?
-
Hi Cotty, thanks for responding so quickly. I've stripped the drawing/sketchup file down so I can share it now. Here's a CAD/Sketchup copy for you to look at:
http://www.bikerchris.co.uk/3d/centreline-of-road-help.skp
http://www.bikerchris.co.uk/3d/for-sketchup-help.dwg
You'll note that as I only had 3 values for Z but I knew where they were, I did this (possibly an odd solution):
Using CAD I found the height difference of points to the nearest 0.5m. Then calculated how many 0.5m go into the difference, then used the CAD 'divide' command and submitted that number to the polyline. Then offset 0.5m vertically and simply made a note of each point, then created a 3D poly based on that. Hmm, that does sound complicated when I describe it!
Thanks in advance for your help.
-
So you have the center line at your z-values. You need the edges at z value too. Do you know what those or are you just estimating their height as even with the center line. Is that what you mean by you want it "Flat"?
I am guessing here, but You could use the center as guide for follow-me. Make a vertical profile of the road. Though you only need the top, you need to make this profile to have a face,so enclose it on the bottom. Draw it aligned with your center line. Use follow-me to extrude it via the centerline. Use soften/smooth as required. Other choice is you may want to use "follow-me and Keep plugin.
-
@pbacot said:
So you have the center line at your z-values. You need the edges at z value too. Do you know what those or are you just estimating their height as even with the center line. Is that what you mean by you want it "Flat"?
Thanks for commenting pbacot. I don't know what the road edge heights are, so I would like to say approx 0.1m lower than the centreline, to give them some sort of gradient. You've got the idea though, just imagine trying to draw a road which twists and turns up a hill and remains flat as it does so - but with no ground level for reference.
@pbacot said:
I am guessing here, but You could use the center as guide for follow-me. Make a vertical profile of the road. Though you only need the top, you need to make this profile to have a face,so enclose it on the bottom. Draw it aligned with your center line. Use follow-me to extrude it via the centerline. Use soften/smooth as required. Other choice is you may want to use "follow-me and Keep plugin.
That is a FANTASTIC work around, I love it! I would definitely use it if the road edge didn't vary from the centreline so much. I will definitely retain that method in the brain databank, thank you!
-
Sorry, forgot to attach this, which shows how non-uniform the road edge is when related to the centreline.
-
Sorry if these are thoughts are too random. I just came up with another idea.
Extrude the road edges up and extrude the (elevation-adjusted) center out. Intersect the road edge faces with model. Get the three resulting curves. Lower the outer edges to the approx. relative elevation and skin all with sandbox or another plugin. Use TIG's Extrusion Tools.
I think this is faster
-
Looking at your image and what you are proposing to work with, it looks like you have to make terrain based on the centerline then drape or intersect your road edges on it--sort of where you began.
-
You can scale the resulting polygons that result strung along the centerline. You may need to cut up your centerline to provide enough segments.
Edit: I decided to delete this method, cause, though possible is slow way to do it.
-
Hi pdacot,
Thank you so much for putting loads of effort into resolutions, they're all great! I'll have a go at both solutions and see how I get on.
thanks again!
Chris
-
If you want to try these. Might be a combination of the two. Use follow-me-and-Keep plugin on the the profile and center line. make the profile wider than the road at any point. Then drape the road edges (or intersect).
Advertisement