Giter Site home page Giter Site logo

Support for hull, etc? about hob3l HOT 4 CLOSED

moehriegitt avatar moehriegitt commented on August 27, 2024
Support for hull, etc?

from hob3l.

Comments (4)

moehriegitt avatar moehriegitt commented on August 27, 2024

Some operations are inherently 3D, so they cannot be faked with 2D operations. I do not plan to support those operations, because the point about this project is faking using 2D operations in order to avoid those complex 3D operations. Hob3l is fast only because of that.

Unfortunately, 'hull' is among those operations. Other operations I will not implement are: 'minkowsky' and 'projection(cut=false)'. I am currently adding 'projection(cut=true)', but with 'cut=false', it is, again, a full-fletched 3D operation that cannot be faked by using 2D.

OpenSCAD is exactly right when you need 'hull' -- it is not OpenSCAD's fault that it is slow, but it is inherently the required 3D math that is way more complex than 2D.

from hob3l.

moehriegitt avatar moehriegitt commented on August 27, 2024

By design, this will not be fixed in Hob3l.

from hob3l.

e-matteson avatar e-matteson commented on August 27, 2024

Ok, thanks!

from hob3l.

hg42 avatar hg42 commented on August 27, 2024

I found this project and was really excited, because it is really awesome.
It also implements something, I thought about a some time ago, but never followed the track.
So, I didn't hesitate and installed hob3l.

Unfortunately, I now got a message, that I cannot use hull....and say 80% of my projects use hull...

For some applications it's the only possible way to implement the algorithm.
Minkowsky is also nice, but I don't use it often, so I'm mainly interested in hull. Though, I know some applications that cannot be done without minkowski.

You said, you don't use hull. I understand you have no interest to invest time for it.

But what about a pull request? Would you reject it?

Hull is not very difficult to add, if we use the well known library quickhull3d.
It takes a simple point cloud.
The result would have to be converted into a csg3 object to be used by hob3l.
I currently don't know the format of csg3, so I cannot estimate if it's a problem.

I read your reasoning at two places, in the docs and in this thread.
For me it doesn't sound very logical.

If all slowdowns originate from expensive 3D operations, you shouldn't see a speedup by slicing, when you don't use them (as you said somewhere).
So, why is hob3l so much faster for you?

I think, hob3l is much faster even when using some expensive real 3D operations, because you are reducing the number of points to be handled by only looking at a discrete (and low) resolution in Z and because working with slices is reducing the number of combinations of points to be looked at for an operation.
It's the same principle as with image filters. If you can split the filter into unidirectional parts the sequenced computation will be much faster than the combined algorithm.

Hob3l is also faster because some operations like determining if a point is inside or outside must only look at one plane. So many operations benefit from slicing.

From my experience, quickhull3d itself is fast. But the number of points generated e.g. by a hull over spheres with a high resolution slows down all the operations after it. Just because it results in many points. As a counter example look at a hull of eight cubes that build another cube. This will not slow down anything.

You are right, that the hull itself has to be executed in 3D (at least in some way), but all the remaining computations still benefit a lot from slicing.

I admit, I don't fully know how hob3l acts for operations like rotation etc. Does it operate on the sliced objects? If so, isn't this expensive, too?

from hob3l.

Related Issues (10)

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.