Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an error-check and corrected parameter passing #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion GenFixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ def Generate(self, path):
# Get test points
self.GetTestPoints ()

# Test for failure to find test points
if len(self.test_points) == 0:
print "WARNING, ABORTING: No test points found!"
print "Verify that the pcbnew file has test points specified"
print "or use the --flayer option to force test points"
return

# Plot DXF
self.PlotDXF (path)

Expand Down Expand Up @@ -206,7 +213,7 @@ def Generate(self, path):
if self.pivot_d != None:
args += " -D\'pivot_d=%.02f\'" % float (self.pivot_d)
if self.border != None:
args += " -D\'border=%.02f\'" % float (self.border)
args += " -D\'pcb_support_border=%.02f\'" % float (self.border)

# Create output file name
dxfout = path + "/" + self.prj_name + "-fixture.dxf"
Expand Down
4 changes: 4 additions & 0 deletions openfixture.scad
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ module head_top ()

// Common base
head_base_common ();

// Remove back cutout
translate ([2 * mat_th, head_y - mat_th, 0])
cube ([head_x - 4 * mat_th, mat_th, mat_th]);

// Remove holes for hex nuts
translate ([hole_offset, hole_offset, 0])
Expand Down