From 7fad57f65f9767e78628a9fc749f6900ede2a231 Mon Sep 17 00:00:00 2001 From: Mabelle Lin Date: Wed, 2 Dec 2020 16:08:16 +1300 Subject: [PATCH 1/2] Correct elements count along annotation groups --- src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index fa68b8a0..e2610285 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -646,12 +646,7 @@ def generateBaseMesh(cls, region, options): xTexture = d1Texture = d2Texture = d3Texture = [] # Obtain elements count along body and neck of the bladder for defining annotation groups - if includeUrethra: - # bladderLength = length - urethraLength - bodyLength = ureterPositionDown * bladderLength - else: - bodyLength = ureterPositionDown * length - elementsCountAlongBody = int(bodyLength / bladderSegmentLength) + elementsCountAlongBody = round(ureterPositionDown * elementsCountAlongBladder - 1) elementsCountAlongNeck = elementsCountAlongBladder - elementsCountAlongBody # Create annotation groups for bladder and urethra From 10fa23c7cf4e496eeb99cd2acdddc36d2aa35c2f Mon Sep 17 00:00:00 2001 From: Mabelle Lin Date: Wed, 2 Dec 2020 16:25:46 +1300 Subject: [PATCH 2/2] Add new case --- src/scaffoldmaker/utils/eftfactory_tricubichermite.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scaffoldmaker/utils/eftfactory_tricubichermite.py b/src/scaffoldmaker/utils/eftfactory_tricubichermite.py index 91b0442c..f225f3de 100644 --- a/src/scaffoldmaker/utils/eftfactory_tricubichermite.py +++ b/src/scaffoldmaker/utils/eftfactory_tricubichermite.py @@ -885,7 +885,6 @@ def createEftWedgeCollapseXi1Quadrant(self, collapseNodes): # zero cross derivative parameters remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS1DS2, []) remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS1DS3, []) - remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS2DS3, []) remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D3_DS1DS2DS3, []) remapEftLocalNodes(eft, 6, ln_map) @@ -925,6 +924,11 @@ def createEftWedgeCollapseXi2Quadrant(self, collapseNodes): else: valid = False ln_map = [1, 2, 3, 4, 5, 6, 5, 6] + elif collapseNodes in [[4, 8]]: + nodes = [2, 4, 6, 8] + remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D_DS2, []) + remapEftNodeValueLabel(eft, [2, 6], Node.VALUE_LABEL_D_DS1, [(Node.VALUE_LABEL_D_DS2, [])]) + ln_map = [1, 2, 3, 2, 4, 5, 6, 5] else: valid = False @@ -933,7 +937,6 @@ def createEftWedgeCollapseXi2Quadrant(self, collapseNodes): # zero cross derivative parameters remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS1DS2, []) - remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS1DS3, []) remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D2_DS2DS3, []) remapEftNodeValueLabel(eft, nodes, Node.VALUE_LABEL_D3_DS1DS2DS3, [])