Rebar CreateFromCurvesAndShape hook orientation issue

Rebar CreateFromCurvesAndShape hook orientation issue

r10521606
Explorer Explorer
370 Views
2 Replies
Message 1 of 3

Rebar CreateFromCurvesAndShape hook orientation issue

r10521606
Explorer
Explorer
IList<Curve> curves1 = new List<Curve>();
            Curve curve1 = Line.CreateBound(eleCenter[0] + forward.Negate() + sideForward, eleCenter[1] + forward + sideForward);
            curves1.Add(curve1);
            IList<Curve> curves2 = new List<Curve>();
            Curve curve2 = Line.CreateBound(eleCenter[0] + forward.Negate() + sideForward + XYZ.BasisZ * spacing, eleCenter[1] + forward + sideForward + XYZ.BasisZ * spacing);
            curves2.Add(curve2);
rebar1 = Rebar.CreateFromCurvesAndShape(doc,
                                        shape,
                                        barType,
                                        hook90, hook135,
                                        hostElement, XYZ.BasisZ, curves1,
                                        rebarHookOrientation, rebarHookOrientation);
rebar2 = Rebar.CreateFromCurvesAndShape(doc,
                                        shape,
                                        barType,
                                        hook135, hook90,
                                        hostElement, XYZ.BasisZ, curves2,
                                        rebarHookOrientation, rebarHookOrientation);

currently i'm using RevitAPI to create column rebar, to make it more accurate with construction site, i'm trying to make tie object staggered, like image below

r10521606_0-1684179346785.png

the C# code works fine in this revit project, but when i opened new other project, the result become weird.

as below,

r10521606_1-1684179446004.png

when i debuged, i found the more weird thing, the red rebar project (which i thought works fine,) the two rebar actually have same start hook angle and end hook angle, which is out of my exception!

 

0 Likes
371 Views
2 Replies
Replies (2)
Message 2 of 3

moturi.magati.george
Autodesk
Autodesk

Hello,

I asked the development for you here.
I will update you once I get a response from them. 

  Moturi George,     Developer Advocacy and Support,  ADN Open
Message 3 of 3

moturi.magati.george
Autodesk
Autodesk

Hi @r10521606 

 

Kindly provide a minimum reproducible case i.e. sample project and sample code that can be used by the engineering team to reproduce your issue above.

  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes