1
0
mirror of https://github.com/nophead/Mendel90.git synced 2025-08-19 03:21:18 +02:00

Merge pull request #70 from im-0/c14n_stl-improvement

c14n_stl: Also convert "-0" to "0"
This commit is contained in:
Chris
2018-10-30 21:14:58 +00:00
committed by GitHub

View File

@@ -11,6 +11,11 @@ from __future__ import print_function
import sys
def _cmz(x):
''' Convert "-0" to "0". '''
return '0' if x == '-0' else x
class Vertex:
def __init__(self, x, y, z):
self.x, self.y, self.z = x, y, z
@@ -44,7 +49,7 @@ class STL:
self.facets = []
f = open(fname)
words = [s.strip() for s in f.read().split()]
words = [_cmz(s.strip()) for s in f.read().split()]
f.close()
if words[0] == 'solid' and words[1] == 'OpenSCAD_Model':