Giter Site home page Giter Site logo

meshcut's People

Contributors

harvie avatar hongbo-miao avatar julienr avatar themmes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meshcut's Issues

cross section

I'm using your library for a program I'm making. It works very well except that when I run the cross_section code, the returned arrays seem to build up points of a line. When I connect all these points some appear to because I'm not sure where to connect the start and in points of each array.

Here I have a teapot.stl and here is the result I got out by "connecting the dots" if you will.

dots

connected dots

So I have no idea where to connect the start and end points. Is there something I'm missing?

This is the STL I'm using

Returning both halves of the mesh

Is it possible for meshcut to return the both halves as closed manifolds? Or would I have to adapt the code? If so, could you point me in the right direction of where to start?

Thanks in advance!

Decrease number of dependencies needed to parse STL files

When i want to slice PLY i use examples.ply, but for STL there's quite large number of dependencies. This means that meshcut will drag these dependecies to any project which will use it. Maybe we can write some minimalistic STL processor to do the same job.

numpy MemoryError

We've run into this issue: vlachoudis/bCNC#1223
When slicing following mesh: fairy-of-the-forest20180624-11119-wpj9bg.zip

  File "/usr/local/lib/python2.7/dist-packages/bCNC/plugins/slicemesh.py", line 96, in execute
    verts, faces = self.loadMesh(file)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/plugins/slicemesh.py", line 149, in loadMesh
    verts, faces = self.load_stl(file)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/plugins/slicemesh.py", line 289, in load_stl
    verts, faces = self.merge_close_vertices(verts, faces)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/plugins/slicemesh.py", line 244, in merge_close_vertices
    D = spdist.cdist(verts, verts)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/distance.py", line 2710, in cdist
    dm = np.empty((mA, mB), dtype=np.double)
MemoryError

Missing line segment after slicing non-manifold mesh

Hi!

Thanks for a great library.

In examples/1_stl_sphere_cut.py, with the settings

example_fname = os.path.join('data', 'temp.stl')
plane_orig = (387.224, 232.544, 6.287)
plane_norm = (0, 1, 0)

I have attached the temp.stl file, see below.

I get two lines from the slicing but I expect a single continuous line. One piece of the line is missing.
I had a look at the triangle where the missing line is and I can see nothing wrong with it. See this screenshot:

meshcut_error

It seems I might have the same or similar problem as in this issue:
#7

temp.zip

cutting orthogonal to tubes ends up with two non connected polygons

Hi there,
I try to slice a vertical tube along the xy plane. the result is two circular polygones which are not connected. the outer one is considered as complete object and covers the inner one.

I tried to visualize my results with matplotlib:
tube

this is the test object I created using openSCAD.

testtube.stl.txt

If polygones had normals, I could look them up to see what's inside and outside..
To my understanding, if a triangle is connected to the plane, it's normal must be projected onto the plane and should be normalized after..

I currently play around with your code to set the loaded stl.mesh's normals into your mesh object but since I'm completely new to numpy I have hard times recalculating the normals. I currently just ignore z because that's the normal to my plane

Here's the code I used to create that image..

buildspace.py.txt

Wall thickness evaluation

The idea is to get the thickness of the section shown in image. The vertical distance of planer cross-section lines to the next one. Is there a possibility to get it with mesh cut?

00

Make meshcut compatible with Python 3

I just pip installed meshcut and tried to import the module.

Traceback (most recent call last):

  File "/home/tom/portaal/env/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-99-cb3daef93112>", line 1, in <module>
    import meshcut

  File "/home/tom/portaal/env/lib/python3.6/site-packages/meshcut.py", line 228
    print 'Degenerate case (probably non-closed mesh)'
                                                     ^
SyntaxError: invalid syntax

Due to missing parentheses in print statement. Are there many more issues you could think of why meshcut will not run with Python3? Else I try to create a PR.

How to get slice as polygon

Hi! I want to use this to get list of lines representing intersection polygons at given STL/PLY layer height. So i can generate custom g-code based on that. How can i do it? I can't get mayavi working, but i don't even need that. I just need polylines.

Thanks in advance...

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.