Git Product home page Git Product logo

xbimessentials's People

Contributors

alexmatv70 avatar andyward avatar artoymyp avatar bekraft avatar cbenghi avatar chuongmep avatar dmk-rib avatar dottormo avatar fomayette avatar gcoulby avatar haacked avatar i-sokolov avatar ibrahim5aad avatar jbrouwerdigibase avatar konstantinleontev avatar kozintsev avatar laurenceskoropinski avatar lloydpickering avatar martin1cerny avatar mezumroka avatar mlankamp avatar mseifert04 avatar prognostic-software avatar sense545 avatar stevelockley avatar urosjovanovic avatar xbimci avatar youshengcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xbimessentials's Issues

Add Element to IfcBuildingStorey

Dear xBim Team,

I created a storey (IfcBuildingStorey) and a few columns (IfcColumn). I would like to add column into IfcBuildingStorey.

public static void WriteColumn(Column w, XbimModel model, IfcBuilding building, double min, double max, IfcBuildingStorey storey)
{
IfcColumn wall = CreateColumn(model, w, min, max);
if (wall != null)
{
AddPropertiesToColumn(model, wall);
}
using (XbimReadWriteTransaction txn = model.BeginTransaction("Add Storey"))
{
storey.AddElement(wall);
building.AddElement(wall);
txn.Commit();
}
}

I write the code as above. But storey.AddElement() throw out an exception saying "Unable to cast object of type 'Xbim.Ifc2x3.SharedBldgElements.IfcColumn' to type 'Xbim.Ifc2x3.ProductExtension.IfcSpatialStructureElement'." .

May I know how to correctly assign a relation between Building Storey and an elements?
Thanks!

IFC4 support

Hi, I see there is a dev branch for IFC4 support.

Do you have an estimate on when it will be ready and promoted to master branch?

Thanks!

Latest XBimGeometry nuget incompatible with Essentials 3.1.1 on Myget master

Steve, it looks like this commit 10aa6f1 made a breaking change to IXbimGeometryCreator - a new Create() overload which has not been implemented in XbimTeam/XbimGeometry's Interop dll yet.

Anyone who gets the latest Essentials and Geometry from myget Master will have issues creating geometry since 3.0.24 of XbimGeometry engine is not compatible.

Is that an oversight, or should we stub in an implementation for now?

Workaround is to get the prior version of XbimEssentials (3.0.23)

Andy

IfcProxy (2x3): Tag and ProxyType attribute are not written in an ifc file

Dear xBIM team,
I am facing the following problem (bug??):

var ifcProxy = model.Instances.New();
ifcProxy.Name = "TestCuboid";
ifcProxy.Tag = new IfcLabel("TestTag");
ifcProxy.ProxyType= IfcObjectType.NotDefined;
...

is written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69);

but should be written as
#20=IFCPROXY('0UvNqIQW9AvAeKkg$mFvZJ',#11,'TestCuboid',$,$,#82,#69,.NOTDEFINED.,'TestTag');

Thanks and regards,
Dominic

Can't compile Xbim.ModelGeometry.Converter project!

Hi,

It seems like all the native dlls TKBO.dll, TKBool.dll TKBRep.dll and etc didn't come along with the downloaded project. May I know where can I get all these dlls in order to compile Xbim.ModelGeometry.Converter successfully?

Thanks in Advance!

Failed to add entity to the database

During the research the xBIM Toolkit I found the problem.
Unfortunately, InsertCopy method throws an exception:
Message = "Failed to add entity to the database"
InnerException = {"Illegal duplicate key"}

The test was taken from the file:
https://github.com/xBimTeam/XbimEssentials/blob/master/Xbim.Essentials.Tests/ModelFilterTest.cs

As well as, I write test:

   [TestMethod]
    public void CopyFileToFileTest()
    {
        using (var source = new XbimModel())
        {

            PropertyTranformDelegate propTransform = delegate (IfcMetaProperty prop, object toCopy)
            {
                var value = prop.PropertyInfo.GetValue(toCopy, null);
                return value;
            };
            string ifcFilename_1 = @"c:\\Temp\\House_1.ifc",
                ifcFilename_2 = @"c:\\Temp\\House_2.ifc";               
            source.CreateFrom(ifcFilename_1, Path.GetTempFileName(), null, true);
            source.CacheStop();
            using (var target = new XbimModel())
            {
                target.CreateFrom(ifcFilename_2, Path.GetTempFileName(), null, true);
                target.CacheStop();
                target.AutoAddOwnerHistory = false;
                using (var txn = target.BeginTransaction())
                {
                    var copied = new XbimInstanceHandleMap(source, target);
                    foreach (var item in source.Instances)
                    {
                        target.InsertCopy(item, copied, txn, propTransform);
                    }
                    txn.Commit();
                }
                target.SaveAs(ifcFilename_2);
            }
            source.Close();
            //the two files should be the same
        }
    }

