12-04-2021



For curves, the bulge value is a ratio of the distance from the arc to the chord divided by half the length of the chord. The bulge factor adds vertices to a polyline curve, creating an approximation of the curve using straight line segments. The length of these segments varies depending on the bulge factor and the degree of curvature. Exploded to polylines (32 segments): Y2 - Direct after XP, OR performs different on the left top one: Y3 - Faulty solutions by OR: Y4 (= saved state) The results may differ with the saved explosions. Y1 TA XP Relocate startpoint with OR to an existing reference (called ‘End’) Regards, CVH.

The curvature of a Polyline Arc segment is defined using a quantity known as bulge. This unit measures the deviation of the curve from the straight line (chord) joining the two vertices of the segment. It is defined as the ratio of the arc sagitta (versine) to half the length of the chord between the two vertices; this ratio is equal to the tangent of a quarter of the included arc angle between the two polyline vertices.

In this way, a negative bulge indicates that the arc follows a clockwise direction from the first vertex to the next, with a positive bulge describing an anticlockwise oriented arc. A bulge of 0 indicates a straight segment, and a bulge of 1 is a semicircle.

An AutoCAD Arc Entity is defined by a center, radius and start & end angle. The arc is always defined to be anticlockwise oriented, that is, following an anticlockwise direction from the start angle to the end angle.

Here I demonstrate various methods to convert between the quantities used to define a Polyline Arc segment and those used to define an Arc Entity, with a brief explanation of calculations used in each method.

Contents
Polyline

Arc to Bulge

Dxf polyline vertex bulge
Function Syntax(LM:arc->bulge <c> <a1> <a2> <r>)
Current Version1.0
Donate

Dxf Polyline Vertex Bulge

Arguments
SymbolTypeDescription
cListArc Center
a1, a2RealStart and End Angle of Arc (respectively)
rRealArc Radius
Returns
TypeDescription
ListList of: (<vertex> <bulge> <vertex>) describing the Polyline Arc

This function will convert the quantities used to define an AutoCAD Arc Entity (center, start/end angle, radius) to those used to define a Polyline Arc segment (vertices, bulge).

The function first normalises the included arc angle to lie within the range 0 ≤ θ < 2π and then utilises the definition that the bulge of a Polyline Arc is the tangent of a quarter of the included arc angle.

Test Function

The following test function will prompt for selection of an Arc Entity and proceed to create a (green) Polyline Arc segment to match the selected arc.

3-Points to Bulge

Function Syntax(LM:3p->bulge <pt1> <pt2> <pt3>)
Current Version1.0
Donate
Arguments
SymbolTypeDescription
pt1, pt2, pt3List3 points defining an arc
Returns
TypeDescription
RealThe bulge value describing the arc starting at pt1, passing through pt2, to pt3.

This function will return the bulge value describing an arc which starts at the first supplied point pt1, passes through the second supplied point pt2, and terminates at the third supplied point pt3.

The returned bulge value may be positive or negative, depending upon whether the arc passing through the three points traces a clockwise or counter-clockwise path.

Dxf polyline bulge

Test Function

The following test function will prompt the user for specification of three points, and, given a valid response of three non-collinear points, will then construct a polyline arc segment passing through the three points.

Bulge to Arc

Function Syntax(LM:Bulge->Arc <p1> <p2> <b>)
Current Version1.0
Donate
Arguments
SymbolTypeDescription
p1, p2ListPoints describing the vertices of the Polyline Arc segment
bRealBulge of the Polyline Arc
Returns
TypeDescription
ListList of: (<center> <start angle> <end angle> <radius>) describing the Arc
Dxf Polyline Bulge

This function will convert the quantities used to define a Polyline Arc segment (vertices, bulge) to those used to define an AutoCAD Arc Entity (center, start/end angle, radius).

Version 1

This version uses the relationship between the arc chord length and included angle, as illustrated by the following diagram:

Version 2

This version uses the relationship between the arc sagitta and bulge factor, illustrated by the following diagram:

Test Function

The following test function will prompt for selection of an LWPolyline with 2 vertices and non-zero bulge, and proceed to create a (green) Arc Entity to match the selected Polyline Arc segment.

Dxf Polyline Bulge

Additional Functions

The following functions are derived from the above Bulge to Arc functions, and will return the individual arc properties of the polyline arc segment.

The required parameters & values returned by each function are detailed in the respective code headers.

Bulge Center

Bulge Radius

Dxf Polyline Bulge

Further Information

More information about the derivation of the bulge quantity can be found in this article by Stig Madsen. The article also explains in greater detail many of the properties and relationships of an arc used by the above functions.