Skip to main content

ifc_systems/
lib.rs

1//! `ifc-systems` -- Distribution systems: ports, connectivity and system grouping.
2//!
3//!
4//! 23 entities in IFC4. Turns a bag of pipes and ducts into a connected network
5//! that can be traced -- the basis of any MEP analysis.
6//!
7//! # Module map
8//!
9//! | Module | Role |
10//! |---|---|
11//! | `system` | `IfcSystem`, `IfcDistributionSystem` and grouping |
12//! | `port` | `IfcDistributionPort` and port assignment to elements |
13//! | `connectivity` | `IfcRelConnectsPorts` and network traversal |
14//! | `flow` | Flow direction and segment/fitting/terminal roles |
15//! | `error` | Why a system query failed |
16//!
17//! # Status
18//!
19//! Implemented: systems with subtype-aware discovery and membership, ports
20//! and both element-attachment forms, the undirected connection graph with
21//! cycle-safe traversal, flow roles and direction, zones, and what a system
22//! serves: `IfcRelServicesBuildings` and the IFC4X3 `ServicesFacilities`
23//! references, read onto [`System`]. Author the relationship with
24//! `ifc_spatial::serve_buildings`; this crate's [`serve_buildings`] is a
25//! deprecated duplicate (#492), as is [`contain_in_spatial_structure`]
26//! beside `ifc_spatial::contain`.
27
28pub mod authoring;
29mod connectivity;
30mod error;
31mod flow;
32mod port;
33mod release;
34mod system;
35
36pub use authoring::{
37    assign_to_group, assign_to_group_with_owner_history, connect_port_to_element,
38    connect_port_to_element_with_owner_history, connect_ports, connect_ports_with_owner_history,
39    create_classified_system, create_classified_system_with_owner_history, create_group,
40    create_group_with_owner_history, create_port, create_port_with_owner_history, create_system,
41    create_system_with_owner_history, nest_ports, nest_ports_with_owner_history,
42    reference_in_spatial_structure, reference_in_spatial_structure_with_owner_history,
43    ClassifiedSystemDraft, SystemAuthoringError, SystemAuthoringResult, SystemKind,
44};
45// Deprecated duplicates of ifc-spatial's writers (#492), still exported.
46#[allow(deprecated)]
47pub use authoring::{
48    contain_in_spatial_structure, contain_in_spatial_structure_with_owner_history, serve_buildings,
49    serve_buildings_with_owner_history,
50};
51pub use connectivity::{
52    Connection, ConnectionGraph, Direction, FlowNetwork, FlowQuery, NetworkGraph,
53};
54pub use error::{NotInSchema, SchemaGap, SchemaResolutionError, SystemAnomaly};
55pub use flow::{role_inconsistencies, ElementRole, FlowDirection, RoleInconsistency};
56/// The IFC release a read binds to (re-exported from `ifc-schema`).
57pub use ifc_schema::SchemaVersion;
58pub use port::{ports, Attachment, Port};
59pub use release::schema_of;
60pub use system::{systems, System};
61pub use zone::{long_name_of, spatial_placements, zones, SpatialPlacement, Zone};
62
63pub(crate) mod zone;