AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
Distinguished Contributor
Vasily_BC
Posts: 106
Registered: ‎04-27-2012
Message 1 of 19 (438 Views)

Centerline from Buffer

438 Views, 18 Replies
02-12-2013 04:40 PM

Hi,

 

I know that it probably old story, however I didn't find an answer.

Is there way to create centerline from buffer or polygon in Civil 3D?

There is should be some easy method to do it.

By now the only proper way is to explode object, delete lines that are smaller than minimum and do offset for merged border.

 

Any ideas?

 

Thanks

*Expert Elite*
BrianHailey
Posts: 2,868
Registered: ‎04-27-2005
Message 2 of 19 (421 Views)

Re: Centerline from Buffer

02-12-2013 07:53 PM in reply to: Vasily_BC

I honestly don't know what you are trying to accomplish. Perhaps you could provide a drawing or an image showing what it is you are trying to do.

 

When I think of buffer, I think of an area around something. Is that what you mean by a buffer?

Brian Hailey
CAD-1.com
My Blog
*Expert Elite*
tcorey
Posts: 2,768
Registered: ‎12-18-2002
Message 3 of 19 (415 Views)

Re: Centerline from Buffer

02-12-2013 08:33 PM in reply to: Vasily_BC

I'm sure youre license is Civil 3D, but your question is a Map question, right? Perhaps posting in the AutoCAD Map group would yield better results.

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Distinguished Contributor
Vasily_BC
Posts: 106
Registered: ‎04-27-2012
Message 4 of 19 (407 Views)

Re: Centerline from Buffer

02-12-2013 09:41 PM in reply to: Vasily_BC

The thing is that I have shapefile of 60m corridor along transmission line 120 km long. I need to extract centerline from it. Of course I can do it manually, but it's 120km. I've tried to explode shapefile and delete short lines that was on rounded corners and then extend the rest. However, I realize that even this could take hours and also it's not a beautiful way to do it. I know it could be done in ArcGIS by Collapse Dual Lines To Centerline, but I believe it could be done in AutoCAD.

I've also tried to create best fit alignment. It freeze my computer every time.

I'll upload picture tomorrow morning.

ps. I think this case could be applicable both to Civil 3D and Map 3D because everyone works with shapefiles.

 

Thanks!

*Expert Elite*
sboon
Posts: 2,226
Registered: ‎11-08-2005
Message 5 of 19 (406 Views)

Re: Centerline from Buffer

02-12-2013 09:43 PM in reply to: tcorey

I'm taking a bit of a guess as to what the OP is trying to do but - given a polygon like this one how would you accurately recreate the original centerline?  Some parts of it are easy, but not all.

 

Clipboard01.png

 

*Expert Elite*
neilyj
Posts: 3,989
Registered: ‎08-01-2008
Message 6 of 19 (393 Views)

Re: Centerline from Buffer

02-13-2013 01:42 AM in reply to: sboon

That's my understanding of the question as well

 

Not overly familiar with shapefiles but If the shapefile was exploded into CAD line primitives, would using JOIN not create a polyline that could be offset 60m?

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 500Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
Distinguished Contributor
Vasily_BC
Posts: 106
Registered: ‎04-27-2012
Message 7 of 19 (379 Views)

Re: Centerline from Buffer

02-13-2013 09:25 AM in reply to: sboon

Hi,

 

You understand it right. Here couple screenshots of shapefile.

Shapefile has 3638 vertexes! However, most of them are not important because was made by feature buffer command (my guess). Also explode method was just a try to get centerline. I can use offset, but as a result will get polyline with extra 1800 vertexes!

1.JPG

2.JPG

*Expert Elite*
Alfred.NESWADBA
Posts: 9,608
Registered: ‎06-29-2007
Message 8 of 19 (373 Views)

Re: Centerline from Buffer

02-13-2013 09:39 AM in reply to: Vasily_BC

Hi,

 

>> The thing is that I have shapefile of 60m corridor along transmission line 120 km long.

>> I need to extract centerline from it

I would:

  • run _MAPIMPORT to get it into AutoCAD as Polyline.
  • next run command _OFFSET with the value of 30 (half of the corridor width) to the inside
  • if there are now double objects then you can use _MAPCLEAN to delete double and maybe to join elements together.

Does that help?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Vasily_BC
Posts: 106
Registered: ‎04-27-2012
Message 9 of 19 (366 Views)

Re: Centerline from Buffer

02-13-2013 10:25 AM in reply to: Alfred.NESWADBA

It would work but it will take hours cause offset works only with ONE object. However, it is only way so far.

It will be easer to query lines that are 10m and less for example, delete them, do offset for the rest and do extend for missing parts.

I believe that there is should be some proper and beautiful way how to do it.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,608
Registered: ‎06-29-2007
Message 10 of 19 (363 Views)

Re: Centerline from Buffer

02-13-2013 10:29 AM in reply to: Vasily_BC

Hi,

 

>> It would work but it will take hours cause offset works only with ONE object

I thought you have ONE corridor? Then you would only have one _OFFSET-command.

 

BTW: the most easiest way would be to get the source of the buffer, at least look to backups because there was an element from which the buffer were created.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.