Revision Cloud inversion

Revision Cloud inversion

SimonaQQ
Advocate Advocate
1,614 Views
3 Replies
Message 1 of 4

Revision Cloud inversion

SimonaQQ
Advocate
Advocate

Hello,

When using the API to create a rectangular Revision Cloud, I ran into the problem of Revision Cloud inversion.
The position of the IndependentTag in the diagram is the first point of the Revision Cloud, and the diagonal is the second point.
I think it is the direction of Line that causes this problem, but how should I judge or deal with the direction of Line? How do I pick or compute the four points?
thank you
love you

2021-07-02_155806.png

                var fPoint = selection.PickPoint();
                var sPoint = selection.PickPoint();

                var tPoint = new XYZ(sPoint.X, fPoint.Y, fPoint.Z);
                var foPoint = new XYZ(fPoint.X, sPoint.Y, sPoint.Z);


                var bian1 = Line.CreateBound(fPoint, tPoint);
                var bian2 = Line.CreateBound(tPoint, sPoint);
                var bian3 = Line.CreateBound(sPoint, foPoint);
                var bian4 = Line.CreateBound(foPoint, fPoint);

                List<Curve> lines = new List<Curve>() { bian1, bian2, bian3, bian4 };

                var newRevisionCloud = RevisionCloud.Create(doc, doc.ActiveView, revision.Id, lines);

 

0 Likes
Accepted solutions (1)
1,615 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni
Accepted solution

That is clearly documented in the Revit API docs that Richard and I pointed out to you yesterday:

 

https://www.revitapidocs.com/2021.1/090c0da6-db59-d1e6-5dcf-4335c531ee9f.htm

 

> The cloud graphics will be attached to the curves under the assumption that each curve is oriented in a clockwise direction. For lines, this means that the outside of the cloud is in the direction of the line's normal vector within the View's plane. Any closed loops should therefore be oriented clockwise to create the typical cloud shape.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

RPTHOMAS108
Mentor
Mentor

It is actually important to be able to invert a cloud as this is often used to represent an abeyance/hold region of a drawing. I think it is common practice although probably nobody can find the code of practice that dictates such use of clouds. I would set out that explicitly to avoid the 'I don't know what an abeyance cloud is' debate we sometimes experienced with other parties.

Message 4 of 4

SimonaQQ
Advocate
Advocate
Thank you
According to your instructions, I solved the problem by judging whether the three dots are in a clockwise direction.
0 Likes