Hi!
A couple of months ago I posted about beginning the work on IfcSverchok nodes as part of this years Google Summer of Code.
GSoC is now finished, and while the nodes definitely are not, there are now around 15 basic, core nodes to play around with and test.
They are still WIP and may lead to Blender crashes, especially if undoing (ctrl/cmd-Z).
TL;DR
There is an example model, kindly provided by Erindale Woodford https://twitter.com/erindale_xyz, and a walk-through of how it can be turned into an IFC model with the nodes. For now, it can be seen on my fork of the project https://github.com/mdjska/IfcOpenShell/tree/v0.7.0/src/ifcsverchok.
The overview and general logic is as follows:
So there are two ways of creating geometry right now; 1) from Blender objects or 2) from Sverchok geometry (verts, edges and faces).
And the created IFC model imported with BlenderBIM:
A more detailed description and some other small examples are in the projects readme.
Nodes
List of nodes that have been tested to the best of ability (nodes not listed here are not considered ready for use).
Most nodes have a help description, and input tooltips, that show show up when hovering over the "?"-icon and socket input respectively.
| Node name | Inputs | Outputs | Description |
|--------------------------|-----------------------------------------------------------------------------------|---------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| IFC Create Entity | - Names<br /> - Descriptions<br /> - IfcClass<br /> - Representations<br /> - Locations<br /> - Properties | - Entities Ids | Create IFC Entity. Takes one or multiple inputs.<br /> If 'Representation(s)' is given, that determines number of output entities. Otherwise, 'Names' is used. |
| IFC Read Entity | - Entity Id | - Id<br /> - is_a<br /> - Other entity attributes (dynamic) | Decompose an IfcEntity into its attributes. Takes one entity id as input, returns attribute values. |
| IFC BMesh to IFC Repr | - Context type<br /> - Context identifier<br /> - Target View<br /> - Blender Objects | - Representations<br /> - Locations | Blender mesh to IfcShapeRepresentation. Takes one or multiple geometries.<br /> Deconstructs joined geometries and creates a separate representation for each. |
| IFC Sverchok to IFC Repr | - Context type<br /> - Context identifier<br /> - Target View<br /> - Vertices<br /> - Edges<br /> - Faces | - Representations | Sverchok geometry to IfcShapeRepresentation. Takes one or multiple nested lists of inputs. |
| IFC Create Blender Shape | - Entity Id(s) | - Blender Object(s) | Create Blender shape from IfcEntity Id. Takes one or multiple IfcEntity Ids.<br /> Creates shapes in scene and returns them in output socket. |
| IFC Add Spatial Element | - Names<br /> - IfcClass<br /> - Elements | - Entity Id(s) | Add IfcElements to an IfcSpatialElement. Takes one or multiple nested lists of inputs.<br /> Input can also be a (list of) spacial elements to be aggregated. |
| IFC Write File | - path | | Writes active Ifc model to path. <br />N.B.! It's recommended to use the 'Write File' panel under the "IfcSverchok" tab instead. |
| IFC Class Picker | - IfcProduct (from drop-down)<br /> - IfcClass (from drop-down) | - IfcClass | Pick an IfcClass from drop-down list. |
| IFC By Id | - Id | - Entities | Get IfcElement by step id. Takes one or multiple step ids. |
| IFC By Guid | - Guid | - Entities | Get IfcElement by guid. Takes one or multiple guids. |
| IFC By Type | - IfcProduct (from drop-down)<br /> - IfcClass (from drop-down)<br /> - Custom IfcClass | - Entities<br /> - Entity Ids | Get IFC element(s) in file by type. Pick an IfcProduct and an IfcClass or give a custom IfcClass. |
| IFC Add Pset | - Name<br /> - Properties<br /> - Element Ids | - (Pset) Entities | Add a property set and corresponding properties, in a JSON key:value format, to IfcElements. |
| IFC Generate Guid | | - Guid | Generate a unique GUID. |
| IFC Get Property | - Entity Ids<br /> - Pset name<br /> - Prop name | - Value | Get the value of a property of an IfcEntity. Can take multiple entity ids. |
| IFC Get Attribute | - Entity Ids<br /> - Attribute Name | - Value | Get the value of an attribute of an IfcEntity. Can take multiple entities. |
IfcSverchok panel
IfcSverchok creates a "IfcSverchok" tab in the Nodes panel. It includes a "Re-run all nodes" button that creates a fresh IFC File and a "Write File" button. It's recommended to re-run all nodes before saving the file either through the panel or the "Write File" node. Re-running creates a fresh IFC model, and removes all the duplicated/unneeded IfcElements that were created while building the model.
I'd love to hear it if anybody decides to give them a go or any other comments. :)
Thanks again to @Moult and @aothms for the help and support throughout.