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
1
vote
0 answers

How do I rotate a mesh about its axis with three.js?

Three.js beginner here, I'm trying to create a 3d-ring like structure composed of separate meshes that I union together using CSG. I managed to place each of the separate meshes along a circle. How do I now rotate them so that the long side of each…
nithinaray
  • 11
  • 3
1
vote
1 answer

After using the threeBSP method, the created spheres are not smooth

I'm trying to change the number of segments of the sphere, but I can't cut it if I have reached the 45 limit, and there's no other way to make the sphere a little smoother. var result; var sphereG = new THREE.SphereGeometry( 115, 45, 45 ); var…
黄小羽
  • 15
  • 5
1
vote
1 answer

Suggestion on how to create a window over a wall

I am working on a three.js application where I have to create a building structure (all on ground floor), the height, width, length will be specified by user. User can change wall and roof color (which are applied using texture, as I have images…
Deeps
  • 557
  • 9
  • 31
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
vote
1 answer

Three.js 2D CSG - intersect, union, subtract

I'm using csg.js with three.js and it seems it only supports 3D CSG. Check this I would like to intersect and union 2D (three.js)geometries. Is there any way I can do 2D CSG with three.js ?
hyewon330
  • 45
  • 1
  • 12
1
vote
0 answers

Inverse() of a 3D shape with ThreeCSG

I'm trying to invert a 3D shape using ThreeCSG (get the empty spaces of the original shape) but it looks like they didn't include the inverse function from the original CSG: inverse: function() { var csg = this.clone(); …
shinzou
  • 5,850
  • 10
  • 60
  • 124
1
vote
0 answers

Finding Mesh Changes/Difference from an existing 3DR

Say a Tango (Unity) device is used in a controlled room, where all objects and walls are stationary and pre-known. You take a 3DR scan of the room, and have a good ADF. How could you approach detecting/tracking only new/changed objects? Eg a…
Jethro
  • 3,029
  • 3
  • 27
  • 56
1
vote
0 answers

How to use CSG with VTK in python?

I want to use CSG with VTK in python to perform substractions. I already have VTK installed. For the CSG I was thinking to install: https://pypi.python.org/pypi/pycsg . How would I go around using it for custom PolyDatas in order to substract one…
C. Mihai
  • 51
  • 1
  • 7
1
vote
1 answer

Transformation and CSG Operations on grid in OpenVDB

OpenVDB seems really amazing, and the addressing of the nodes is really smart. There are some operations that I don't understand, in particular CSG operations. This is a example code. It takes as input two arguments: a vdb input file with only one…
Matteo Ragni
  • 2,837
  • 1
  • 20
  • 34
1
vote
1 answer

Subtracting Geometry in Three.js (or really, 3D programming in general)

I'm currently working on a small project with which I need to subtract a rectangular area of a cube on mousemove (think, an indented area for placing a door on a house). The 'door' would be 'placed' on click, but would need to be 'visualized' while…
ezekg
  • 924
  • 10
  • 20
1
vote
1 answer

How can we calculate the amount of volume of a CSG object?

In OpenSCAD I implement the following animation: WhR = 1.5; // wheel radius WhH = 6; // wheel height WpR = 1; // workpiece radius WpH = 6; // workpiece height $fn = 30; pos = position($t); intersection(){ rotate([0,-90,0]){ cylinder(WpH,…
1
vote
2 answers

Render arbitrary CSG solid given boolean function?

I'm looking to implement my own CSG classes for a Robotics project, and I'm thinking to implement each solid as a function that returns a boolean value, given a 3D point; this function will return true if the 3D point is contained within the solid.…
Lee.J.Baxter
  • 495
  • 4
  • 12
1
vote
1 answer

subtracted geometries result in strange lighting

In three.js, I am trying to 'cut out' a window from a box geometry (a wall), using this csg (contructive solid geometry) extension I found here: https://github.com/chandlerprall/ThreeCSG I am successful in cutting the window, but then the surface of…
Hoff
  • 38,776
  • 17
  • 74
  • 99
1
vote
1 answer

Carve 1.4 CSG - C2375: 'cbrt' : redefinition; different linkage

I am trying to compile Carve 1.4 c++ library. but keep getting C2375: 'cbrt' : redefinition; different linkage errors. When i click on an error it takes me to this line in math.h: _CRTIMP double __cdecl cbrt(_In_ double _X); the only other cbrt…
1
vote
1 answer

Finding the intersection between a cube and a CSG object for octree subdivision

I'm trying to build an octree representing a volume which is originally described by a CSG (Constructive Solid Geometry) tree. My original plan was to start with a big cube that contains the entire object and then test, for each of the eight…
gigabytes
  • 3,104
  • 19
  • 35