Comments (7)
CSG usually refers to a rendering trick that makes Boolean operations look right, but doesn't actually compute them.
I was refering to actually intersecting the meshes and calculating the mesh result live in the browser. Similar to what we did with Clara.io back in 2013 here - and this isn't a rendering trick, try it in the editor, it is live Boolean mesh result (and completely unreliable on complex meshes):
https://clara.io/view/86e0579a-4dc8-4145-81a8-6ad9f765b30b
from manifold.
Ah, I understand. CSG often refers to building from primitive shapes using Boolean operations. I guess I've seen CSG misused so many times (e.g. https://evanw.github.io/csg.js ) then I've conflated it with Boolean operations and continued the confusion.
I am interested in Boolean operations only. I've edited the title.
from manifold.
@manthrax Here here! And agreed that CSG and so many other terms in the CAD space tend to be overloaded and confusing. In any case, it sounds like this library is well-aligned with your desires. Of course it isn't JS, but there are a variety of ways we could look at making it web-accessible (WASM, REST API, ...).
from manifold.
CSG usually refers to a rendering trick that makes Boolean operations look right, but doesn't actually compute them. For graphics that is often much simpler. This library is for actually intersecting meshes, so more in the realm of a design tool than a rendering tool.
from manifold.
imo Constructive solid geometry/CSG is a fine term for geometric boolean operations or for the visual only version. They are not mutually exclusive.
There are already a number of visual/stencil buffer tricks available for rendering only. i.e. Goldfeather and ZBuffer. but they rely on having a well structured graph of operations that isn't always trivial to construct/implement.
Here's a demo of a CSG lib I maintain that is based on evanw's CSG but extended to preserve uvs/normals/colors and materials:
https://manthrax.github.io/THREE-CSGMesh/demos/CSGShinyDemo.html
(you can hit W to see wireframe.. and show that it's actual geometry and not a stencil effect.)
What would be lovely to find is something that can do this but faster! and for more complex objects! :)
Right now it's N squared with the number of polygons involved since there is no search acceleration/culling strategy.
Having something more optimal could unlock a whole host of runtime web procedural generation tools!
from manifold.
@elalish is this considered finished? Or do we want to extend the three.js example?
from manifold.
I definitely want more, but agreed that we now have a simple three.js booleans example: https://elalish.github.io/manifold/bindings/wasm/examples/index.html
from manifold.
Related Issues (20)
- Is Manifold CAD opensource? HOT 2
- #528 causes invalid `UpdateVert` calls HOT 31
- Refactor triangulator HOT 2
- triangulator bugs related to #528
- vertProperties behavior HOT 3
- refactor SparseIndices to use HashTable HOT 1
- allow double precision HOT 14
- Python Interface Vertex and Face Types HOT 5
- Volume calculation is not deterministic HOT 12
- Testing booleans of meshes HOT 2
- Emscripten build HOT 10
- Lost faces when creating manifold HOT 22
- Subtraction creates overlapping triangles HOT 6
- extrude twist can cause invalid geometry HOT 5
- XCode 15 Link problem with <memory_resource> HOT 6
- How could I create a manifold object for a simple rectangle? HOT 4
- non-manifold mesh repair HOT 1
- refine to length HOT 6
- Support for OS X 10.13? HOT 4
- Wrong vertex normals and uvs after boolean subtraction HOT 7
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 manifold.