Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(69)  |  Call(69)  |  Derive(0)  |  Import(0)

src/h/e/heekspython-HEAD/examples/example.py   heekspython(Download)
def make_beam_profile(beam_width,beam_height,beam_thickness):
    cad.sketch()
    sketch = cad.getlastobj()
 
    cad.line(-beam_width/2.0,-beam_height/2.0,beam_width/2.0,-beam_height/2.0)
    cad.add(sketch,cad.getlastobj())
    cad.line(-beam_width/2.0,-beam_height/2.0,-beam_width/2.0,-beam_height/2.0+beam_thickness)
    cad.add(sketch,cad.getlastobj())
    cad.line(-beam_width/2.0,-beam_height/2.0+beam_thickness,-beam_thickness/2.0,-beam_height/2.0+beam_thickness)
    cad.add(sketch,cad.getlastobj())
    cad.add(sketch,cad.getlastobj())
    cad.line(beam_thickness/2.0,-beam_height/2.0+beam_thickness,beam_width/2.0,-beam_height/2.0+beam_thickness)
    cad.add(sketch,cad.getlastobj())
    cad.line(beam_width/2.0,-beam_height/2.0+beam_thickness,beam_width/2.0,-beam_height/2.0)
    cad.add(sketch,cad.getlastobj())

src/h/e/heekspython-HEAD/examples/facegear.py   heekspython(Download)
def cut_it(obj1,obj2):
    cad.cut(obj1,obj2)
    newobj = cad.getlastobj()
    cad.remove(obj1)
    cad.changed()
    length = length
    cad.cylinder(x0,y0,z0,rad1,length)
    c1 = cad.getlastobj()
 
    rad2 = (inner_dia)*.5
 
    cad.cylinder(x0,y0,z0,rad2,length)
    c2 = cad.getlastobj()
def tooth_form(tilt,length):
    cad.sketch()
    sketch = cad.getlastobj()
    cad.line(-.0625,.1083,.0625,.1083)
    l1 = cad.getlastobj()

src/h/e/heekspython-HEAD/examples/parametric_rectangle.py   heekspython(Download)
    rad = rad*scale
    cad.sketch()
    sketch = cad.getlastobj()
    cad.line(originx,originy,originx+width,originy)
    l1= cad.getlastobj()
    cad.line(originx+width,originy,originx+width,originy+length)
    l2= cad.getlastobj()
    cad.line(originx+width,originy+length,originx,originy+length)
    l3= cad.getlastobj()
    l3= cad.getlastobj()
    cad.line(originx,originy+length,originx,originy)
    l4= cad.getlastobj()
    cad.add(sketch,l1)
    cad.add(sketch,l2)

src/h/e/heekspython-HEAD/examples/fillets2.py   heekspython(Download)
# this example shows how to create fillets between two lines
 
import HeeksPython as cad
cad.sketch()
sketch = cad.getlastobj()
cad.line(0,1,4,1)
l1= cad.getlastobj()
cad.line(4,1,4,2)
l2= cad.getlastobj()
 
cad.line(4,2,0,2)
l3= cad.getlastobj()
 
cad.line(0,2,0,1)
l4= cad.getlastobj()

src/h/e/heekspython-HEAD/examples/cut_example.py   heekspython(Download)
def cut_it(obj1,obj2):
    cad.cut(obj1,obj2)
    newobj = cad.getlastobj()
    cad.remove(obj1)
    cad.changed()
 
cad.cuboid(0,0,0,1,1,1)
c1 = cad.getlastobj()
cad.cylinder(0,0,0,.5,1)
c2 = cad.getlastobj()
n1 = cut_it(c1,c2)
 
cad.cylinder(1,0,0,.5,1)
c3 = cad.getlastobj()
 
cad.cylinder(1,1,0,.5,1)
c4 = cad.getlastobj()
n3 = cut_it(n2,c4)
 

src/h/e/heekspython-HEAD/examples/fillets.py   heekspython(Download)
# this example shows how to create fillets between two lines
 
import HeeksPython as cad
cad.sketch()
sketch = cad.getlastobj()
cad.line(0,1,4,1)
l1= cad.getlastobj()
cad.line(4,1,4,2)
l2= cad.getlastobj()
l2= cad.getlastobj()
cad.line(4,2,0,2)
l3= cad.getlastobj()
cad.line(0,2,0,1)
l4= cad.getlastobj()

src/h/e/heekspython-HEAD/examples/revolve_it.py   heekspython(Download)
import HeeksPython as cad
cad.sketch()
sketch = cad.getlastobj()
cad.line(0,1,4,1)
l1= cad.getlastobj()
cad.line(4,1,4,2)
l2= cad.getlastobj()
cad.line(4,2,0,2)
l3= cad.getlastobj()
l3= cad.getlastobj()
cad.line(0,2,0,1)
l4= cad.getlastobj()
cad.add(sketch,l1)
cad.add(sketch,l2)

src/h/e/heekspython-HEAD/examples/fillet0.py   heekspython(Download)
import HeeksPython as cad
cad.sketch()
sketch = cad.getlastobj()
cad.line(0,1,4,1)
l1= cad.getlastobj()
cad.line(4,1,4,2)
l2= cad.getlastobj()

src/h/e/heekspython-HEAD/examples/polar_array.py   heekspython(Download)
    def GenCode(self, event): # wxGlade: MyFrame.<event_handler>
        cad.sketch()
        sketch = cad.getlastobj()        
 
        x_center=float(self.x_center_entry.GetValue())
 
            cad.point(x,y,z)
            cad.add(sketch,cad.getlastobj())            
            data=str('X%.4f Y%.4f Z%.4f '% (x, y, z)+'\n')