From 097f4fb28c74508277afc04bfba1f45a9a887976 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 15 Oct 2019 09:16:07 -0400 Subject: [PATCH] Corrected node reading from extresist because the ".nodes" file does not have any scaling in the dimensions and so values should not be divided by the factor lambda from the .sim file "units" line. --- resis/ResReadSim.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/resis/ResReadSim.c b/resis/ResReadSim.c index cc47fb4b..19ae304d 100644 --- a/resis/ResReadSim.c +++ b/resis/ResReadSim.c @@ -243,13 +243,17 @@ ResReadNode(nodefile) entry = HashFind(&ResNodeTable,line[NODENODENAME]); node = ResInitializeNode(entry); - node->location.p_x = (int)((float)atof(line[NODENODEX])/lambda); - node->location.p_y = (int)((float)atof(line[NODENODEY])/lambda); + /* NOTE: Fixed 10/15/2019. No scalefactor is passed to EFNodeVisit() + * so there is no scaling by lambda. Values are in centimicrons always, + * and factor of 100 is required to get database units. + */ + node->location.p_x = (int)((float)atof(line[NODENODEX]) / 100.0); + node->location.p_y = (int)((float)atof(line[NODENODEY]) / 100.0); #ifdef ARIEL - node->rs_bbox.r_xbot = (int)((float)atof(line[NODE_BBOX_LL_X])/lambda); - node->rs_bbox.r_ybot = (int)((float)atof(line[NODE_BBOX_LL_Y])/lambda); - node->rs_bbox.r_xtop = (int)((float)atof(line[NODE_BBOX_UR_X])/lambda); - node->rs_bbox.r_ytop = (int)((float)atof(line[NODE_BBOX_UR_Y])/lambda); + node->rs_bbox.r_xbot = (int)((float)atof(line[NODE_BBOX_LL_X]) / 100.0); + node->rs_bbox.r_ybot = (int)((float)atof(line[NODE_BBOX_LL_Y]) / 100.0); + node->rs_bbox.r_xtop = (int)((float)atof(line[NODE_BBOX_UR_X]) / 100.0); + node->rs_bbox.r_ytop = (int)((float)atof(line[NODE_BBOX_UR_Y]) / 100.0); #endif if (cp = strchr(line[NODETYPE], ';')) *cp = '\0'; node->type = DBTechNameType(line[NODETYPE]);