Comments (10)
from python-admesh.
ADmesh 0.98.1, the latest stable. Python 2.7 and 3.4.
from python-admesh.
from python-admesh.
from python-admesh.
That is Debian Jessie.
cdef extern from "admesh/stl.h":
ctypedef struct stl_vertex:
float x
float y
float z
ctypedef struct stl_normal:
float x
float y
float z
ctypedef char stl_extra[2]
ctypedef struct stl_facet:
stl_normal normal
stl_vertex vertex[3]
stl_extra extra
cdef enum stl_type:
binary, ascii, inmemory
ctypedef struct stl_edge:
pass
ctypedef struct stl_hash_edge:
pass
ctypedef struct stl_neighbors:
pass
ctypedef struct v_indices_struct:
pass
ctypedef struct stl_stats:
char header[81]
stl_type type
int number_of_facets
stl_vertex max
stl_vertex min
stl_vertex size
float bounding_diameter
float shortest_edge
float volume
unsigned number_of_blocks
int connected_edges
int connected_facets_1_edge
int connected_facets_2_edge
int connected_facets_3_edge
int facets_w_1_bad_edge
int facets_w_2_bad_edge
int facets_w_3_bad_edge
int original_num_facets
int edges_fixed
int degenerate_facets
int facets_removed
int facets_added
int facets_reversed
int backwards_edges
int normals_fixed
int number_of_parts
int malloced
int freed
int facets_malloced
int collisions
int shared_vertices
int shared_malloced
ctypedef struct stl_file:
stl_stats stats
stl_facet *facet_start
void stl_open(stl_file *stl, char *file)
void stl_close(stl_file *stl)
void stl_write_ascii(stl_file *stl, const char *file, const char *label)
void stl_write_binary(stl_file *stl, const char *file, const char *label)
void stl_check_facets_exact(stl_file *stl)
void stl_check_facets_nearby(stl_file *stl, float tolerance)
void stl_remove_unconnected_facets(stl_file *stl)
void stl_write_vertex(stl_file *stl, int facet, int vertex)
void stl_write_facet(stl_file *stl, char *label, int facet)
void stl_write_edge(stl_file *stl, char *label, stl_hash_edge edge)
void stl_write_neighbor(stl_file *stl, int facet)
void stl_write_quad_object(stl_file *stl, char *file)
void stl_verify_neighbors(stl_file *stl)
void stl_fill_holes(stl_file *stl)
void stl_fix_normal_directions(stl_file *stl)
void stl_fix_normal_values(stl_file *stl)
void stl_reverse_all_facets(stl_file *stl)
void stl_translate(stl_file *stl, float x, float y, float z)
void stl_translate_relative(stl_file *stl, float x, float y, float z)
void stl_scale(stl_file *stl, float factor)
void stl_rotate_x(stl_file *stl, float angle)
void stl_rotate_y(stl_file *stl, float angle)
void stl_rotate_z(stl_file *stl, float angle)
void stl_mirror_xy(stl_file *stl)
void stl_mirror_yz(stl_file *stl)
void stl_mirror_xz(stl_file *stl)
void stl_open_merge(stl_file *stl, char *file)
void stl_invalidate_shared_vertices(stl_file *stl)
void stl_generate_shared_vertices(stl_file *stl)
void stl_write_obj(stl_file *stl, char *file)
void stl_write_off(stl_file *stl, char *file)
void stl_write_dxf(stl_file *stl, char *file, char *label)
void stl_write_vrml(stl_file *stl, char *file)
void stl_calculate_normal(float normal[], stl_facet *facet)
void stl_normalize_vector(float v[])
void stl_calculate_volume(stl_file *stl)
void stl_repair(stl_file *stl, int fixall_flag, int exact_flag, int tolerance_flag, float tolerance, int increment_flag, float increment, int nearby_flag, int iterations, int remove_unconnected_flag, int fill_holes_flag, int normal_directions_flag, int normal_values_flag, int reverse_all_flag, int verbose_flag)
void stl_initialize(stl_file *stl)
void stl_read(stl_file *stl, int first_facet, int first)
void stl_facet_stats(stl_file *stl, stl_facet facet, int first)
void stl_get_size(stl_file *stl)
void stl_clear_error(stl_file *stl)
int stl_get_error(stl_file *stl)
'''
from python-admesh.
0.98.3 works jus fine.
from python-admesh.
OK, this only happens with Cython 0.21 and 0.21.1. In Fedora we have 0.22 and on Travis CI, the most updated version is pulled.
I can try to somehow conditionalize this part, but it would be better if Cython in Debian gets updated. It doesn't look it would break anything in backwards incompatible manner.
from python-admesh.
Also, if you add facet_stats
to PXD_IGNORE, does it compile? I'd recommend patching this on a package level. As upstream, I'll probably use 'Cython>=0.22' in setup.py and requirements.txt.
from python-admesh.
Unfortunately no:
generating cadmesh.pxd and admesh.pyx
found /usr/include/admesh/stl.h
cythoning admesh.pyx to admesh.c
Error compiling Cython file:
------------------------------------------------------------
...
def __next__(self):
if self._iterindex >= len(self):
raise StopIteration
self._iterindex += 1
return self._c_stl_file.facet_start[self._iterindex - 1]
^
------------------------------------------------------------
admesh.pyx:41:43: Cannot convert 'stl_facet' to Python object
building 'admesh' extension
from python-admesh.
Well, if it is too problematic to fix it, I would leave it as it is. Cython should be soon updated in Debian (which was frozen several months due to release). Anyway, thanks for trying to fix it.
from python-admesh.
Related Issues (12)
- Python3 admesh issue HOT 2
- Data input: parse STL and facet import HOT 5
- Fails to compile with new Cython
- test/utils.py not in sdist
- Mac - problem with installation HOT 10
- Member variables of stl_file (stats, facet_start, etc.) are not exposed HOT 2
- get_size() and calculate_volume() methods return None HOT 8
- Make ADMeshException HOT 1
- Does not compile with Cython 0.23 HOT 2
- Missing surface_area in stats HOT 8
- Deepcopy doesn't work HOT 1
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 python-admesh.