Circular placement labeling [Gelöst]

Schlagworte:
  • PythonParts

Hi,
Thank you for the documentation until now was very helpful, but I got to the point where I need to use circular area element for the placement of rebars and it seems it doesn't support the labeling from ReinforcementLabel. Is there a solution that can help me label this rebars?

I don`t think i can create each rebar by hand ( is there a solution to create each rebar by hand as an arc2D? )

Thank you,
Bogdan

Lösung anzeigen Lösung verbergen

Hi Bogdan,

It seems, that labeling the rebars of a CircularAreaElement is not possible at the moment and this is due to the fact, that this element does not have the SetLabel method, which you could use to associate the label with the placement.

I assume, it will also never be the case, since labeling the a circular placement in Allplan does not occur by clicking on the placement, but on individual rebars. It's logical, when you think about the fact that each rebar inside CircularAreaPlacement has its own mark number.

In your case, to automate the whole process: rebar creation and labeling, there is no way around as create each circular rebar individually. In this way, each rebar would be represented with a BarPlacement object and you could associate it with a label.

Best!
Bart

Hi Bogdan,

Can you please share your script here, so I can have a look on this? As far as I understood correctly, you place an CircularAreaElement and want to append a Label with SetLabel. But what happens next is important for me to understand the problem: does Allplan crash, do you get a Python message or simply nothing happen. It would be very helpful for me, if you could provide a very simple script, with which I could reproduce the problem.

You can create each rebar "by hand" (actually by script). The BarShapeSideData accepts 2D arcs. But when you create a BendingShape, make sure its type is BarWithArc so that you get a correct bending scheme in the schedule.
However, you would have to create and place each bar individually. So there will be no information about the spacing in the label.

Best,
Bart

Thank you for the response,
I will try to explain a bit more: I`m creating the circular area reinforcement, making a section through it and them i would like to label each rebar that is in the section, when I`m doing this, Allplan says No placement found for position number 1. The position exists and I can create the label with the label function from Allplan (See the second picture - this is what I would like to create)

for creating the reinforcement:

def create_reinforcement(self):
        """
        Create the circular reinforcement
        Returns: created reinforcement
        """

        rotation_axis = AllplanGeo.Line3D(AllplanGeo.Point3D(0, 0, 0),
                                          AllplanGeo.Point3D(0, 0, self.h_1))

        contour = AllplanGeo.Polyline3D()
        contour += AllplanGeo.Point3D(self.r_1, 0, self.h_1)
        contour += AllplanGeo.Point3D(self.r_2, 0, self.h_1)

        circular_area = AllplanReinf.CircularAreaElement(1, 28,5, 5,
                                                         rotation_axis, contour,
                                                         0,
                                                         360,
                                                         0,
                                                         360,
                                                         -55, -55, -55)

        circular_area.SetBarProperties(250, 11900, 1000,
                                       1,
                                       12000, 12000,
                                      0, 10000)

        circular_area.SetOverlap(1000, 0, True,
                                 0, 1000, True,
                                 1000)


        return circular_area

and for labeling:

 [...]
            label_point = AllplanGeo.Point2D(3*self.r_1, 0)

            pos_nr = AllplanReinforcement.ReinforcementUtil.GetNextBarPositionNumber(self.document)


            label = AllplanReinforcement.ReinforcementLabel(
                reinforcementType = AllplanReinforcement.Bar,
                type              = AllplanReinforcement.LabelType.LabelWithFan,
                positionNumber    = pos_nr,
                labelProp         = label_prop,
                labelPoint        = label_point,
                angle             = AllplanGeo.Angle())

            labels = AllplanReinforcement.ReinforcementLabelList()

            labels.append(label)

            sect_ele = AllplanBasisElements.ViewSectionElement()

            # placement point is bottom left point of the from the section path body in the view

            view_props.PlacementPoint  = right_view_place_pnt
            view_props.PlacementAngle  = math.radians(0)


            sect_ele.GeneralSectionProperties = view_props
            sect_ele.ViewMatrix               = RotationAngles(-90, 0, 0).get_rotation_matrix()
            sect_ele.TextElements             = [view_label]
            sect_ele.ReinforcementLabels      = labels

I check the labeling script for bars that are placed with LinearBarBuilder.create_linear_bar_placement_from_to_by_dist and it worked.

Anhänge (2)

Typ: image/png
12-mal heruntergeladen
Größe: 5,12 KiB
Typ: image/png
18-mal heruntergeladen
Größe: 5,13 KiB

Hi Bogdan,

It seems, that labeling the rebars of a CircularAreaElement is not possible at the moment and this is due to the fact, that this element does not have the SetLabel method, which you could use to associate the label with the placement.

I assume, it will also never be the case, since labeling the a circular placement in Allplan does not occur by clicking on the placement, but on individual rebars. It's logical, when you think about the fact that each rebar inside CircularAreaPlacement has its own mark number.

In your case, to automate the whole process: rebar creation and labeling, there is no way around as create each circular rebar individually. In this way, each rebar would be represented with a BarPlacement object and you could associate it with a label.

Best!
Bart

Thank for the answer, I was guessing this might be the case.
Then in my case, how could I try to label those rebars, because this is taking a big amount of time to do it manually and is very laborious. From the manual, I understand that a label needs a BarPlacement and a UVS. Since my BarPlacement is missing what can I try?
I attached a example of a drawing that I need to create.

Thank you again for the help!

Anhänge (1)

Typ: image/png
32-mal heruntergeladen
Größe: 409,12 KiB

Zitiert von: bogdanv92
Then in my case, how could I try to label those rebars, ... Since my BarPlacement is missing what can I try?

I would create those rebars using the reinforcement shape builder. As previously mentioned, the BarShapeSideDataList accepts an Arc2D. You will then have one BendingShape object for each individual bar, which you then have to place individually. In this case you have the bar placement, that you can label individually.

Of course, creating individual curved bars is far more difficult, than just using an out-of-box solution. Still it should be achievable looking on your example. That is I think the only possibility for now.

Best,
Bart