Expand description
Net product geometry: the Body minus every opening that voids it (#44).
§Why this is a separate entry point
A product’s Body representation is its GROSS shape. IfcRelVoidsElement
says an opening’s body is to be removed from it, but the file never authors
the result. Quantity takeoff wants gross; clearances, net areas, ratios and
clash tests through an opening want net. Both must stay reachable, so gross
keeps its existing entry point unchanged and net is asked for explicitly.
§What the graph looks like
The host body is lowered as usual, then each opening’s Body is lowered
through ITS OWN placement chain (exporters place openings relative to the
host, and the chain resolves that). Exact Boolean { Difference } nodes
are appended; nothing is evaluated here.
A boolean operand must be a solid, and a multi-item Body lowers to a
Collection (possibly under an Instance), which the graph rejects as an
operand. So both sides are first split into their solid PARTS, with any
enclosing instance transforms carried onto each part. Then, because
(A u B) - O = (A - O) u (B - O), each host part is cut on its own:
part_i -> (part_i - o1_a - o1_b) -> (... - o2_a) -> ... for every host part i
step k = Collection(every part's head after opening k) (or the head itself)
root = step of the last openingOpenings go in ascending id, so the graph is a function of the model’s content.
§In the host’s frame (#388)
All of the above is lowered in the HOST’s frame: the host’s items without
its world placement, each opening’s by its placement relative to the
host’s, composed along the placement chain the two share. The
subtraction then runs where the file’s coincidences hold, not 5.6e6 m out
on a georeferenced site, and one Instance with the host’s world
transform sits above each node NetLowering reports, so every one of
them is still in world coordinates:
gross = Instance(host world, host body)
body_k = Instance(host world, opening k's body relative to the host)
step k = Instance(host world, the host-frame step k above)When an opening shares no placement chain with its host, the whole net
body is lowered in world coordinates as before, rather than guessed. The
frame module says how the relative placement is composed and when it is
not.
A host no opening voids is lowered the same way when an item of its Body
is a boolean, a clip or an IfcCsgSolid (#655), so gross and root
are both Instance(host world, body in its frame). Any other opening-less
Body stays in world coordinates. A boolean under an IfcMappedItem
already runs in the map’s frame under the mapped item’s Instance.
§Refusal, not a quiet gross body
Every per-opening failure becomes GeometryError::OpeningNotSubtracted
naming the opening. Skipping it would hand back geometry that claims to be
net and is not – the silent failure this entry point exists to prevent.
§Reference View openings: taken as applied (#351)
IFC4 Reference View exports author an IfcOpeningElement with only a
Reference representation, usually tessellated, against a host whose
Body already has the hole in it. The schema says so in the opening’s own
definition (IFC4 ADD2 TC1, IfcOpeningElement, entity definition): with
a 'Body' representation the voiding relationship is an implicit Boolean
difference, but “if the IfcShapeRepresentation.RepresentationIdentifier =
‘Reference’, then the Reference shape representation of the opening is
not subtracted, it is provided in addition to the hole in the Body shape
representation of the voided element”. Its Reference View concept
(Reference Geometry, same page) repeats it: “Since there are no Boolean
operations, either as IfcBooleanResult or implicitly by
IfcRelVoidsElement the geometry of the IfcOpeningElement shall not be used
to subtract the opening from the ‘Body’ shape representation of the voided
element.” IFC4.3 keeps both readings (IfcOpeningElement, concepts
Reference Geometry and Reference Tessellation Geometry), and its
Element Openings template states that the element’s representation
“does account for voids at export”.
Such an opening is therefore neither subtractable nor missing: the host’s
gross Body already IS its net Body. lower_product_net still refuses
it, as it always has, because a caller asking for net geometry has not
said it accepts the exporter’s word for the hole. ADR 0014 makes net
geometry an explicit request, so accepting it is explicit too:
lower_product_net_with with NetOptions set to
ReferenceOnlyOpenings::TakeAsApplied. Then the opening is listed in
NetLowering::taken_as_applied with its relation and the reason, and
nothing is subtracted for it. Nothing is guessed or dropped: the caller
sees every opening either subtracted or taken as applied.
Only an IfcOpeningElement (or IFC4’s IfcOpeningStandardCase) whose
representations are all, and only, Reference qualifies; the clause is
about that entity and that identifier. An opening with no representation
at all, one with any other representation beside Reference, a
Reference-only IfcVoidingFeature, and an opening whose Body cannot be
lowered are refused exactly as without the option.
Structs§
- NetLowering
- A host lowered as net geometry.
- NetOptions
- Options for a net request;
Defaultislower_product_net’s behaviour. - Subtraction
- One opening removed from a host, with the nodes that express it.
- Taken
AsApplied - An opening whose void the host’s Body already carries (#351).
Enums§
- Applied
Reason - Why an opening is taken as already applied to its host.
- Reference
Only Openings - What
lower_product_net_withdoes with an opening that has only aReferencerepresentation (#351).
Functions§
- lower_
product_ net - Lower
product’s Body with every voiding opening subtracted. - lower_
product_ net_ with lower_product_netwith explicitNetOptions.