CircularExtrusion on wrong z

Which tool versions are you using?

SDK: v13.6.1
Platform: v22.11.0
Python: v3.10.8
Isolation mode: venv

Current Behavior

A CircularExtrusion in a GeometryView is shown at the wrong z location.

Here’s some cleaned up example code:

    @GeometryView("TEST", duration_guess=1)
    def view_test_geometry(self, params, **kwargs) -> GeometryResult:
        """
        Do some testing to find geometry issues
        """

        test_color = Color(0, 255, 0)
        test_material = Material("Water", color=test_color, threejs_opacity=0.50)

        # Create geometries
        test_point_1 = Point(0, 0, 50)
        test_point_2 = Point(0, 0, 200)
        test_line = Line(test_point_1, test_point_2, color=test_color)
        test_ce = CircularExtrusion(diameter=200, line=test_line, material=test_material)

        # Group together
        test_system = Group([test_line, test_ce])

        # Add some labels for debugging
        labels = [
            Label(Point(0, 0, 50), "z=50"),
            Label(Point(0, 0, 200), "z=200"),
            Label(Point(0, 0, 0), "z=0"),
            Label(Point(0, 0, 125), "z=125"),
            Label(Point(0, 0, -25), "z=-25")
        ]

        return GeometryResult(test_system, labels=labels)

Gives the following result (in front view, isometric):

Expected Behavior

The CircularExtrusion (test_ce) should have the same z values as the Line (test_line).

Looks like the top of the extrusion is shown at the middle of the line. And the bottom is (top - line_height).

Previous versions of our app worked fine with similar code, but now breaks.

Hi @rkg thanks for reporting.

Do you know what SDK version you were using when it worked as expected?

@khameeteman that would be viktor==12.11.0 according to requirements.txt. Or is there an easy way to check that for a published app?

Thanks, we will check it out!

An “easy” way is to use viktor-cli describe APP to see previous published tags, and check the requirements file that corresponds to the git tag (in case you are using git). Might be an idea for us to include this in the publish overview as well :thinking:

Ah, that “easy” way is exactly what I did. I hoped for a “more easy” way :slight_smile: , perhaps on de app details page.

This has been fixed in SDK v13.6.2.