ThreeCSG | A THREE | Service Mesh library
kandi X-RAY | ThreeCSG Summary
kandi X-RAY | ThreeCSG Summary
A THREE.js plugin to allow implementing boolean operations on THREE Objects(Mesh, Geometry). The boolean operations are supported by csg.js. For an overview of the CSG process, see the orginal csg.js code.
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 ThreeCSG
ThreeCSG Key Features
ThreeCSG Examples and Code Snippets
Community Discussions
Trending Discussions on ThreeCSG
QUESTION
I am using THREE and I am trying to intersect a box mesh with a custom geometry I am creating and converting it to geometry using :
...ANSWER
Answered 2020-Nov-25 at 17:33I suggest you set bevelEnabled:false to your mesh extrusion, because I am psychic and I can see your code in my head. :D
QUESTION
I am using EdgesGeometry to show the outer edges of the mesh as so : EdgesGeometry( geometry, thresholdAngle ).
This normally works as expected but after a using threeCSG to either 'subtract' or 'union' and then generating the EdgesGeometry on the resulting mesh I get various stray edges appear on coplanar faces, even if I increase the 'thresholdAngle' to say '180 degrees', they remain.
Here's my code: (a & b are the meshes of the box geometry)
...ANSWER
Answered 2017-Aug-31 at 16:55You are seeing unexpected "edges" when rendering with EdgesGeometry
.
The cause is an artifact of the output of threeCSG
.
The long edge of the large triangle is coincident with edges of three smaller triangles -- coincident, but not shared.
That means, the long edge is not shared at all. Nor are the three short edges.
Edges that are not shared are rendered by EdgesGeometry.
three.js r.87
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
Following the example here:
http://learningthreejs.com/blog/2011/12/10/constructive-solid-geometry-with-csg-js/
And using Three.js with https://github.com/chandlerprall/ThreeCSG, I'm trying to do 3D boolean operations on nodes from the model. Like for example if I have a wall with a window, I want to do invert()
on that to get just the window.
I have a function that returns all the vertices of the polygons of a node, here's an example of vertices of an object without holes https://pastebin.com/8dhYzPwE.
I'm using ThreeCSG like this:
...ANSWER
Answered 2017-Jun-07 at 14:15I just worked on a demo using THREE csg: the Viewer meshes have an indexed array of vertices so you cannot create a BSP directly out of it. Also my code is using a web worker to process the meshes in order to keep the UI responsive with large models, so I need first to send the mesh data to the worker and reconstruct a simple THREE.Mesh on the worker side, the code looks like below:
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.
QUESTION
I've taken a look at the Clipping examples in the Threejs site, and the ThreeCSG operations, but I am not able to find an example that has "both".
To be more specific, I require a PlaneGeometry of PlaneBufferGeometry that applies a CSG operation as smooth as a Clipping, but this PlaneGeometry could be moving, changing its position and orientation.
As an example, a Sphere and a Plane are on the scene, the Plane starts facing in Z and is spinning in Y, cutting one side of the sphere at all times, but the plane could be a box or any other object.
Is it possible?
...ANSWER
Answered 2017-Feb-01 at 12:29Lets take a look at two seperate problems.
For Plane Clipping things are pretty easy to do.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ThreeCSG
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