IFC Format
IFC format is an object-based file format to facilitate interoperability in the architecture, engineering and construction (AEC) industry among others. The last years this format is gaining a lot of importance and is being used in various end-user applications.
What is the vdIFC library
vdIFC library is included in VectorDraw Developers Framework annual subscription and gives the ability to import and export the IFC format. Note that the IFC code is based on internal VectorDraw implementation and not using any external library.
Unlearn you must
IFC has a completely different structure than our current Object Model therefore we had to adopt in order to be able to provide this format to our users. Instead of trying to make a full conversion of the imported ifc structure to our mentality (this approach would loose a lot of information during the import and export process) we made a new structure class (vdIFCDocument) which holds the majority of the information of the IFC file. Our current structure (in simple words) has a Document with layouts , and every layout has a collection of vdFigures. Also the Document has various primaries collections like layers , textstyles , dimstyles etc… that control the appearance of vdFigures. The IFC format is a little different…
vdIFCDocument
vdIFCDocument is the Document that is returned when an IFC file is opened. IT is a vdFigure object that in it's draw method the whole drawing is implemented. After opening an IFC file this vdFigure will be added to the model (or any other layout) in order to see it.
Every IFC file contains a Project.
Every Project contains a Site.
Every Site contains at least one of the following
a) A collection of Buildings.
Every Building contains a collection of
Building Storeys
Every Building Storey contains
products.
b) A collection of products.
As you understand the main graphical object is the product
(vdIFCProduct). The product has various custom properties that the
user wants to store like volume , price , width , height , material
etc… and a graphical representation which is what you see on the
screen. The type of the product is the "name" of the custom object
and we import the following : Default, IfcBuildingElementProxy,
IfcBeam,IfcColumn,IfcCovering, IfcCurtainWall, IfcDoor, IfcFooting,
IfcMember, IfcPile, IfcPlate, IfcRailing, IfcRamp, IfcRampFlight,
IfcRoof, IfcSlab, IfcStair, IfcStairFlight, IfcWall, IfcWindow,
IfcVirtualElement, IfcCivilElement, IfcDistributionElement,
IfcElementAssembly, IfcSystemFurnitureElement,
IfcGeographicElement, IfcTransportElement, IfcSpace. There are many
types of products but these are the most used ones. There are still
our main primaries lists like layers , textstyles etc… that the
graphical elements of the products belong to but they are not so
important as they were in our main mentality.
Each IFC object has various properties as mentioned above that contain a lot of information for the object. For example the Site object has a property named Address(vdAddress) that contains information about the site's physical address.
vdIFC component
The vdIFC component is the component that should be used in order to import and export ifc files from your application. After adding the component to your project you can use a code like below to import an IFC file
vdIFCDocument vdifcdoc = vdIFCComponent1.Open(fileName);
if (vdifcdoc != null)
{
mdoc.EnsureDefaults();
mdoc.Model.Entities.AddItem(vdifcdoc);
success = true;
}
Where the vdIFCComponent1 is the added component to your
project. You will notice that the open method returns a
vdIFCDocument which after is being added to the model entities. So
after opening the IFC format the model entities will be 1. All the
information of the IFC file and its graphical entities is in the
vdIFCDocument.
Creating an IFC file and exporting it is also possible. Although
if you do not prepare the Document in an IFC mentality then
VectorDraw will wrap all your objects and put them in one product
and export it. But you can create an IFC mentality to your
application and create buildings , storeys , graphic objects etc...
and then save the file in the IFC format. Please check our help
file to the "New" method of the vdIFCComponent for some sample
code.
What does VectorDraw IFC support
Our main goal is to open the format and to show the representation of the file in our component. So when we read an IFC object we provide it's stored representation , it's type and also it's properties. We have seen several IFC viewers and we realised that each one of them have a different approach on the format. Our main goal is to support as much as possible on this format and it's objects. We do not claim that we support all of IFC objects ( IFC has a lot of different objects in order to represent various elements) so if you encounter a drawing that is not fully supported or another viewer shows it differently we will be happy to examine it and explain to you our approach.
Import up to IFC 4 , export IFC4 (default) and 2x3.
How can I see what you are talking about
After downloading the developer setup we provide a viewer application vdIFCviewer with it's c# code so you can take a taste of how to handle the IFCDocument in your project , and as always our support team will be available to answer all your questions.
What else is provided
Also you will recieve a project that contain the vdWall custom object. Please read the information regarding this source code at the link above.