- shortx[d] = dx * (shorten[d] / len);
- shorty[d] = dy * (shorten[d] / len);
- }
- while (flip (&d) != LEFT);
- Axis other = other_axis (protusion_axis);
-
- Molecule l1 = Lookup::line (thick, Offset(shortx[LEFT], shorty[LEFT]),
- Offset ( (dx - gapx)/2, (dy - gapy)/2 ));
-
- Molecule l2 = Lookup::line (thick, Offset((dx + gapx) / 2,(dy + gapy) / 2),
- Offset (dx - shortx[RIGHT], dy - shorty[RIGHT]));
-
- Offset protusion;
- protusion[other] = -widen[LEFT];
- protusion[protusion_axis] = height[LEFT];
- Molecule p1 = Lookup::line (thick,
- Offset(shortx[LEFT], shorty[LEFT]),
- Offset(shortx[LEFT], shorty[LEFT]) + protusion);
- protusion[other] = widen[RIGHT];
- protusion[protusion_axis] = height[RIGHT];
- Molecule p2 = Lookup::line (thick,
- Offset(dx - shortx[RIGHT], dy - shorty[RIGHT]),
- Offset(dx - shortx[RIGHT], dy - shorty[RIGHT]) + protusion);
-
- Molecule m;
- m.add_molecule (p1);
- m.add_molecule (p2);
- m.add_molecule (l1);
- m.add_molecule (l2);
+ straight_corners[d] += - d * shorten[d] /length * dz;
+ } while (flip (&d) != LEFT);
+
+
+ if (gap.is_empty())
+ gap = Interval (0,0);
+ do {
+ gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
+ } while (flip (&d) != LEFT);
+
+ Drul_array<Offset> flare_corners = straight_corners;
+ do {
+ flare_corners[d][bracket_axis] = straight_corners[d][bracket_axis];
+ flare_corners[d][protusion_axis] += height[d];
+ straight_corners[d][bracket_axis] += - d * flare[d];
+ } while (flip (&d) != LEFT);
+
+ Stencil m;
+ do {
+ m.add_stencil (Line_interface::line (me, straight_corners[d],
+ gap_corners[d]));
+
+ m.add_stencil (Line_interface::line (me, straight_corners[d],
+ flare_corners[d]));
+ } while (flip (&d) != LEFT);