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.