Questions tagged [csg]

Constructive Solid Geometry

CSG tag should be assigned to questions about the formation of complex solid geometries from primitive solids like cuboids, cylinders, prisms, pyramids, spheres or cones. Sample questions can be: How to handle the operation sequence in a tree structure? How to cut a cuboid with a sphere? How to apply boolean operations inbetween arbitrary geometries?

78 questions
16
votes
4 answers

Bezier clipping

I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several…
jjrv
  • 4,211
  • 2
  • 40
  • 54
10
votes
1 answer

How to perform Boolean operations in mesh in Unity?

I have Cube model and Cylinder model. I want to make a hole inside Cube by Cylinder, how can I make it? I have these two models: And I want to make this:
Eloren
  • 321
  • 1
  • 3
  • 13
8
votes
1 answer

ThreeJS CSG Problem intersecting extruded shapes

I have many views that I'm trying to extrude and then intersect in order to create a final polygon. The problem is that the result is not the expected, it has some floating extra parts. I need to correct this somehow, even if the solution is a…
7
votes
1 answer

Anti-Aliasing issue with MSAA, drawing CSG with depth and FBO

I have reimplemented OpenCSG for modern OpenGL version. PixelFormatAttributes: NSOpenGLPFAColorSize , 24 , NSOpenGLPFAAlphaSize , 8 , NSOpenGLPFADepthSize , 32 , NSOpenGLPFAStencilSize , 8 , NSOpenGLPFAAccelerated …
Volodymyr B.
  • 3,369
  • 2
  • 30
  • 48
6
votes
4 answers

How do I construct a hollow cylinder in Three.js

I'm having difficulties constructing a hollow cylinder in Three.js. Should I go and construct it using CSG or by stitching the vertices together?
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
4
votes
1 answer

Is it possible to use jcsg library with Processing?

Processing is a creative coding platform - language, IDE & ecosystem - maintained by the Processing community with the backing of the Processing Foundation https://processing.org. Processing Java Mode can usually benefit from code in Java libraries.…
villares
  • 333
  • 2
  • 12
4
votes
1 answer

How to convert a MeshView to a CSG object using JCSG library in JavaFX

I'm using the JCSG library for JavaFX. I have some MeshView objects that I want to convert them into CSG objects, is there a way to achieve this?
Jean-Baptiste-B
  • 325
  • 1
  • 3
  • 9
3
votes
1 answer

Adding textures to a three.js shape after it has gone throught a CSG.js process

I am using both three.js and CSG.js together to make a new shape. var materialText = new THREE.MeshBasicMaterial({ map: THREE.ImageUtils.loadTexture(rel_path_name+"images/wood.jpg") }); var material = new THREE.MeshLambertMaterial({ …
mcclennon19
  • 623
  • 2
  • 6
  • 21
3
votes
0 answers

Why is this CSG Library subtract function leaving behind vertices?

I'm currently using this CSG library to subtract two solids. I chose this particular library in order to work with the .NET Framework 4.5 dependency of my project. My goal is to be able to successfully use boolean operations on two concave solids.…
OGP99
  • 149
  • 9
3
votes
0 answers

Issue with Carve CSG c++. Wrong vertex included in result

Hello I have a problem with Carve but I am unsure if it is with the implementation or my usage of it. Here is isolated code which exhibits the issue I have. Essentially I am getting the wrong result, or more specifically I am getting an incorrect…
lfgtm
  • 1,037
  • 6
  • 19
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
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
1 answer

How to compute boolean intersection between 3 geometries using vtk?

I'm trying to compute the intersection between 3 geometries using VTK. I've started with the BooleanOperationPolyDataFilter example and made minor tweaks such as: Adding a third sphere: vtkNew sphereSource3; …
George Profenza
  • 50,687
  • 19
  • 144
  • 218
1
2 3 4 5 6