| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /* ==============================================================================
- * 功能描述:RevitApiBaseDll
- * 创 建 者:Garrett
- * 创建日期:2018/4/23 18:38:06
- * ==============================================================================*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Autodesk.Revit.DB;
- namespace SAGA.RevitAPI
- {
- /// <summary>
- /// RevitApiBaseDll
- /// </summary>
- public static class RevitApiBaseDll
- {
- public static Plane NewPlane(XYZ norm,XYZ origin)
- {
- Plane plane = null;
- #if R16
- plane=new Plane(norm,origin);
- #else
- plane = Plane.CreateByNormalAndOrigin(norm,origin);
- #endif
- return plane;
- }
- public static Plane NewPlane(XYZ xVec,XYZ yVec,XYZ origin)
- {
- Plane plane = null;
- #if R16
- plane=new Plane(xVec,yVec,origin);
- #else
- plane = Plane.CreateByThreePoints(xVec, yVec, origin);
- #endif
- return plane;
- }
- }
- }
|