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
0
votes
0 answers

Using ThreeCSG with BufferGeometry is giving me weird results - missing faces

When trying to subtract or union two meshes (TextGeometry and BufferGeometry), result meshes have missing faces and opposite results, I am using ThreeCSG that supposedly support buffer geometry, I tried converting to normal Geometry and results were…
TimWP
  • 3
  • 3
0
votes
1 answer

Controlling the scaling of custom geometries in Three.js

I have a custom object which is a subtraction of two meshes. This subtraction creates a frame-like object. createFrame (x, y, z) { const frameMesh = new THREE.Mesh(new THREE.BoxGeometry(1,1,1)); frameMesh.scale.set(x, y, z); const…
Dawid Zbiński
  • 5,521
  • 8
  • 43
  • 70
0
votes
1 answer

How can I subtract one Model3D object from another using HelixToolkit or 3D WPF?

I am using the HelixToolkit.Wpf library to create some graphics for my application. I know that Helix provides a CuttingPlanesGroup that gives you the ability to create images like this one: https://i.stack.imgur.com/VFQBC.jpg But, the issue I am…
chamshop
  • 1
  • 2
0
votes
1 answer

Is there a way to do dynamic CSG in Javascript?

I'm very new at Javascript and coding. I use Three.js to make a scene where there is a glass, in which liquid moves depending upon events (mouseMove, click...). I thought about Constructive Solid Geometry to achieve that, in the way depicted on the…
0
votes
1 answer

Substract 3D text to a Geometry in Three.js

I want to transform my 3D text to Geometry so I can use it with CSG (I used a Three.js CSG wrapper also) to substract it from another object like in this question. My 3D text : loader.load('optimer_regular.typeface.json', function (font){ var…
Gawel91
  • 39
  • 10
0
votes
2 answers

Three.js: how to force update matrix after cloning? (to use with CSG ThreeBSP)

I'm trying to clone and then scale a mesh, but scaling does not seem to be working immediately on the cloned object, for programming purposes using CSG ThreeBSP. I think I should call a function after the scaling to force the matrix or other…
chaotive
  • 182
  • 14
0
votes
0 answers

Digging a polygon according to another with libgdx

I actually develop a 3D application on Android, and i manipulate 3D object. I want to dig a polygon according to another polygon form such as a cube or a cylinder. In the following image you can imagine I have two superimposed polygons, a cylinder…
Meriemi
  • 85
  • 11
0
votes
1 answer

CSG - Boolean operation using a CSG.Plane

I can define a CSG.Plane with a normal and a constant w like this: CSG.Plane = function(normal, w) { this.normal = normal; this.w = w; }; How can I now use this CSG plane in a boolean subtract operation? I think I have to somehow convert…
Wilt
  • 41,477
  • 12
  • 152
  • 203
0
votes
1 answer

How add texture to a three.js after it has gone throught a CSG.js process?

This my code: var materialNormal = new THREE.MeshNormalMaterial(); var cubeGeometry = new THREE.CubeGeometry( 20, 500, 1000, 1, 1, 1 ); var cubeMesh = new THREE.Mesh( cubeGeometry ); cubeMesh.position.set(-50, 60, 0); //scene.add(cubeMesh);…
0
votes
4 answers

ThreeCSG.js minimal example

I am trying to learn ThreeCSG.js, the javascript Constructive Solid Geometry front-end to Three.js. I thought I would start by copying a minimal example from the web. I tried to save a local copy of Chandler Prall's amazing little javascript…
0
votes
1 answer

Compute the volume of a constructive solid geometry

I have a constructive solid geometry of ellipsoids that cut a cube. I need to compute the volume of the porous cube. How can I do this?
user3528789
  • 103
  • 7
0
votes
0 answers

Meshing a construcitve solid geometry (CSG)

I have many geometric primitives (100) which cut a cube. This could be modelled using CSG. Now I need a relatively coarse tetra mesh for finite element simulations. For generating the mesh I came across netgen (see the picture). But netgen will give…
user3528789
  • 103
  • 7
0
votes
0 answers

Three.js CSG library causes uncaught TypeError

I've started creating nice 3d objects with Three.js. Now I'm trying to do a subtract as in the given example at: https://github.com/stemkoski/stemkoski.github.com/blob/master/Three.js/CSG.html But I'm getting an error in the library: Uncaught…
yccteam
  • 2,168
  • 4
  • 25
  • 47
0
votes
1 answer

Three.js Mesh or Geometry content

I'm new to Three.js; Is there a way to get separate objects (elements/shells) from a Mesh or Geometry object? If there's no native way to do that, how could I implement a method for separating faces that are not connected to an ensemble and then…
chadiik
  • 537
  • 4
  • 14
0
votes
1 answer

Construct 3D geometry with PHP?

I need to construct 3D models for use with Three.js, but I need to do CSG (Constructive Solid Geometry) operations on them too. I managed to use the ThreeCSG.js library for this, but I find this to be quite slow (about 5 seconds to slice about 30…
Dylan
  • 9,129
  • 20
  • 96
  • 153