Skip to content

Working as intented? #2

@mankeli

Description

@mankeli

Hi,
First off, I had to make some modifications to get it to run:

index dd16569..04c6a49 100644
--- a/explision.py
+++ b/explision.py
@@ -14,8 +14,8 @@ from Shaper import Shaper
 def parse_mesh( inputfile ):
        '''this uses OpenMesh to do the complex 3D measurements and operations of explision'''
        #read the mesh form the input file
-       mesh = TriMesh()
-       if not read_mesh( mesh, inputfile ):
+       mesh = read_trimesh( inputfile )
+       if not mesh:
                raise ValueError( "Could not read mesh from " + inputfile )
        #create shapes out of mesh faces
        shapes = []
@@ -53,5 +53,5 @@ if __name__ == "__main__":
        shaper = Shaper(config)
        inputfile = sys.argv[2] 
        shapes = parse_mesh( inputfile )
-       open('shapes.svg',     'w').write(shaper.render_shapes(shapes))
-       open('connectors.svg', 'w').write(shaper.render_connectors(shapes))
+       open('shapes.svg',     'wb').write(shaper.render_shapes(shapes))
+       open('connectors.svg', 'wb').write(shaper.render_connectors(shapes))
diff --git a/openmesh.so b/openmesh.so
deleted file mode 100644
index 21cc0d2..0000000
Binary files a/openmesh.so and /dev/null differ

The included openmesh.so binary 😁 complained about ImportError: libOpenMeshTools.so.6.3: cannot open shared object file: No such file or directory, with these modifications openmesh installed from pip3 should do.

Also btw, there' "python2" interpreter specified in explisition.py, but readme tells to run program with python3? :)

Anyway, example.ply then generates plausible output, but triangles in shapes.svg seem to overlap with each other, like
image - is this how it should work?

Can you tell me about your configuration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions