예제 #1
0
        public bool ConvertToRDF(Xbim.XbimExtensions.Interfaces.IModel model)
        {
            //indexing of items to store as object links cannot be made without the object being connected to context
            foreach (Xbim.XbimExtensions.Interfaces.IPersistIfcEntity en in model.Instances)
            {
                var temp = en as Ifc2x3.Kernel.IfcRoot;
                if(temp !=null)
                {
                    new IfcRoot(this) { UriId = temp.GlobalId.ToString(), EntityLabel = temp.EntityLabel, Name = temp.Name.ToString(), Description = temp.Description.ToString() };
                }
                else
                {
                    new ENTITY(this) { UriId = en.EntityLabel.ToString(), EntityLabel = en.EntityLabel };
                }
            }

            foreach (Xbim.XbimExtensions.Interfaces.IPersistIfcEntity en in model.Instances.OfType<Ifc2x3.ProductExtension.IfcSite>())
            {
                
                /* var RDFen = this.ENTITYs.Where(x => x.EntityLabel == en.EntityLabel).ElementAt(0);
                var RDFent = (IfcSite)RDFen;
                foreach(var IfcProp in en.GetType().GetProperties().Where(x => x.GetCustomAttributes(typeof(IfcAttribute)).Any()))
                {
                    IfcAttribute attr = (IfcAttribute)IfcProp.GetCustomAttribute(typeof(IfcAttribute));
                    if (attr.Order >3)
                    {
                        RDFent.GetType().GetProperty(IfcProp.Name).SetValue(RDFent,IfcProp.GetValue(en));
                    }
                    this.ENTITYs.
                }*/
            }   

            return true;

        }
 public Result(String name, Xbim.ModelGeometry.Scene.XbimRegion region)
 {
     ModelName = name;
     WorldCoordinateOffsetX = region.WorldCoordinateSystem.OffsetX;
     WorldCoordinateOffsetY = region.WorldCoordinateSystem.OffsetY;
     WorldCoordinateOffsetZ = region.WorldCoordinateSystem.OffsetZ;
     ModelSizeX = region.Size.X;
     ModelSizeY = region.Size.Y;
     ModelSizeZ = region.Size.Z;
     CentrePointX = region.Centre.X;
     CentrePointY = region.Centre.Y;
     CentrePointZ = region.Centre.Z;
 }
예제 #3
0
        public void PostToStore(Xbim.Ifc2x3.ProductExtension.IfcSite rt)
        {

            

            var rdfrt = new IfcSite(this)
            {
                UriId = rt.GlobalId.ToString(),
                GlobalId = rt.GlobalId,
                Name = rt.Name.ToString(),
                Description = rt.Description.ToString(),
                RefLatitude =
                new IfcCompoundPlaneAngleMeasure(this)
                {
                    
                    first = rt.RefLatitude.Value.Degrees,
                    rest = new IfcCompoundPlaneAngleMeasure(this) {
                                first = rt.RefLatitude.Value.Minutes,
                                rest = new IfcCompoundPlaneAngleMeasure(this){
                                         first = rt.RefLatitude.Value.Seconds,
                                        rest = new IfcCompoundPlaneAngleMeasure(this) {
                                            first = (double)(rt.RefLatitude.Value.MillionthsOfaSecond == null ? 0 : rt.RefLatitude.Value.MillionthsOfaSecond),
                                            rest = new IfcCompoundPlaneAngleMeasure(this)
                            }
                        }
                    }
                },
                RefLongitude =
                new IfcCompoundPlaneAngleMeasure(this)
                {
                    first = rt.RefLongitude.Value.Degrees,
                    rest = new IfcCompoundPlaneAngleMeasure(this)
                    {
                        first = rt.RefLongitude.Value.Minutes,
                        rest = new IfcCompoundPlaneAngleMeasure(this)
                        {
                            first = rt.RefLongitude.Value.Seconds,
                            rest = new IfcCompoundPlaneAngleMeasure(this)
                            {
                                first = (double)(rt.RefLatitude.Value.MillionthsOfaSecond == null ? 0 : rt.RefLatitude.Value.MillionthsOfaSecond),
                                rest = new IfcCompoundPlaneAngleMeasure(this)
                            }
                        }
                    }
                }

            };                          
        }
예제 #4
0
        public AddFederatedModel(Xbim.IO.XbimReferencedModel rItem)
            : this()
        {
            FileSelector.FilePath = rItem.DocumentInformation.Name;

            if (rItem.DocumentInformation.DocumentOwner is IfcOrganization)
            {
                var own = rItem.DocumentInformation.DocumentOwner as IfcOrganization;
                RoleSelector.Text = own.RolesString;
                OrganisationTextBox.Text = own.Name;
            }

            RoleSelector.IsReadOnly = true;
            RoleSelector.IsEnabled = false;

            OrganisationTextBox.IsReadOnly = true;
        }
예제 #5
0
 public IfcProduct SymDifference(Xbim.Ifc2x3.Kernel.IfcProduct first, Xbim.Ifc2x3.Kernel.IfcProduct second)
 {
     throw new NotImplementedException();
 }
예제 #6
0
 public bool? Relate(Xbim.Ifc2x3.Kernel.IfcProduct first, Xbim.Ifc2x3.Kernel.IfcProduct second)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 public IfcProduct Intersection(Xbim.Ifc2x3.Kernel.IfcProduct first, Xbim.Ifc2x3.Kernel.IfcProduct second)
 {
     throw new NotImplementedException();
 }
예제 #8
0
 public double? Distance(Xbim.Ifc2x3.Kernel.IfcProduct first, Xbim.Ifc2x3.Kernel.IfcProduct second)
 {
     throw new NotImplementedException();
 }
예제 #9
0
 public IfcProduct ConvexHull(Xbim.Ifc2x3.Kernel.IfcProduct product)
 {
     throw new NotImplementedException();
 }
예제 #10
0
 public IfcProduct Buffer(Xbim.Ifc2x3.Kernel.IfcProduct product)
 {
     throw new NotImplementedException();
 }
예제 #11
0
 private void DrawingControl_MeasureChangedEvent(DrawingControl3D m, Xbim.Presentation.ModelGeomInfo.PolylineGeomInfo e)
 {
     if (e != null)
     {
         this.EntityLabel.Text = e.ToString();
     }
 }