Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to calculate the correct orientation for a point

1 REPLY 1
Reply
Message 1 of 2
068335643
230 Views, 1 Reply

how to calculate the correct orientation for a point

I figured out a little about the problem and correct my question: I have to move the point (curve) a certain distance (central layers) along the normal. I took the Orientation x and, using the trigonometry formula cos2 + sin2 = 1, found it from x - y, but (as can be seen from the formula) we can have Y positive and negative how to get from the infu curve what sign should it be?

      private static XYZ MoveWallLayers(Wall wall, XYZ directionCurve,double centerLayers)
        {
            LocationCurve newWallLineT = wall.Location as LocationCurve;

  
             var x = directionCurve.X * centerLayers ;
            double y = Math.Sqrt( 1 - Math.Pow(directionCurve.X, 2)) * centerLayers   ;

           


            XYZ translationVec = new XYZ(y, x, 0);
            newWallLineT.Move(translationVec);
            return translationVec;


        }
1 REPLY 1
Message 2 of 2
jeremy_tammik
in reply to: 068335643

A translation does not affect the orientation:

 

https://en.wikipedia.org/wiki/Translation_(geometry)

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report