RectangleObject on path from OffsetPolyline3DByDistance by distance = 0.000


Hello together,
I am trying to get the RectangleObject from the path, which I get from OffsetPolyline3DByDistance, see Visual-Code-Picture below.
If I use float numbers (-0,15m; +0,15m) it works fine, but if I put 0 it just doesnt work.

The Allplan says:"RectangleObject: Path is empty". I tried to build the new polyline from the origin polyline and use ExecPythonScript with the following code in order to make a lind of if-statement, but I think I want to much from this node. I think the node can not return objects..

def function_to_execute(count, polyline_with_offset, polyline_original):
    if count == 1:
        result = polyline_with_offset
    elif count == 0:
        result = polyline_original
    return result

My questions:
1) what could be the reason, why the polyline with 0 offset even doesnt get created?
2) how can I build something as "if statement":
if distance = 0 → use polyline_original; else → use polyline_with_offset?

Thank you very much in advance for the help.

Přílohy (2)

Type: image/png
Staženo 32
Size: 63,50 KiB
Type: text/xml
Staženo 360
Size: 4,44 KiB

Show most helpful answer Hide most helpful answer

It seems to be bug in our API, as the coded PythonPart also has the same issue. We will investigate it.

To workaround, you can try the node "OutputTrueFalseSelector". It will return the object based on a boolean value.

Product Owner API, Allplan GmbH

Přílohy (1)

Type: image/png
Staženo 34
Size: 41,48 KiB

It seems to be bug in our API, as the coded PythonPart also has the same issue. We will investigate it.

To workaround, you can try the node "OutputTrueFalseSelector". It will return the object based on a boolean value.

Product Owner API, Allplan GmbH

Přílohy (1)

Type: image/png
Staženo 34
Size: 41,48 KiB

https://campus.allplan.com/ používá cookies  -  Více informací

Souhlasím