0

How can I create a solid polyhedral surface from extruded 2D polygon? I have created a closed polyhedral surface but ST_MakeSolid does not work for me.

Is there something wrong with the code below?

WITH cte AS (
    SELECT ST_MakeSolid(
        ST_Extrude(
            ST_Translate(
                ST_Force3D(
                    ST_GeomFromText('POLYGON ((-1 1,1 1,1 -1,-1 -1,-1 1))')
                ),
                0, 0, -1
            ),
            0, 0, 2
        )
    ) geom
)
SELECT
    ST_IsSolid(geom),
    ST_IsClosed(geom),
    ST_Volume(geom)
FROM cte

# OUTPUT  : false, true, 8
# EXPECTED: true, true, 8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.