Intersection of lines in 3D space

Which SDK and Platform version are you using?

SDK: v13.0.0

Current Behavior

The documentation implies that calculating the intersection of lines is possible in 3D space. But this is not done correctly. for example:

polyline = Polyline(

            [

                Point(0.0, 0.0, 5.0),

                Point(5.0, 5.0, 5.0),

                Point(0.0, 5.0, 5.0),

                Point(5.0, 0.0, 5.0),

            ]

        )

        for line_1 in polyline.lines[:-1]:

            print(line_1.start_point)

            for line_2 in polyline.lines[1:]:

                if calculate_intersection_bounded_lines(line_1, line_2, inclusive=False):

                    print(calculate_intersection_bounded_lines(line_1, line_2))

Should result in an intersection at point (2.5,2.5,5.0) but the result is an intersection at (2,5,2,5,0.0). In other words, the intersection seems to be calcated with the z-values ommited/ set to 0.0. (this is not even a real 3D example but okay)

Expected Behavior

At least I would expect that this is documented → intersection in 3D - space are not supported.
secondly I would expect an exception raised when inputting a line representation with z-values that the function is not supported.

Even better would be to support this functionality.

Context

I do have my own functions which can solve this problem, but I was just checking out if the built-in functions could accomplish the same. If so I don’t have to migrate and maintain the functions on every project. In this case the main goal is to check if a polyline is self intersecting in a 3D-space.

Thank you for the notification. The intersection function indeed only supports 2D. We will add a note to the docstring for now to clear this up and add 3D support to our list of suggested features.