Hello, Im looking for help with closing the space between the frames ive created using a triangle lunchbox frames component. When the frames are created theres a space between them. They meet on an edge on one side but are open on the other side with a gap.
Yes, this due to the fact that your triangulated base surface is curved and LunchBox uses the normal vector of each of its planar, tessellated triangles as individual extrusion directions. This has the benefit that all faces of the resulting three-dimensional window geometry are planar, but the greater the set extrusion height, the bigger the gaps been the cassettes get, where there is important base surface curvature.
Now to get rid of the gaps, you need to look at each point of each triangle, and find its adjacent, neighbouring triangle faces to get their normals. There should be 6 neighbouring triangles and thus normals for each point that doesn’t lie on the surface border, isn’t considered “naked”. You can then add those nornal vectors together and divide them by the number of summed up normals to get the average offset vector at the considered point. You still want to normalize this vector and multiply it by your desired extrusion or offset distance. You can then add it to the point to get the corresponding offset point.
If you do this for every point in the system, you’ll get the offset triangles that don’t have gaps between each other. However, this has the downside that only the base and offset triangle remain planar, when constructing the three-dimensional cassette geometry. All other faces will have some degree of torsion that correlates again with the local curvature of the base surface.
You can do this as described above, or even simpler by offsetting your base surface and reapplying the exact same triangular tessellation to the resukting surface. This will give you the offset triangle faces, as described above. You can then offset them loft, cap, etc. to form the cassette geometry.