Skip to content

Commit

Permalink
Updated some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchodora committed May 3, 2018
1 parent 04712ea commit fdee9d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def slice_geometry(self):
# Calculate slice thickness/number of slices parameters and infill spacing
h = ydim.get()
step = slice_size.get()
# Check for incorrect slice heights
# Check for incorrect slice heights (negative or zero)
if step <= 0:
step = 0.1
num_steps = int(h/step)
space = infill_space.get()
# Check for incorrect infill spacing
# Check for incorrect infill spacing (negative or zero)
if space <= 0:
space = 0.1

Expand Down Expand Up @@ -324,9 +324,9 @@ def output_popup():
'SVG Files:\n\nThe slicer outputs an SVG file for each vertical slice of the geometry for'
' visualization and diagnostics of the print edge contours and infill patterns.\n\n'
'CSV File:\n\nThe slicer outputs a "path.csv" file describing the position of the print head'
' during printing. Each row represents an X,Y,Z coordinate in space and fourth value indicates'
' whethere the print head should be on (1) or off (0) when making the move to the position from'
'its previous position.')
' during printing. Each row represents the elapsed time in seconds, the X,Y,Z coordinate in'
' space and fifth value indicates whether the print head should be on (1) or off (0) when'
' making the move to the position from its previous position.')


# ****** Initialize Main Window ******
Expand Down
4 changes: 2 additions & 2 deletions slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def compute_points_on_z(geometry, z, xdim, ydim, zdim):
pairs.append([line[2][0], line[2][1]])

# Only need to keep point pairs (sets of 1 and 3 are not needed - these will be inherently handled by a point
# pair from a face somehwere else in the object geometry)
# pair from a face somewhere else in the object geometry)
if len(pairs) == 2:
# Reject points if they are the same (within tolerance) - too close together, not a path pair for printing
if abs(pairs[0][0] - pairs[1][0]) < tol and abs(pairs[0][1] - pairs[1][1]) < tol:
Expand Down Expand Up @@ -161,7 +161,7 @@ def infill(pairs, direct, spacing):
for fill_pass in range(num_passes+1):
loc = min_pos + fill_pass*spacing # Increment fill pass position by the infill spacing variable
pts = []
# Loop over each segment in the list of countour point pairs
# Loop over each segment in the list of contour point pairs
for segment in pairs:
# If the line falls on either side of the current fill pass line position
if segment[direct] < loc < segment[direct+2] or segment[direct+2] < loc < segment[direct]:
Expand Down

0 comments on commit fdee9d5

Please sign in to comment.