Content-type: text/html; charset=UTF-8
ADD L<layer> [.<cname>] [@<sname>] [:B<nsegs>] [:W<width>] [:H height] <xy1> <xy2> [<xy3> ...] EOC
Lines by default are zero width. If the :W<width> option is given, then the line will be drawn with the specified width. The coordinates specify the center of the line and the body of the line extends +/-(width/2) on either side of the centerline.
The LOCK command may be used to constrain line placement. When extending a line using the mouse, the mouse coordinate is modified such that the angle of each new segment is snapped to the closest multiple of the LOCK angle, consistent with the current drawing grid. In practice, this produces precise angles for 45 and 90 degrees, but may result in slight angle errors for other settings, especially on coarse grids. A lock angle of 0 turns off all restrictions on line placement.
If the :B<nsegs> option is specified with three or more points, the line is converted to a Catmull-Rom Spline curve with <nsegs> smoothed points inserted between each of the originally entered points. The curve gets visually smoother with higher number of segments, and smoothing can be turned off by setting <nsegs> to zero.
If the :H<height> option is specified, it is assumed that the line being drawn is a microstrip transmission line of specified width and height over a ground plane. The corners of the line are mitered to minimize the excess capacitance at the corner and produce a good approximation to a constant impedance. The miter geometry calculation is described in [1],[2] and depends only on width and height of the line. The miter geometry is independent of the dielectric constant of the substrate in the range of dielectric constant 2.5<=(epsilon)<=25.0. The generated lines are most accurate in the range of (width/height)>=0.25. If it is desired to eliminate mitering, the <height> can be set to 0.0; The published reference defines mitres only for exact 90 degree turns, but the algorithm implemented here produces interpolated miters for any angle while exactly matching the recommended miters for 0,90 degree bends.
[2] R.J.P. Douville and D.S. James, Experimental Study of Symmetric Microstrip Bends and Their Compensation, IEEE Transactions on Microwave Theory and Techniques, Vol. MTT-26, March 1978, pp. 175-181.
The PD Piglet homepage is at http://www.omnisterra.com/walker/linux/piglet/intro.htm.