CSDF
No description available
Install / Use
/learn @wrc042/CSDFREADME
CSDF
This is my custom signed distance(SDF) computation of points to manifold mesh with PyTorch API on GPU. The code and framework is modified from Kaolin.
Installation
python setup.py install
If encounter circular import, try:
pip install -e .
or manually modify csdf/__init__.py.
Usage
The code provide two function:
compute_sdf(pointclouds, face_vertices)- input
- unbatched points with shape (num, 3)
- unbatched face_vertices with shape (num , 3, 3)
- returns
- squared distance
- normal defined by gradient
- distance signs (inside -1 and outside 1)
- closest face indexes
- distance type (plane, vertices or edges)
- input
index_vertices_by_faces(vertices_features, faces): return face_verts reqired bycompute_sdf(pointclouds, face_vertices).
Note
- Sign is defined by
sign(dis.dot(face_normal)), check your mesh has perfect normal information. - Returned normal is defined by
(p - closest_point).normalized()or equally $\frac{\partial d}{\partial p}$, not face normal. - The code only run on cuda.
- Scripts in
testscannnot run independently (requires kaolin api or mesh datasets).
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
