Author Topic: Divide Polyline?  (Read 1560 times)

0 Members and 1 Guest are viewing this topic.

Atook

  • Swamp Rat
  • Posts: 933
Divide Polyline?
« on: October 10, 2006, 03:21:14 PM »
Iíd like to take a polyline and divide it into equal pieces. Just like the divide command, but in VB(A). When itís a straight polyline, no problem, as soon as you throw bulges and segments with different slopes it gets more complicated.

Is there an easy way to do this? The Autodesk forums turn up some references to acadx, which has been discontinued, but not much past that.

Iím currently writing in VBA, but would eventually like to port it to VB. Iím writing for r2007.

If thereís a simple way to do this in VB.NET, it might be the trick to get me .NETting.

I believe the hard way will include Brycos post on bulges. And if thereís only a hard way to do it that someone has coded up and would like to share, Iíd be more than happy to make use of it. :)
« Last Edit: October 10, 2006, 03:30:09 PM by Atook »

Bryco

  • Water Moccasin
  • Posts: 1849
Re: Divide Polyline?
« Reply #1 on: October 10, 2006, 08:44:44 PM »
Atook the math isn't that hard but you may want to use Curve.cls by Frank Oquendo, I use it in 2006 no problems. You need the Vlax as well. This isn't the same as the discontinued acadx it is 2 classes that allow you to access the math functions exposed in lisp (shhh!)

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Divide Polyline?
« Reply #2 on: October 10, 2006, 11:02:10 PM »
...or you could use the curve functions directly available in .NET (Acad that is)
ie getParamAtPoint etc.

Cheers,
Glenn.
Me