- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Do you have any advice on how to determine the direction for positive offset values in case of segment to segment rebar constraints using the Revit API? This is conveniently available in the UI, and indicated by the arrow shown on the constraint target. Here is a link to the documentation. Can I query this from the database somehow?
I figured it could be based on the direction of the curves driving the rebar shape. Maybe the cross product of the the segment line direction and the rebar shape normal. But the attached example proves me wrong. Both of the S-shape bars are of the same shape id (M_20), have the same normal (0, 0, 1), both start at the south side and end on north. But their positive offset direction is opposite. Probably one of them is flipped in a way, but I couldn’t get this information from the API.
Then I figured to read it from the rebar shape family. The cross product of the segment direction and the Basis Z (0, 0, 1) looks promising, though I have no idea how to apply this rule to the rebar instance generated by the shape, the rebar parameters and the global location and a possible flip.
Solved! Go to Solution.