Strumenti Utente



tutorial_freecad:tutorial_03

Questa è una vecchia versione del documento!


Codice per creare una barra filettata (tratto da http://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=3&t=1461)

import Part, FreeCAD, math
from FreeCAD import Base

radius = 3.0
height = 10.0
helix = Part.makeHelix(1,height,radius)
edge1 = Part.makeLine((2.5,0,-0.125), (2.5,0,0.125))
edge2 = Part.makeLine((2.5,0,0.125), (3.1,0,0.419))
edge3 = Part.makeLine((3.1,0,0.419), (3.1,0,-0.419))
edge4 = Part.makeLine((3.1,0,-0.419), (2.5,0,-0.125))
section = Part.Wire([edge1,edge2,edge3,edge4])
makeSolid=1
isFrenet=1
pipe = Part.Wire(helix).makePipeShell([section],makeSolid,isFrenet)

cylinder = Part.makeCylinder(radius,height,Base.Vector(0,0,0),Base.Vector(0,0,1))

diff = cylinder.cut(pipe)

Part.show(diff)

http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Topological_data_scripting#Boolean_Operations


tutorial_freecad/tutorial_03.1372931733.txt.gz · Ultima modifica: 2013/07/04 11:55 da mickele

Facebook Twitter Google+ Digg Reddit LinkedIn StumbleUpon Email