For Hypar Space, we rely on a visual trick for our spaces — we turn them inside out, with their normals inwards, so that you only see the faces on the opposite side of the room, and can look through the top to see the furniture, and easily select it.
This is presently achieved by manually building a ConstructedSolid direct from faces, since Extrude has a built-in check to ensure that normals point out. This works fine, but means that we serialize much more data than is needed in the model: we have to store every vertex, edge, and face, which makes the model json heavy.
DESCRIPTION:
Adds an optional Flipped property, which inverts the normal check when building the extrude. if Flipped is true, the profile is flipped w/r/t the extrusion direction, resulting in an inside-out shape.
TESTING:
I added a new test which verifies technically and visually that the Flipped parameter has the desired effect.
FUTURE WORK:
It is conceivable, if a bit unlikely, that other primitives might want similar behavior.
BACKGROUND:
ConstructedSolid
direct from faces, sinceExtrude
has a built-in check to ensure that normals point out. This works fine, but means that we serialize much more data than is needed in the model: we have to store every vertex, edge, and face, which makes the model json heavy.DESCRIPTION:
Flipped
property, which inverts the normal check when building the extrude. ifFlipped
is true, the profile is flipped w/r/t the extrusion direction, resulting in an inside-out shape.TESTING:
Flipped
parameter has the desired effect.FUTURE WORK:
REQUIRED:
CHANGELOG.md
.This change is