2027 Method
Changes 7
M

Rebar.CreateFromCurvesAndShape

Description:
Creates a new instance of a shape driven Rebar element within the project. The instance will have the default shape parameters from the RebarShape. The curves and terminations data should match the rebar shape definition.
public static Rebar CreateFromCurvesAndShape(
	Document doc,
	RebarShape rebarShape,
	RebarBarType barType,
	Element host,
	XYZ norm,
	IList<Curve> curves,
	BarTerminationsData barTerminationsData
)
  • doc
    A document.
  • rebarShape
    A RebarShape element that defines the shape of the rebar. A RebarShape element that matches curves, and terminations data. A RebarShape element that provides the RebarStyle of the rebar.
  • barType
    A RebarBarType element that defines bar diameter, bend radius and material of the rebar.
  • host
    The element to which the rebar belongs. The element must support rebar hosting. See # RebarHostData.
  • norm
    The normal to the plane that the rebar curves lie on.
  • IList<Curve>
    curves
    An array of curves that define the shape of the rebar curves. They must belong to the plane defined by the normal and origin. Bends, hooks and cranks should not be included in the array of curves.
  • barTerminationsData
    Data about the Rebar's terminations.
Return Value Rebar The newly created Rebar instance, or if the operation fails.
  • The element host was not found in the given document. -or- host is not a valid rebar host. -or- The input curves is empty. -or- The input curves contains at least one curve which is not a bound Line or bound Arc and is not supported for this operation. -or- curves do not form a valid CurveLoop. -or- The input curves contains at least one helical curve and is not supported for this operation. -or- The barTerminationsData was not created using the input document. -or- The barTerminationsData was not created using the rebarShape's document. -or- The barTerminationsData was not created using the barType's document. -or- The input curves are too small to apply crank on them.
  • A non-optional argument was null
  • norm has zero length.
  • curves contains non-fillet arcs with radii that are less than the minimum bend radius for the RebarBarType and RebarShape style.
  • rebarShape does not match curves.