From 3934b77f6490d789063dc05853035a7d37fc44ca Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Mon, 8 Jun 2026 15:58:06 -0400 Subject: [PATCH] Modified the GDS path handling so that duplicate points produce a warning appropriate for duplicate points and not a path reversal warning. Modified the output for path reversal or duplicate point errors so that the coordinate is in GDS units and not path units (which are multiplied by 2). --- calma/CalmaRdpt.c | 1 - cif/CIFrdpt.c | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 767b2a90..7776bc64 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -537,7 +537,6 @@ calmaElementPath(void) int layer, dt, width, pathtype, ciftype, savescale; int xmin, ymin, xmax, ymax, temp; CIFPath *pathheadp, *pathp, *previousp; - Rect segment; Plane *plane; int first,last; CellUse *use; diff --git a/cif/CIFrdpt.c b/cif/CIFrdpt.c index dee267d9..6ed09889 100644 --- a/cif/CIFrdpt.c +++ b/cif/CIFrdpt.c @@ -462,9 +462,22 @@ CIFPaintWirePath( /* Wire reverses direction. Break wire here, */ /* draw, and start new polygon. */ - TxError("Warning: direction reversal in path at (%d, %d).\n", - pathp->cifp_x, pathp->cifp_y); + /* Check first if last point and current point */ + /* are the same, in which case a different */ + /* message should be issued (and possibly */ + /* should be handled differently?) */ + if (previousp && previousp->cifp_x == pathp->cifp_x + && previousp->cifp_y == pathp->cifp_y) + { + TxError("Warning: duplicate point in path at (%d, %d).\n", + pathp->cifp_x / 2, pathp->cifp_y / 2); + } + else + { + TxError("Warning: direction reversal in path at (%d, %d).\n", + pathp->cifp_x / 2, pathp->cifp_y / 2); + } phi = theta; if (endcap) {