Skip to content

Is there a collision detection method for meshes? #38

Answered by jimy-byerley
Boehm92 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Boehm92 !

About drilling

I'm not sure to understand the need of an intersection-check function in this case, as there is nothing wrong in performing a boolean union or difference when the meshes are not intersecting. In case of non intersecting meshes, a union will simply concatenate them, resulting in one mesh containing 2 islands, a difference will result in only the first mesh unmodified.
Here is an example of what I understand of your case:

from madcad import *

def cylinder(bottom:vec3, top:vec3, radius:float) -> 'Mesh':
	direction = top-bottom
	return extrusion(direction, 
             flatsurface(wire(Circle((bottom,normalize(direction)), radius)))
             .flip())

cube =

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Boehm92
Comment options

@jimy-byerley
Comment options

@jimy-byerley
Comment options

@Boehm92
Comment options

@jimy-byerley
Comment options

Answer selected by Boehm92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants