Skip to content

Commit 26c314f

Browse files
committed
bug fix unload function
1 parent ff97ed8 commit 26c314f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

famodel/project.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,9 +3873,6 @@ def unload(self,file='project.yaml'):
38733873
for i,anch in enumerate(self.anchorList.values()):
38743874
newanch = True
38753875
name = anch.dd['name'] if 'name' in anch.dd else str(len(anchConfigs))
3876-
if len(anch.attachments)>1:
3877-
# shared anchor, add to arrayAnch list
3878-
arrayAnch.append([anch.id,name,anch.r[0],anch.r[1],0])
38793876
# add mass if available
38803877
aad = deepcopy(anch.dd['design'])
38813878
if anch.mass is not None and anch.mass>0:
@@ -3889,6 +3886,9 @@ def unload(self,file='project.yaml'):
38893886
name = ac[0] # reset name to matching config name
38903887
if newanch:
38913888
anchConfigs[name] = aad
3889+
if len(anch.attachments)>1:
3890+
# shared anchor, add to arrayAnch list
3891+
arrayAnch.append([anch.id,name,anch.r[0],anch.r[1],0])
38923892

38933893
mapAnchNames[anch.id] = name
38943894

@@ -3954,7 +3954,7 @@ def unload(self,file='project.yaml'):
39543954
# we have a shared anchor here, put mooring in array_mooring
39553955
headA = 'None' # no heading at end A because it's an anchor
39563956
# append mooring line to array_moor section
3957-
arrayMoor.append([current_config, mapAnchNames[atts[is_anch][0].id], moor.attached_to[1].id, headA,headB,int(0)])
3957+
arrayMoor.append([current_config, atts[0].id, atts[1].id, headA,headB,int(0)])
39583958
else:
39593959
# not shared anchor or shared mooring, add line to mooring system
39603960
msys.append([current_config,

0 commit comments

Comments
 (0)