예제 #1
0
 public IXbimFace CreateFace(IIfcProfileDef profileDef, ILogger logger)
 {
     using (new Tracer(LogHelper.CurrentFunctionName(), this._logger, profileDef))
     {
         return(_engine.CreateFace(profileDef, logger));
     }
 }
예제 #2
0
        public IIfcRevolvedAreaSolid CreateSolid(
            IIfcProfileDef profile,
            double radius,
            double angle)
        {
            IIfcAxis1Placement   ifcAxis1Placement = IfcTools.IfcDatabase.CreateIfcAxis1Placement(IfcTools.CreatePoint(radius, 0.0, 0.0), IfcTools.CreateDirection(0.0, 1.0, 0.0));
            IIfcAxis2Placement3D axis2Placement3D  = IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(this.Position.get_X(), this.Position.get_Y(), this.Position.get_Z()), this.DirY, this.DirX);

            return(IfcTools.CreateRevolvedAreaSolid(profile, axis2Placement3D, ifcAxis1Placement, (IfcPlaneAngleMeasure)angle));
        }
예제 #3
0
        public IIfcBeam CreateStraight(
            ref List <IIfcProduct> elements,
            IIfcProfileDef profile,
            double length,
            Guid guid)
        {
            IfcAxis2Placement          beamLocation           = new IfcAxis2Placement(IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(this.Position.get_X(), this.Position.get_Y(), this.Position.get_Z()), this.DirZ, this.DirX));
            IIfcAxis2Placement3D       axis2Placement3D       = IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(0.0, 0.0, 0.0), IfcTools.CreateDirection(0.0, 0.0, 1.0), IfcTools.CreateDirection(1.0, 0.0, 0.0));
            IIfcProductDefinitionShape productDefinitionShape = IfcTools.IfcDatabase.CreateIfcProductDefinitionShape((IfcLabel)null, (IfcText)null, new List <IIfcRepresentation>()
            {
                IfcTools.CreateShapeRepresentation((IIfcRepresentationItem)IfcTools.CreateExtrudedAreaSolid(profile, axis2Placement3D, IfcTools.CreateDirection(0.0, 0.0, 1.0), (IfcPositiveLengthMeasure)length), "Body", "SweptSolid")
            });

            return(IfcTools.CreateBeam(beamLocation, (IIfcProductRepresentation)productDefinitionShape, guid));
        }
예제 #4
0
        public IIfcBeam CreateCurve(
            ref List <IIfcProduct> elements,
            IIfcProfileDef profile,
            double radius,
            double angle,
            Guid guid)
        {
            IfcAxis2Placement          beamLocation           = new IfcAxis2Placement(IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(this.Position.get_X(), this.Position.get_Y(), this.Position.get_Z()), this.DirX, this.DirZ));
            IIfcAxis2Placement3D       axis2Placement3D       = IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(0.0, 0.0, 0.0), IfcTools.CreateDirection(1.0, 0.0, 0.0), IfcTools.CreateDirection(0.0, 1.0, 0.0));
            IIfcProductDefinitionShape productDefinitionShape = IfcTools.IfcDatabase.CreateIfcProductDefinitionShape((IfcLabel)null, (IfcText)null, new List <IIfcRepresentation>()
            {
                IfcTools.CreateShapeRepresentation((IIfcRepresentationItem)IfcTools.CreateCurvedBeam(profile, axis2Placement3D, IfcTools.IfcDatabase.CreateIfcAxis1Placement(IfcTools.CreatePoint(0.0, 0.0, 0.0), IfcTools.CreateDirection(1.0, 0.0, 0.0)), (IfcPlaneAngleMeasure)angle), "Body", "SweptSolid")
            });

            return(IfcTools.CreateBeam(beamLocation, (IIfcProductRepresentation)productDefinitionShape, guid));
        }
예제 #5
0
        public static Dictionary <int, LinearPath> DicLinPathOfProductsGet(List <IIfcProduct> lstProduct)
        {
            Dictionary <int, LinearPath> dicLinPath = new Dictionary <int, LinearPath>();

            for (int i = 0; i < lstProduct.Count; i++)
            {
                IIfcRepresentationItem repItem = lstProduct[i].Representation.Representations.First.Items.First;
                IIfcProfileDef         profile = (repItem as IIfcExtrudedAreaSolid).SweptArea;
                IIfcCurve curve = (profile as IIfcArbitraryClosedProfileDef).OuterCurve;

                IIfcPolyline pLine = curve as IfcPolyline;
                IItemSet <IIfcCartesianPoint> ptSet = pLine.Points;

                List <Point3D> lstPt = new List <Point3D>();

                for (int j = 0; j < ptSet.Count; j++)
                {
                    lstPt.Add(new Point3D(ptSet[j].X, ptSet[j].Y, ptSet[j].Z));
                }
                dicLinPath.Add(lstProduct[i].EntityLabel, new LinearPath(lstPt));
            }
            return(dicLinPath);
        }
예제 #6
0
        public IIfcElement CreateRevolution(
            ref List <IIfcProduct> elements,
            List <Point> points,
            List <double> chamfers,
            double angle,
            Guid guid)
        {
            IIfcProfileDef             profile                = IfcTools.CreateProfile(points, chamfers, "REVO");
            IfcAxis2Placement          beamLocation           = new IfcAxis2Placement(IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(this.Position.get_X(), this.Position.get_Y(), this.Position.get_Z()), this.DirY, this.DirX));
            IIfcAxis2Placement3D       axis2Placement3D       = IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(0.0, 0.0, 0.0), IfcTools.CreateDirection(0.0, 1.0, 0.0), IfcTools.CreateDirection(1.0, 0.0, 0.0));
            IIfcProductDefinitionShape productDefinitionShape = IfcTools.IfcDatabase.CreateIfcProductDefinitionShape((IfcLabel)null, (IfcText)null, new List <IIfcRepresentation>()
            {
                IfcTools.CreateShapeRepresentation((IIfcRepresentationItem)IfcTools.CreateCurvedBeam(profile, axis2Placement3D, IfcTools.IfcDatabase.CreateIfcAxis1Placement(IfcTools.CreatePoint(0.0, 0.0, 0.0), IfcTools.CreateDirection(1.0, 0.0, 0.0)), (IfcPlaneAngleMeasure)angle), "Body", "SweptSolid")
            });
            IIfcBeam beam = IfcTools.CreateBeam(beamLocation, (IIfcProductRepresentation)productDefinitionShape, guid);

            IfcTools.AddQuantities((IIfcObject)beam);
            IfcTools.AddColorToElement((IIfcElement)beam, "beige");
            IfcTools.AddMaterialToElement(new List <IIfcRoot>()
            {
                (IIfcRoot)beam
            }, "Undefined");
            if (!string.IsNullOrEmpty(this.Reference))
            {
                Dictionary <string, object> attributes = new Dictionary <string, object>()
                {
                    {
                        "PDMS_ID",
                        (object)(IfcLabel)this.Reference
                    }
                };
                IfcTools.AddProperties((IIfcObject)beam, "PDMS Common", attributes);
            }
            elements.Add((IIfcProduct)beam);
            return((IIfcElement)beam);
        }
예제 #7
0
 public IXbimFace CreateFace(IIfcProfileDef profileDef)
 {
     return(_engine.CreateFace(profileDef));
 }