Difference between revisions of "IfcOpenShell code examples"
From Wiki.OSArch
(Adding links to external code samples) |
|||
Line 1: | Line 1: | ||
+ | To load a file, you'll need to import IfcOpenShell and store the IFC file in a variable. We'll use the variable <code>ifc</code>. | ||
+ | |||
+ | <syntaxhighlight lang="python" line='line'> | ||
+ | import ifcopenshell | ||
+ | ifc = ifcopenshell.open('/path/to/your/file.ifc') | ||
+ | </syntaxhighlight> | ||
+ | |||
=Samples from web= | =Samples from web= | ||
{| class="wikitable" | {| class="wikitable" |
Revision as of 06:20, 19 June 2020
To load a file, you'll need to import IfcOpenShell and store the IFC file in a variable. We'll use the variable ifc
.
import ifcopenshell
ifc = ifcopenshell.open('/path/to/your/file.ifc')
Samples from web
Subject | Language | Version | Additional infos |
---|---|---|---|
Understanding placements in IFC using IfcOpenShell and FreeCAD | python | 0.6.0a1 | FreeCAD 0.18 git |
Using IfcOpenShell to parse IFC files with Python | python | ||
Read geometry as Boundary Representation in FreeCAD | python | 0.6.0a1 | FreeCAD 0.18 git |
Read IFC geometry as triangle meshes in FreeCAD | python | 0.6.0a1 | FreeCAD 0.18 git |
Using IfcOpenShell and C++ to generate Alignments through the IFC 4×1 schema | python/C++ | ||
Creating a simple wall with property set and quantity information | python | ||
Using IfcOpenshell and pythonOCC to generate cross sections directly from an IFC file | python | <= 0.6 ? | pythonOCC 0.16.0 ? |
Using the parsing functionality of IfcOpenShell interactively | python | ||
Using IfcOpenShell and pythonOCC to construct new geometry | python | <= 0.6 | pythonOCC 0.16.0 |
Various ifc creation examples (little house, geometry etc…) | C++ |