This repository contains all basic components related to 3D visualisation and configuration
Every Geometry object has a ConstructionString()
function that returns a descriptive chain of 'functions' that represent all operations that are needed to build the geometry. This string can be used to rebuild the 3D model representation in various formats (e.g. IFC)
- 2D constructs
- POLYLINE2D([[x,y]])
- CIRCLELINE2D([xcenter, ycenter] ; r ; θstart ; θend)
- COMPOSITE_CURVE2D({curve_1 ; ... ; curve_n})
- SHAPE({curve_1 ; ... ; curve_n})
- 2D to 3D transforms
- EXTRUDE(height)
- REVOLVE(θ)
- 3D constructs
- PLANE(normal, w)
- TRANSLATION([x,y,z])
- ROTATION([θx, θy, θz])
- UNION(geometry)
- DIFFERENCE(geometry)
- INTERSECTION(geometry)
- CLIP_BY_PLANE(plane)
var stream = fs.createWriteStream('./test1.png');
renderThreeSceneToPng(scene, camera, renderWidth, renderHeight).pipe(stream);
stream.on('close', () => console.log('The PNG file was created.'));