Comments (4)
Here is a fix:
// CSG
const brush1 = new Brush( geometry );
brush1.material = material
brush1.updateMatrixWorld();
const brush2 = new Brush( geometry2 );
brush2.material = material2
brush2.position.z = 0.45;
brush2.updateMatrixWorld();
const evaluator = new Evaluator();
evaluator.useGroups = true
evaluator.consolidateMaterials = true
const result = evaluator.evaluate( brush1, brush2, SUBTRACTION );
let index = [];
for (let i = 0; i < result.geometry.attributes.position.count; i++)
index.push(i);
result.geometry.setIndex(index);
scene.add(result)
With the help of thrax, we found out, that the geometry is not indexed after the subtraction. setting an index fixed the issue with exporting. So you were right i think, it is an Exporter issue
from three-bvh-csg.
From the docs:
CSG results use Geometry.drawRange to help maintain performance which can cause three.js exporters to fail to export the geometry correctly. It is necessary to convert the geometry to remove the use of draw range before exporting with three.js exporters.
from three-bvh-csg.
Either way this is an issue related to an exporter if three.js is not exporting geometry as it's rendered in the application and should be reported elsewhere. At least a warning should be logged.
from three-bvh-csg.
Either way this is an issue related to an exporter if three.js is not exporting geometry as it's rendered in the application and should be reported elsewhere. At least a warning should be logged.
I tried with other CSG libraries and the exporting works fine so i thought the implementation in this library does something different with the materials
from three-bvh-csg.
Related Issues (20)
- Coplanar faces: determine coplanar direction and faces in clip phase
- Perform benchmarking to determine where slowdowns are HOT 1
- Determine coplanar side in TriangleSplitter
- Missing Triangle HOT 1
- Understand why there are cases where edges are not matched
- Consolidate groups is not working as expected HOT 1
- Getting different results after upgrading from v0.0.10 to v0.0.11 HOT 10
- More Papers to Read
- Unexpected behaviour when upgrading from v0.0.10 to v0.0.12 HOT 5
- Hollow Subtraction Regression v0.0.12 HOT 2
- Fast winding numbers
- Extra edges after complex subtraction HOT 8
- Bounding box of csg geometry sometimes does not match the geometry (is much more bigger) HOT 4
- Orphaned Triangles After Operation HOT 6
- Planar faces failure HOT 1
- Performance Issus when two bufferGeometries evaluate HOT 1
- Weird result using Three CSG HOT 2
- New failure case HOT 1
- Fix "isTriDegenerate" function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three-bvh-csg.