2027 Method
Changes 0
M

RebarShapeDefinitionBySegments.AddConstraintToSegment

Description:
Add a constraint that helps determine the length of a segment.
Remarks:
The vector defined by (constraintDirCoordX, constraintDirCoordY) must have a positive dot product with the desired direction of the segment. This restriction, combined with the value of signOfZCoordOfCrossProductOfConstraintDirBySegmentDir, defines a quadrant of the plane that limits the variable-angle segment.
public void AddConstraintToSegment(
	int iSegment,
	ElementId paramId,
	double constraintDirCoordX,
	double constraintDirCoordY,
	int signOfZCoordOfCrossProductOfConstraintDirBySegmentDir,
	bool measureToOutsideOfBend0,
	bool measureToOutsideOfBend1
)
  • Int32
    iSegment
    Index of the segment (0 to NumberOfSegments - 1).
  • paramId
    Id of a parameter to drive the constraint. To obtain the id of a shared parameter, call RebarShape.GetElementIdForExternalDefinition().
  • Double
    constraintDirCoordX
    The x-coordinate of a 2D vector specifying the constraint direction.
  • Double
    constraintDirCoordY
    The y-coordinate of a 2D vector specifying the constraint direction.
  • Int32
    signOfZCoordOfCrossProductOfConstraintDirBySegmentDir
    Legal values are 1 and -1. For a fixed-direction segment, this value is ignored. For a variable-direction segment, this value is combined with the constraint length (the nonnegative value associated with 'param') to determine the direction of the segment. For example, a segment whose direction vector lies in the upper-right quadrant of the plane, and whose x-axis projected length is A and whose y-axis projected length is B, could be created by calling: AddConstraintToSegment(iSegment, paramA, 1.0, 0.0, 1, ...) AddConstraintToSegment(iSegment, paramB, 0.0, 1.0, -1, ...)
  • Boolean
    measureToOutsideOfBend0
    Choose between two possibilities for the first reference of the length dimension. If false, the reference is at the point where the bend begins; equivalently, at the projection of the bend centerpoint onto the segment. If true, the reference is moved outward by a distance equal to the bend radius plus the bar diameter; if the bend is a right angle or greater, this is equivalent to putting the reference at the outer face of the bend.
  • Boolean
    measureToOutsideOfBend1
    Choose between two possibilities for the second reference of the length dimension.
  • iSegment is not between 0 and NumberOfSegments. -or- paramId is not the id of a shared parameter in the current document, or its unit type is not Reinforcement_Length, Angle or Number. -or- The length of the vector (constraintDirCoordX, constraintDirCoordY) is too close to zero. -or- signOfZCoordOfCrossProductOfConstraintDirBySegmentDir is neither -1 nor 1.
  • A non-optional argument was null