Rounding of line segments
Moderators: SDS, support, admin
Rounding of line segments
Hi,
We're using CADImport.NET to read cad files.
Right now i'm looking for some code to round the corners of a polyline (just like the fillet function in Autocad).
Does somebody now where i can get such code or just the algorithm? I couldn't find it on the internet.
Thanks.
We're using CADImport.NET to read cad files.
Right now i'm looking for some code to round the corners of a polyline (just like the fillet function in Autocad).
Does somebody now where i can get such code or just the algorithm? I couldn't find it on the internet.
Thanks.
Re: Rounding of line segments
Hello.
The fillet feature can be realized using CAD Import .NET. At first you need to calculate an angle between two polyline segments forming a corner that needs to be rounded. The polyline vertex representing this corner must be replaced with two other vertexes. Vertexes placement will be defined by calculated angle and required radius of fillet. Finally one of the vertexes must have Bulge value specified to set segment curvature.
Alexander.
The fillet feature can be realized using CAD Import .NET. At first you need to calculate an angle between two polyline segments forming a corner that needs to be rounded. The polyline vertex representing this corner must be replaced with two other vertexes. Vertexes placement will be defined by calculated angle and required radius of fillet. Finally one of the vertexes must have Bulge value specified to set segment curvature.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Rounding of line segments
Ok, thank you.
I hoped for a library which can do it.. need also to round/fillet polylines with mixed lines and arcs.
Think i need to do it by myself, should indeed be doable.
I hoped for a library which can do it.. need also to round/fillet polylines with mixed lines and arcs.
Think i need to do it by myself, should indeed be doable.
Re: Rounding of line segments
Hello.
The Fillet is advanced editing feature. However CAD Import .NET is the library that provides import functionality basically. Different features can be realized based on provided library API and imported data.
The above mentioned algorithm can be used for rounding of straight and curved polyline segments. However it will require much more complicated calculations. The angle must be found between the straight segment and tangent to curved segment in the point, defined by required angle.
Alexander.
The Fillet is advanced editing feature. However CAD Import .NET is the library that provides import functionality basically. Different features can be realized based on provided library API and imported data.
The above mentioned algorithm can be used for rounding of straight and curved polyline segments. However it will require much more complicated calculations. The angle must be found between the straight segment and tangent to curved segment in the point, defined by required angle.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support