polyline offset algorithm

polyline offset algorithm

Anonymous
Not applicable
2,216 Views
3 Replies
Message 1 of 4

polyline offset algorithm

Anonymous
Not applicable
Is there anyone who can point me to some algorithm that computes offsets for polylines? I need this for a couple of projects of mine... The polyline consists only of segments, no arcs. However when offsetting I might get some rounded corners (if the particular angle is obtuze), but I will simulate that with a series of segments that approximate that curve. I need an algo that can offset this polyline by any amount, the polyline being convex or concave, but geometrically correct (no shape overlapping). Thanks in advance, Banu Cosmin
0 Likes
2,217 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Have you tried the getOffsetCurves() member function inherited by AcDbPolyline from its parent AcDbCurve class? Cheers, Stephen Preston Developer Technical Services Autodesk http://adn.autodesk.com "Banu Cosmin" wrote in message news:40d7ff07_3@newsprd01... > Is there anyone who can point me to some algorithm that computes offsets for > polylines? I need this for a couple of projects of mine... The polyline > consists only of segments, no arcs. However when offsetting I might get some > rounded corners (if the particular angle is obtuze), but I will simulate > that with a series of segments that approximate that curve. I need an algo > that can offset this polyline by any amount, the polyline being convex or > concave, but geometrically correct (no shape overlapping). > > Thanks in advance, > Banu Cosmin > >
0 Likes
Message 3 of 4

Anonymous
Not applicable
Well, I needed this algorithm to be done by me (that's what i've been asked). I wanted to know what AutoCAD does when using this function; that is what algorithm it's using; I've searched the internet for an algorithm, but there are many outthere, and have all kinds of problems (more or less surpassed). Can anyone tell me what algorithm AutoCAD uses? Or is it just an heuristical approach? Thanks, Cosmin "Stephen Preston" wrote in message news:40d9b4bc$1_1@newsprd01... > Have you tried the getOffsetCurves() member function inherited by > AcDbPolyline from its parent AcDbCurve class? > > Cheers, > > Stephen Preston > Developer Technical Services > Autodesk > http://adn.autodesk.com > > > "Banu Cosmin" wrote in message > news:40d7ff07_3@newsprd01... > > Is there anyone who can point me to some algorithm that computes offsets > for > > polylines? I need this for a couple of projects of mine... The polyline > > consists only of segments, no arcs. However when offsetting I might get > some > > rounded corners (if the particular angle is obtuze), but I will simulate > > that with a series of segments that approximate that curve. I need an algo > > that can offset this polyline by any amount, the polyline being convex or > > concave, but geometrically correct (no shape overlapping). > > > > Thanks in advance, > > Banu Cosmin > > > > > >
0 Likes
Message 4 of 4

Anonymous
Not applicable
I would imagine Autocad's full algorithm is fairly complicated given that they treat all curves as parametric entities and have to deal with splines and other fun things. If all you need is something to offset lines, that's easy. If you need to calculate offset cicular arc sections, that's not too bad either. In any case, I don't think you sufficently explained exactly what you need or what your problem is. "Banu Cosmin" wrote in message news:40d9bdf4_3@newsprd01... > Well, I needed this algorithm to be done by me (that's what i've been > asked). I wanted to know what AutoCAD does when using this function; that is > what algorithm it's using; I've searched the internet for an algorithm, but > there are many outthere, and have all kinds of problems (more or less > surpassed). Can anyone tell me what algorithm AutoCAD uses? Or is it just an > heuristical approach? > > Thanks, > Cosmin > > > "Stephen Preston" wrote in message > news:40d9b4bc$1_1@newsprd01... > > Have you tried the getOffsetCurves() member function inherited by > > AcDbPolyline from its parent AcDbCurve class? > > > > Cheers, > > > > Stephen Preston > > Developer Technical Services > > Autodesk > > http://adn.autodesk.com > > > > > > "Banu Cosmin" wrote in message > > news:40d7ff07_3@newsprd01... > > > Is there anyone who can point me to some algorithm that computes offsets > > for > > > polylines? I need this for a couple of projects of mine... The polyline > > > consists only of segments, no arcs. However when offsetting I might get > > some > > > rounded corners (if the particular angle is obtuze), but I will simulate > > > that with a series of segments that approximate that curve. I need an > algo > > > that can offset this polyline by any amount, the polyline being convex > or > > > concave, but geometrically correct (no shape overlapping). > > > > > > Thanks in advance, > > > Banu Cosmin > > > > > > > > > > > >
0 Likes