Skip to content

Commit

Permalink
Merge pull request #19 from DLR-SC/jk/18/guidecurves-required-bug
Browse files Browse the repository at this point in the history
don't try to convert nonexistent guide curves
  • Loading branch information
joergbrech authored Jul 16, 2020
2 parents d6650ae + 51bbc61 commit f004b97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpacs2to3/convert_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def find_guide_curve_using_profile(tixi2, profileUid):
nSegments = tixi2.getNumberOfChilds(xpathSegments)
for segmentIdx in range(0, nSegments):
xpathGuideCurves = xpathSegments + '/segment[{}]/guideCurves'.format(segmentIdx + 1)
if not tixi2.checkElement(xpathGuideCurves):
continue
nCurves = tixi2.getNumberOfChilds(xpathGuideCurves)
for curveIdx in range(0, nCurves):
xpathGuideCurve = xpathGuideCurves + '/guideCurve[{}]'.format(curveIdx + 1)
Expand Down

0 comments on commit f004b97

Please sign in to comment.