Example #1
0
 def getSegments(self, lenZw):
     assert len(self.pS) == 3 and len(self.vDirC) == 3
     if self.dIA['lvlDbg'] > 0 and (self.pS[2] < 0 or lenZw <= 0):
         print('self.pS[2] =', self.pS[2], '/', 'lenZw =', lenZw)
     assert self.pS[2] >= 0 and lenZw > 0
     assert (len(self.lFDsE) == len(self.lAnEP)
             and len(self.lAnEP) == len(self.lAnEA))
     nE = len(self.lFDsE)
     lDirSg, lPSgE = [V0_3D] * (nE + 1), [V0_3D] * (nE + 1)
     lLenSg = [0.] * (nE + 1)
     cAngChDr = Fkt.drawDst(self.dITp['dAngChDr'][self.sDir], self.cM,
                            self.dIA['dMinMax']['AngPol'])
     lInpV = [
         0,
         np.array([cKS for cKS in self.pS]), self.vDirC, lenZw,
         self.dITp['dPosZweig'][self.sDir], cAngChDr, self.dIA['tolAngV']
     ]
     # lInpV: [pRC, pSC, vDC, lenC, cSPosZweig, cAngChDr, angTol]
     Fkt.constructSeg(lDirSg, lPSgE, lLenSg, nE, lInpV, self.lFDsE,
                      self.lAnEP, self.lAnEA)
     assert len(lDirSg) == len(lPSgE) and len(lDirSg) == len(lLenSg)
     self.lDirSeg, self.lPSegE, self.lLenSeg = lDirSg, lPSgE, lLenSg
     self.pE, self.lenZ = self.lPSegE[-1], sum(self.lLenSeg)