当前位置: 首页>>代码示例>>C#>>正文


C# Ifc.DatabaseIfc类代码示例

本文整理汇总了C#中GeometryGym.Ifc.DatabaseIfc的典型用法代码示例。如果您正苦于以下问题:C# DatabaseIfc类的具体用法?C# DatabaseIfc怎么用?C# DatabaseIfc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DatabaseIfc类属于GeometryGym.Ifc命名空间,在下文中一共展示了DatabaseIfc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IfcCartesianPointList2D

		public IfcCartesianPointList2D(DatabaseIfc m, IEnumerable<Point2d> coordList) : base(m)
		{
			List<Tuple<double, double>> pts = new List<Tuple<double, double>>();
			foreach (Point2d t in coordList)
				pts.Add(new Tuple<double, double>(t.X, t.Y));
			mCoordList = pts.ToArray();
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:7,代码来源:ifc+C+RhinoCommon.cs

示例2: IfcRationalBSplineCurveWithKnots

 internal IfcRationalBSplineCurveWithKnots(DatabaseIfc db, NurbsCurve nc, bool twoD)
     : base(db, nc, twoD)
 {
     mWeightsData = new List<double>(nc.Points.Count);
     for (int icounter = 0; icounter < nc.Points.Count; icounter++)
         mWeightsData.Add(nc.Points[icounter].Weight);
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:7,代码来源:IFC+R+RhinoCommon.cs

示例3: attachModel

		private void attachModel(DatabaseIfc m)
		{

			bool added = false;
			for (int icounter = m.mNextBlank; icounter < m.mIfcObjects.Count; icounter++)
			{
				if (m.mIfcObjects[icounter] == null)
				{
					added = true;
					mIndex = icounter;
					m.mNextBlank = icounter + 1;
					m.mIfcObjects[icounter] = this;
					break;
				}
			}
			if (!added)
			{
				if (m.mNextBlank > m.mIfcObjects.Count)
				{
					int count = m.mNextBlank - m.mIfcObjects.Count;
					for (int pcounter = 0; pcounter < count; pcounter++)
						m.mIfcObjects.Add(null);
				}
				mIndex = m.mIfcObjects.Count;
				m.mIfcObjects.Add(this);
				m.mNextBlank = mIndex + 1;
			}
			mDatabase = m;
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:29,代码来源:BaseClassIFC.cs

示例4: IfcEdge

		internal IfcEdge(DatabaseIfc db, IfcEdge e) : base(db, e)
		{
			if(e.mEdgeStart > 0)
				EdgeStart = db.Factory.Duplicate( e.EdgeStart) as IfcVertex;
			if(e.mEdgeEnd > 0)
				EdgeEnd = db.Factory.Duplicate( e.EdgeEnd) as IfcVertex;
		}
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:7,代码来源:IFC+E.cs

示例5: IfcParameterizedProfileDef

		protected IfcParameterizedProfileDef(DatabaseIfc m)
			: base(m)
		{
			if (mDatabase.mModelView == ModelView.Ifc4Reference)
				throw new Exception("Invalid Model View for IfcParameterizedProfileDef : " + m.ModelView.ToString());
			if (mDatabase.mSchema == Schema.IFC2x3)
				Position = (mDatabase.m2DPlaceOrigin == null ? new IfcAxis2Placement2D(m) : mDatabase.m2DPlaceOrigin);
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:8,代码来源:IFC+P.cs

示例6: IfcDirection

 public IfcDirection(DatabaseIfc db, Vector2D v)
     : base(db)
 {
     double len = v.Length;
     mDirectionRatioX = v.X / len;
     mDirectionRatioY = v.Y / len;
     mDirectionRatioZ = double.NaN;
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:8,代码来源:IFC+D+Math.NET.cs

示例7: Main

		static void Main(string[] args)
		{
			DatabaseIfc db = new DatabaseIfc(Console.In);
			IfcProject project = db.Project;
			IfcSpatialElement rootElement = project.RootElement;
			int buildingStoreyCount = CountStories(rootElement);
			Console.Out.Write("Number of Stories in file :" + buildingStoreyCount);
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:8,代码来源:Program.cs

示例8: IfcTable

		public IfcTable(DatabaseIfc m, string name, List<IfcTableRow> rows, List<IfcTableColumn> cols) : base(m)
		{
			if (!string.IsNullOrEmpty(name))
				mName = name.Replace("'", "");
			if (rows != null && rows.Count > 0)
				mRows = rows.ConvertAll(x => x.mIndex);
			if (cols != null && cols.Count > 0)
				mColumns = cols.ConvertAll(x => x.mIndex);
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:9,代码来源:IFC+T.cs

示例9: IfcMapConversion

		internal IfcMapConversion(DatabaseIfc m, IfcCoordinateReferenceSystemSelect source, IfcCoordinateReferenceSystem target, double eastings, double northings, double orthogonalHeight, double XAxisAbscissa, double XAxisOrdinate, double scale)
			: base(m, source, target)
		{
			mEastings = eastings;
			mNorthings = northings;
			mOrthogonalHeight = orthogonalHeight;
			mXAxisAbscissa = XAxisAbscissa;
			mXAxisOrdinate = XAxisOrdinate;
			mScale = scale;
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:10,代码来源:IFC+M.cs

示例10: IfcDirection

        public IfcDirection(DatabaseIfc db, Vector3d v)
            : base(db)
        {
            Vector3d unit = v;
            unit.Unitize();

            mDirectionRatioX = unit.X;
            mDirectionRatioY = unit.Y;
            mDirectionRatioZ = unit.Z;
        }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:10,代码来源:IFC+D+RhinoCommon.cs

示例11: IfcColourRgbList

 public IfcColourRgbList(DatabaseIfc db, IEnumerable<Color> colourList)
     : base(db)
 {
     mColourList = new Tuple<double, double, double>[colourList.Count()];
     int ilast = colourList.Count();
     for (int icounter = 0; icounter < ilast; icounter++)
     {
         Color c = colourList.ElementAt(icounter);
         mColourList[icounter] = new Tuple<double, double, double>(c.R / 255.0, c.G / 255.0, c.B / 255.0);
     }
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:11,代码来源:IFC+C+System.Drawing.cs

示例12: ConvertRhinoCommonCurve

 public static IfcBoundedCurve ConvertRhinoCommonCurve(DatabaseIfc db, Curve crv)
 {
     double tol = db.Tolerance, angTol = Math.PI / 1800;
     if (crv.IsLinear(tol))
         return new IfcPolyline(new List<IfcCartesianPoint>() { new IfcCartesianPoint(db, crv.PointAtStart), new IfcCartesianPoint(db, crv.PointAtEnd) });
     Plane pln = new Plane();
     if (crv.TryGetPlane(out pln, tol))
     {
         if (Math.Abs(pln.Origin.Z) < tol && pln.ZAxis.IsParallelTo(Vector3d.ZAxis, angTol) != 0)
             return convCurve(db, crv, true);
     }
     return convCurve(db, crv, false);
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:13,代码来源:IFC+B+RhinoCommon.cs

示例13: IfcNamedUnit

		protected IfcNamedUnit(DatabaseIfc m, IfcUnitEnum unitEnum, bool gendims) : base(m)
		{
			mUnitType = unitEnum;
			if (gendims)
			{
				if (unitEnum == IfcUnitEnum.LENGTHUNIT)
					mDimensions = new IfcDimensionalExponents(m, 1, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.AREAUNIT)
					mDimensions = new IfcDimensionalExponents(m, 2, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.VOLUMEUNIT)
					mDimensions = new IfcDimensionalExponents(m, 3, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.PLANEANGLEUNIT)
					mDimensions = new IfcDimensionalExponents(m, 0, 0, 0, 0, 0, 0, 0).mIndex;
			}
		}
开发者ID:jenca-cloud,项目名称:ggIFC,代码行数:15,代码来源:IFC+N.cs

示例14: IfcTrimmedCurve

 internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD, IfcCartesianPoint optStrt, out IfcCartesianPoint end)
     : base(db)
 {
     Point3d o = a.Plane.Origin, s = a.StartPoint, e = a.EndPoint;
     Vector3d x = s - o;
     mSenseAgreement = true;
     if (optStrt == null)
         optStrt = twoD ? new IfcCartesianPoint(db, new Point2d(s.X, s.Y)) : new IfcCartesianPoint(db, s);
     end = twoD ? new IfcCartesianPoint(db, new Point2d(e.X, e.Y)) : new IfcCartesianPoint(db,e);
     double angleFactor = mDatabase.mContext.UnitsInContext.getScaleSI(IfcUnitEnum.PLANEANGLEUNIT);
     if (twoD)
     {
         if (a.Plane.ZAxis.Z < 0)
         {
             mSenseAgreement = false;
             x = e - o;
             IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
             BasisCurve = new IfcCircle(ap, a.Radius);
             mTrim1 = new IfcTrimmingSelect(a.Angle / angleFactor, optStrt);
             mTrim2 = new IfcTrimmingSelect(0, end);
         }
         else
         {
             IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
             BasisCurve = new IfcCircle(ap, a.Radius);
             mTrim1 = new IfcTrimmingSelect(0, optStrt);
             mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
         }
     }
     else
     {
         Vector3d y = Vector3d.CrossProduct(a.Plane.ZAxis, x);
         Plane pl = new Plane(o, x, y);
         IfcAxis2Placement3D ap = new IfcAxis2Placement3D(db, pl);
         BasisCurve = new IfcCircle(ap, a.Radius);
         mTrim1 = new IfcTrimmingSelect(0, optStrt);
         mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
     }
     mMasterRepresentation = IfcTrimmingPreference.PARAMETER;
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:40,代码来源:IFC+T+RhinoCommon.cs

示例15: IfcWindowType

 internal IfcWindowType(DatabaseIfc m, string name, IfcWindowTypeEnum type, IfcWindowTypePartitioningEnum partition, string userDefinedPartionType, IfcWindowLiningProperties wlp, List<IfcWindowPanelProperties> pps)
     : base(m)
 {
     Name = name;
     mPredefinedType = type;
     mPartitioningType = partition;
     mParameterTakesPrecedence = true;
     if (wlp != null)
         mHasPropertySets.Add(wlp.mIndex);
     if (pps != null && pps.Count > 0)
         mHasPropertySets.AddRange(pps.ConvertAll(x => x.mIndex));
     if (!string.IsNullOrEmpty(userDefinedPartionType))
         mUserDefinedPartitioningType = userDefinedPartionType.Replace("'", "");
 }
开发者ID:jmirtsch,项目名称:GeometryGymIFC,代码行数:14,代码来源:IFC+W.cs


注:本文中的GeometryGym.Ifc.DatabaseIfc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。