Offset function several offset values

Offset function several offset values

jordan
Contributor Contributor
1,243 Views
2 Replies
Message 1 of 3

Offset function several offset values

jordan
Contributor
Contributor

Is there a way to do an offset of a polyline ( or polyline points ) with different offset values?

There is a getOffsetCurves method of AcDbCurve, but this is only offset value.

The same for the AcGeOffsetCurve3d class.

0 Likes
Accepted solutions (1)
1,244 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor
Accepted solution

Do you mean different offsets for each segment of the polyline?

No, there is no such method.

You can write your own by splitting the polyline into lines and arcs, offset each one with your desired offset, than calculate sectionpoints, trim or extent the segments to the section points and build a new polyline.

 

Depending on your geometry an offset values you may have to handle some tricky case like this:

offset.png

 

Moreover you'll have trouble if the segments are tangential and have different offsets.

 


Thomas Brammer ● Software Developer ● imos AG ● LinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 3

jordan
Contributor
Contributor

That's what I feared.. I' ve writting my own offset function, but like you said, in the tricky case it sometimes fails.

I'll have to optimize my own offset function.

 

Thanks for the reply!

 

0 Likes