def geometry(): from examples.WireStent import DoubleHelixStent global wire_diameter # create a Doublehelix stent with fixed geometry stent_diameter = 10. stent_length = 150. wire_diameter = 0.2 number_wires = 6 pitch_angle = 30. # during testing stent_length = 10. stent = DoubleHelixStent(stent_diameter,stent_length, wire_diameter,number_wires,pitch_angle,nb=1 ).getFormex() return stent
calpy_path = '/usr/local/lib/calpy-0.3.4' ####################################################################### from examples.WireStent import DoubleHelixStent import datetime # create a Doublehelix stent stent_diameter = 10. stent_length = 150. wire_diameter = 0.2 number_wires = 6 pitch_angle = 30. # during testing stent_length = 10. stent = DoubleHelixStent(stent_diameter,stent_length, wire_diameter,number_wires,pitch_angle,nb=1).all() if GD.options.gui: # draw it clear() draw(stent,view='iso') ############################################ ##### NOW load the calpy analysis code ##### # Check if we have calpy: import sys sys.path.append(calpy_path) try: import calpy
## pyFormex is a tool for generating, manipulating and transforming 3D ## geometrical models by sequences of mathematical operations. ## Home page: http://pyformex.org ## Project page: http://savannah.nongnu.org/projects/pyformex/ ## Copyright 2004-2015 (C) Benedict Verhegghe ([email protected]) ## Distributed under the GNU General Public License version 3 or later. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program. If not, see http://www.gnu.org/licenses/. ## from examples.WireStent import DoubleHelixStent for De in [16., 32.]: for nx in [6, 10]: for beta in [25, 50]: stent = DoubleHelixStent(De, 40., 0.22, nx, beta).all() draw(stent, view='iso') pause() clear()