-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
work with obj or stl loaded geometry #25
Comments
here is script I whant to make working Here is code I need to get working.
|
solved this isue. Can now provide fix to your lib.
and then we can make ThreeBSP object of it And whole code will look like this
|
Does this also work with JSON FIles using THREE.ObjectLoader();? |
I suppose yes. Don't remember the details of case now. But as I understand three.js stores all loaded models in object with same semantics. Besides now I can also say that these lib (threeBSP) is not the slowest way to intersect small file even for production. Compared results with compiled app - openscad. |
Hi |
Does it support stl file? |
Hi
|
Thanks, it Works for the simple geometry! |
This may work (I hope so)
1. download Meshlab (it's free)
2. open anyfile.obj
3. try to simplify the mesh
4. save to anyfile2.obj
5. Run the procedure with the later file
Le mer. 27 janv. 2021 à 01:58, liangchao <[email protected]> a
écrit :
… Hi
This Works
var loader = new THREE.OBJLoader();
loader.load('https://anyfile.obj', function(obj) {
obj.traverse( function (child) { if (child instanceof THREE.Mesh) geometry
= child.geometry; child.material = Shipmaterial; });
//Geo1 for CGS boolean Manipulation we bave to Convert from BufferGeometry to geometry to allow boolean operations
var geo = new THREE.Geometry().fromBufferGeometry( geometry );
Geo1 = new THREE.Mesh( geo, material1 );
Geo1 .rotation.x = -Math.PI/2 ; Geo1 .position.set(-x,0,0); Geo1.renderOrder = 5;
Geo1.updateMatrixWorld(true);
//--------------boolean operations here--------------------
}
Thanks, it Works for the simple geometry!
But my Chrome stuck when obj faces too much, how to solve
<https://camo.githubusercontent.com/c5ecf5e6cae9c7fdb2e4b5028a82b22a35de2f330ea17173192c45b3afdc1a6c/687474703a2f2f697069632e6c69616e676368616f2e736974652f696d6167652e706e67>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACW6XDNLQOITPN6ZVG2GPXDS35QKTANCNFSM4B46L7OA>
.
|
whant to use that lib with obj or stl or other files loaded through three.js.
now lib shows me error "the geometry is not supported"
How can I do it with this lib?
The text was updated successfully, but these errors were encountered: