I am using QGIS 3.10.
I am trying to split multiple rectangle polygons diagonally into 2 parts using "Geometry by expression" under Processing. This is for symbology only (exporting for use elsewhere), so attribute retention is not necessary. For symbolizing diagonally split rectangles in QGIS, I successfully produced a two-layered geometry-generated symbology for each rectangle using:
Top layer: make_triangle(point_n($geometry,1), point_n ($geometry,2),point_n( $geometry,3))
Bottom layer: make_triangle(point_n($geometry,3), point_n ($geometry,4),point_n( $geometry,1))
This is fine for symbology, but now I need to reproduce those triangles as saved geometry.
Using Geometry by expression, I used the following, which only produces one triangle:
collect_geometries(make_triangle(point_n($geometry,1), point_n($geometry,2),point_n( $geometry,3)),(make_triangle(point_n($geometry,3), point_n ($geometry,4),point_n( $geometry,1))))
The expression builder accepts the whole expression above with no errors - just produces one element (see figure, blue polys).
Plugin Polygon divider doesn't accommodate corner to corner splits.
Also tried "Combine" expression in place of "collect geometries"
This should be simple, but I can't find any native command or plugin for the job.