# \#csg

**URL:** https://discourse.threejs.org/tag/csg/66.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Soda Vending Machines](https://discourse.threejs.org/t/soda-vending-machines/93720)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 3\
**Last updated:** [August 25, 2026, 5:14am UTC](https://discourse.threejs.org/t/soda-vending-machines/93720 "2026-08-25T05:14:21Z")

</div>

Hi community! A bunch of instanced vending machines with (sort of) soda :sweat\_smile: Picture: Demo: Sketch

---

## [Lunar: Browser-based geometry processing. AI-controllable via MCP. ](https://discourse.threejs.org/t/lunar-browser-based-geometry-processing-ai-controllable-via-mcp/91155)

<div class="topic-metadata">

**Author:** [@ZigaSajovic](https://discourse.threejs.org/u/ZigaSajovic)\
**Replies:** 0\
**Last updated:** [April 21, 2026, 6:58pm UTC](https://discourse.threejs.org/t/lunar-browser-based-geometry-processing-ai-controllable-via-mcp/91155 "2026-04-21T18:58:06Z")

</div>

We shared trueform here a while ago — the WASM geometry engine. Since then we’ve been building Lunar on top of it: a full geometry workbench that runs entirely in the browser, using ThreeJS. What’s new: AI agents ope…

---

## [Trueform 0.7: WASM NDArrays with vectorized geometric queries. From collisions, to mesh booleans](https://discourse.threejs.org/t/trueform-0-7-wasm-ndarrays-with-vectorized-geometric-queries-from-collisions-to-mesh-booleans/90088)

<div class="topic-metadata">

**Author:** [@ZigaSajovic](https://discourse.threejs.org/u/ZigaSajovic)\
**Replies:** 0\
**Last updated:** [February 28, 2026, 4:14pm UTC](https://discourse.threejs.org/t/trueform-0-7-wasm-ndarrays-with-vectorized-geometric-queries-from-collisions-to-mesh-booleans/90088 "2026-02-28T16:14:59Z")

</div>

We have released the TS/JS SDK we announced a while back. Built on WASM bindings for the C++ library we use in production to build real time 3D applications. npm install @polydera/trueform Easier to show than explain. …

---

## [Three.js + trueform: Real-time mesh booleans, registration, slicer, and more](https://discourse.threejs.org/t/three-js-trueform-real-time-mesh-booleans-registration-slicer-and-more/89686)

<div class="topic-metadata">

**Author:** [@ZigaSajovic](https://discourse.threejs.org/u/ZigaSajovic)\
**Replies:** 4\
**Last updated:** [February 8, 2026, 12:24pm UTC](https://discourse.threejs.org/t/three-js-trueform-real-time-mesh-booleans-registration-slicer-and-more/89686 "2026-02-08T12:24:55Z")

</div>

We are building idiomatic TypeScript bindings for trueform, a production-tested C++ geometry processing library, to bring real-time CSG and mesh processing to Three.js users as a proper npm package. As a proof of concep…

---

## [Is the result of ExtrudeGeometry always Manifold? ~ Given necessary properties for being so](https://discourse.threejs.org/t/is-the-result-of-extrudegeometry-always-manifold-given-necessary-properties-for-being-so/88717)

<div class="topic-metadata">

**Author:** [@PratikHadawale-tech](https://discourse.threejs.org/u/PratikHadawale-tech)\
**Replies:** 3\
**Last updated:** [December 18, 2025, 11:37am UTC](https://discourse.threejs.org/t/is-the-result-of-extrudegeometry-always-manifold-given-necessary-properties-for-being-so/88717 "2025-12-18T11:37:07Z")

</div>

Assume we have a 2D Shape with the following properties: Non Overlapping edges No duplicate points in shape Non Overlapping Holes with other holes / boundary May or May not have co-linear points Note: Unsure about the…

---

## [CSG operations without using libraries](https://discourse.threejs.org/t/csg-operations-without-using-libraries/87309)

<div class="topic-metadata">

**Author:** [@localmix](https://discourse.threejs.org/u/localmix)\
**Replies:** 5\
**Last updated:** [October 4, 2025, 6:06pm UTC](https://discourse.threejs.org/t/csg-operations-without-using-libraries/87309 "2025-10-04T18:06:56Z")

</div>

Is there any way to mimic boolean operations (intersection,subtraction..) in three js without using libraries? the problem is poor performance of those libraries (e.g. three-bvh-csg) in real time use cases with complex m…

---

## [Why does my extruded cube create triangles instead of clean square faces in Three.js or 3D modeling?](https://discourse.threejs.org/t/why-does-my-extruded-cube-create-triangles-instead-of-clean-square-faces-in-three-js-or-3d-modeling/83562)

<div class="topic-metadata">

**Author:** [@harsh\_98765](https://discourse.threejs.org/u/harsh_98765)\
**Replies:** 4\
**Last updated:** [June 5, 2025, 7:30pm UTC](https://discourse.threejs.org/t/why-does-my-extruded-cube-create-triangles-instead-of-clean-square-faces-in-three-js-or-3d-modeling/83562 "2025-06-05T19:30:51Z")

</div>

I’m trying to create an L-shaped 3D structure made by combining or extruding cube segments. In the first image, the geometry appears correct—each face is a clean square and there are no unnecessary diagonal edges: …

---

## [Stones of fun \[CSG\]](https://discourse.threejs.org/t/stones-of-fun-csg/83022)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [May 23, 2025, 3:39pm UTC](https://discourse.threejs.org/t/stones-of-fun-csg/83022 "2025-05-23T15:39:23Z")

</div>

Hi community! An attempt to generate stones, using three-bvh-csg: Demo: https://codepen.io/prisoner849/pen/GggVzMN

---

## [Creating a simple CSG code for steel shapes](https://discourse.threejs.org/t/creating-a-simple-csg-code-for-steel-shapes/73080)

<div class="topic-metadata">

**Author:** [@liljojomc](https://discourse.threejs.org/u/liljojomc)\
**Replies:** 4\
**Last updated:** [May 4, 2025, 10:09pm UTC](https://discourse.threejs.org/t/creating-a-simple-csg-code-for-steel-shapes/73080 "2025-05-04T22:09:03Z")

</div>

Recently, I commented on a post regarding constructive solid geometry (CSG) but I guess it was in the wrong category of topics. I’ve developed a basic library of steel shapes and written a code that can extrude these sha…

---

## [EdgeGeometry Issue after CSG Union operations](https://discourse.threejs.org/t/edgegeometry-issue-after-csg-union-operations/79897)

<div class="topic-metadata">

**Author:** [@jaxx\_sparrow](https://discourse.threejs.org/u/jaxx_sparrow)\
**Replies:** 6\
**Last updated:** [March 25, 2025, 3:02am UTC](https://discourse.threejs.org/t/edgegeometry-issue-after-csg-union-operations/79897 "2025-03-25T03:02:04Z")

</div>

Issue I am using three-csg (import CSG from '../../csg/three-csg') to perform Boolean unions on multiple meshes (created by extrude geometries). However, when I generate edges using THREE.EdgesGeometry, the final mesh s…

---

## [Unwanted edge in CSG result](https://discourse.threejs.org/t/unwanted-edge-in-csg-result/79184)

<div class="topic-metadata">

**Author:** [@yesbird](https://discourse.threejs.org/u/yesbird)\
**Replies:** 2\
**Last updated:** [March 8, 2025, 1:13am UTC](https://discourse.threejs.org/t/unwanted-edge-in-csg-result/79184 "2025-03-08T01:13:22Z")

</div>

I am trying to apply wireframe on result of CSG subtract operation, library is THREE-CSGMesh by @manthrax (btw, many thanks for this port). Doing it this way I am getting strange artifact (please see attached image). …

---

## [Very small gaps after csg operation between faces of the meshes](https://discourse.threejs.org/t/very-small-gaps-after-csg-operation-between-faces-of-the-meshes/77621)

<div class="topic-metadata">

**Author:** [@Kaustubh\_Jha](https://discourse.threejs.org/u/Kaustubh_Jha)\
**Replies:** 16\
**Last updated:** [February 7, 2025, 4:10pm UTC](https://discourse.threejs.org/t/very-small-gaps-after-csg-operation-between-faces-of-the-meshes/77621 "2025-02-07T16:10:07Z")

</div>

this.uiManager.uploadedBrushes = this.uiManager.uploadedBrushes.map((brush, index) =\> { if (!doesIntersect(brush)) return brush; const originalState = originalStates\[index\]; const…

---

## [Three-bvh-csg issue with r148](https://discourse.threejs.org/t/three-bvh-csg-issue-with-r148/46622)

<div class="topic-metadata">

**Author:** [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Replies:** 16\
**Last updated:** [February 6, 2025, 6:31am UTC](https://discourse.threejs.org/t/three-bvh-csg-issue-with-r148/46622 "2025-02-06T06:31:33Z")

</div>

Hey, i know this is not directly a three.js question as it is mostly related to the three-bvh-csg library by @gkjohnson , i seem to have found a slight bug once updating from r147 to r148 and not entirely sure why as th…

---

## [Three-bvh-csg with web worker](https://discourse.threejs.org/t/three-bvh-csg-with-web-worker/75610)

<div class="topic-metadata">

**Author:** [@Cien267](https://discourse.threejs.org/u/Cien267)\
**Replies:** 3\
**Last updated:** [December 24, 2024, 8:31pm UTC](https://discourse.threejs.org/t/three-bvh-csg-with-web-worker/75610 "2024-12-24T20:31:03Z")

</div>

Hello everyone, I am using three-bvh-csg library, but due to the complexity of the objects, the subtraction operation takes a very long time. While it is processing, my website becomes unresponsive, and I can’t even dis…

---

## [CSG subtraction from mesh](https://discourse.threejs.org/t/csg-subtraction-from-mesh/73088)

<div class="topic-metadata">

**Author:** [@davidigandan](https://discourse.threejs.org/u/davidigandan)\
**Replies:** 2\
**Last updated:** [October 30, 2024, 12:38pm UTC](https://discourse.threejs.org/t/csg-subtraction-from-mesh/73088 "2024-10-30T12:38:34Z")

</div>

Aim: I’m trying to use CSG to make the angled red box in my picture act as a mask on the blue cylinder. However, the resultant shape (pink cylinder) should look like a cylinder sliced diagonally in half. However, as you …

---

## [Issues with CSG Subtraction: Rectangular vs. L-Shaped Floor Plans](https://discourse.threejs.org/t/issues-with-csg-subtraction-rectangular-vs-l-shaped-floor-plans/73374)

<div class="topic-metadata">

**Author:** [@liljojomc](https://discourse.threejs.org/u/liljojomc)\
**Replies:** 5\
**Last updated:** [October 29, 2024, 3:12am UTC](https://discourse.threejs.org/t/issues-with-csg-subtraction-rectangular-vs-l-shaped-floor-plans/73374 "2024-10-29T03:12:11Z")

</div>

I have developed a code that generates outlines for both rectangular and L-shaped floor plans. However, when attempting to apply openings, a noticeable discrepancy arises between the two shapes in terms of the applied Co…

---

## [How to boolean a complex mesh](https://discourse.threejs.org/t/how-to-boolean-a-complex-mesh/73227)

<div class="topic-metadata">

**Author:** [@Dieter\_Banaag](https://discourse.threejs.org/u/Dieter_Banaag)\
**Replies:** 2\
**Last updated:** [October 25, 2024, 7:57am UTC](https://discourse.threejs.org/t/how-to-boolean-a-complex-mesh/73227 "2024-10-25T07:57:36Z")

</div>

So i have this mesh, the top sides have a peak. What im wondering is I want to remove the holes in the wall, while keeping its shape. Is there any way to do this? I want it to that is still has its outer shape, but …

---

## [Three-bvh-csg: A library for performing fast CSG operations!](https://discourse.threejs.org/t/three-bvh-csg-a-library-for-performing-fast-csg-operations/42713)

<div class="topic-metadata">

**Author:** [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)\
**Replies:** 42\
**Last updated:** [October 22, 2024, 11:01am UTC](https://discourse.threejs.org/t/three-bvh-csg-a-library-for-performing-fast-csg-operations/42713 "2024-10-22T11:01:06Z")

</div>

Hello! I want to share the three-bvh-csg project - a library designed to support fast, arbitrary boolean construction-solid-geometry operations between arbitrary geometries! The project uses three-mesh-bvh to quickly per…

---

## [How to remove the mesh outside of the second mesh](https://discourse.threejs.org/t/how-to-remove-the-mesh-outside-of-the-second-mesh/72889)

<div class="topic-metadata">

**Author:** [@Mohamed\_Ali\_Mani](https://discourse.threejs.org/u/Mohamed_Ali_Mani)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 5:55pm UTC](https://discourse.threejs.org/t/how-to-remove-the-mesh-outside-of-the-second-mesh/72889 "2024-10-16T17:55:32Z")

</div>

in the following scene, I’m loading a gltf model of an eyeglass rim and I have added a glass cylinder using cylinder geometry. my objectify is to create the lense for the rim. how do I remove the part of the lens mes…

---

## [GLTF files subtraction](https://discourse.threejs.org/t/gltf-files-subtraction/72425)

<div class="topic-metadata">

**Author:** [@Cien267](https://discourse.threejs.org/u/Cien267)\
**Replies:** 3\
**Last updated:** [October 5, 2024, 7:02am UTC](https://discourse.threejs.org/t/gltf-files-subtraction/72425 "2024-10-05T07:02:27Z")

</div>

I have a pattern in SVG format and a model imported from a GLTF file. I want to carve the model using the shape of the SVG pattern, creating a perforated cut. I tried using ExtrudeGeometry to create a 3D model from t…

---

## [Looking for z-buffer CSG rendering library](https://discourse.threejs.org/t/looking-for-z-buffer-csg-rendering-library/72136)

<div class="topic-metadata">

**Author:** [@xyz](https://discourse.threejs.org/u/xyz)\
**Replies:** 3\
**Last updated:** [October 1, 2024, 12:04am UTC](https://discourse.threejs.org/t/looking-for-z-buffer-csg-rendering-library/72136 "2024-10-01T00:04:05Z")

</div>

Hi, I have been trying out different CSG libraries like Manthrax, SB, and Manifold for a few days and want to explore z-buffer rendering algorithms like Goldfeather or SCS. Are there any CSG libraries that implement a z…

---

## [How import "three-bvh-csg" in my project](https://discourse.threejs.org/t/how-import-three-bvh-csg-in-my-project/52869)

<div class="topic-metadata">

**Author:** [@winnip\_fr](https://discourse.threejs.org/u/winnip_fr)\
**Replies:** 10\
**Last updated:** [August 30, 2023, 5:51pm UTC](https://discourse.threejs.org/t/how-import-three-bvh-csg-in-my-project/52869 "2023-08-30T17:51:34Z")

</div>

Hi, The question is not directly related to threejs but, I was told that three-bvh-csg will enable me to do what I want with my project, find and create the geometry of the intersection of 3D objects displayed in my 3D…

---

## [Color array changes after applying CSG](https://discourse.threejs.org/t/color-array-changes-after-applying-csg/70389)

<div class="topic-metadata">

**Author:** [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)\
**Replies:** 4\
**Last updated:** [September 10, 2024, 12:26pm UTC](https://discourse.threejs.org/t/color-array-changes-after-applying-csg/70389 "2024-09-10T12:26:34Z")

</div>

I am applying csg using three-bvh-csg on a .glb model, the issue is that the .glb model has colors on it and I want to keep the colors even after the csg has been applied. Here is the code responsible for applying the c…

---

## [Converting a mesh with morph with a morph target to a CSG mesh](https://discourse.threejs.org/t/converting-a-mesh-with-morph-with-a-morph-target-to-a-csg-mesh/62501)

<div class="topic-metadata">

**Author:** [@Mostafa\_Salloum](https://discourse.threejs.org/u/Mostafa_Salloum)\
**Replies:** 3\
**Last updated:** [March 10, 2024, 3:21pm UTC](https://discourse.threejs.org/t/converting-a-mesh-with-morph-with-a-morph-target-to-a-csg-mesh/62501 "2024-03-10T15:21:11Z")

</div>

Hello, I have a 3d file with morph on one of its children in order to control its length. After making it longer using the morph, I need to perform a mesh subtraction on it using the CSG library. When I convert the mo…

---

## [Csg operation does not work for mergeBufferGeometries](https://discourse.threejs.org/t/csg-operation-does-not-work-for-mergebuffergeometries/65674)

<div class="topic-metadata">

**Author:** [@jaxx\_sparrow](https://discourse.threejs.org/u/jaxx_sparrow)\
**Replies:** 0\
**Last updated:** [May 17, 2024, 10:05am UTC](https://discourse.threejs.org/t/csg-operation-does-not-work-for-mergebuffergeometries/65674 "2024-05-17T10:05:56Z")

</div>

Hi everyone, I’m working on a project involving CSG (Constructive Solid Geometry) operations in three.js. I have a function that takes a mesh and a series of machining operations, then returns the resulting mesh after p…

---

## [How to create bufferGeometries so that it works with CSG?](https://discourse.threejs.org/t/how-to-create-buffergeometries-so-that-it-works-with-csg/63120)

<div class="topic-metadata">

**Author:** [@brunoat2](https://discourse.threejs.org/u/brunoat2)\
**Replies:** 3\
**Last updated:** [March 22, 2024, 8:01pm UTC](https://discourse.threejs.org/t/how-to-create-buffergeometries-so-that-it-works-with-csg/63120 "2024-03-22T20:01:56Z")

</div>

I have asked a very similar question recently but that specific issue got solved so I decided it would be more organized to start another thread. And because realized I have no idea how to use bufferGeometry, this is a m…

---

## [BufferGeometry and Three-bvh-csg not working together](https://discourse.threejs.org/t/buffergeometry-and-three-bvh-csg-not-working-together/63046)

<div class="topic-metadata">

**Author:** [@brunoat2](https://discourse.threejs.org/u/brunoat2)\
**Replies:** 3\
**Last updated:** [March 21, 2024, 6:01pm UTC](https://discourse.threejs.org/t/buffergeometry-and-three-bvh-csg-not-working-together/63046 "2024-03-21T18:01:48Z")

</div>

So I have a list of points in a 3D space, and I have a list triangles that show how each of them connect. I input both of these into BufferGeometry as attributes and it displays the shape just fine. In three.js it looks …

---

## [Looking for Updated plug-in for CSG](https://discourse.threejs.org/t/looking-for-updated-plug-in-for-csg/6785)

<div class="topic-metadata">

**Author:** [@3DFish](https://discourse.threejs.org/u/3DFish)\
**Replies:** 36\
**Last updated:** [March 19, 2024, 4:36am UTC](https://discourse.threejs.org/t/looking-for-updated-plug-in-for-csg/6785 "2024-03-19T04:36:59Z")

</div>

We have a project that is using Chandler Prall’s CSG Plug-in ( https://github.com/chandlerprall/ThreeCSG ) however, this plug-in has not been updated in years. We would like to update all of our code to use BufferGeomet…

---

## [What's the difference between three-bvh-csg and .mergeGeometries](https://discourse.threejs.org/t/whats-the-difference-between-three-bvh-csg-and-mergegeometries/62769)

<div class="topic-metadata">

**Author:** [@dwang3142](https://discourse.threejs.org/u/dwang3142)\
**Replies:** 1\
**Last updated:** [March 14, 2024, 8:53am UTC](https://discourse.threejs.org/t/whats-the-difference-between-three-bvh-csg-and-mergegeometries/62769 "2024-03-14T08:53:33Z")

</div>

I tried uisng three-bvh-csg to combine two models but was running into edge cases for various models making it more complicated. What is the difference between adding in the three-bvh-csg library and merge geometry in th…

---

## [Why am I unable to subtract from a bone model of an stl?](https://discourse.threejs.org/t/why-am-i-unable-to-subtract-from-a-bone-model-of-an-stl/62497)

<div class="topic-metadata">

**Author:** [@leo2](https://discourse.threejs.org/u/leo2)\
**Replies:** 11\
**Last updated:** [March 11, 2024, 1:17pm UTC](https://discourse.threejs.org/t/why-am-i-unable-to-subtract-from-a-bone-model-of-an-stl/62497 "2024-03-11T13:17:35Z")

</div>

I have an stl of a bone that I am trying to cut with a sphere using react-three-csg as shown below. The image is what i see with showOperations=true. But without that, all i get is a blank screen. I have tried it with a …

[Next page](https://discourse.threejs.org/tag/csg/66.md?match_all_tags=true&page=1&tags%5B%5D=csg)
