I have a project using jsc3d to render a 3d object. the project needs to put new accessories into the current figure. I need to check if the accessory collision with the main part so the output 3D models can print though 3d printer. is there any way to detect collision in jsc3d ??
Asked
Active
Viewed 164 times
1 Answers
0
There isn't any easy method to check for 3D mesh collision. To get an exact result for complex and/or concave 3d shapes, You will need to check every triangle of both shapes for intersection. This may be somewhat slow, depending from the amount of vertices, but there is also some optimization possible.
There are some approximation techniques which are faster than the N*M check of all triangles intersection:
- intersection of axis-aligned bounding boxes
- intersection of the bounding spheres
- intersection of the rotated bounding boxes
- intersection of the bounding cylinders
- ...or any combination of the shapes
JSC3D has already built-in the AABB structure. For simple 3D meshes, maybe You can use that. The check for 3D AABB intersection is really easy, see also this answer here: Intersection between two boxes in 3D space

deblocker
- 7,629
- 2
- 24
- 59