Comments (9)
Tried it and it works:
diff --git a/source/viewer/viewer.js b/source/viewer/viewer.js
index e5acfe0..5dad2d3 100644
--- a/source/viewer/viewer.js
+++ b/source/viewer/viewer.js
@@ -230,6 +230,9 @@ OV.Viewer = class
for (let i = 0; i < meshes.length; i++) {
let mesh = meshes[i];
this.scene.add (mesh);
+ let edges = new THREE.EdgesGeometry(mesh.geometry);
+ let lines = new THREE.LineSegments(edges, new THREE.LineBasicMaterial( { color: 0xFF0000 }));
+ this.scene.add (lines);
}
this.Render ();
}
from online3dviewer.
At the moment it's not possible.
from online3dviewer.
You can probably add this by rendering two model, once like it's done currently, and a second with wireframe/edge mode only (it would also draw hidden edges, I think.
Like this:
const geometry = new THREE.BoxGeometry( 100, 100, 100 );
const edges = new THREE.EdgesGeometry( geometry );
const line = new THREE.LineSegments( edges, new THREE.LineBasicMaterial( { color: 0xffffff } ) );
scene.add( line );
from online3dviewer.
Thanks for the example code, @X-Ryl669. It works great, and your code can be used as a workaround until it will be part of the core feature set.
Here are my results with your code:
from online3dviewer.
Look great ! how can I do this (without coding knowledge) ?
from online3dviewer.
Unfortunately I don't think it's possible without coding knowledge.
from online3dviewer.
I did it ! It's quite simple. Just add 3 lines at the right place. But the result is not what I expect, it show all edges :
But I think the problem come from STL file (if I upload STL files on grabcad edges are not showing )
from online3dviewer.
STL files doesn't contain edges, so it's up to the visualizer to draw them or not. The trick that was mentioned before are just using a helper to show the edges, and it depends on the angle of polygons if an edge is visible or not. Fortunately there is a second parameter for EdgesGeometry
that defines the threshold angle. Playing with this value maybe you can get the result you want.
let edges = new THREE.EdgesGeometry(mesh.geometry, 30);
let lines = new THREE.LineSegments(edges, new THREE.LineBasicMaterial( { color: 0xFF0000 }));
this.scene.add (lines);
from online3dviewer.
from online3dviewer.
Related Issues (20)
- Preserve navigation and projection mode between sessions
- This GLB file cannot be opened with online3DViewer, but it can be opened using three.js's gltfLoader. HOT 1
- Markdown support HOT 1
- Comparator of two files HOT 1
- Automatic initialization in Mediawiki site HOT 2
- "No importable file found" on URL returning an OBJ file HOT 3
- Fbx model missing some feature HOT 7
- Update Github Workflows
- support for these DirectX files called .x
- Dotbim import ifc export
- support separated step files
- o3dv.website.min.js HOT 3
- How to debug code HOT 1
- Use OrbitControls and requestAnimationFrame HOT 1
- Crash web on mobile web (IOS, iphone) when upload this file with .step format
- Measure tool markers don´t show up when model has transparency HOT 1
- Localization support
- Disable using the full website in an iframe
- Create service desk
- Integrated converter into viewer link below HOT 3
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 online3dviewer.