diff --git a/cw.py b/cw.py index 1d4a4b0..521208e 100755 --- a/cw.py +++ b/cw.py @@ -1,6 +1,7 @@ #!/usr/bin/python import sys, math +import shape group = None @@ -211,47 +212,14 @@ def rect(x0, y0, z0, x1, y1, z1): do(x0, y0, z0, x1, y1, z1) -# -# make the base -# - -def make_base(): - rect(16, 46.0, 2.6, 22, 55, 2.6) # left lateral, bottom - rect(22, 46.0, 3.7, 24, 55, 3.7) # on pedestal - rect(89.5, 46.0, 2.6, 99.5, 55, 2.6) # right lateral, bottom - rect(88, 46.0, 3.7, 89.5, 55, 3.7) # on pedestal - - rect(29.5, 50, 3.7, 36, 55, 3.7) # left podium, to beam - rect(38.5, 50, 3.7, 41, 55, 3.7) # after beam - rect(71, 50, 3.7, 82, 55, 3.7) # right podium - - rect(16, 55, 2.6, 36, 60, 3.9) # middle bar, to 1st beam - rect(38.5, 55, 2.6, 46, 60, 3.9) # between beams - rect(48, 55, 2.6, 52.5, 60, 3.9) # 2nd beam to battery lid - rect(59.5, 55, 2.6, 99.5, 60, 3.9) # right of battery lid "tongue" - - rect(36, 56, 3.9, 38.5, 60, 3.9) # cover the beams - rect(46, 56, 3.9, 48, 60, 3.9) - - rect(52.5, 56.5, 3.0, 59.5, 60, 3.9) # cover the lid "tongue" - - rect(15, 60, 3.9, 60.5, 64, 3.9) # end bar, left of beam - rect(62.5, 60, 3.9, 100, 64, 3.9) # right of beam - - rect(15, 64, 3.9, 34, 69.5, 3.9) # left "ear" - rect(89.5, 64, 3.9, 100, 69, 3.9) # right "ear" - - rect(34, 64, 3.9, 60.5, 65, 3.9) # extend inner area to sponge - rect(62.5, 64, 3.9, 82.5, 65, 3.9) - - if __name__ == "__main__": do = rect_gnuplot else: import HeeksPython as cad do = rect_cad -make_base() +shape.rect = rect +shape.make_base() # # for wax model diff --git a/shape.py b/shape.py new file mode 100755 index 0000000..e4c9976 --- /dev/null +++ b/shape.py @@ -0,0 +1,34 @@ +#!/usr/bin/python + +# +# make the base +# + +def make_base(): + rect(16, 46.0, 2.6, 22, 55, 2.6) # left lateral, bottom + rect(22, 46.0, 3.7, 24, 55, 3.7) # on pedestal + rect(89.5, 46.0, 2.6, 99.5, 55, 2.6) # right lateral, bottom + rect(88, 46.0, 3.7, 89.5, 55, 3.7) # on pedestal + + rect(29.5, 50, 3.7, 36, 55, 3.7) # left podium, to beam + rect(38.5, 50, 3.7, 41, 55, 3.7) # after beam + rect(71, 50, 3.7, 82, 55, 3.7) # right podium + + rect(16, 55, 2.6, 36, 60, 3.9) # middle bar, to 1st beam + rect(38.5, 55, 2.6, 46, 60, 3.9) # between beams + rect(48, 55, 2.6, 52.5, 60, 3.9) # 2nd beam to battery lid + rect(59.5, 55, 2.6, 99.5, 60, 3.9) # right of battery lid "tongue" + + rect(36, 56, 3.9, 38.5, 60, 3.9) # cover the beams + rect(46, 56, 3.9, 48, 60, 3.9) + + rect(52.5, 56.5, 3.0, 59.5, 60, 3.9) # cover the lid "tongue" + + rect(15, 60, 3.9, 60.5, 64, 3.9) # end bar, left of beam + rect(62.5, 60, 3.9, 100, 64, 3.9) # right of beam + + rect(15, 64, 3.9, 34, 69.5, 3.9) # left "ear" + rect(89.5, 64, 3.9, 100, 69, 3.9) # right "ear" + + rect(34, 64, 3.9, 60.5, 65, 3.9) # extend inner area to sponge + rect(62.5, 64, 3.9, 82.5, 65, 3.9)