`

In file XbimEntityCursor.cs, method AddEntity throws an exception line 382.
internal void AddEntity(int currentLabel, short typeId, IEnumerable<int> indexKeys, byte[] data, bool? indexed, XbimLazyDBTransaction? trans = null)

VRML

Hello!
Can Xbim Essentials save the IFC file as VRML (Virtual Reality Modeling Language) ?
Or maybe there is another way to save IFC file as VRML?

How to add a door to a wall?

I am experimenting with your toolkit, and it so far seems very useful. However, due to a lack of clear documentation, I'm struggling to understand how to compose hierarchies of objects.

For an example, let's assume I would like to create a wall, that has a door in it. Creating both the wall and the door themselves is fairly straightforward, after creating a model itself. But, how would one go about attaching the door to the wall?

How to collect the geometry data from IFC file?

Hi,

This open source project is a great job! I spend a few days to study it but it is too huge for me. Actually what I need is to open an IFC file, import the structural element such as Beam, Wall, Slab, Column and its 3D geometry data. Can anyone give me some hints to do that? Thanks in advance.

There was no argument keepLabels to method InsertCopy

I found a bug in file (developer version):

D:\GitHub\XbimEssentials\Xbim.IO\Esent\EsentModel.cs line 1032:

It was:

    public T InsertCopy<T>(T toCopy, XbimInstanceHandleMap mappings, PropertyTranformDelegate propTransform, bool includeInverses, bool keepLabels) where T : IPersistEntity
    {
        var txn = CurrentTransaction as XbimReadWriteTransaction;
        return Cache.InsertCopy(toCopy, mappings, txn, includeInverses, propTransform);
    }

Necessary:

    public T InsertCopy<T>(T toCopy, XbimInstanceHandleMap mappings, PropertyTranformDelegate propTransform, bool includeInverses, bool keepLabels) where T : IPersistEntity
    {
        var txn = CurrentTransaction as XbimReadWriteTransaction;
        return Cache.InsertCopy(toCopy, mappings, txn, includeInverses, propTransform, keepLabels);
    }

Where methods moved from version 3?

Hello!

Where are the methods:
buildingStorey.AddElement ?
project.AddSite(site) ?
project.AddBuilding(building) ?

etc.

Maybe there are common methods for IFC2x3 ΠΈ IFC4 ?
Do you have an example?

Thank you for attention.

How to create XBimModel from .xBim binary file?

Hi,

I know how to create an instant of XBimModel from .ifc file.
But I don't know how to create an instant of XBimModel from .xBim binary file?

Something like this:
var model = new Xbim.IO.XbimModel();
model.CreateFrom(xBimFile,....);

The reason is my IFC file is very big then it takes ages to create instant of XBimModel in the first time then I don't want to parse IFC file everytime. Therefore I think I should parse the .xBim instead in the second time as it should be faster than IFC text format.

Any ideas?

Xbim.IO.IfcOutputStream & IfcConnectionPointGeometry

Hi Everyone,

I have a problem with Xbim.IO.IfcOutputStream
(sorry if this is not the proper place to ask)

Here is what happens to me

I call, on an IfcOutputStream object, the Store method,
passing an Xbim.XbimExtensions.XbimMemoryModel with all IfcConnectionPointGeometry with PointOnRelatingElement = a specific IfcVertexPoint

In my ifc file, generated by storage, then I found all those IfcVertexPoint and all those IfcConnectionPointGeometry, but these latter ones are with no arguments, like you see here:
172=IFCCONNECTIONPOINTGEOMETRY();
173=IFCCONNECTIONPOINTGEOMETRY();
174=IFCCONNECTIONPOINTGEOMETRY();
175=IFCCONNECTIONPOINTGEOMETRY();
176=IFCCONNECTIONPOINTGEOMETRY();
177=IFCCONNECTIONPOINTGEOMETRY();
178=IFCCONNECTIONPOINTGEOMETRY();
179=IFCCONNECTIONPOINTGEOMETRY();

XbimModel.Delete() is throwing Method Not Implemented Exception

I am attempting to create a method to delete elements in a model; however, I get the follwoing exception from the code below.

Exception:
"The method or operation is not implemented."

Code:

    public static string Delete(XbimModel IfcModel, IfcElement IfcElement)
    {
        try
        {
            List<IPersistIfcEntity> m_IPersistObjects = IfcModel.Instances.OfType("IfcElement", true).ToList(); ;

            foreach (IPersistIfcEntity m_PersistObj in m_IPersistObjects)
            {
                IfcElement m_Element = m_PersistObj as IfcElement;

                if(m_Element.Name.ToString().ToLower() == IfcElement.Name.ToString().ToLower())
                {
                    // Delete existing 
                    using (XbimReadWriteTransaction txn = IfcModel.BeginTransaction("Delete IfcElement"))
                    {
                        IfcModel.Delete(m_PersistObj);
                    }
                    return c._Success;
                }
            }    
        }
        catch { }
        return null;
    }

Trying to get all Pset properties

Hello

I'm new in XBim and i want to make a testing application that should be able to open, modify and store all properties of IFC elements.
I followed this Guide https://www.youtube.com/watch?v=uZ3pAV7jp1o in order to add XBim package in to my application and now i'm trying to use it to do some simple tasks. At the moment I need to open all PSETS and I would like to know what is the "correct" method to do it.
Next i will need to modify these values and store them in the IFC file.

This is the code i'm using

        if (SelectedText == "IFCCOLUMN")
        {
            var TotalColumns = XBModel.Instances.OfType<Xbim.Ifc2x3.SharedBldgElements.IfcColumn>();
            Xbim.Ifc2x3.SharedBldgElements.IfcColumn col = TotalColumns.ElementAt(listBox1.SelectedIndex);
            textBox1.Text = "";
            var ifcObj = col as Xbim.Ifc2x3.Kernel.IfcObject;
            var ifcType = Xbim.IO.IfcMetaData.IfcType(ifcObj);

             Dictionary<IfcLabel, Dictionary<IfcIdentifier, IfcValue>> result = col.GetAllPropertySingleValues();

             for (int i = 0; i < result.Count; i++)
             {
                 var Meta = result.ElementAt(i).Value;
                 for (int j = 0; j < Meta.Count; j++)
                 {
                     var SubMeta = Meta.ElementAt(j);
                     textBox1.Text += "\t" + SubMeta.Key + ": " + SubMeta.ToString() + Environment.NewLine;
                 }
             }

            //Previous tests
            //for (int i = 0; i < ifcType.IfcProperties.Count; i++)
            //{
            //    Xbim.IO.IfcMetaProperty Meta = ifcType.IfcProperties.ElementAt(i).Value;
            //    textBox1.Text += "\t" + Meta.PropertyInfo.Name + ": " + Meta.PropertyInfo.GetValue(ifcObj) + Environment.NewLine;
            //}
            //for (int i = 0; i < ifcType.ExpressEnumerableProperties.Count(); i++)
            //{
            //        Xbim.IO.IfcMetaProperty Meta = ifcType.ExpressEnumerableProperties.ElementAt(i);
            //        textBox1.Text += "\t" + Meta.PropertyInfo.Name + ": " + Meta.PropertyInfo.GetValue(ifcObj) + Environment.NewLine;                   
            //}
        }

Exception on accessing ifcStore.DefaultOwningApplication if XbimEditorCredentials not provided on IfcStore.Create

In master branch (dll version 3.2):
The code in property IfcStore.DefaultOwningApplication assumes that _editorDetails is not null:
a.ApplicationName = _editorDetails.ApplicationFullName;

However, _editorDetails remains null using constructor
public static IfcStore Create(IfcSchemaVersion ifcVersion, XbimStoreType storageType)

Workaround: Provide editorDetails on Create()
public static IfcStore Create(XbimEditorCredentials editorDetails, IfcSchemaVersion ifcVersion, XbimStoreType storageType)

Problem in getting quantities

Hi guys I'm a begginner user of the xBim project, and I'm trying to create a BIM explorer interface, the problem that I'm currently facing is that I can get all IFC products and quantities, butI don't know how to related them. For example, for a wall I want to get what are its quantities.

I was reading and testing the code provided in the documentation section, but it seems to be out of date, and some function do not exist anymore. So how can I get the quantities related with some IFC product?

Sorry for posting here.

Thanks!

Deleting / Removing stuff from the xbim model

Is there any plan to migrate the examples and documentation from version 2 to version 3?
My current issue is that I have to remove some elements out of an IFC model and I can't find a good way to do that.

Is there a forum or something that xBim users use. Google has not been my friend so far.

SQLite database

Hello!

Why do you use the Esent rather than SQLite?
Do you have plans to use SQLite?

IfcExtrudedAreaSolid holes information?

Hi,

I have an Ifc file exported from Revit. If open with Xbim Xplorer you will see 4 holes within a IfcSlab. When I try to retrieve the IfcSlab info programmatically, the IfcSlab is actually represented by IfcExtrudedAreaSolid, I check the IfcExtrudedAreaSolid.SweptArea and it is actually a IfcArbitraryClosedProfileDef and the outerCurve is a IfcPolyline type. My question is where do they store the holes information ? Thanks in advance.

How to capture propertySets for each geometry?

Hi @LloydPickering , @martin1cerny , @andyward , @benjymous, @CBenghi

I've been trying to get the Properties of each shape this way :

`

