Hi,
I'm trying to work out a way to build simple 3D roof shapes for buildings that creates the minimal number of surfaces in the resulting 3D representation. My input data is a 2D set of building footprints and I have a height attribute per feature. Many of the footprint shapes are rectangular, so adding a minimally complex hipped or gable type shape on top of an extruded block of the building will likely be sufficient. My first attempt to create a roof was to use a triangulation based approach:
Input footprints -> 3DOffset (by height attribute) -> CenterLineReplacer -> TINGenerator (centre line and footprint to "breaklines" input) -> GeometryExtractor (from Triangles output).This is OK and does create a hipped shape (see image), but the problem is I want to minimise the number of surfaces. This approach creates 6 triangles for this rectangle example - 2 end triangles, then 2 triangles for each of the long surfaces (there is no surface at the underneath the hipped shape). I think the long surfaces should be actually be 1 surface each as would be achieved my merging the (almost) planar triangles. Presumably this could be done by doing some rounding of the aspect values and then dissolving on this attribute. But that seems unnecessarily complicated.
So, can I actually create the hipped surface without a triangulation step? The Straight Skeleton of the CentreLineReplacer identifies a 2D line that looks like it be modified to create the 3D polygons directly. But how can I define the 3D planes / 3D faces? I thought maybe I could merge straight skeleton and footprint and then assign the Z values of the polygon edges that are the centre line - but what transformer would do this?
any advice much appreciated.