icon

Extrude Bar Along Path Placement, NOI Error

Schlagworte:
  • Allplan
  • PythonParts

Hello,
I am trying to place a longitudiunal reinforcement through a path by using Extrude Bar Placement. Unfortunately, I am not able to do that due to NOI error. However, while ı am still running the code I can see my reinforcement placed, but when I close the code to check the reinforcement properties, the NOI error pops out. All my formwork shape and reinforcement are no longer visible.

"def _create_single_longitudinal_extrude_placement(self,
path,
start_point,
end_point,
theta_start,
arc_length):
try:
print("REINF DEBUG - ENTER EXTRUDE FUNCTION")
print("REINF DEBUG - arc_length =", arc_length)
print("REINF DEBUG - start_point =", (start_point.X, start_point.Y, start_point.Z))
print("REINF DEBUG - end_point =", (end_point.X, end_point.Y, end_point.Z))

placement = AllplanReinf.ExtrudeBarPlacement(
self.params.outer_main_position_start,
path,
AllplanReinf.ExtrudeBarPlacement.eProfileRotation.eStandard,
False,
0.0,
arc_length,
0.0,
0.0,
AllplanReinf.ExtrudeBarPlacement.eEdgeOffsetType.eStartEqualEnd,
0.0,
0.0,
0.0,
AllplanGeo.Vector3D(0, 0, 1)
)

print("REINF DEBUG - EXTRUDE CONSTRUCTOR OK")

section = AllplanReinf.BarPlacementSection(
True,
arc_length,
arc_length * 10.0
)
placement.AddPlacementSection(section)

print("REINF DEBUG - SECTION ADDED OK")

cross_shape = self._create_valid_cross_shape_2d()
if cross_shape is None:
print("REINF DEBUG - CROSS SHAPE IS NONE")
return None

placement.AddCrossBendingShape(cross_shape)
print("REINF DEBUG - CROSS SHAPE ADDED OK")

longi_point_shape = AllplanReinf.BendingShape(
start_point,
self.params.normal_main_diameter,
self.params.reinf_steel_grade,
self.params.reinf_concrete_grade
)

longi_bar = AllplanReinf.LongitudinalBarProperties(
longi_point_shape,
False,
0.0,
False,
0.0,
0.0,
0.0,
AllplanReinf.LongitudinalBarProperties.eDeliveryShapeType.eStraight,
AllplanReinf.LongitudinalBarProperties.eInsideBarsState.eExact,
0.0
)

placement.AddLongitudinalBarProp(longi_bar)
print("REINF DEBUG - LONGITUDINAL PROP ADDED OK")

placement.Extrude()
print("REINF DEBUG - EXTRUDE() OK")

return placement

except Exception as ex:
print("REINF DEBUG - EXTRUDE STEP FAILED:", ex)
return None
"

Anhänge (2)

Typ: image/png
4-mal heruntergeladen
Größe: 9,97 KiB
Typ: image/png
8-mal heruntergeladen
Größe: 29,30 KiB

Hi,

This is probably because previewing the element succeeds, but creating it fails. Unfortunately, NOI errors are difficult to debug. All I can recommend you to is step by step adapt a working example and turn it into your use-case and see, which change leads to the NOI error.

TIP: if your reinforcement cannot be created using ALLPLAN's UI, it is also not possible to be created with API, even if theoretically the data structures allows it. Often, the NOI catches the unallowed combination of data.

Cheers,
Bart