Viktor.geometry.points_are_coplanar is not correct

Which SDK and Platform version are you using?

SDK: v13.0.0

Current Behavior

the function viktor.geometry.points_are_coplanar seems not to be correct:

check_if_flat = points_are_coplanar([Point(x=0.0, y=0.0, z=0.0),
                NamedPoint(x=5.0, y=0.0, z=0.0),
                NamedPoint(x=5.0, y=5.0, z=5.0),
                NamedPoint(x=2.5, y=7.0, z=0.0),
                NamedPoint(x=0.0, y=5.0, z=0.0)])

should result in: False

→ the points are not in a (shared) two dimensional plane

This function should be 3D supported, because in 2D all points are coplanar by definition.

Expected Behavior

See before.
I would also expect some kind of numerical precision as input value.

Context (optional, but preferred)

I want to check if a surface is flat.

Thank you for the notification, I added the bug to our issue list.

This has been resolved in SDK v13.2.0

1 Like