From 5ba46da6b93be323649c77219930958554ee5287 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 6 Oct 2017 22:56:34 -0400 Subject: [PATCH] Corrected custom wire extension handling in GDS file reads. --- calma/CalmaRdpt.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 8db21fb1..3f2a2961 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -471,15 +471,13 @@ calmaElementPath() width /= calmaReadScale2; - /* Set path extensions based on path type */ - if (pathtype == CALMAPATH_SQUAREFLUSH || pathtype == CALMAPATH_CUSTOM) - { - extend1 = extend2 = 0; - } - else if (pathtype == CALMAPATH_SQUAREPLUS || pathtype == CALMAPATH_ROUND) - { - extend1 = extend2 = (width / 2); - } + /* Set path extensions based on path type. Note that SQUARE endcaps */ + /* are handled automatically by the CIFPaintWirePath routine. */ + /* Round endcaps are not really handled other than assuming they're */ + /* the same as square. All others are truncated to zero and any */ + /* custom endcap is added to the path here. */ + + extend1 = extend2 = 0; /* Handle BGNEXTN, ENDEXTN */ PEEKRH(nbytes, rtype); @@ -608,8 +606,8 @@ calmaElementPath() } CIFPaintWirePath(pathheadp, width, - (pathtype == CALMAPATH_SQUAREFLUSH) ? FALSE : TRUE, - plane, CIFPaintTable, (PaintUndoInfo *)NULL); + (pathtype == CALMAPATH_SQUAREFLUSH || pathtype == CALMAPATH_CUSTOM) ? + FALSE : TRUE, plane, CIFPaintTable, (PaintUndoInfo *)NULL); if (cifCurReadPlanes == cifEditCellPlanes) {