stl_parser 0.0.71 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stl_parser.rb +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a990395271e77ff3189b63f8252d2034c20ff138
|
4
|
+
data.tar.gz: 3f12977eb4fc966fb4922ff52ce7b5d6560a5bc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: effe477074d3119cb4f2451b93fd4121176449de6d1b1f860d26817c0ab00129049e8373bf705c81ef62a25521fb49f42e2ffef916e239ca6357d8a49105f250
|
7
|
+
data.tar.gz: ef2cee7293e67fb1e929c9f5615ded84f41eff4756cf3d9088e87fa4b17f607ab4bdd520c7b902dd2bf969e6d34182cda8d05e930923727bbc7e1f9cb35ffef6
|
data/lib/stl_parser.rb
CHANGED
@@ -166,7 +166,17 @@ class STLParser
|
|
166
166
|
@f = open(infilename, "rb")
|
167
167
|
|
168
168
|
# Set the file type to ascii if needed
|
169
|
-
|
169
|
+
binary_found = false
|
170
|
+
@f.each_line do |line|
|
171
|
+
if(@f.gets.ascii_only? == false)
|
172
|
+
binary_found = true
|
173
|
+
break
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
unless(binary_found)
|
178
|
+
@file_type = :ascii
|
179
|
+
end
|
170
180
|
|
171
181
|
# Go back to beginning of the file
|
172
182
|
@f.seek(0)
|