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)
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.
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.