Point Classifier / triple-dexel data structure suggestion


CAD community veteran

I have been playing with the point classifier lesson and wanted to build a triple-dexel

I am not sure what could be a good data structure to store the data.. any idea?



Staff member
Seems like you already have something? I have never tried to implement tri-dexels and was not totally convinced that tri-dexel is any better than adaptive voxelization. What's your opinion on that? Btw, are you aware of these papers from ModuleWorks about tri-dexels?


  • Theegarten et al. - 2019 - Discrete {Cutter}-{Workpiece} {Engagement} for {Five}-{Axis} {Milli...pdf
    2.5 MB · Views: 4


CAD community veteran
@Quaoar , I just visualized the data.. I have not really thought of a way to store it.. I am guessing a bvh tree would work.. I don't know if there would be a better one for this application.

I was not aware of the paper.. I will read for sure.

Adaptive voxelization would be like an octree ? Honestly, I have no idea.. I felt like the dexel was something I could achive and that is, sadly, the reason why I went for it.

another thing that pushed me into this direction was that it was used in milling to calculate forces and chip thickness.. my goal is to optimize for surface contact.

my next steps are:
find a good way to store the data
remove 'material' using another tri-dexel
optimize surface contact between 2 tri-dexel.. either reducing to 0 or maximizing
and maybe rebuild a mesh out of that

thank you for your inputs as always it is greatly appreciated.


Staff member
I am guessing a bvh tree would work..
BVH would give you fast membership classification, something you already do, I think. BVH aims at decomposing your object hierarchically for fast inclusion tests. In contrast, the dexel/voxel models are space decompositions aimed at capturing the region occupied by a shape. For representation of dexels, some extra research might be necessary. It will be interesting to know how ModuleWorks represent them, although I'm not sure they delve into such details in their articles.

Voxels are represented with octrees and I think they can be used for material removal simulation as well. Some references were given in this topic: http://analysissitus.org/forum/index.php?threads/material-removal.50/

There is open source implementation of adaptive voxels and marching cubes (to reconstruct mesh), and I was going to try it out, but haven't found enough motivation for doing that :)

Will be interesting to hear about your achiements in that area, keep us posted!


CAD community veteran
@Quaoar , thanks for the resources. I will be sure to post my progress

we shall see where this leads me, I am pretty much just exploring at this point and learning!

I do understand what the BVH tree is, but at this point, it's bit unclear how it is built and how to iterate through it. Gotta study the code some more. :)
Last edited:


CAD community veteran
I have found that some edges are a bit problematic .. On this impeller, the seam in the center appears to create issue with the detection of hit points. My guess is that it is just missing the triangle. I guess this will be today's investigation haha!

My first Idea was to see if Shape healing could 'heal' the two half cylinder automatically.. I tried ShapeUpgrade_RemoveInternalWires without sucess.. I would probably better to attack the mesh perspective.

I hope you all have a great day.


CAD community veteran
Well, it took less time this morning than anticipated!
I think my theory was right.

I have revised two lines in the intersectTriangle method.

first line was
if(time <= 0) return REAL_MAX;

I replaced with

if (time < -2 * Precision::Confusion()) return REAL_MAX;

similarly at the end
return ( U < 0 || V < 0 || V+U > 1.0) ? REAL_MAX : time;

return (U < -2 * Precision::Confusion() || V < -2 * Precision::Confusion() || U + V > 1.0) ? REAL_MAX : time;

I think this allows for a bit of tolerance, which I think is ok since dealing with meshes is not as accurate as the BREP anyways.
I used 2*Precision::Confusion() but I may have to increase this eventually. Will see!