Support Forum

[Question] How to make a bar shape using Polyline3D? [Solved]


I want to make a rebar with a free shape in Python.

To be precise, I want to implement Convert, Match Elements among Allplan functions.

Is there a way to freely draw a Polyline and turn it into a Bar Shape?

Show solution Hide solution

Hello,

you can use the API class BendingShape:

    def __init__(self, shapePol: Polyline3D, bendingRoller: VecDoubleList, diameter: float, steelGrade: int, concreteGrade: int,
                 bendingShapeType: BendingShapeType) -> None:
        """
        Constructor

        Parameter: shapePol          Shape polyline
                   bendingRoller     Bending roller
                   diameter          Diameter
                   steelGrade        Steel grade
                   concreteGrade     Concrete grade (index of the global list starting from 0, -1 = use global value from the Allplan settings)
                   bendingShapeType  Bending shape type
        """

Best regards
Horst

Hello,

you can use the API class BendingShape:

    def __init__(self, shapePol: Polyline3D, bendingRoller: VecDoubleList, diameter: float, steelGrade: int, concreteGrade: int,
                 bendingShapeType: BendingShapeType) -> None:
        """
        Constructor

        Parameter: shapePol          Shape polyline
                   bendingRoller     Bending roller
                   diameter          Diameter
                   steelGrade        Steel grade
                   concreteGrade     Concrete grade (index of the global list starting from 0, -1 = use global value from the Allplan settings)
                   bendingShapeType  Bending shape type
        """

Best regards
Horst

Quote by Horst_Hohmann
Hello,
you can use the API class BendingShape:

def __init__(self, shapePol: Polyline3D, bendingRoller: VecDoubleList, diameter: float, steelGrade: int, concreteGrade: int, bendingShapeType: BendingShapeType) -> None: """ Constructor Parameter: shapePol Shape polyline bendingRoller Bending roller diameter Diameter steelGrade Steel grade concreteGrade Concrete grade (index of the global list starting from 0, -1 = use global value from the Allplan settings) bendingShapeType Bending shape type """Best regards

Horst

Thank you for answering my question.

I have more questions.

1. ShapePol: Polyline3D is only available for Class Polyline3D?

2. If Class Polyline 3D() is possible, should I change the 3D Arc to Polyline 3D and enter it?

Hello,

Allplan can't create a bar from a Arc3D. You need to convert the Arc3D to a Polyline3D, for this you can use the Polygonize function.

Best regards
Horst


https://connect.allplan.com/ uses cookies  -  More information

Accept