YFI
I don't understand what things are you keeping track of? You only need to track the header status recursively.
In LDCad I force everything to CCW on the part top level, so the recursive function only keeps track of the needed mutation on the current file to get it to CCW at toplevel. This is done in a single line:
Where doInverse and curMatrix are the recursive function parameters. And for any type 1 line you pass (doInverse xor "invertnext meta present") and the new matrix to the next recursion level.
Maybe this helps you
I don't understand what things are you keeping track of? You only need to track the header status recursively.
In LDCad I force everything to CCW on the part top level, so the recursive function only keeps track of the needed mutation on the current file to get it to CCW at toplevel. This is done in a single line:
Code:
const TLDWindingMutation wo=mainRenderData->getUseBFC() ? (doInverse xor (curMatrix.determinant()<0) ? LDWM_Inverse : LDWM_Normal) : LDWM_DontCare;
Where doInverse and curMatrix are the recursive function parameters. And for any type 1 line you pass (doInverse xor "invertnext meta present") and the new matrix to the next recursion level.
Maybe this helps you