Last modified: 2025-04-13 13:34:06
< 2025-04-12 2025-04-14 >It did occur to me that if every surface had a different id then maybe the bulging wouldn't happen? Because you wouldn't be applying the blend to the coplanar surfaces?
So let's try that out.
Before:
That's 2 10x10x10 cubes, one translated by 5 mm in X and 5mm in Y, and with a 3mm fillet.
So now I need to make BoxNode
give a different surface id on each side.
OK, I did that. It is annoying to add a blend between these surface ids, because blends need to take node references even though they only care about ids. I hardcoded a blend between the ideas I care about.
But TreeRewriter
is not managing to successfully rewrite the tree to satisfy the
blends. And the reason is that it can only satisfy a blend by rewriting the tree to make
those blend surfaces into sibling children of some combinator. And since it can't split up
a BoxNode
into multiple surfaces to be Unioned separately, it can't satisfy the blend.
So an alternative is to actually make the Box out of the Intersection of 6 half-spaces. And if that is good then I can fix the broken distance field that it causes.
OK, I have made it form Boxes out of the Intersections of 6 half-spaces. But it's still not managing to apply blends to them.
Oh, derp. I made it do Intersections of half-spaces with structmax
- but the TreeRewriter
is operating on the level of TreeNode
. So I need the BoxNode makeNormalised()
to
return an IntersectionNode
with 6 half-spaces as children.
Whoa! Check it out:
That's 2 cubes made out of 6 half-spaces each, with 2 blends applied.
So yes, this works for preventing blends from bulging! Finally, something works.
Issues currently are:
radius
parameterAlso do you reckon the fillet doesn't look like a true circle? May want to address that at some point.
So I kind of need a way for a TreeNode
to reserve a bunch of surface ids instead of just
having one.
This is on the "half-spaces-fiddle" branch. So plan tomorrow is to solve the issues from above, and then expand this to work with other objects that obviously have multiple surfaces, like Cylinder and Extrude.
< 2025-04-12 2025-04-14 >