Coder Social home page Coder Social logo

metabolize-forks / lace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lace/lace

0.0 2.0 0.0 179 KB

DEPRECATED

Home Page: https://github.com/lace/lace

License: BSD 2-Clause "Simplified" License

Ruby 0.43% Python 74.18% C++ 3.78% C 21.51% Dockerfile 0.11%
mesh 3d geometry

lace's Introduction

metabolace

pip install version python versions build status last commit open pull requests

This is an active fork of lace, the Body Labs-developed polygonal mesh library.

The fork's goals are ambitious:

  • Keep the library working in current versions of Python and other tools.
  • Make bug fixes.
  • Provide API stability and backward compatibility with the upstream version.
  • Expand functionality to fully support quad meshes, and additional analysis and manipulation functionality where appropriate.
  • Respond to community contributions.

Installation

Install dependencies

Mac OS:

brew update && brew install boost
pip install numpy==1.13.1
pip install lace

Linux:

apt-get install -y --no-install-recommends libsuitesparse-dev libboost-dev
pip install numpy==1.13.1
pip install lace

Docker:

docker build .

Install the library

pip install metabolace

And import it just like the upstream library:

from lace.mesh import Mesh

Development

pip install -r requirements_dev.txt
pip install -e .
rake test
rake lint

Contribute

Pull requests welcome!

Support

If you are having issues, please let us know.

Acknowledgements

This library was refactored from legacy code at Body Labs by Alex Weiss, with portions by Eric Rachlin, Paul Melnikow, Victor Alvarez, and others. It was extracted from the Body Labs codebase and open-sourced by Guillaume Marceau.

License

The project is licensed under the two-clause BSD license.

This project uses the RPly library to read and write PLY files, by Diego Nehab, IMPA, distributed under the MIT License.

lace's People

Contributors

paulmelnikow avatar algrs avatar dependabot[bot] avatar gmarceau avatar lillekemiker avatar btparker avatar classner avatar

Watchers

James Cloos avatar  avatar

lace's Issues

Topology tests failing with TypeError: 'numpy.float64' object cannot be interpreted as an index

Three topology tests are failing in master:

======================================================================
ERROR: test_faces_per_edge (lace.test_topology.TestTopologyMixin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/lace/test_topology.py", line 278, in test_faces_per_edge
    self.assertEqual(len(cube.faces_per_edge), len(self.edges_the_hard_way(cube.f)))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 463, in faces_per_edge
    f2v = sp.csc_matrix((data, (IS, JS)), shape=(len(self.f), np.max(self.f.ravel())+1))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/compressed.py", line 51, in __init__
    other = self.__class__(coo_matrix(arg1, shape=shape))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/coo.py", line 154, in __init__
    self._shape = check_shape((M, N))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in check_shape
    new_shape = tuple(operator.index(arg) for arg in args)
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in <genexpr>
    new_shape = tuple(operator.index(arg) for arg in args)
TypeError: 'numpy.float64' object cannot be interpreted as an index

======================================================================
ERROR: test_vertices_per_edge (lace.test_topology.TestTopologyMixin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/lace/test_topology.py", line 295, in test_vertices_per_edge
    self.assertEqual(len(cube.vertices_per_edge), len(self.edges_the_hard_way(cube.f)))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 476, in vertices_per_edge
    return np.asarray([vertices_in_common(e[0], e[1]) for e in self.f[self.faces_per_edge]])
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 463, in faces_per_edge
    f2v = sp.csc_matrix((data, (IS, JS)), shape=(len(self.f), np.max(self.f.ravel())+1))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/compressed.py", line 51, in __init__
    other = self.__class__(coo_matrix(arg1, shape=shape))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/coo.py", line 154, in __init__
    self._shape = check_shape((M, N))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in check_shape
    new_shape = tuple(operator.index(arg) for arg in args)
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in <genexpr>
    new_shape = tuple(operator.index(arg) for arg in args)
TypeError: 'numpy.float64' object cannot be interpreted as an index

======================================================================
ERROR: test_vertices_to_edges_matrix (lace.test_topology.TestTopologyMixin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/lace/test_topology.py", line 308, in test_vertices_to_edges_matrix
    calculated_edges = cube.vertices_to_edges_matrix.dot(cube.v.ravel()).reshape((-1, 3))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 507, in vertices_to_edges_matrix
    return self.get_vertices_to_edges_matrix(want_xyz=True)
  File "/home/circleci/repo/lace/topology.py", line 490, in get_vertices_to_edges_matrix
    vpe = np.asarray(self.vertices_per_edge, dtype=np.int32)
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 476, in vertices_per_edge
    return np.asarray([vertices_in_common(e[0], e[1]) for e in self.f[self.faces_per_edge]])
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/circleci/repo/lace/topology.py", line 463, in faces_per_edge
    f2v = sp.csc_matrix((data, (IS, JS)), shape=(len(self.f), np.max(self.f.ravel())+1))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/compressed.py", line 51, in __init__
    other = self.__class__(coo_matrix(arg1, shape=shape))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/coo.py", line 154, in __init__
    self._shape = check_shape((M, N))
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in check_shape
    new_shape = tuple(operator.index(arg) for arg in args)
  File "/home/circleci/repo/venv/lib/python2.7/site-packages/scipy/sparse/sputils.py", line 281, in <genexpr>
    new_shape = tuple(operator.index(arg) for arg in args)
TypeError: 'numpy.float64' object cannot be interpreted as an index

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.