PDF Export RSS - Latest News

Import from IFC with textures

This tutorial shows how to create an IFC conversion rule, where information in the file is used as keys in the conversion, or is mapped to properties, like material and texture. We can convert all of the attributes we find in the file and import them on the features in the model, but in this example, we only go through material and texture.

NOTE: This tutorial is translated from norwegian, and the IFC file used in the example contains norwegian names. But the process itself is identical in english.

In the conversion, IFC object type probably does not distinguish exactly what the different features represent, but an IFC file contains many other classifications and attributes on the objects that can be used in the conversion.

  • We use Name to convert to an object
  • We use Material to assign a material, and later a texture

One point here is to standardize at least one or two attributes in the program used to create the IFC file, in order to reuse the conversion rule.

In this example we will import an IFC file (can be downloaded for testing itselfhere) of a bridge construction. If you want to create conversion rules for IFC, you may want to get a program that works as a free viewer of IFC files, such as the Solibri Model Viewer. We need this to get an overview of the attributes on the different objects.

When we make the conversion rule, we'll set up a Regular Expression in the conversion, which is a programming syntax that describes one or more strings to match when you search a body of text. For example, we can search for all objects that have the text string “Søyle” (=Column) in the name, and convert to feature Column.

Start import-verktøyet på vanlig måte, og velg DWG-filen som skal leses inn.

Click Select Rules

In the next dialog, click New, then give the rule a suitable name, and set Source Compability = Exact.

You are now in the Conversion Rule editor. Click New Rule.

In this example we set up Source Feature = IfcObject, Source Attribute = nameValuePairList and Conversion Key Name = Name. In Convertion Key Value, click *Edit Value….

Type in Søyle (=Column) under substring and click OK.

A regular expression for the text string “Søyle” (=Column) is now being filled in. Also set Destination Feature to Column. Now, if the text string “Søyle” is somewhere in the IFC name, it will be mapped to the feature Column. As the IFC name of the column in the file is “Søyle Betong Sirkulær:ø1500:642773”, this layer will be converted to Column.

In our external IFC viewer application, click the other objects and see if you find something in the name that can be used. We find this for Rekkverksstolpe (=GuardRailPost) and Fundament (=Foundation). Thus we use the same method as above on these.

For Landkar (=Abutment) and Bjelke (=Beam) we find no attributes we can use, neither in the name nor other places in the Info of the file. Here we must read the name specifically for these objects.

For the two beams we use text strings “Generic Models 19” and “Generic Models 20”, respectively.

For the two abutments we use text strings “Generic Models 36” and “Generic Models 37”, respectively.

If we click on the bridge surface, we can see that we don't have anything we can use from Name (although we can use “Generic Models 3” as we did above). If we click Identity Data, we find Mark = Brubane Nord (=Bridge path north). The text string “Brubane” (=Bridge path) can be used to convert to the BridgeSurface feature.

Same goes with the traffic barrier. If we click on Identity Data, we findWorkset = 87220000_Kjøresterkt-rekkverk-i-stål. The text string “rekkverk” (=traffic barrier) we can use to convert to the TrafficBarrier feature.

Set up like this:

We've set up a conversion for everything from the IFC file to different objects in the model, and can now set up the mapping of textures.

Information about textures can be retrieved from Constraints and ProsesskodeLag (=Process Code layers) (alternatively it can be retrieved from Identity Data and Workset).

Click Attributes Conversion per Feature (marked yellow in the picture below).

First we add the attribute constructionMaterial for the column, which we retrieve from the name (nameValuePairList) under Constraints.ProsesskodeLag. Set up like the picture below shows.

Click the mapping button to the right in the row for bridgeMaterial. Then we set up the mapping. Set up as the picture below shows, with Regular Expression you can type in yourself (/.*xxxxx.*/i). In this case, if “Betong” (=Concrete) exists somewhere in the layer name, bridgeMaterial will be mapped as Concrete [1].

Similarly, we add the textureName property for Column, which we also get from the name (nameValuePairList) under Constraints.ProsesskodeLag. Set up like the picture below shows.

Click the mapping button at the right of the row of textureName. Then we set up the mapping. Set up as the picture below shows, with Regular Expression you can type in yourself (/.*xxxxx.*/i). In this case, if “Betong” (=Concrete) exists somewhere in the layer name, textureName will be mapped as T_Concrete01..

You can of course set up many more mappings for textures here. All available textures that can be mapped are found with the installation:

C:\Program Files\Vianova\Novapoint\<versjon>\Configuration\Textures

Now do the same for conversion of the guardrail posts. Here we use the attribut guardRailPostMaterial and textureName. Set up like the picture below shows.

Continue doing the same mapping for the rest of the features. All of the features has the attribut TextureName, but the name of the material mapping attribut will vary slightly depending on the feature. For Fundament it is called generalMaterialTypes, for Abutment and BridgeSurface it is bridgeMaterial, while Beam and GuardRailPost has constructionMaterial, the same as we set up for Column.

Click OK in the Conversion Rule editor, and select the conversion rule when completing the import.

Now we can see the result in 3D. We must select the drawing rule Default, as this drawing rule supports textturing. The end result will be like this:

Last modified: 2017/10/16 11:52 by vn_no_jko
CC Attribution-NoDerivs 3.0 Unported License.