# Tangential arcs and lines

I have a polyline consisting of straight segments and arc segments. The polyline is from a digitizer and should describe a line we then use in a tube bender. For the tube bender to interpret it correctly the input lines and arcs need to be tangential to each other. The digitizer polyline have kinks in it.
My question is what would be the best way to remove those kinks and create tangential straight lines and arcs without going to far from the original polyline?

Hello - can you post an example? You can try `Line` > Tangent >2curves and pick the arcs at either end of the near-straight segment, as a start, and see how close you get.

-Pascal

Two different types of kinks in polycurves of line segments between arc:

1. The arc and line are co-planar but the line is not tangent to the arc.

2. The arc and line are not co-planar.

The first situation can be “corrected” using the method Pascal suggested if the arcs at either end of the line segment are co-planar. The arcs may need to be extended. If the arcs are not co-planar than Pacal’s method will generally fail except in special situations.

Pascal’s method does not work in the second situation. One method to "correct this situation is extend the line segments until they intersect. If they do not intersect in 3D (not just in one view) then the lines need to be altered until they intersect. Then use Fillet to create new arcs of the desired radius in the corners.

1002-1005.3dm (32.2 KB)

Here’s a file. The “ytterkontur” layer is the input from the digitizer (the curve is in one plane). The input is not completely symmetrical (but in theory it should be) so I split it at the middle ref line and mirror one of the sides (“ref” is a layer with reference lines). 1002-1005 is the layer with what should be the “corrected” polycurve consisting of only lines and arcs. After correcting the polycurve I use “convert to arcs” and then export to a dxf with specified settings working with our tube bender. Since the tube bender only can bend in one direction, kinks on the curve will result in bending that doesn’t correspond to the original line.
Line > Tangent > 2curves will probably work between a straight segment and an arc segment, but what about between two arc segments? (for instance at the “shoulder” of the curve, see attached file)

btw is there a way to check if a line and curve (or curve-curve) is tangential to each other?

For1002-1005_V6.3dm (40.9 KB)
contains another way the blue polycurve can be smoothed to be tangential continuous.
_Arc also has a Tangent option, which was used in creating some of this. It may be helpful to first _Connect with ExtendArcsBy=Arc ExtendOtherCurvesBy=Line, the 2 curves from which to pick the tangencies, or _Extend with Type=Natural if no intersection exists.

One quick way to test for tangent continuity in a polycurve is to _ExtrudeCrv it with SplitAtTangents=No. The model’s angle tolerance, which is 1° in your model, is used to determine tangency. If an open polycurve is tangent continuous, only 1 surface will result.

When I clean planar data like this, I find it helpful to sometimes view the geometry at an acute angle to their plane. Kinks are easier to spot this way. If using the Perspective viewport to do this, it may be easier to navigate the view when the projection is set to Parallel.

`GCon` will tell you this. ArcBlend is a good tool to connect lines with tangent arcs where the current arcs are off.

-Pascal

ArcBlend generally makes two arcs rather than one arc. In this application (pipe bending) one arc connects two straight lines. It seems that the best method is to explode the polyline, move the arcs to different layer, and make new arcs with Fillet command.