From 04e91d640da973d7b6fe068b35419fc6ef837c20 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Thu, 12 Mar 2026 11:50:21 -0400 Subject: [PATCH] Corrected a problem in which if a label exists that is only connected to material in a child cell, and the label is a point or line label, and the parent cell has no material other than the label in the immediate area, then the "interaction area" will have zero area, which will cause problems as area checks on a zero-sized area don't do anything useful. The solution is to ensure that interaction areas do not have zero area, but will expand around point labels. This should not have any other implications, because the interaction area is just a way to limit the amount of processing; larger interaction areas do not affect the extraction result (except in this case, where it fixes the error). --- VERSION | 2 +- extract/ExtHier.c | 2 +- extract/ExtSubtree.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 36c57972..9e0be425 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.619 +8.3.620 diff --git a/extract/ExtHier.c b/extract/ExtHier.c index 997c2033..5429ebf0 100644 --- a/extract/ExtHier.c +++ b/extract/ExtHier.c @@ -354,8 +354,8 @@ extHierConnections(ha, cumFlat, oneFlat) if (!(lab->lab_flags & LABEL_STICKY)) continue; r = lab->lab_rect; + if (!GEO_TOUCH(&r, &ha->ha_subArea)) continue; GEOCLIP(&r, &ha->ha_subArea); - if (GEO_RECTNULL(&r)) continue; cumDef = cumFlat->et_use->cu_def; connected = &DBConnectTbl[lab->lab_type]; diff --git a/extract/ExtSubtree.c b/extract/ExtSubtree.c index f3be58cb..7b68b1fd 100644 --- a/extract/ExtSubtree.c +++ b/extract/ExtSubtree.c @@ -251,6 +251,17 @@ extSubtree(parentUse, reg, f) if (result == 0) { /* If result == FALSE then ha.ha_interArea is invalid. */ ha.ha_interArea = rlab; + /* Ensure that the interaction area is not zero */ + if (ha.ha_interArea.r_xtop - ha.ha_interArea.r_xbot == 0) + { + ha.ha_interArea.r_xtop++; + ha.ha_interArea.r_xbot--; + } + if (ha.ha_interArea.r_ytop - ha.ha_interArea.r_ybot == 0) + { + ha.ha_interArea.r_ytop++; + ha.ha_interArea.r_ybot--; + } result = 1; } else @@ -779,6 +790,7 @@ extSubtreeFunc(scx, ha) */ ha->ha_subArea = use->cu_bbox; GEOCLIP(&ha->ha_subArea, &ha->ha_interArea); + hy.hy_area = &ha->ha_subArea; hy.hy_target = oneFlat->et_use; hy.hy_prefix = TRUE;