Indentify an extrusion

Technical discussions
Post Reply
Felix Kalman
Posts: 1
Joined: Fri Jul 26, 2019 5:04 am

Indentify an extrusion

Post by Felix Kalman »

Hi,
I'm completely new to KernelCAD. I would like to know if it is possible to implement code that automatically recognizes if some volume solid has a shape which is an extrusion.

If it is, it should return the reference of the source and targe surface that would represent the solid.

I only would like to find out if this is technically possible.
Thanks in advance.
Felix

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Indentify an extrusion

Post by nickz »

Hello Felix
I assume you mean linear extrusion?

Yes it is doable with DG Kernel and is not that complicated. There is some coding to do. It is not very common functionality so we do not have a ready-to-use algorithm, but again, it is not that hard.

I would suggest creating a simplest test case (a box probably) to test even the first steps with it.

I think you would first need to find a face of the base for extrusion. It would be a face where all vertices outside if it are offset by a constant vector (to be determined on the go). After one suspected face is identified you could check if the are more faces extruded in the same direction, check that the extrusion geometrically coincides with the original solid (up to a tolerance) and that is it.

If base is not found the solid is not an extrusion (of anything)

Good luck

Post Reply