def cpacsImport(self, path='.\\cpacs.xml', TIXIHandle=None, TIGLHandle=None): ''' Overwrites the parameters cpacsImport method! Will get the value for lfus from CPACS via TIGL functions ''' if not TIXIHandle: TIXIHandle = openTIXI(path) if not TIGLHandle: TIGLHandle = openTIGL(TIXIHandle, self.parent.aircraft.modelUID.getValue()) if checkElement(TIXIHandle, '/cpacs/vehicles/aircraft/model/fuselages/fuselage'): # get First Point from the Fuselage x1, y1, z1 = getFuselagePoint(TIGLHandle, 1, 0., 0.) lastSegment = getFuselageSegmentCount(TIGLHandle) x2, y2, z2 = getFuselagePoint(TIGLHandle, lastSegment, 1., 0.) self.setValueFix(x2 - x1) self.importSuccess() else: self.importError()
def cpacsImport(self, path='.\\cpacs.xml', TIXIHandle=None, TIGLHandle=None): ''' Overwrites the parameters cpacsImport method! Will get the value for dfus from CPACS via TIGL functions ''' if not TIXIHandle: TIXIHandle = openTIXI(path) if not TIGLHandle: TIGLHandle = openTIGL(TIXIHandle, self.parent.aircraft.modelUID.getValue()) if checkElement(TIXIHandle, '/cpacs/vehicles/aircraft/model/fuselages/fuselage'): lastSegment = getFuselageSegmentCount(TIGLHandle) dmax = 0. for i in range(lastSegment): diameter = getFuselageDiameter(TIGLHandle, i + 1, 1.) if diameter > dmax: dmax = diameter self.setValueFix(dmax) self.importSuccess() else: self.importError()
def cpacsImport(self, path='.\\cpacs.xml', TIXIHandle=None, TIGLHandle=None): ''' Overwrites the parameters cpacsImport method! Will get the value for dfus from CPACS via TIGL functions ''' if not TIXIHandle: TIXIHandle = openTIXI(path) if not TIGLHandle: TIGLHandle = openTIGL(TIXIHandle, self.parent.aircraft.modelUID.getValue()) if checkElement(TIXIHandle, '/cpacs/vehicles/aircraft/model/fuselages/fuselage'): lastSegment = getFuselageSegmentCount(TIGLHandle) dmax = 0. for i in range(lastSegment): diameter = getFuselageDiameter(TIGLHandle, i+1,1.) if diameter > dmax: dmax = diameter self.setValueFix(dmax) self.importSuccess() else: self.importError()