from sdxf import * units = 'mm' spaces = 20 mwidth = 3.23 runnerspacing = 36.7 runnerheight = 40 #block for tines tinespacing = 3 tineheight = 10 tinewidth = 7 signheight = 120 tine = Block('tine') tine.append(Line(points=[(0,0),(tinespacing,0)])) tine.append(Line(points=[(tinespacing,0),(tinespacing-1,tineheight)])) tine.append(Arc(center=(tinespacing-1+(tinewidth/2),tineheight),radius=tinewidth/2,startAngle=0,endAngle=180)) tine.append(Line(points=[(tinespacing-2+tinewidth,tineheight),(tinespacing+tinewidth-1,0)])) side = Drawing() side.blocks.append(tine) blockwidth = tinespacing+tinewidth-1 for i in range(0,spaces+1): currentX = i*(tinespacing+tinewidth-1) side.append(Insert('tine',point=(currentX,6),layer="PYDXF")) side.append(LwPolyLine(points=[(currentX+blockwidth,6),(currentX+blockwidth,0),(-mwidth * 3,0),(-mwidth * 3,6+runnerheight),(-mwidth *2,6+runnerheight),(-mwidth *2,6+runnerheight/2),(-mwidth,6+runnerheight/2),(-mwidth,6+runnerheight),(0,6+runnerheight),(0,6)])) side.saveas('displayside.dxf') sign = Drawing() signpoints=[(0,0),(0,signheight),(80,signheight),(80,0),(40+runnerspacing/2,0),(40+runnerspacing/2,runnerheight/2)] signpoints.extend([(40+runnerspacing/2-mwidth,runnerheight/2),(40+runnerspacing/2-mwidth,0),(40-runnerspacing/2+mwidth,0)]) signpoints.extend([(40-runnerspacing/2+mwidth,runnerheight/2),(40-runnerspacing/2,runnerheight/2)]) signpoints.extend([(40-runnerspacing/2,0),(0,0)]) sign.append(LwPolyLine(points=signpoints)) sign.saveas('displaysign.dxf')