More software tests, bugfix... etc

pull/6/head
carlosgs 2013-06-06 13:40:34 +02:00
parent c65a8de6f0
commit 029c41db87
19 changed files with 5027 additions and 36 deletions

View File

@ -17,6 +17,7 @@ News
- v0.9.6b has a robust Y axis motor stand (improvement suggested and tested by **Yopero**), and the Z carriage now shows the name of the machine (how cool is that? :P)
**Software**
- Note: The timeout for commands of the edge needs to be increased, since the moves are really slow.
- First Z probing results are promising, read: <https://plus.google.com/u/0/113437723819360223498/posts/9VCHqqnirj6> and <https://plus.google.com/u/0/113437723819360223498/posts/89W2cv1fgQW>
- Added the python probing script (v0.1) and Octave/Matlab visualizer
- Based on PyGerber2Gcode.py script

View File

@ -198,7 +198,7 @@ def moveZrelSafe(Z, F):
print "Moving Z", Z, "mm safely..."
sendCommand("M121\n") # Enable endstops (for protection! usually it should **NOT** hit neither the endstop nor the PCB)
moveZrel(Z, F)
dist = abs(Z-lastDrillPos[2]) # [mm]
dist = abs(Z) # [mm]
speed = float(F)/60.0 # [mm/s]
wait = float(dist)/speed # [s]
time.sleep(wait) # Wait for the movement to finish, this way the M121 command is effective
@ -222,7 +222,7 @@ def probeZ():
def close():
# IMPORTANT: Before closing the serial port we must make a blocking move in order to wait for all the buffered commands to end
homeZXY()
sendCommand("G28 Z0\n",timeoutResend) # move Z to min endstop
if Emulate == 0:
CNC_Machine.close() # Close the serial port connection

View File

@ -207,8 +207,11 @@ def optimize(etch_moves_in, origin=[0,0], travel_height = 5): # Optimizes the to
firstPoint = path[0]
if distance > 0.0001 : # This will join etching moves closer than 0.01 mm (sqrt(0.0001)=0.01)
if distance > 0.1**2 : # This will join etching moves closer than 0.1 mm (this avoids repetitive drill lifting)
travel_moves.append([toolPosition, [firstPoint[0], firstPoint[1], travel_height, firstPoint[3]] ]) # Travel to the initial point of the etching
else :
travel_moves.append([toolPosition, firstPoint]) # Travel to the initial point of the etching (without lifting)
print "Joining etching paths!"
if distance < minDistance :
minDistance = distance

View File

