Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] How to make a bar shape using Polyline3D? [Gelöst]

Schlagworte:
  • PythonParts
  • Reinforcement
  • API

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?

Lösung anzeigen Lösung verbergen

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

Zitiert von: 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