def loadReports(self,FEcase,pathGr,texFile,grWdt): '''Creates the graphics files of loads for the load case and insert them in a LaTex file :param FEcase: finite element case :param pathGr: directory to place figures (ex: 'text/graphics/loads/') :param texFile: laTex file where to include the graphics (e.g.:'text/report_loads.tex') :param grWdt: width to be applied to graphics ''' preprocessor=FEcase.getPreprocessor labl=self.loadCaseName for st in self.setsToDispLoads: grfname=pathGr+self.loadCaseName+st.name capt=self.loadCaseDescr + ', ' + st.description + ', ' + self.unitsLoads QGrph.displayLoad(preprocessor=preprocessor,setToDisplay=st,loadCaseNm=self.loadCaseName,unitsScale=self.unitsScaleLoads,vectorScale=self.vectorScaleLoads, multByElemArea=self.multByElemAreaLoads, viewDef= self.cameraParameters,caption= capt,fileName=grfname+'.jpg') QGrph.displayLoad(preprocessor=preprocessor,setToDisplay=st,loadCaseNm=self.loadCaseName,unitsScale=self.unitsScaleLoads,vectorScale=self.vectorScaleLoads, multByElemArea=self.multByElemAreaLoads, viewDef= self.cameraParameters,caption= capt,fileName=grfname+'.eps') insertGrInTex(texFile=texFile,grFileNm=grfname,grWdt=grWdt,capText=capt,labl=labl) for st in self.setsToDispBeamLoads: grfname=pathGr+self.loadCaseName+st.name capt=self.loadCaseDescr + ', ' + st.description + ', ' + self.unitsLoads lcs=QGrph.QuickGraphics(FEcase) lcs.dispLoadCaseBeamEl(loadCaseName=self.loadCaseName,setToDisplay=st,fUnitConv=self.unitsScaleLoads,elLoadComp=self.compElLoad,elLoadScaleF=self.vectorScaleLoads,nodLoadScaleF=self.vectorScalePointLoads, viewDef= self.cameraParameters,caption= capt,fileName=grfname+'.jpg') lcs.dispLoadCaseBeamEl(loadCaseName=self.loadCaseName,setToDisplay=st,fUnitConv=self.unitsScaleLoads,elLoadComp=self.compElLoad,elLoadScaleF=self.vectorScaleLoads,nodLoadScaleF=self.vectorScalePointLoads, viewDef= self.cameraParameters,caption= capt,fileName=grfname+'.eps') insertGrInTex(texFile=texFile,grFileNm=grfname,grWdt=grWdt,capText=capt,labl=labl) return
execfile('../model_data.py') execfile('../loadStateData.py') from postprocess.xcVtk.FE_model import quick_graphics as qg #ordered list of load cases (from those defined in ../loadStateData.py #or redefined lately) to be displayed: loadCasesToDisplay = [ G2, QA_unif, QB_unif, QF_unif, QAcc_unif, QA_point, QB_point, QF_point, QAcc_point ] #End data for lc in loadCasesToDisplay: for st in lc.setsToDispLoads: # capt=lc.loadCaseDescr + ', ' + st.genDescr + ', ' + lc.unitsLoads capt = lc.loadCaseDescr + ', ' + lc.unitsLoads qg.displayLoad(preprocessor=prep, setToDisplay=st, loadCaseNm=lc.loadCaseName, unitsScale=lc.unitsScaleLoads, vectorScale=lc.vectorScaleLoads, multByElemArea=lc.multByElemAreaLoads, viewNm=lc.viewName, hCamFct=lc.hCamFct, caption=capt, fileName=None, defFScale=1.0)
from postprocess.xcVtk.FE_model import quick_graphics as qg execfile('./cantilever_mesh_generation.py') #available components: 'axialComponent', 'transComponent', 'transYComponent', # 'transZComponent' rlcd = gr.getRecordLoadCaseDispFromLoadPattern(lp0) rlcd.cameraParameters = vtk_graphic_base.CameraParameters('Custom') rlcd.cameraParameters.viewUpVc = [0, 1, 0] rlcd.cameraParameters.posCVc = [-100, 100, 100] loadCasesToDisplay = [rlcd] #End data for lc in loadCasesToDisplay: for st in lc.setsToDispLoads: # capt=lc.loadCaseDescr + ', ' + st.genDescr + ', ' + lc.unitsLoads capt = lc.loadCaseDescr + ', ' + lc.unitsLoads qg.displayLoad(preprocessor, setToDisplay=st, loadCaseNm=lc.loadCaseName, unitsScale=lc.unitsScaleLoads, vectorScale=lc.vectorScaleLoads, multByElemArea=lc.multByElemAreaLoads, viewDef=lc.cameraParameters, caption=capt, fileName=None, defFScale=1.0)
# -*- coding: utf-8 -*- execfile('../model_data.py') from postprocess.xcVtk.FE_model import quick_graphics as qg #ordered list of load cases (from those defined in ../loadStateData.py #or redefined lately) to be displayed: #loadCasesToDisplay=[G1,G2a,G2b,G2c,G3,Q1a,Q1b,Q1c,Q2b,A1a,A1b,C1] PP=lcases.LoadCase(preprocessor=prep,name="PP",loadPType="default",timeSType="constant_ts") PP.create() PP.addLstLoads([Qptren_v1_e1,Qptren_v1_e2,Qptren_v1_e3,Qptren_v1_e4]) loadCasesToDisplay=[PP] #End data for lc in loadCasesToDisplay: qg.displayLoad(preprocessor=prep,setToDisplay=overallSet,loadCaseNm=lc.name,unitsScale=1e-3,vectorScale=0.01, multByElemArea=False,viewNm='ZPos',hCamFct=1,caption='',fileName=None,defFScale=1.0)
def loadReports(self, FEcase, pathGr, texFile, grWdt): '''Creates the graphics files of loads for the load case and insert them in a LaTex file :param FEcase: finite element case :param pathGr: directory to place figures (ex: 'text/graphics/loads/') :param texFile: laTex file where to include the graphics (e.g.:'text/report_loads.tex') :param grWdt: width to be applied to graphics ''' preprocessor = FEcase.getPreprocessor labl = self.loadCaseName for st in self.setsToDispLoads: grfname = pathGr + self.loadCaseName + st.name capt = self.loadCaseDescr + ', ' + st.description + ', ' + self.unitsLoads QGrph.displayLoad(preprocessor=preprocessor, setToDisplay=st, loadCaseNm=self.loadCaseName, unitsScale=self.unitsScaleLoads, vectorScale=self.vectorScaleLoads, multByElemArea=self.multByElemAreaLoads, viewNm=self.viewName, hCamFct=self.hCamFct, caption=capt, fileName=grfname + '.jpg') QGrph.displayLoad(preprocessor=preprocessor, setToDisplay=st, loadCaseNm=self.loadCaseName, unitsScale=self.unitsScaleLoads, vectorScale=self.vectorScaleLoads, multByElemArea=self.multByElemAreaLoads, viewNm=self.viewName, hCamFct=self.hCamFct, caption=capt, fileName=grfname + '.eps') insertGrInTex(texFile=texFile, grFileNm=grfname, grWdt=grWdt, capText=capt, labl=labl) for st in self.setsToDispBeamLoads: grfname = pathGr + self.loadCaseName + st.name capt = self.loadCaseDescr + ', ' + st.description + ', ' + self.unitsLoads lcs = QGrph.QuickGraphics(FEcase) lcs.dispLoadCaseBeamEl(loadCaseName=self.loadCaseName, setToDisplay=st, fUnitConv=self.unitsScaleLoads, elLoadComp=self.compElLoad, elLoadScaleF=self.vectorScaleLoads, nodLoadScaleF=self.vectorScalePointLoads, viewName=self.viewName, hCamFct=self.hCamFct, caption=capt, fileName=grfname + '.jpg') lcs.dispLoadCaseBeamEl(loadCaseName=self.loadCaseName, setToDisplay=st, fUnitConv=self.unitsScaleLoads, elLoadComp=self.compElLoad, elLoadScaleF=self.vectorScaleLoads, nodLoadScaleF=self.vectorScalePointLoads, viewName=self.viewName, hCamFct=self.hCamFct, caption=capt, fileName=grfname + '.eps') insertGrInTex(texFile=texFile, grFileNm=grfname, grWdt=grWdt, capText=capt, labl=labl) return