Closed bwoodsend closed 4 years ago
The reason for that header is mostly because most other apps and libraries appear to do something similar. But a different kind of header is certainly an option. I can add it to the todo list but I'm really strapped for time at the moment so I won't create a new release within a few weeks or so.
That's OK - I'm not in a hurry. Thanks.
I've created a new release where the header can be modified by either inheriting/subclassing Mesh
to override the get_header
method: https://github.com/WoLpH/numpy-stl/blob/137fa7776c2d18fab6fc5fc94cd1a14594f08fe1/stl/stl.py#L282-L289
Or you can monkeypatch either get_header
for your mesh instance or monkeypatch stl.HEADER_FORMAT
for a global change.
That's perfect. Thanks a lot!
Here's my code.
I'd expect to get
b'alternative_name'
but instead I get the just get the numpy-stl header with the beginning ofpath
(below).Looking at the source code I see that that header appears to be hard coded in
mesh.save()
. Is there a reason you chose to do it that way? Could it change?