This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pylab as pylab | |
from scipy.optimize import leastsq | |
from scipy.interpolate import interp1d | |
import numpy | |
fileList = [ 'AXIAL_Test4.prn', 'AXIAL_Test5.prn', 'AXIAL_Test6.prn', | |
'AXIAL_Test10.prn', 'AXIAL_Test11.prn', 'AXIAL_Test12.prn', | |
'ML_Test3.prn', 'ML_Test7.prn', 'ML_Test8.prn'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
root = r'D:\temp' | |
m = mdb.models['Model-1'] | |
a = m.rootAssembly | |
p = m.parts['Part-1'] | |
elements = p.elements | |
foutName = 'eConn2.txt' | |
npFace = 3 # Number of nodes per face. If using C3D4 elems, this will be 3 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using QThreads in PyQt5 using worker model | |
# There is so many conflicting posts on how QThreads should be used in pyqt. I had | |
# been subclassing QThread, overriding the run function, and calling start to run | |
# the thread. I did it this way, because I couldn't get the worker method (where | |
# an object is moved to a thread using moveToThread) to do what I wanted. It turns | |
# out that I just didn't understand why. But, once I worked it out I have stuck with | |
# the moveToThread method, as this is recommended by the official docs. | |
# | |
# The key part for me to understand was that when I am running a heavy calculation in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ref: https://github.com/Beastmaster/itk-python-example/blob/master/vtkSlidebar.py | |
# Ref: https://kitware.github.io/vtk-examples/site/Cxx/Widgets/Slider/ | |
import vtk | |
sphereSource = vtk.vtkSphereSource() | |
sphereSource.SetCenter(0.0,0.0,0.0) | |
sphereSource.SetRadius(4.0) | |
sphereSource.Update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abaqus import * | |
from abaqusConstants import * | |
from odbAccess import * | |
odb = session.viewports[session.currentViewportName].displayedObject | |
instName = 'MALE' | |
elements = odb.rootAssembly.instances[instName].elements | |
foutName = 'elementConnectivity.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code to show two plots of simulated streamed data. Data for each plot is processed (generated) | |
# by separate threads, and passed back to the gui thread for plotting. | |
# This is an example of using movetothread, which is the correct way of using QThreads | |
# Michael Hogg, 2015 | |
import time, sys | |
from pyqtgraph.Qt import QtGui, QtCore | |
from PyQt4.Qt import QMutex | |
import pyqtgraph as pg |
OlderNewer