Questions tagged [threecsg]

ThreeCSG is a JavaScript wrapper for the csg.js library enabling the use of constructive solid geometry boolean operations with Three.js.

ThreeCSG is a JavaScript wrapper for the csg.js library enabling the use of constructive solid geometry boolean operations with Three.js. Constructive solid geometry allows for the creation of complex objects by combining simpler 3D solids.

35 questions
5
votes
1 answer

ThreeJS : CSG (Wrapper?)

I've been using the standalone ThreeCSG.js (https://github.com/chandlerprall/ThreeCSG) to create different shapes but I'm having errors occur with some shapes I'm trying to create: Maximum call stack exceeded. It seems the repo is not being updated…
Yenza
  • 440
  • 5
  • 19
5
votes
2 answers

CSG operations on bufferGeometry

I am currently using the three.js geometry class for creating a shape and then performing multiple CSG operations on that shape. Thus continuously redrawing the shape. This process of performing multiple csg operations is slow, as I am using…
damitj07
  • 2,689
  • 1
  • 21
  • 40
3
votes
1 answer

3D Boolean operations with Three CSG

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…
shinzou
  • 5,850
  • 10
  • 60
  • 124
3
votes
1 answer

Three.js - Merge multiple geometries/meshes removing common areas

I´m trying to merge two geometries/meshes (red and blue) into a unique one. But after creating a new geometry and applying geometry.merge() I found that all the inner vertices and faces are still there (the green area). I would like to remove all…
spacorum
  • 495
  • 6
  • 16
3
votes
0 answers

How to fix tiny holes in the Mesh after subtract operation with Three.CSG

I have a Box Mesh where I subtract another Box with Three.CSG to create a wall with a window. After doing so, there are tiny holes in the Mesh alongside the cut. They are not visible alle the time, but show up when moving around. How to close these…
Falk Thiele
  • 4,424
  • 2
  • 17
  • 44
2
votes
0 answers

Three.js CSG subtraction sometimes brake mesh

I have strange behaviour that only on some specific angles of my meshes the result is broken. The red meshes are the meshes which cut the cube. Seems only the problem when 2 cutting meshes are near: Sometimes all is right, an when chaing the…
daniel
  • 34,281
  • 39
  • 104
  • 158
2
votes
0 answers

How to improve merging by computing new faces in ThreeJS

I'm learning ThreeJS for 4 months, applying it into a personal project. Yesterday, I achieved building a stronghold using most of ThreeJS geometries and some CSG tricks. The result looks fine, but I like precision and my geometry is kind of a mess…
MrBooks
  • 85
  • 10
2
votes
1 answer

Cross section of STL Object using three.js

I'm trying to take a cross section of a heart model that I loaded using three.js's STLLoader function. I'm currently trying to use the ThreeCSG wrapper for the csg.js library, same as in this stack overflow post. Here's my code for the csg…
2
votes
1 answer

'Uncaught ThreeBSP: Given geometry is unsupported'

preface: I'm using Three-CSG to try and merge geometries in Three.js. I'm getting thrown an error Uncaught ThreeBSP: Given geometry is unsupported when passing in an instance of THREE.Mesh into the library's ThreeBSP method. Any ideas why i'm…
2
votes
0 answers

How to create hollow geometries with holes in Three.js (without CSG.js?)

I'd like to create a hollow box with some holes in Three.js. Currently I managed to create a hollow box by creating a regular geometry and pushing triangles by hand (I created the inner box and than the outer box and merged the two together). What I…
OzTamir
  • 131
  • 8
2
votes
1 answer

Unexpected mesh results from ThreeCSG boolean operation

I am creating a scene & have used a boolean function to cut out holes in my wall. However the lighting reveals that the resultant shapes have messed up faces. I want the surface to look like one solid piece, rather than fragmented and displaying…
Lozza
  • 75
  • 5
2
votes
1 answer

Cross-sections of OBJ in three.js using ThreeCSG

I'm trying to make cross-sections of an OBJ loaded with the three.js OBJ loader using the threeCSG wrapper for the JavaScript constructive solid geometry library. When I use a regular mesh (like a sphere/cube), the intersection csg operation works…
Luigi
  • 4,129
  • 6
  • 37
  • 57
1
vote
1 answer

Three.js - Why is csg.js not working for boolean operations?

I'm new to both three.js and csg.js. I've created a basic scene like this: // Create scene const scene = new THREE.Scene(); // Create perspective camera - FOV, aspect ratio, near + far clipping plane const camera = new THREE.PerspectiveCamera(45,…
Llumineral
  • 11
  • 2
1
vote
1 answer

Threecsg flat sides when expecting volumetric result

The issue: Subtracting a cube from a sphere provides a result where the z axis retains volume, but the y and x axis produce flat disks, as show in the image. I am not sure why the sphere is losing volume on those sides. I am using a typical subtract…
Radio
  • 2,810
  • 1
  • 21
  • 43
1
vote
1 answer

threeJS / threeCSG - stray edges on coplanar faces after threeCSG boolean functions when using EdgesGeometry

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…
treeseal7
  • 739
  • 8
  • 22
1
2 3