csg.js | Constructive solid geometry on meshes using BSP trees | Graphics library
kandi X-RAY | csg.js Summary
kandi X-RAY | csg.js Summary
Constructive Solid Geometry (CSG) is a modeling technique that uses Boolean operations like union and intersection to combine 3D solids. This library implements CSG operations on meshes elegantly and concisely using BSP trees, and is meant to serve as an easily understandable implementation of the algorithm. All edge cases involving overlapping coplanar polygons in both solids are correctly handled.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of csg.js
csg.js Key Features
csg.js Examples and Code Snippets
Community Discussions
Trending Discussions on csg.js
QUESTION
I wish you all a happy new year.
I've only been working with Javascript for 2-3 months and I'm still a beginner.
I want to work with THREE.js
and especially with CSG, so that I can subtract two obj models from each other using boolean operations.
For this purpose I import the respective local files in a central JavaScript file, so that I can work with them in it.
With THREE.js
, OBJLoader2
, etc. I have solved it that way:
ANSWER
Answered 2020-Jan-03 at 04:57Use my csg library :) Its more robust than the existing csg library.
QUESTION
I'm experimenting with the ThreeCSG library and am attempting to swap out the sphere or normal geometry for a custom made Shape, in this case the heart shape from the 3js examples.
Unfortunately I'm getting an odd result on the side that faces the camera. Here's a code sample:
...ANSWER
Answered 2018-Jun-01 at 11:32ThreeCSG cannot subtract a concave mesh correctly. But there is a workaround, since both halves of a heart or convex.
You can subtract the right half of the heart from a cuboid:
QUESTION
I'm using THREE.Plane to clip my STL model.
...ANSWER
Answered 2017-Jun-08 at 16:57Edit: Follow WestLangley's advice. I'll leave this her as an alternate though less efficient means of performing the clipping.
Clipping planes are infinite. There's no getting around that. So what can you do? Multiple clipping planes in multiple render passes!
To do this, you'll need to turn off auto-clearing, and do your own manual buffer clearing.
QUESTION
I'm trying to engrave some text on a surface using Three.js. I've achieved it using csg.js and ThreeCSG and it works perfect, the result is really good but the problem is it takes a lot of time. On my PC it takes about 30 seconds to engrave the word Hello
.
Searching for other solution I found this site. They make custom jewelry and you can engrave text on it and the time it takes to engrave the text is really short! So I assume they are not using csg.js. What other technique can be used to achieve this result?
I though about using bump maps, I should generate a bump map for each letter but I don't know if that's the correct approach.
...ANSWER
Answered 2017-Mar-11 at 00:42I can see by looking at the shaders that the site your linked to uses bump maps.
I don't think you would create a bump map for each letter, you would just do all the drawing (text) on a single canvas and apply that as a bump map.
Click on "Run Code Snippet" below for a demo of canvas bump maps (click and drag in the white box).
I hope this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install csg.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page