brepjs-bim 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/bcf/bcfXml.d.ts +9 -3
- package/dist/brepjs-bim.cjs +792 -309
- package/dist/brepjs-bim.js +793 -311
- package/dist/elementFns/placedGeometry.d.ts +18 -0
- package/dist/ifc-writer/geometryWriter.d.ts +4 -1
- package/dist/ifc-writer/railingWriter.d.ts +9 -3
- package/dist/import/placement.d.ts +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/specs/railingSpec.d.ts +6 -0
- package/dist/specs/roofSpec.d.ts +7 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -21,10 +21,17 @@ useful downstream (psets, classification, materials, quantities), with import, e
|
|
|
21
21
|
validation. Geometry is produced by brepjs (OCCT); each element carries a `ValidSolid` (or, for
|
|
22
22
|
curtain walls, a panel/mullion grid). Element geometry is **unplaced template geometry** in local
|
|
23
23
|
coordinates — placement (`origin` / `axisX` / `axisZ`) is applied by the IFC layer via
|
|
24
|
-
`IfcLocalPlacement`, not baked into the brepjs solid.
|
|
24
|
+
`IfcLocalPlacement`, not baked into the brepjs solid. Use `placedSolids(element)` to read an
|
|
25
|
+
element's geometry already transformed to its world placement as fresh, caller-owned solids
|
|
26
|
+
(stairs return one solid per flight) — handy for display so the on-screen scene matches the IFC
|
|
27
|
+
export.
|
|
25
28
|
|
|
26
29
|
- Units default to mm; IFC export emits SI metres.
|
|
27
30
|
- Stable identity: deterministic IFC GUIDs (`deriveIfcGuid`) and local id counters.
|
|
31
|
+
- Shaped geometry: roofs build real shed/gable/hip/dome solids when `pitch` is set (flat slab
|
|
32
|
+
otherwise); railings build posts + top/bottom rails with `infill: 'POSTED'` (a single swept panel
|
|
33
|
+
otherwise). Shaped roofs and posted railings serialize to IFC as tessellated bodies; flat roofs
|
|
34
|
+
and panel railings keep their parametric `IfcExtrudedAreaSolid`.
|
|
28
35
|
|
|
29
36
|
## Status
|
|
30
37
|
|
package/dist/bcf/bcfXml.d.ts
CHANGED
|
@@ -24,9 +24,15 @@ export interface XmlNode {
|
|
|
24
24
|
readonly text: string;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Parse an XML string into a tree. Tolerant of the XML declaration,
|
|
28
|
-
* whitespace, self-closing tags, and CDATA-free text.
|
|
29
|
-
*
|
|
27
|
+
* Parse an XML string into a tree. Tolerant of the XML declaration, processing
|
|
28
|
+
* instructions, comments, whitespace, self-closing tags, and CDATA-free text.
|
|
29
|
+
* Throws on malformed or unbalanced structure; callers wrap this in a `Result`.
|
|
30
|
+
*
|
|
31
|
+
* This is a hand-written cursor scan rather than a single tokenizing regex: the
|
|
32
|
+
* input is an untrusted `.bcfzip` payload, and a backtracking regex over
|
|
33
|
+
* uncontrolled data is a polynomial-ReDoS vector. Every construct here is
|
|
34
|
+
* consumed by an `indexOf` or a single-character advance, so the parse is linear
|
|
35
|
+
* in the input length. The sibling `ids/idsXml.ts` parser scans the same way.
|
|
30
36
|
*/
|
|
31
37
|
export declare function parseXml(xml: string): XmlNode;
|
|
32
38
|
export declare function findChild(node: XmlNode, tag: string): XmlNode | undefined;
|