@ -98,13 +98,15 @@ def view(filePath,fileName,showAll=0,showEtch=0,showEtch2=0,showEtch3=0,showDril
(etch_moves, travel_moves, gcode_minXY, gcode_maxXY) = gcp.parseGcodeRaw(gcode_file)
(etch_moves, travel_moves) = gcp.optimize(etch_moves)
if draw: plotPath(etch_moves, travel_moves, etch2pass_color, travel_color, etch2pass_diam, travel_diam)
checkMinMax(gcode_minXY,gcode_maxXY)
if showAll or showEtch3:
print "\n Loading etch (3nd pass)..."
print "\n Loading etch (3rd pass)..."
gcode_file = filePath+fileName+"_etch3pass.gcode"
(etch_moves, travel_moves, gcode_minXY, gcode_maxXY) = gcp.parseGcodeRaw(gcode_file)
(etch_moves, travel_moves) = gcp.optimize(etch_moves)
if draw: plotPath(etch_moves, travel_moves, etch3pass_color, travel_color, etch3pass_diam, travel_diam)
checkMinMax(gcode_minXY,gcode_maxXY)
if showAll or showDrill:
print "\n Loading drill..."
@ -112,6 +114,7 @@ def view(filePath,fileName,showAll=0,showEtch=0,showEtch2=0,showEtch3=0,showDril
(etch_moves, travel_moves, gcode_minXY, gcode_maxXY) = gcp.parseGcodeRaw(gcode_file)
(etch_moves, travel_moves) = gcp.optimize(etch_moves)
if draw: plotPath(etch_moves, travel_moves, drill_color, travel_color, drill_diam, travel_diam)
checkMinMax(gcode_minXY,gcode_maxXY)
if showAll or showEdge:
print "\n Loading edge..."
@ -119,6 +122,7 @@ def view(filePath,fileName,showAll=0,showEtch=0,showEtch2=0,showEtch3=0,showDril
(etch_moves, travel_moves, gcode_minXY, gcode_maxXY) = gcp.parseGcodeRaw(gcode_file)
(etch_moves, travel_moves) = gcp.optimize(etch_moves)
if draw: plotPath(etch_moves, travel_moves, edge_color, travel_color, edge_diam, travel_diam)
checkMinMax(gcode_minXY,gcode_maxXY)
#if draw : plt.hold(False)
if draw and newFigure: pltShowNonBlocking()

View File

@ -0,0 +1,578 @@
G04 (created by PCBNEW (2013-mar-13)-testing) date mié 05 jun 2013 17:08:33 CEST*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
G01*
G70*
G90*
G04 APERTURE LIST*
%ADD10C,0.005906*%
%ADD11C,0.009843*%
G04 APERTURE END LIST*
G54D10*
G54D11*
X92790Y-52178D02*
X92790Y-51784D01*
X92696Y-51784D01*
X92640Y-51803D01*
X92603Y-51840D01*
X92584Y-51878D01*
X92565Y-51953D01*
X92565Y-52009D01*
X92584Y-52084D01*
X92603Y-52121D01*
X92640Y-52159D01*
X92696Y-52178D01*
X92790Y-52178D01*
X92190Y-52178D02*
X92415Y-52178D01*
X92303Y-52178D02*
X92303Y-51784D01*
X92340Y-51840D01*
X92378Y-51878D01*
X92415Y-51896D01*
X92790Y-51178D02*
X92790Y-50784D01*
X92696Y-50784D01*
X92640Y-50803D01*
X92603Y-50840D01*
X92584Y-50878D01*
X92565Y-50953D01*
X92565Y-51009D01*
X92584Y-51084D01*
X92603Y-51121D01*
X92640Y-51159D01*
X92696Y-51178D01*
X92790Y-51178D01*
X92415Y-50821D02*
X92396Y-50803D01*
X92359Y-50784D01*
X92265Y-50784D01*
X92228Y-50803D01*
X92209Y-50821D01*
X92190Y-50859D01*
X92190Y-50896D01*
X92209Y-50953D01*
X92434Y-51178D01*
X92190Y-51178D01*
X92790Y-50178D02*
X92790Y-49784D01*
X92696Y-49784D01*
X92640Y-49803D01*
X92603Y-49840D01*
X92584Y-49878D01*
X92565Y-49953D01*
X92565Y-50009D01*
X92584Y-50084D01*
X92603Y-50121D01*
X92640Y-50159D01*
X92696Y-50178D01*
X92790Y-50178D01*
X92228Y-49915D02*
X92228Y-50178D01*
X92321Y-49765D02*
X92415Y-50046D01*
X92171Y-50046D01*
X92790Y-49178D02*
X92790Y-48784D01*
X92696Y-48784D01*
X92640Y-48803D01*
X92603Y-48840D01*
X92584Y-48878D01*
X92565Y-48953D01*
X92565Y-49009D01*
X92584Y-49084D01*
X92603Y-49121D01*
X92640Y-49159D01*
X92696Y-49178D01*
X92790Y-49178D01*
X92340Y-48953D02*
X92378Y-48934D01*
X92396Y-48915D01*
X92415Y-48878D01*
X92415Y-48859D01*
X92396Y-48821D01*
X92378Y-48803D01*
X92340Y-48784D01*
X92265Y-48784D01*
X92228Y-48803D01*
X92209Y-48821D01*
X92190Y-48859D01*
X92190Y-48878D01*
X92209Y-48915D01*
X92228Y-48934D01*
X92265Y-48953D01*
X92340Y-48953D01*
X92378Y-48971D01*
X92396Y-48990D01*
X92415Y-49028D01*
X92415Y-49103D01*
X92396Y-49140D01*
X92378Y-49159D01*
X92340Y-49178D01*
X92265Y-49178D01*
X92228Y-49159D01*
X92209Y-49140D01*
X92190Y-49103D01*
X92190Y-49028D01*
X92209Y-48990D01*
X92228Y-48971D01*
X92265Y-48953D01*
X108006Y-44528D02*
X107706Y-44528D01*
X107856Y-44678D02*
X107856Y-44378D01*
X107331Y-44284D02*
X107518Y-44284D01*
X107537Y-44471D01*
X107518Y-44453D01*
X107481Y-44434D01*
X107387Y-44434D01*
X107350Y-44453D01*
X107331Y-44471D01*
X107312Y-44509D01*
X107312Y-44603D01*
X107331Y-44640D01*
X107350Y-44659D01*
X107387Y-44678D01*
X107481Y-44678D01*
X107518Y-44659D01*
X107537Y-44640D01*
X107200Y-44284D02*
X107068Y-44678D01*
X106937Y-44284D01*
X114678Y-47078D02*
X114284Y-47078D01*
X114565Y-47209D01*
X114284Y-47340D01*
X114678Y-47340D01*
X114678Y-47528D02*
X114284Y-47528D01*
X114640Y-47940D02*
X114659Y-47921D01*
X114678Y-47865D01*
X114678Y-47828D01*
X114659Y-47771D01*
X114621Y-47734D01*
X114584Y-47715D01*
X114509Y-47696D01*
X114453Y-47696D01*
X114378Y-47715D01*
X114340Y-47734D01*
X114303Y-47771D01*
X114284Y-47828D01*
X114284Y-47865D01*
X114303Y-47921D01*
X114321Y-47940D01*
X92771Y-48178D02*
X92771Y-47784D01*
X92678Y-47784D01*
X92621Y-47803D01*
X92584Y-47840D01*
X92565Y-47878D01*
X92546Y-47953D01*
X92546Y-48009D01*
X92565Y-48084D01*
X92584Y-48121D01*
X92621Y-48159D01*
X92678Y-48178D01*
X92771Y-48178D01*
X92434Y-47784D02*
X92303Y-48178D01*
X92171Y-47784D01*
X114149Y-48528D02*
X113850Y-48528D01*
X113999Y-48678D02*
X113999Y-48378D01*
X112799Y-44303D02*
X112837Y-44284D01*
X112893Y-44284D01*
X112949Y-44303D01*
X112987Y-44340D01*
X113006Y-44378D01*
X113024Y-44453D01*
X113024Y-44509D01*
X113006Y-44584D01*
X112987Y-44621D01*
X112949Y-44659D01*
X112893Y-44678D01*
X112856Y-44678D01*
X112799Y-44659D01*
X112781Y-44640D01*
X112781Y-44509D01*
X112856Y-44509D01*
X112612Y-44678D02*
X112612Y-44284D01*
X112387Y-44678D01*
X112387Y-44284D01*
X112200Y-44678D02*
X112200Y-44284D01*
X112106Y-44284D01*
X112050Y-44303D01*
X112012Y-44340D01*
X111993Y-44378D01*
X111975Y-44453D01*
X111975Y-44509D01*
X111993Y-44584D01*
X112012Y-44621D01*
X112050Y-44659D01*
X112106Y-44678D01*
X112200Y-44678D01*
X104162Y-44678D02*
X104162Y-44284D01*
X103993Y-44678D02*
X103993Y-44471D01*
X104012Y-44434D01*
X104049Y-44415D01*
X104105Y-44415D01*
X104143Y-44434D01*
X104162Y-44453D01*
X103862Y-44415D02*
X103712Y-44415D01*
X103805Y-44284D02*
X103805Y-44621D01*
X103787Y-44659D01*
X103749Y-44678D01*
X103712Y-44678D01*
X103637Y-44415D02*
X103487Y-44415D01*
X103580Y-44284D02*
X103580Y-44621D01*
X103562Y-44659D01*
X103524Y-44678D01*
X103487Y-44678D01*
X103356Y-44415D02*
X103356Y-44809D01*
X103356Y-44434D02*
X103318Y-44415D01*
X103243Y-44415D01*
X103206Y-44434D01*
X103187Y-44453D01*
X103168Y-44490D01*
X103168Y-44603D01*
X103187Y-44640D01*
X103206Y-44659D01*
X103243Y-44678D01*
X103318Y-44678D01*
X103356Y-44659D01*
X102999Y-44640D02*
X102981Y-44659D01*
X102999Y-44678D01*
X103018Y-44659D01*
X102999Y-44640D01*
X102999Y-44678D01*
X102999Y-44434D02*
X102981Y-44453D01*
X102999Y-44471D01*
X103018Y-44453D01*
X102999Y-44434D01*
X102999Y-44471D01*
X102531Y-44265D02*
X102868Y-44771D01*
X102118Y-44265D02*
X102456Y-44771D01*
X101818Y-44659D02*
X101856Y-44678D01*
X101931Y-44678D01*
X101968Y-44659D01*
X101987Y-44640D01*
X102006Y-44603D01*
X102006Y-44490D01*
X101987Y-44453D01*
X101968Y-44434D01*
X101931Y-44415D01*
X101856Y-44415D01*
X101818Y-44434D01*
X101481Y-44678D02*
X101481Y-44471D01*
X101500Y-44434D01*
X101537Y-44415D01*
X101612Y-44415D01*
X101649Y-44434D01*
X101481Y-44659D02*
X101518Y-44678D01*
X101612Y-44678D01*
X101649Y-44659D01*
X101668Y-44621D01*
X101668Y-44584D01*
X101649Y-44546D01*
X101612Y-44528D01*
X101518Y-44528D01*
X101481Y-44509D01*
X101293Y-44678D02*
X101293Y-44415D01*
X101293Y-44490D02*
X101275Y-44453D01*
X101256Y-44434D01*
X101218Y-44415D01*
X101181Y-44415D01*
X100993Y-44678D02*
X101031Y-44659D01*
X101050Y-44621D01*
X101050Y-44284D01*
X100787Y-44678D02*
X100825Y-44659D01*
X100843Y-44640D01*
X100862Y-44603D01*
X100862Y-44490D01*
X100843Y-44453D01*
X100825Y-44434D01*
X100787Y-44415D01*
X100731Y-44415D01*
X100693Y-44434D01*
X100675Y-44453D01*
X100656Y-44490D01*
X100656Y-44603D01*
X100675Y-44640D01*
X100693Y-44659D01*
X100731Y-44678D01*
X100787Y-44678D01*
X100506Y-44659D02*
X100468Y-44678D01*
X100393Y-44678D01*
X100356Y-44659D01*
X100337Y-44621D01*
X100337Y-44603D01*
X100356Y-44565D01*
X100393Y-44546D01*
X100450Y-44546D01*
X100487Y-44528D01*
X100506Y-44490D01*
X100506Y-44471D01*
X100487Y-44434D01*
X100450Y-44415D01*
X100393Y-44415D01*
X100356Y-44434D01*
X100000Y-44415D02*
X100000Y-44734D01*
X100018Y-44771D01*
X100037Y-44790D01*
X100075Y-44809D01*
X100131Y-44809D01*
X100168Y-44790D01*
X100000Y-44659D02*
X100037Y-44678D01*
X100112Y-44678D01*
X100150Y-44659D01*
X100168Y-44640D01*
X100187Y-44603D01*
X100187Y-44490D01*
X100168Y-44453D01*
X100150Y-44434D01*
X100112Y-44415D01*
X100037Y-44415D01*
X100000Y-44434D01*
X99831Y-44659D02*
X99793Y-44678D01*
X99718Y-44678D01*
X99681Y-44659D01*
X99662Y-44621D01*
X99662Y-44603D01*
X99681Y-44565D01*
X99718Y-44546D01*
X99775Y-44546D01*
X99812Y-44528D01*
X99831Y-44490D01*
X99831Y-44471D01*
X99812Y-44434D01*
X99775Y-44415D01*
X99718Y-44415D01*
X99681Y-44434D01*
X99494Y-44640D02*
X99475Y-44659D01*
X99494Y-44678D01*
X99512Y-44659D01*
X99494Y-44640D01*
X99494Y-44678D01*
X99156Y-44659D02*
X99194Y-44678D01*
X99269Y-44678D01*
X99306Y-44659D01*
X99325Y-44621D01*
X99325Y-44471D01*
X99306Y-44434D01*
X99269Y-44415D01*
X99194Y-44415D01*
X99156Y-44434D01*
X99137Y-44471D01*
X99137Y-44509D01*
X99325Y-44546D01*
X98987Y-44659D02*
X98950Y-44678D01*
X98875Y-44678D01*
X98837Y-44659D01*
X98819Y-44621D01*
X98819Y-44603D01*
X98837Y-44565D01*
X98875Y-44546D01*
X98931Y-44546D01*
X98969Y-44528D01*
X98987Y-44490D01*
X98987Y-44471D01*
X98969Y-44434D01*
X98931Y-44415D01*
X98875Y-44415D01*
X98837Y-44434D01*
X104246Y-43678D02*
X104246Y-43284D01*
X104152Y-43284D01*
X104096Y-43303D01*
X104059Y-43340D01*
X104040Y-43378D01*
X104021Y-43453D01*
X104021Y-43509D01*
X104040Y-43584D01*
X104059Y-43621D01*
X104096Y-43659D01*
X104152Y-43678D01*
X104246Y-43678D01*
X103909Y-43284D02*
X103684Y-43284D01*
X103796Y-43678D02*
X103796Y-43284D01*
X103552Y-43678D02*
X103552Y-43284D01*
X103421Y-43565D01*
X103290Y-43284D01*
X103290Y-43678D01*
X102971Y-43471D02*
X103102Y-43471D01*
X103102Y-43678D02*
X103102Y-43284D01*
X102915Y-43284D01*
X102465Y-43678D02*
X102465Y-43284D01*
X102371Y-43284D01*
X102315Y-43303D01*
X102278Y-43340D01*
X102259Y-43378D01*
X102240Y-43453D01*
X102240Y-43509D01*
X102259Y-43584D01*
X102278Y-43621D01*
X102315Y-43659D01*
X102371Y-43678D01*
X102465Y-43678D01*
X101921Y-43659D02*
X101959Y-43678D01*
X102034Y-43678D01*
X102071Y-43659D01*
X102090Y-43621D01*
X102090Y-43471D01*
X102071Y-43434D01*
X102034Y-43415D01*
X101959Y-43415D01*
X101921Y-43434D01*
X101903Y-43471D01*
X101903Y-43509D01*
X102090Y-43546D01*
X101565Y-43659D02*
X101603Y-43678D01*
X101678Y-43678D01*
X101715Y-43659D01*
X101734Y-43640D01*
X101753Y-43603D01*
X101753Y-43490D01*
X101734Y-43453D01*
X101715Y-43434D01*
X101678Y-43415D01*
X101603Y-43415D01*
X101565Y-43434D01*
X101340Y-43678D02*
X101378Y-43659D01*
X101396Y-43640D01*
X101415Y-43603D01*
X101415Y-43490D01*
X101396Y-43453D01*
X101378Y-43434D01*
X101340Y-43415D01*
X101284Y-43415D01*
X101246Y-43434D01*
X101228Y-43453D01*
X101209Y-43490D01*
X101209Y-43603D01*
X101228Y-43640D01*
X101246Y-43659D01*
X101284Y-43678D01*
X101340Y-43678D01*
X100871Y-43678D02*
X100871Y-43284D01*
X100871Y-43659D02*
X100909Y-43678D01*
X100984Y-43678D01*
X101021Y-43659D01*
X101040Y-43640D01*
X101059Y-43603D01*
X101059Y-43490D01*
X101040Y-43453D01*
X101021Y-43434D01*
X100984Y-43415D01*
X100909Y-43415D01*
X100871Y-43434D01*
X100534Y-43659D02*
X100571Y-43678D01*
X100646Y-43678D01*
X100684Y-43659D01*
X100703Y-43621D01*
X100703Y-43471D01*
X100684Y-43434D01*
X100646Y-43415D01*
X100571Y-43415D01*
X100534Y-43434D01*
X100515Y-43471D01*
X100515Y-43509D01*
X100703Y-43546D01*
X100347Y-43678D02*
X100347Y-43415D01*
X100347Y-43490D02*
X100328Y-43453D01*
X100309Y-43434D01*
X100272Y-43415D01*
X100234Y-43415D01*
X99840Y-43415D02*
X99747Y-43678D01*
X99653Y-43415D01*
X99428Y-43284D02*
X99390Y-43284D01*
X99353Y-43303D01*
X99334Y-43321D01*
X99315Y-43359D01*
X99297Y-43434D01*
X99297Y-43528D01*
X99315Y-43603D01*
X99334Y-43640D01*
X99353Y-43659D01*
X99390Y-43678D01*
X99428Y-43678D01*
X99465Y-43659D01*
X99484Y-43640D01*
X99503Y-43603D01*
X99522Y-43528D01*
X99522Y-43434D01*
X99503Y-43359D01*
X99484Y-43321D01*
X99465Y-43303D01*
X99428Y-43284D01*
X99128Y-43640D02*
X99109Y-43659D01*
X99128Y-43678D01*
X99147Y-43659D01*
X99128Y-43640D01*
X99128Y-43678D01*
X98753Y-43284D02*
X98940Y-43284D01*
X98959Y-43471D01*
X98940Y-43453D01*
X98903Y-43434D01*
X98809Y-43434D01*
X98772Y-43453D01*
X98753Y-43471D01*
X98734Y-43509D01*
X98734Y-43603D01*
X98753Y-43640D01*
X98772Y-43659D01*
X98809Y-43678D01*
X98903Y-43678D01*
X98940Y-43659D01*
X98959Y-43640D01*
M02*

View File

@ -0,0 +1,276 @@
G04 (created by PCBNEW (2013-mar-13)-testing) date mié 05 jun 2013 17:08:33 CEST*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
G01*
G70*
G90*
G04 APERTURE LIST*
%ADD10C,0.005906*%
%ADD11R,0.062000X0.090000*%
%ADD12O,0.062000X0.090000*%
%ADD13R,0.055000X0.055000*%
%ADD14C,0.055000*%
%ADD15C,0.065000*%
%ADD16C,0.070000*%
%ADD17R,0.100000X0.100000*%
%ADD18C,0.100000*%
%ADD19R,0.060000X0.060000*%
%ADD20C,0.060000*%
%ADD21C,0.039370*%
G04 APERTURE END LIST*
G54D10*
G54D11*
X96000Y-53000D03*
G54D12*
X97000Y-53000D03*
X98000Y-53000D03*
X99000Y-53000D03*
X100000Y-53000D03*
X101000Y-53000D03*
X102000Y-53000D03*
X102000Y-50000D03*
X101000Y-50000D03*
X100000Y-50000D03*
X99000Y-50000D03*
X98000Y-50000D03*
X97000Y-50000D03*
X96000Y-50000D03*
G54D13*
X113500Y-50250D03*
G54D14*
X113500Y-51750D03*
X105000Y-51500D03*
X105000Y-53500D03*
X103500Y-52500D03*
X103500Y-50500D03*
X100500Y-46000D03*
X102500Y-46000D03*
X100500Y-47000D03*
X102500Y-47000D03*
G54D15*
X111000Y-53500D03*
X114000Y-53500D03*
X104000Y-46500D03*
X107000Y-46500D03*
X111000Y-52000D03*
X111000Y-49000D03*
X107500Y-47500D03*
X110500Y-47500D03*
X105000Y-47500D03*
X105000Y-50500D03*
G54D16*
X102500Y-48500D03*
X98500Y-48500D03*
G54D11*
X109500Y-49500D03*
G54D12*
X108500Y-49500D03*
X107500Y-49500D03*
X106500Y-49500D03*
X106500Y-52500D03*
X107500Y-52500D03*
X108500Y-52500D03*
X109500Y-52500D03*
G54D16*
X97000Y-46500D03*
X97000Y-44500D03*
G54D17*
X109000Y-45000D03*
G54D18*
X111000Y-45000D03*
G54D19*
X113500Y-47000D03*
G54D20*
X113500Y-48000D03*
G54D19*
X93500Y-52000D03*
G54D20*
X93500Y-51000D03*
X93500Y-50000D03*
X93500Y-49000D03*
X93500Y-48000D03*
G54D21*
X109000Y-45000D02*
X110500Y-46500D01*
X110500Y-46500D02*
X110500Y-47500D01*
X105500Y-52500D02*
X103500Y-52500D01*
X105500Y-53000D02*
X105500Y-52500D01*
X106000Y-53500D02*
X105500Y-53000D01*
X109500Y-53500D02*
X106000Y-53500D01*
X109500Y-53500D02*
X111000Y-53500D01*
X110500Y-47500D02*
X111000Y-47500D01*
X109500Y-52000D02*
X109500Y-52500D01*
X112000Y-49500D02*
X109500Y-52000D01*
X112000Y-48500D02*
X112000Y-49500D01*
X111000Y-47500D02*
X112000Y-48500D01*
X109500Y-52500D02*
X109500Y-53500D01*
X103500Y-52500D02*
X103500Y-52000D01*
X103500Y-52000D02*
X103000Y-51500D01*
X103000Y-51500D02*
X101500Y-51500D01*
X101500Y-51500D02*
X101000Y-52000D01*
X101000Y-52000D02*
X101000Y-53000D01*
X98000Y-53000D02*
X99000Y-53000D01*
X99000Y-53000D02*
X100000Y-53000D01*
X100000Y-53000D02*
X101000Y-53000D01*
X113000Y-47000D02*
X111000Y-45000D01*
X113500Y-47000D02*
X113000Y-47000D01*
X104000Y-46500D02*
X107000Y-43500D01*
X111000Y-44000D02*
X111000Y-45000D01*
X110500Y-43500D02*
X111000Y-44000D01*
X107000Y-43500D02*
X110500Y-43500D01*
X104000Y-46500D02*
X104000Y-49500D01*
X104000Y-46500D02*
X102500Y-46500D01*
X102500Y-46000D02*
X102500Y-46500D01*
X102500Y-46500D02*
X102500Y-47000D01*
X106500Y-49500D02*
X104000Y-49500D01*
X104000Y-49500D02*
X103500Y-49500D01*
X103500Y-49500D02*
X103500Y-50500D01*
X103500Y-50500D02*
X102500Y-50500D01*
X102500Y-50500D02*
X102000Y-50000D01*
X97000Y-46500D02*
X98500Y-48000D01*
X98500Y-48000D02*
X98500Y-48500D01*
X100500Y-47000D02*
X100500Y-47500D01*
X100000Y-48000D02*
X100000Y-48500D01*
X100500Y-47500D02*
X100000Y-48000D01*
X100000Y-50000D02*
X100000Y-48500D01*
X100000Y-48500D02*
X98500Y-48500D01*
X93500Y-48000D02*
X96500Y-48000D01*
X98000Y-49500D02*
X98000Y-50000D01*
X96500Y-48000D02*
X98000Y-49500D01*
X107000Y-46500D02*
X107000Y-47000D01*
X107000Y-47000D02*
X107500Y-47500D01*
X107500Y-47500D02*
X107500Y-49500D01*
X113500Y-48000D02*
X113500Y-50250D01*
X113500Y-50250D02*
X113750Y-50250D01*
X114500Y-53000D02*
X114000Y-53500D01*
X114500Y-51000D02*
X114500Y-53000D01*
X113750Y-50250D02*
X114500Y-51000D01*
X113500Y-51750D02*
X111250Y-51750D01*
X111250Y-51750D02*
X111000Y-52000D01*
X105000Y-51000D02*
X109000Y-51000D01*
X109500Y-50500D02*
X109500Y-49500D01*
X109000Y-51000D02*
X109500Y-50500D01*
X105000Y-51500D02*
X105000Y-51000D01*
X105000Y-51000D02*
X105000Y-50500D01*
X105000Y-47500D02*
X105000Y-47000D01*
X109000Y-47000D02*
X109000Y-48500D01*
X107500Y-45500D02*
X109000Y-47000D01*
X106500Y-45500D02*
X107500Y-45500D01*
X105000Y-47000D02*
X106500Y-45500D01*
X111000Y-49000D02*
X110500Y-49000D01*
X110000Y-48500D02*
X109000Y-48500D01*
X109000Y-48500D02*
X108500Y-48500D01*
X110500Y-49000D02*
X110000Y-48500D01*
X108500Y-48500D02*
X108500Y-49500D01*
X97000Y-44500D02*
X98500Y-46000D01*
X98500Y-46000D02*
X100500Y-46000D01*
X100500Y-46000D02*
X101500Y-46000D01*
X101500Y-46000D02*
X101500Y-48500D01*
X101000Y-50000D02*
X101000Y-48500D01*
X101000Y-48500D02*
X101500Y-48500D01*
X101500Y-48500D02*
X102500Y-48500D01*
X105000Y-53500D02*
X102500Y-53500D01*
X102500Y-53500D02*
X102000Y-53000D01*
X97000Y-50000D02*
X97000Y-49500D01*
X96500Y-49000D02*
X93500Y-49000D01*
X97000Y-49500D02*
X96500Y-49000D01*
X97000Y-53000D02*
X97000Y-54000D01*
X93500Y-52500D02*
X93500Y-52000D01*
X95000Y-54000D02*
X93500Y-52500D01*
X97000Y-54000D02*
X95000Y-54000D01*
X93500Y-51000D02*
X94500Y-51000D01*
X96000Y-52500D02*
X96000Y-53000D01*
X94500Y-51000D02*
X96000Y-52500D01*
X96000Y-50000D02*
X93500Y-50000D01*
M02*

View File

@ -0,0 +1,26 @@
G04 (created by PCBNEW (2013-mar-13)-testing) date mié 05 jun 2013 17:08:33 CEST*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
G01*
G70*
G90*
G04 APERTURE LIST*
%ADD10C,0.005906*%
G04 APERTURE END LIST*
G54D10*
X115500Y-55000D02*
X115500Y-54500D01*
X91000Y-55000D02*
X115500Y-55000D01*
X91000Y-54500D02*
X91000Y-55000D01*
X92000Y-42500D02*
X91000Y-42500D01*
X91000Y-42500D02*
X91000Y-54500D01*
X115500Y-54500D02*
X115500Y-42500D01*
X92000Y-42500D02*
X115500Y-42500D01*
M02*

View File

@ -0,0 +1,72 @@
M48
;DRILL file {Pcbnew (2013-mar-13)-testing} date mar 04 jun 2013 23:39:34 CEST
;FORMAT={-:-/ absolute / inch / decimal}
FMAT,2
INCH,TZ
T1C0.032
T2C0.040
T3C0.060
%
G90
G05
M72
T1
X9.6Y-5.
X9.6Y-5.3
X9.7Y-4.45
X9.7Y-4.65
X9.7Y-5.
X9.7Y-5.3
X9.8Y-5.
X9.8Y-5.3
X9.85Y-4.85
X9.9Y-5.
X9.9Y-5.3
X10.Y-5.
X10.Y-5.3
X10.05Y-4.6
X10.05Y-4.7
X10.1Y-5.
X10.1Y-5.3
X10.2Y-5.
X10.2Y-5.3
X10.25Y-4.6
X10.25Y-4.7
X10.25Y-4.85
X10.35Y-5.05
X10.35Y-5.25
X10.4Y-4.65
X10.5Y-4.75
X10.5Y-5.05
X10.5Y-5.15
X10.5Y-5.35
X10.65Y-4.95
X10.65Y-5.25
X10.7Y-4.65
X10.75Y-4.75
X10.75Y-4.95
X10.75Y-5.25
X10.85Y-4.95
X10.85Y-5.25
X10.95Y-4.95
X10.95Y-5.25
X11.05Y-4.75
X11.1Y-4.9
X11.1Y-5.2
X11.1Y-5.35
X11.35Y-5.025
X11.35Y-5.175
X11.4Y-5.35
T2
X9.35Y-4.8
X9.35Y-4.9
X9.35Y-5.
X9.35Y-5.1
X9.35Y-5.2
X11.35Y-4.7
X11.35Y-4.8
T3
X10.9Y-4.5
X11.1Y-4.5
T0
M30

View File

@ -0,0 +1,176 @@
(Generated by ./pygerber2gcode_cui_MOD.py )
( 2013-06-05 17:19:17 )
(Initialize)
(Start form here)
G0 Z0.500000 F40.000000
G0 X52.989999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X52.989999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X50.449999 Y30.129999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X50.449999 Y25.049999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X50.449999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X50.449999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X47.909999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X47.909999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X46.639999 Y19.969999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X45.369999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X45.369999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X42.829999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X42.829999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X41.559999 Y26.319999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X41.559999 Y23.779999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X40.289999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X40.289999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X37.749999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X37.749999 Y8.539999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X36.479999 Y26.319999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X36.479999 Y23.779999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X36.479999 Y19.969999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X33.939999 Y14.889999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X33.939999 Y9.809999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X32.669999 Y25.049999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X30.129999 Y22.509999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X30.129999 Y14.889999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X30.129999 Y12.349999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X30.129999 Y7.269999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X26.319999 Y17.429999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X26.319999 Y9.809999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X25.049999 Y25.049999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X23.779999 Y22.509999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X23.779999 Y17.429999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X23.779999 Y9.809999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X21.239999 Y17.429999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X21.239999 Y9.809999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X18.699999 Y17.429999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X18.699999 Y9.809999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X16.159999 Y22.509999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X14.889999 Y18.699999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X14.889999 Y11.079999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X14.889999 Y7.269999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X8.539999 Y15.524999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X8.539999 Y11.714999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X7.269999 Y7.269999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X59.339999 Y21.239999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X59.339999 Y18.699999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X59.339999 Y16.159999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X59.339999 Y13.619999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X59.339999 Y11.079999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X8.539999 Y23.779999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X8.539999 Y21.239999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X19.969999 Y28.859999
G0 Z-2.000000 F40.000000
G0 Z0.500000
G0 X14.889999 Y28.859999
G0 Z-2.000000 F40.000000
G0 Z0.500000
(Goto to Initial position)
G0 Z0.500000
G0 X0.000000 Y0.000000
G0 Z0.000000

View File

@ -0,0 +1,20 @@
(Generated by ./pygerber2gcode_cui_MOD.py )
( 2013-06-05 17:19:17 )
(Initialize)
(Start form here)
G0 Z0.500000
G0 X65.689999 Y35.209999
G1 Z-2.000000 F20.000000
G1 Y4.729999 F30.000000
G1 Y3.459999 F30.000000
G1 X3.459999 F30.000000
G1 Y4.729999 F30.000000
G1 Y35.209999 F30.000000
G1 X63.149999 F30.000000
G1 X65.689999 F30.000000
(Goto to Initial position)
G0 Z0.500000
G0 X0.000000 Y0.000000
G0 Z0.000000

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
GERBER_DIR = "./in"
FRONT_FILE = ""
BACK_FILE = "printshield-1.0-B_Cu.gtl"
DRILL_FILE = "printshield-1.0.drl"
EDGE_FILE = "printshield-1.0-Edge_Cuts.gbr"
BACK_FILE = "DTMF_Shield-B_Cu.gbl"
DRILL_FILE = "DTMF_Shield.drl"
EDGE_FILE = "DTMF_Shield-Edge_Cuts.gbr"
MIRROR_FRONT = 0
MIRROR_BACK = 1
MIRROR_DRILL = 1
@ -10,13 +10,13 @@ MIRROR_EDGE = 1
ROT_ANG = 0
OUT_DIR = "./out"
OUT_FRONT_FILE = ""
OUT_BACK_FILE = "printshield_etch.gcode"
OUT_BACK_FILE = "DTMF_Shield_etch.gcode"
OUT_FRONT_2PASS_FILE = ""
OUT_BACK_2PASS_FILE = "printshield_etch2pass.gcode"
OUT_BACK_2PASS_FILE = "DTMF_Shield_etch2pass.gcode"
OUT_FRONT_3PASS_FILE = ""
OUT_BACK_3PASS_FILE = "printshield_etch3pass.gcode"
OUT_DRILL_FILE = "printshield_drill.gcode"
OUT_EDGE_FILE = "printshield_edge.gcode"
OUT_BACK_3PASS_FILE = "DTMF_Shield_etch3pass.gcode"
OUT_DRILL_FILE = "DTMF_Shield_drill.gcode"
OUT_EDGE_FILE = "DTMF_Shield_edge.gcode"
INI_X=0.0
INI_Y=0.0
@ -25,9 +25,9 @@ MOVE_HEIGHT=0.5
IN_INCH_FLAG=1
OUT_INCH_FLAG=0
MCODE_FLAG=0
XY_SPEED=100
XY_SPEED=200
Z_SPEED=60
LEFT_X=40.0
LEFT_X=5.0
LOWER_Y=5.0
DRILL_SPEED=40
DRILL_DEPTH=-2
@ -41,11 +41,11 @@ DRILL_UNIT=0.00254
EDGE_UNIT=0.00254
EDGE_TOOL_D=2.4
EDGE_DEPTH=-2
EDGE_SPEED=50
EDGE_Z_SPEED=30
EDGE_SPEED=30
EDGE_Z_SPEED=20
MERGE_DRILL_DATA=0
Z_STEP_DRILL=-0.1
Z_STEP_EDGE=-0.4
Z_STEP_EDGE=-2.1
GERBER_COLOR=BLACK
DRILL_COLOR=BLUE
EDGE_COLOR=GREEN YELLOW

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -13,8 +13,8 @@
# Begin configuration
BAUDRATE = 115200
DEVICE = "/dev/ttyUSB2"
Emulate = 1
DEVICE = "/dev/ttyUSB0"
Emulate = 0
# End configuration
# Begin modules
@ -34,7 +34,7 @@ from helper import *
# End modules
filePath = "../GcodeGenerators/pyGerber2Gcode_CUI/out/"
fileName = "printshield" # sys.argv[1]
fileName = "DTMF_Shield" # sys.argv[1]
@ -69,10 +69,16 @@ def pltShow():
def probingResults(): # quick and dirty temporal code
global Z_workbed_surface
x_points = [0.0, 12.272727272727273, 24.545454545454547, 36.81818181818182, 49.09090909090909, 61.36363636363637, 73.63636363636364, 85.9090909090909, 98.18181818181819, 110.45454545454547, 122.72727272727273, 135.0]
y_points = [0.0, 16.8, 33.6, 50.400000000000006, 67.2, 84.0]
probe_result = [[0.0, 0.2, 0.4, 0.53, 0.58, 0.6, 0.56, 0.53, 0.5, 0.44, 0.33, 0.2], [-0.03, 0.07, 0.16, 0.26, 0.32, 0.33, 0.33, 0.33, 0.29, 0.23, 0.15, 0.05], [-0.07, 0.0, 0.05, 0.12, 0.16, 0.2, 0.2, 0.22, 0.2, 0.16, 0.08, 0.0], [-0.07, -0.03, 0.04, 0.11, 0.15, 0.19, 0.2, 0.22, 0.22, 0.19, 0.11, 0.04], [0.0, 0.04, 0.08, 0.19, 0.23, 0.29, 0.33, 0.36, 0.37, 0.32, 0.2, 0.11], [0.13, 0.2, 0.27, 0.37, 0.44, 0.51, 0.55, 0.61, 0.64, 0.55, 0.41, 0.22]]
duration = 346.076061
# x_points = [0.0, 12.272727272727273, 24.545454545454547, 36.81818181818182, 49.09090909090909, 61.36363636363637, 73.63636363636364, 85.9090909090909, 98.18181818181819, 110.45454545454547, 122.72727272727273, 135.0]
# y_points = [0.0, 16.8, 33.6, 50.400000000000006, 67.2, 84.0]
# probe_result = [[0.0, 0.2, 0.4, 0.53, 0.58, 0.6, 0.56, 0.53, 0.5, 0.44, 0.33, 0.2], [-0.03, 0.07, 0.16, 0.26, 0.32, 0.33, 0.33, 0.33, 0.29, 0.23, 0.15, 0.05], [-0.07, 0.0, 0.05, 0.12, 0.16, 0.2, 0.2, 0.22, 0.2, 0.16, 0.08, 0.0], [-0.07, -0.03, 0.04, 0.11, 0.15, 0.19, 0.2, 0.22, 0.22, 0.19, 0.11, 0.04], [0.0, 0.04, 0.08, 0.19, 0.23, 0.29, 0.33, 0.36, 0.37, 0.32, 0.2, 0.11], [0.13, 0.2, 0.27, 0.37, 0.44, 0.51, 0.55, 0.61, 0.64, 0.55, 0.41, 0.22]]
# duration = 346.076061
# DTMF board
x_points = [0.0, 17.5, 35.0, 52.5, 70.0]
y_points = [0.0, 13.333333333333334, 26.666666666666668, 40.0]
probe_result = [[0.0, 0.28000000000000114, 0.490000000000002, 0.5599999999999987, 0.5199999999999996], [0.0, 0.1700000000000017, 0.33000000000000185, 0.41000000000000014, 0.41000000000000014], [-0.030000000000001137, 0.08999999999999986, 0.21999999999999886, 0.3000000000000007, 0.33000000000000185], [-0.08999999999999986, 0.03999999999999915, 0.16000000000000014, 0.26000000000000156, 0.28999999999999915]]
duration = 102.808573
# Show our grid
# print "--- Probing results ---"
@ -123,13 +129,13 @@ probingResults()
print "Must be zero:",floats(getZoffset(0,0))
# Display the Gcode that is going to be etched
(etch_moves, travel_moves, gcode_minXY_global, gcode_maxXY_global) = gcv.view(filePath,fileName,showEtch=1)
(etch_moves, travel_moves, gcode_minXY_global, gcode_maxXY_global) = gcv.view(filePath,fileName,showEdge=1)
#(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)
# Truncate the background to the dimensions of the PCB
# 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)
@ -184,7 +190,7 @@ drawTool(10, 20) # Show a marker on the gcode plot
# Warning: Do not lower too much or you will potentially cause damage!
initial_Z_lowering_distance = -20
initial_Z_lowering_distance = -10
cy.moveZrelSafe(initial_Z_lowering_distance,F_slowMove/2) # Move Z towards the PCB (saves some probing time for the first coord)
Z_origin_offset = cy.probeZ()

View File

@ -34,9 +34,12 @@ cy.sendCommand("G90\n") # Set absolute positioning
cy.homeZXY() # Home all the axis
# (x,y)
#grid_origin = (0,0) # Initial point of the grid [mm]
#grid_len = (135,84) # Distance to probe [mm]
#grid_N = (12,6) # Number of points
grid_origin = (0,0) # Initial point of the grid [mm]
grid_len = (135,84) # Distance to probe [mm]
grid_N = (12,6) # Number of points
grid_len = (70,40) # Distance to probe [mm]
grid_N = (5,4) # Number of points (AT LEAST 4 IN EACH DIRECTION, OTHERWISE INTERPOLATION WILL FAIL)
Zlift = 0.5 # mm
@ -46,12 +49,18 @@ F_slowMove = 100
initial_Z_lowering_distance = -15
cy.moveZrelSafe(initial_Z_lowering_distance,F_slowMove) # Move Z towards the PCB (saves some probing time for the first coord)
#(x_points, y_points, probe_result, Z_offset, duration) = cy.probeGrid(grid_origin, grid_len, grid_N, Zlift)
(x_points, y_points, probe_result, Z_offset, duration) = cy.probeGrid(grid_origin, grid_len, grid_N, Zlift)
#x_points = [0.0, 12.272727272727273, 24.545454545454547, 36.81818181818182, 49.09090909090909, 61.36363636363637, 73.63636363636364, 85.9090909090909, 98.18181818181819, 110.45454545454547, 122.72727272727273, 135.0]
#y_points = [0.0, 16.8, 33.6, 50.400000000000006, 67.2, 84.0]
#probe_result = [[0.0, 0.2, 0.4, 0.53, 0.58, 0.6, 0.56, 0.53, 0.5, 0.44, 0.33, 0.2], [-0.03, 0.07, 0.16, 0.26, 0.32, 0.33, 0.33, 0.33, 0.29, 0.23, 0.15, 0.05], [-0.07, 0.0, 0.05, 0.12, 0.16, 0.2, 0.2, 0.22, 0.2, 0.16, 0.08, 0.0], [-0.07, -0.03, 0.04, 0.11, 0.15, 0.19, 0.2, 0.22, 0.22, 0.19, 0.11, 0.04], [0.0, 0.04, 0.08, 0.19, 0.23, 0.29, 0.33, 0.36, 0.37, 0.32, 0.2, 0.11], [0.13, 0.2, 0.27, 0.37, 0.44, 0.51, 0.55, 0.61, 0.64, 0.55, 0.41, 0.22]]
#duration = 346.076061
x_points = [0.0, 17.5, 35.0, 52.5, 70.0]
y_points = [0.0, 13.333333333333334, 26.666666666666668, 40.0]
probe_result = [[0.0, 0.28000000000000114, 0.490000000000002, 0.5599999999999987, 0.5199999999999996], [0.0, 0.1700000000000017, 0.33000000000000185, 0.41000000000000014, 0.41000000000000014], [-0.030000000000001137, 0.08999999999999986, 0.21999999999999886, 0.3000000000000007, 0.33000000000000185], [-0.08999999999999986, 0.03999999999999915, 0.16000000000000014, 0.26000000000000156, 0.28999999999999915]]
duration = 102.808573
x_points = [0.0, 12.272727272727273, 24.545454545454547, 36.81818181818182, 49.09090909090909, 61.36363636363637, 73.63636363636364, 85.9090909090909, 98.18181818181819, 110.45454545454547, 122.72727272727273, 135.0]
y_points = [0.0, 16.8, 33.6, 50.400000000000006, 67.2, 84.0]
probe_result = [[0.0, 0.2, 0.4, 0.53, 0.58, 0.6, 0.56, 0.53, 0.5, 0.44, 0.33, 0.2], [-0.03, 0.07, 0.16, 0.26, 0.32, 0.33, 0.33, 0.33, 0.29, 0.23, 0.15, 0.05], [-0.07, 0.0, 0.05, 0.12, 0.16, 0.2, 0.2, 0.22, 0.2, 0.16, 0.08, 0.0], [-0.07, -0.03, 0.04, 0.11, 0.15, 0.19, 0.2, 0.22, 0.22, 0.19, 0.11, 0.04], [0.0, 0.04, 0.08, 0.19, 0.23, 0.29, 0.33, 0.36, 0.37, 0.32, 0.2, 0.11], [0.13, 0.2, 0.27, 0.37, 0.44, 0.51, 0.55, 0.61, 0.64, 0.55, 0.41, 0.22]]
duration = 346.076061
# Show our grid
print "--- Probing results ---"

View File

@ -14,6 +14,11 @@
# Begin modules
import sys
import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt
from matplotlib import cm
sys.path.append("../CycloneHost")
import GcodeViewer as gcv
# End modules
@ -25,10 +30,50 @@ os.chdir("../GcodeGenerators/pyGerber2Gcode_CUI/")
call(["pypy","./pygerber2gcode_cui_MOD.py"])
os.chdir("../../gcode_Z_adjust")
def pltShowNonBlocking():
#plt.ion() # Enable real-time plotting to avoid blocking behaviour for plt.show()
plt.draw()
#plt.ioff() # Disable real-time plotting
def pltNewFig():
fig = plt.figure()
#plt.draw()
return fig
def pltSetFig(fig):
plt.figure(fig.number)
def pltRefresh(fig):
fig.canvas.draw()
def pltShow():
#plt.ion() # IMPORTANT: Enable real-time plotting
plt.draw()
#plt.ioff()
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 = "printshield" # sys.argv[1]
fileName = "DTMF_Shield" # sys.argv[1]
gcv.view(filePath,fileName,showAll=1)
pltRefresh(gcodeviewer) # Draw the figure contents, still no window
pltShow() # Open the window showing our figure
raw_input("Press enter to exit...")