예제 #1
0
call(["pypy","./pygerber2gcode_cui_MOD.py"]) # If you have "pypy" installed go ahead!
os.chdir(original_dir)


Z_PROBING_FILE = "Z_probing_data.p"


gcodeviewer = plt.figure()




#filePath = "./GcodeGenerators/pyGerber2Gcode_CUI/out/"
#fileName = "GNBoard" # sys.argv[1]

(etch_moves, travel_moves, gcode_minXY_global, gcode_maxXY_global) = gcv.view(filePath,fileName,showAll=1)

# Save the dimensions for the Z probing
Z_probing_data = {}
Z_probing_data['grid_origin'] = gcode_minXY_global
(grid_len_X,grid_len_Y) = (gcode_maxXY_global[0]-gcode_minXY_global[0], gcode_maxXY_global[1]-gcode_minXY_global[1])

# We take in account panelizing
grid_len_X *= N_copies_X
grid_len_X += N_copies_X*margin_copies_X

grid_len_Y *= N_copies_Y
grid_len_Y += N_copies_Y*margin_copies_Y

print("PANELIZING: There will be " + str(N_copies_X)+"x"+str(N_copies_Y) + " copies of this board")
예제 #2
0
def getZoffset(x, y):  # Returns the offset using interpolation
    return Z_workbed_surface(y, x)[0][0]


plt.ion()  # IMPORTANT: Enable real-time plotting

gcodeviewer = pltNewFig(
)  # Define a new figure, this doesnt open a window by itself (real-time plotting disabled)

# Load the probing results (this will plot the copper level in the background too)
probingResults()
#print("Must be zero, otherwise the interpolation is wrong!: " + floats(getZoffset(0,0)))

# Display the Gcode that is going to be etched
(etch_moves, travel_moves, gcode_minXY,
 gcode_maxXY) = gcv.view(filePath, fileName, 0, showEtch, showEtch2, showEtch3,
                         showDrill, showEdge)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEtch1=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEtch2=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showDrill=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEdge=1)

(boardSizeX, boardSizeY, gcode_minXY_global,
 gcode_maxXY_global) = gcv.boardSize(filePath, fileName)

# Show delimiter rectangle
#x_dat = [gcode_minXY_global[0],gcode_minXY_global[0],gcode_maxXY_global[0],gcode_maxXY_global[0],gcode_minXY_global[0]]
#y_dat = [gcode_minXY_global[1],gcode_maxXY_global[1],gcode_maxXY_global[1],gcode_minXY_global[1],gcode_minXY_global[1]]
#plt.plot(x_dat,y_dat)

pltRefresh(gcodeviewer)  # Draw the figure contents, still no window
pltShow()  # Open the window showing our figure
예제 #3
0
def getZoffset(x,y): # Returns the offset using interpolation
	return Z_workbed_surface(y,x)[0][0]



plt.ion() # IMPORTANT: Enable real-time plotting

gcodeviewer = pltNewFig() # Define a new figure, this doesnt open a window by itself (real-time plotting disabled)

# Load the probing results (this will plot the copper level in the background too)
probingResults()
#print("Must be zero, otherwise the interpolation is wrong!: " + floats(getZoffset(0,0)))

# Display the Gcode that is going to be etched
(etch_moves, travel_moves, gcode_minXY, gcode_maxXY) = gcv.view(filePath,fileName,0,showEtch,showEtch2,showEtch3,showDrill,showEdge)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEtch1=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEtch2=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showDrill=1)
#(etch_moves, travel_moves) = gcv.view(filePath,fileName,showEdge=1)

(boardSizeX,boardSizeY,gcode_minXY_global, gcode_maxXY_global) = gcv.boardSize(filePath,fileName)

# Show delimiter rectangle
#x_dat = [gcode_minXY_global[0],gcode_minXY_global[0],gcode_maxXY_global[0],gcode_maxXY_global[0],gcode_minXY_global[0]]
#y_dat = [gcode_minXY_global[1],gcode_maxXY_global[1],gcode_maxXY_global[1],gcode_minXY_global[1],gcode_minXY_global[1]]
#plt.plot(x_dat,y_dat)

pltRefresh(gcodeviewer) # Draw the figure contents, still no window
pltShow() # Open the window showing our figure
call(["python", "./pygerber2gcode_cui_MOD.py"])
# call(["pypy","./pygerber2gcode_cui_MOD.py"]) # If you have "pypy" installed go ahead!
os.chdir(original_dir)

Z_PROBING_FILE = "Z_probing_data.p"

plt.ion()  # IMPORTANT: Enable real-time plotting

gcodeviewer = pltNewFig(
)  # Define a new figure, this doesnt open a window by itself (real-time plotting disabled)

filePath = "./GcodeGenerators/pyGerber2Gcode_CUI/out/"
fileName = "GNBoard"  # sys.argv[1]

(etch_moves, travel_moves, gcode_minXY_global,
 gcode_maxXY_global) = gcv.view(filePath, fileName, showAll=1)

# Save the dimensions for the Z probing
Z_probing_data = {}
Z_probing_data['grid_origin'] = gcode_minXY_global
(grid_len_X, grid_len_Y) = (gcode_maxXY_global[0] - gcode_minXY_global[0],
                            gcode_maxXY_global[1] - gcode_minXY_global[1])

# We take in account panelizing
grid_len_X *= N_copies_X
grid_len_X += N_copies_X * margin_copies_X

grid_len_Y *= N_copies_Y
grid_len_Y += N_copies_Y * margin_copies_Y

print("PANELIZING: There will be " + str(N_copies_X) + "x" + str(N_copies_Y) +