using (var geomStore = Model.GeometryStore)
{

    using (var geomReader = geomStore.BeginRead())
    {

        var shapeInstances = geomReader.ShapeInstance.Where(s => s.RepresentationType == XbimGeometryRepresentationType.OpeningsAndAdditionsIncluded && !excludedTypes.Contains(s.IfcTypeId));

        foreach (var shapeInstance in shapeInstances)
        {
            var ifcObjs = Model.Instances[shapeInstance.InstanceLabel] as IIfcObject;
            // then access the properties from ifcObjs
        }

    }

}

`

but shapeInstance.InstanceLabel is always equal to -1

Can anybody please help me with that?

Model merge

Is it possible to merge two or more models using XBim?

Delete PropertySet

Hi,

I am looking for a way to remove the property set itself after removing all its properties. I see AddPropertySet(), GetPropertySet but no RemoveProperyStet. Is there any way I can do this?

Best regards

filter out all non-wall items and create a spatial view

Hi @CBenghi , @martin1cerny, @andyward

I have similar problem #15 , I want to filter out all non-wall items and create a Spatial view.

I have used the following code, but it is not populating the tree (Only project number appears on the tree). Could you please help?


private void OpenIfcFile(object s, DoWorkEventArgs args)
{
var worker = s as BackgroundWorker;
var ifcFilename = args.Argument as string;

        var model = new XbimModel();
        var modelCopy = new XbimModel();
        try
        {
            _temporaryXbimFileName = Path.GetTempFileName();
            SetOpenedModelFileName(ifcFilename);             

            if (worker != null)
            {
                model.CreateFrom(ifcFilename, _temporaryXbimFileName, worker.ReportProgress, true);
                string tempFileName = "";
                modelCopy = XbimModel.CreateModel(tempFileName);

                modelCopy.AutoAddOwnerHistory = false;
                using (var txn = modelCopy.BeginTransaction())
                {
                    var copied = new XbimInstanceHandleMap(model, modelCopy);
                    //modelCopy.InsertCopy(model.IfcProject, txn);
                    foreach (var item in model.Instances)
                    {
                        var ifctype = item.IfcType();
                        if (ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCPROJECT || 
                            ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCBUILDING ||
                            ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCBUILDINGSTOREY ||
                            ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCSITE ||
                            ifctype.IfcTypeEnum == IfcEntityNameEnum.IFCWALLSTANDARDCASE )
                        {
                            modelCopy.InsertCopy(item, copied, txn, false);
                        }                        
                    }

                    txn.Commit();
                }

                var context = new Xbim3DModelContext(modelCopy);//upgrade to new geometry represenation, uses the default 3D model
                context.CreateContext(geomStorageType: XbimGeometryType.PolyhedronBinary,  progDelegate: worker.ReportProgress,  adjustWCS: false);

                if (worker.CancellationPending) //if a cancellation has been requested then don't open the resulting file
                {
                    try
                    {
                        model.Close();
                        if (File.Exists(_temporaryXbimFileName))
                            File.Delete(_temporaryXbimFileName); //tidy up;
                        _temporaryXbimFileName = null;
                        SetOpenedModelFileName(null);
                    }
                    catch (Exception ex)
                    {
                        Log.Error(ex.Message, ex);
                    }
                    return;
                }
            }
            args.Result = modelCopy;

        }
        catch (Exception ex)
        {
            var sb = new StringBuilder();
            sb.AppendLine("Error reading " + ifcFilename);
            var indent = "\t";
            while (ex != null)
            {
                sb.AppendLine(indent + ex.Message);
                ex = ex.InnerException;
                indent += "\t";
            }

            args.Result = new Exception(sb.ToString());
        }
    }


Culture specific typenames

Hello,

I would like to report a problem and suggest a fix in lfcMetaData.cs. The problem is related to the uppercase type names stored in TypeNameToIfcTypeLookup. The AddParent method adds culture dependent upper case type names in the dictionary TypeNameToIfcTypeLookup, which causes crashes as the type can not be found later when the program runs under Turkish language. In Turkish upper case 'i' is an uppercase 'I' with a dot over it. This may be an issue in similar languages as well.

The suggested fix is:

In lfcMetaData.cs line 195
string typeLookup = baseParent.Name.ToUpper()
should be changed to
string typeLookup = baseParent.Name.ToUpperInvariant()

This is working fine for the time being but I am not sure if such a fix won't be needed elsewhere.

Can't delete *.xBim file if the ifc File is invlalid

Hello, I'm not sure if this is the right place.

When I open an invlaid ifc File an get an exception (there was an error in the string encoding, but I have the same thing with an invalid line, e.g. "#103= IFCBUILDING('1CP$KLp6fE0OAJmy4q$x53',#41,);
"), I can't delete the created *.xBim file as long my application is running.

xBimModel.CreateFrom(filePath, xBimFileName, LoadXbimProgress)

I use xBimModel in a using directive.
When I had a closer look, there where still a thread of or with the StepP21Parser running, so
I could not delete the file

XbimSolid not in the right place

I am using the following code to get XbimSolid and build a solid with the faces coordinates, but when finished, the solids get far away from each other, like if some are on the right place and others on the origin. Can someone help me? Also, how can I find the IfcProduct of the XbimSolid? So I can try to get the transformation and also the attributes.
Thanks!

        List<Xbim.Ifc2x3.GeometryResource.IfcGeometricRepresentationItem> items = model.Instances.OfType<Xbim.Ifc2x3.GeometricModelResource.IfcExtrudedAreaSolid>().ToList<Xbim.Ifc2x3.GeometryResource.IfcGeometricRepresentationItem>();
        MessageBox.Show("Geometric - " + items.Count().ToString());


        for (int i = 0; i < items.Count(); i++)
        {


            if (items[i] is Xbim.Ifc2x3.GeometricModelResource.IfcExtrudedAreaSolid)
            {


                XbimGeometry.Interfaces.IXbimSolid solidotemp = _xbimGeometryCreator.Create(items[i]) as XbimGeometry.Interfaces.IXbimSolid;
        XbimGeometry.Interfaces.IXbimFaceSet faces = solidotemp.Faces;


    }
    }

capturar

How can I get the EntityLabel that i have use to get an IfcProduct?

Hello,
I have to get the EntityLabel of an product in particular to be used in the following code:

var product = model.Instances[entityLabel] as IfcProduct;
var propertyRelations = product.IsDefinedBy.OfType();
........
........

This I need to get the geometry of the product.

Exception, when Reading ifc Files with IfcBuildingElement

I know this class is abstract. Nevertheless there are Ifc File Reader (Solibri, DDS-CAD Viewer), that accept this Type.
I am working with your Framework, and it threw exceptions.
The IFC File was generated from 'Nemetschek Vectorworks, Inc.' with 'Vectorworks Architect 2015 SP3 R1 (Build 257190) (64-Bit) by Nemetschek Vectorworks, Inc.'

Wouldn't it be nice to accept such files even thoug they are 'invalid'

Using Mono

I just want to know if it is possible to use mono with XbimEssentials or not.

With IFC it works allright, but very limited functionality, and not supported. If I use XbimEssentials with this example http://www.overarching.it/wordpress/2014/03/05/xbim-data-investigation-and-export-overarching-2/

Then I first get an error related to Log4Net not being able to find configuration file. When I fix that by adding it in app.config then I get a TypeInitialzationException in Xbim.IO.IfcPersistedInheritanceCache. This happens in XbimModel model = new XbimModel()

Do I have to use Windows server or is there any alternatives?

[Question]Domain entities filling

Hello,
i'm searching the greatest way to fill a list of all the entities from mep domain(electrical, plombing..)
But it seem to be have no link between an entity and its "MepDomain" in IFC4 ?

have you please got an idea ?

thanks for help

Genericity

Hey,

I can't find a way other than hardcode or reflection to access PredefinedType (contained in for exemple IIfcSlab, IIfcBeam IIfcColumn and a lot more)
I'm trying to set a treeView by defined types and there is so many of them i was thinking that it would be accessible pretty generically.

Does a better way exists?

IfcInputStream not found, Reading + Editing existing IFC

Hello,

Im trying out the toolkit. I have a presumably an older example SimpleOpenAndSaveIfcFile where an existing IFC file is read that uses the IfcInputStream:

IfcInputStream input = new IfcInputStream(new FileStream(ifcFileName, FileMode.Open, FileAccess.Read));

I also have a the HelloWallExample but apparently the Xbim.IO referenced to this project does not contain anymore the IfcInputStream.

Could you please point me out where to look for the IfcInputStream? Has it been renamed or deprecated? Or is there a an example for reading + editing an existing IFC file in another way? I have tried using the XbimModel.CreateFrom() function but it gives me an error.

Thanks in advance for the feedback.

PS: Sorry for using the tracker but the discussion forum link is dead.

What is the status of Nuget package XBim.Essentials.4?

I notice that there is an XBim.Essentials.4 nuget package which is much newer than the standard XBim.Essentials package. However I don't see any formal release in the releases area of this project.
It seems that most of the XBim repos have a .4 nuget package as well.
Can anyone expand on the status of these packages? Are they superseding the standard (not .4) packages?

Also, is there anywhere that details some of the API changes? For example I see that there are still transactions but there is no IfcStore.Validate() whereas there was a XBimModel.Validate(). Is validation just not there anymore?

Thanks
Jero

Stack overflow in IfcCsgPrimitive3D

Project: Xbim.Ifc2x3
File: IfcCsgPrimitive3D.cs
Problem:
Dim property - The get method references itself causing an immediate stack overflow.

Suggested fix: Specification defines that Dim should always be 3.

ManagedEsent 1.9.3.3 problem

I use xBim develop (Xbim.Essentials.4.0.0-V198) and found problem if update ManagedEsent from 1.9.2.0 to 1.9.3.3 (in my project).
Please test it.

The problem occurs if to call the xBim library from another library( which uses a standard mechanism for application extensions in .NET - Managed Extensibility Framework (MEF)).
In my case ...

Not rendering correct wexBIM after conversion

Hi guys,
After I updated the myget packages to the latest the browser stopped rendering correct the model after it's been converted to wexBIM. I attach screenshots of the problem.
building1
rac_basic_sample

Missing Property Data


var property = ifcModel.Instances.New<Xbim.Ifc2x3.PropertyResource.IfcPropertySingleValue>(psv =>
                    {
                        psv.Name = ifcProperty.Name;
                        psv.Description = ifcProperty.Description;                       
                        psv.NominalValue = new Xbim.Ifc2x3.MeasureResource.IfcText(ifcProperty.NominalValue);
                    });

                    var propertySet = ifcModel.Instances.New<Xbim.Ifc2x3.Kernel.IfcPropertySet>(ps =>
                    {
                        ps.HasProperties.Add(property);
                        ps.Name = ifcProperty.Name;
                        ps.Description = ifcProperty.Description;
                    });

                                       foreach (var instance in ifcModel.Instances.Where<Xbim.Ifc2x3.Kernel.IfcProduct>(
                        ins => ins.EntityLabel.Equals(productEntityLabel)))
                    {
                        instance.AddPropertySet(propertySet);
                    }

I am trying to insert property in the following way. Later it is saved to the IFC file like that:

#175043=IFCPROPERTYSINGLEVALUE('Construction',$,IFCTEXT('Yes'),$);
#175044=IFCPROPERTYSET($,#175045,'Construction',$,(#175043));
#175045=IFCOWNERHISTORY(#175048,#175049,$,.ADDED.,$,$,$,0);
#175046=IFCPERSON($,$,$,$,$,$,$,$);
#175047=IFCORGANIZATION($,$,$,$,$);
#175048=IFCPERSONANDORGANIZATION(#175046,#175047,$);
#175050=IFCORGANIZATION($,'Org',$,$,$);
#175049=IFCAPPLICATION(#175050,$,$,'Soft');
#175051=IFCRELDEFINESBYPROPERTIES($,#175045,$,$,(#37994),#175044);

The PSet and the property are now recognized by Solibry. Constructivity even says the file is invalid with the following errors:

#175044, IfcPropertySet, GlobalId, $, 
#175047, IfcOrganization, Name, $, 
#175049, IfcApplication, Version, $, 
#175049, IfcApplication, ApplicationFullName, $, 
#175051, IfcRelDefinesByProperties, GlobalId, $, 
#175053, IfcPropertySet, GlobalId, $, 
#175058, IfcApplication, Version, $, 
#175060, IfcRelDefinesByProperties, GlobalId, $, 

Not rendering correct wexBIM after conversion

Hi, guys I have some great issues with the latest version of the myget packages. The rendering of the wexBIM file after the conversion is getting worse. I am attaching a screenshot. In my last issue I posted the file that I am playing with. In one of the previous versions it was working great.

About XbimMemoryModel

I want to ask a question
Form codeplex, there is a class name XbimMemoryModel,but i can not find it in the source code package of Xbim.XbimExtensions

// ---- code from codeplex --------------
Xbim.XbimExtensions.IModel model = null;

//get a stream to access the ifc data
Xbim.IO.IfcInputStream input = new Xbim.IO.IfcInputStream(new FileStream(ifcFileName, FileMode.Open, FileAccess.Read));

//create an empty model
model = new Xbim.XbimExtensions.XbimMemoryModel();

//load entities into the model
errors = input.Load(model);
// ---- end --------------

and this is the link
http://xbim.codeplex.com/wikipage?title=Walkthrough%20Sample%201%3A%20Export%20data%20from%20an%20IFC%20File%20to%20an%20Excel%20Spreadsheet

is this XbimMemoryModel built model fast than XbimModel?
where i can get this XbimMemoryModel

Exception thrown when Validating an IFC File

I have found a bug.
When I try to validate some IFC files, a have an exception saying that :
_firstOperande of Xbim.Ifc2x3.GeometricModelResource.IfcBooleanResult is null, at lines 118 and 126.

I believe it's not supposed to be, and better write down the problem in the validation output.

model.InsertCopy: missing step instance names inside file by using Esent

Hello,

I am copying from multiple ifc files the IfcShapeRepresentations into new created model, using
destinationModel.InsertCopy(toCopy, mapping, Filter, false, false);. This is used for a tool which shall convert ifc files containing generic BuildingElementProxy to correct ifc product type, with attributes defined inside a SQL database.

This works perfect as long as destinationModel is created by XbimStoreType.InMemoryModel. If EsentDatabase is used, no referenced step instance names are getting added inside file to ifc objects added by code:

destination file output:

#228=IFCCURTAINWALLTYPE('2jOin3JCn7r8OHsq71vF9B',#4,'Curtain Wall  test',$,'IfcCurtainWall',$,$,$,$,.USERDEFINED.);
#229=IFCLOCALPLACEMENT($,#193);
#230=IFCPRODUCTDEFINITIONSHAPE($,$,());
#231=IFCSHAPEREPRESENTATION($,'Body','SurfaceModel',());

Issue:

#228: should contain #229 and #230
#230: () should contain (#231)
#231 () should contain.. 
#231 is the object returned by InsertCopy. The references in lower nested objects are correct

Using InMemoryModel works! In debugger the objects are looking correct, with referenced objects.

Related to Nuget package 4.0.2 from 16 October 2016

Any idea?

(Note; I've edited the comment because some parts where mistakenly interpreted as references to issues from github. Claudio)

Validate IFC 2.3 model

In previous Xbim version, I was able to validate my model with:
model.Validate(t.Modified(), writer);
Now with IfcStore, Validate method does not exists anymore.
What is the new way to validate my data?
Thank you for your help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.