Comments (5)
Late to the party but hey, I'll drop this here in case it interest's yall:
https://github.com/soypat/sdf/blob/main/helpers/sdfexp/import.go.
Left: original 128 cell on longest side model render using SDFs. 140k triangles
Right: Imported triangles using ImportModel
(from left model) and rendering using 128 cells on longest side. The resulting amount of triangles is near identical and model quality is preserved. 6.5s elapsed.
from sdfx.
Right - the library has no current ability to import an STL file as an object. Could be a good thing though. ie import a per-existing object and then hack upon it with various additions, subtractions, etc. Implemtation-wise the challenge is to efficiently do an SDF on the triangle mesh of the STL.
from sdfx.
FWIW I'd love to see this capability too. I actually have a couple of workflows now where I take portions I make in sdfx and combine them with openjscad.org to finish:
from sdfx.
To be clear- importing STLs is not a big deal. It's a bunch of 3d triangles. Working out a minimum distance to a triangle is fairly obvious- so working out the minimum distance to N triangles is likewise obvious. The problem is doing this efficiently. I assume this means partitioning the triangle set in some way so that you can eliminate large groups of triangles that you cannot be closer to.
There's an analogous problem in 2D. ie - closest distance to a polygon made of line segments. You can brute force this - in fact the current code does- but it'd be nice to have an algo that did a more efficient search of the line segment set.
Both of these are areas of nagging interest, some sort of BSP perhaps...
from sdfx.
So I use 3DCoat a lot and what it does is convert mesh's to voxels at a specific resolution, so you say I want a resolution of 1mm and it will the convert to a voxel, which feels like it might efficient with SDFs.
from sdfx.
Related Issues (20)
- Zero length line segments ruin Polygon2D objects HOT 1
- obj/screw.go: NPT thread HOT 2
- Redesigning Vec family API HOT 8
- Removing returned errors from shape generation functions HOT 10
- Request to add pointer to `sdf` project HOT 2
- Hollow out 3D meshes by this tool? HOT 3
- Bolts smaller than expected HOT 3
- Threads on package import HOT 4
- Gyroid shape HOT 1
- Feature Request: Extract Vertex Data to an Array HOT 2
- Pack models together tightly HOT 3
- How to duplicate SDF? HOT 5
- How to check if intersection is empty or not HOT 7
- Time consumption of marching cubes algorithm HOT 1
- Initialize a 4x4 matrix i.e. `sdf.M44` HOT 9
- Description Language idea.. HOT 3
- STL to SDF evaluation HOT 1
- Creating an arbitraty shape for a chain HOT 1
- Build error HOT 3
- Whether to support dxf file parsing? 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 sdfx.