Skip to content

Commit

Permalink
added error message
Browse files Browse the repository at this point in the history
added error message for adding ref axis to grand children after the child is added to the parent
  • Loading branch information
Josh Anibal authored Aug 19, 2022
1 parent 4c2a8a7 commit bbc6147
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pygeo/parameterization/DVGeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1699,10 +1699,15 @@ def update(self, ptSetName, childDelta=True, config=None):
self.children[iChild]._finalize()
refaxis_ptSetName = "child%d_axis" % (iChild)
if refaxis_ptSetName not in self.FFD.embeddedVolumes:
print("adding refaxis_ptSetName", refaxis_ptSetName)
self.FFD.attachPoints(self.children[iChild].refAxis.coef, refaxis_ptSetName)
self.FFD.calcdPtdCoef("child%d_axis" % (iChild))
else:
for iChild in range(len(self.children)):
if len(self.children[iChild].axis) > 0:
refaxis_ptSetName = "child%d_axis" % (iChild)
if refaxis_ptSetName not in self.FFD.embeddedVolumes:
raise Error(f"refaxis {refaxis_ptSetName} cannot be added to child FFD after child is appended to parent")

# Update all coef
self.FFD._updateVolumeCoef()

Expand Down

0 comments on commit bbc6147

Please sign in to comment.