@ifc-lite/create
v2.0.3
Published
IFC creation from scratch — walls, slabs, beams, columns, stairs, roofs with geometry, properties and quantities
Downloads
976
Readme
@ifc-lite/create
Create valid IFC4 STEP files from scratch, programmatically. IfcCreator builds a complete spatial structure (project, site, building, storeys) and adds building elements with real geometry, property sets, quantities, and materials. Inputs are in metres. Element coordinates are relative to the storey you add the element to: the storey placement carries Elevation and every element chains to it, so an element standing on a storey at Elevation: 3 is created with Z = 0.
Install
npm install @ifc-lite/createUsage
import { IfcCreator } from '@ifc-lite/create';
const creator = new IfcCreator({ Name: 'My Project' });
const storey = creator.addIfcBuildingStorey({ Name: 'Ground Floor', Elevation: 0 });
creator.addIfcWall(storey, {
Start: [0, 0, 0], End: [5, 0, 0],
Thickness: 0.2, Height: 3,
});
const { content } = creator.toIfc(); // IFC STEP textFeatures
- Element builders: walls, slabs, columns, beams, stairs, roofs, doors, windows, ramps, railings, plates, members, footings, piles, spaces, curtain walls, furnishing, proxies, and parametric profile shapes (I, L, T, U, C, hollow sections)
- Openings:
addIfcWallDoorandaddIfcWallWindowcut hosted doors and windows into walls - Property sets, element quantities, materials, and colors
- 4D scheduling entities: IfcWorkSchedule, IfcTask, IfcRelSequence
- In-store builders (
addWallToStore,addSlabToStore, ...) that emit elements into an existing parsed model - Space generation:
generateSpacesFromWallsanddetectEnclosedAreasderive IfcSpace footprints from wall layouts - Fully typed parameter objects for every element
Links
- Docs: https://ifclite.dev/docs/
- Source: https://github.com/LTplus-AG/ifc-lite
License
MPL-2.0
