Comments (6)
Python 3 is indeed not working yet, I'll add it to my todo but it's slightly more work than I had hoped :(
from numpy-stl.
I did a test with 2to3.
$> 2to3 --output-dir=numpy-stl-3 -W -n numpy-stl-1.4.2
This seems to go a long way towards the changes needed. After doing this I could use pip to install the package and import it. Interestingly, the utilities work in one direction:
This works fine:
stl2ascii mybinary.stl myascii.stl
This fails:
$> stl2bin myascii.stl mybin.stl
Traceback (most recent call last):
File "/home/matt/anaconda3/bin/stl2bin", line 9, in
load_entry_point('numpy-stl==1.4.2', 'console_scripts', 'stl2bin')()
File "/home/matt/Downloads/test23/numpy-stl-3/stl/main.py", line 80, in to_binary
update_normals=not args.use_file_normals)
File "/home/matt/Downloads/test23/numpy-stl-3/stl/stl.py", line 198, in save
write(fh, name)
File "/home/matt/Downloads/test23/numpy-stl-3/stl/stl.py", line 227, in _write_binary
fh.write(struct.pack('@i', self.data.size))
TypeError: must be str, not bytes
Obviously, this must be to the changes in string and byte handling in python 3. Would love to help more, but I'm not an expert.
from numpy-stl.
That's indeed the problem I ran into, it's not impossible to fix but it's just taking slightly more time than I have right now :)
Still a work in progress though.
from numpy-stl.
ok, if I end up doing any more work on it for my application, I will try to post my findings here.
from numpy-stl.
I've just committed a few changes to make it slightly better, but something is fundamentally different in how py3k handles things, just try and run the test suite and you'll see that something is a bit weird :)
from numpy-stl.
I've just released version 1.5 which has Python 3 support as well as Python 2 support :)
from numpy-stl.
Related Issues (20)
- is_closed() gives false positives for simple STLs HOT 7
- stl2ascii raises a TypeError: File handles should be in binary mode - even when writing an ASCII STL. HOT 1
- Combined STL HOT 1
- How to use `test` modules HOT 1
- Z-height HOT 5
- Graph Generation is Blank HOT 1
- Parsing ASCII STL ending with "end solid" raises exception HOT 2
- about projection area HOT 1
- shape cant find HOT 1
- Save multi-part stls HOT 3
- Possible error in volume calculations HOT 4
- Can we check if two different stl files are overlapping each other HOT 1
- saving ascii STL HOT 2
- Merge STL question HOT 4
- AttributeError: module 'stl' has no attribute 'BaseStl HOT 1
- Computing the Max Z-height for double rotation HOT 3
- More info needed on stl atributes HOT 3
- the centroids of a stl file was not update after i rotated the stl file HOT 3
- How can i find linear parameters of stl model? HOT 2
- can't make image array into *.stl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numpy-stl.