Skip to content

[Bug]: IfcRevolvedAreaSolid produces zero geometry (silently) in 0.0.77 #2098

Description

@arbirk

What happened?

IfcRevolvedAreaSolid yields an empty mesh — no vertices, no indices, and no
error or warning on the console. The type is listed as supported in the docs.

Reproduced on web-ifc 0.0.77 (latest published at time of writing), Node
22, web-ifc-api-node.

Minimal file

Two solids sharing the same profile entity #25 — one revolved, one
extruded. Save as repro.ifc:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('repro','2026-01-01T00:00:00',(''),(''),'hand','hand','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCCARTESIANPOINT((0.,0.,0.));
#2=IFCDIRECTION((0.,0.,1.));
#3=IFCDIRECTION((1.,0.,0.));
#4=IFCAXIS2PLACEMENT3D(#1,#2,#3);
#5=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
#6=IFCUNITASSIGNMENT((#5));
#7=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.E-05,#4,$);
#8=IFCPROJECT('3Ab2c4D6e8F0g2H4i6J8k0',$,'p',$,$,$,$,(#7),#6);
#9=IFCLOCALPLACEMENT($,#4);
#20=IFCCARTESIANPOINT((12.,0.));
#21=IFCCARTESIANPOINT((30.,0.));
#22=IFCCARTESIANPOINT((30.,2.));
#23=IFCCARTESIANPOINT((12.,2.));
#24=IFCPOLYLINE((#20,#21,#22,#23,#20));
#25=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,$,#24);
#26=IFCDIRECTION((0.,1.,0.));
#27=IFCAXIS1PLACEMENT(#1,#26);
#28=IFCREVOLVEDAREASOLID(#25,#4,#27,1.0471975511965976);
#29=IFCSHAPEREPRESENTATION(#7,'Body','SweptSolid',(#28));
#30=IFCPRODUCTDEFINITIONSHAPE($,$,(#29));
#31=IFCBUILDINGELEMENTPROXY('1Ab2c4D6e8F0g2H4i6J8k0',$,'REVOLVE',$,$,#9,#30,$,.NOTDEFINED.);
#40=IFCEXTRUDEDAREASOLID(#25,#4,#2,2.);
#41=IFCSHAPEREPRESENTATION(#7,'Body','SweptSolid',(#40));
#42=IFCPRODUCTDEFINITIONSHAPE($,$,(#41));
#43=IFCBUILDINGELEMENTPROXY('2Ab2c4D6e8F0g2H4i6J8k0',$,'CONTROL_EXTRUDE',$,$,#9,#42,$,.NOTDEFINED.);
ENDSEC;
END-ISO-10303-21;

Probe

const WebIFC = require("web-ifc");
const fs = require("fs");
(async () => {
  const api = new WebIFC.IfcAPI();
  await api.Init();
  const m = api.OpenModel(new Uint8Array(fs.readFileSync("repro.ifc")));
  api.StreamAllMeshes(m, (mesh) => {
    let v = 0;
    for (let i = 0; i < mesh.geometries.size(); i++)
      v += api.GetGeometry(m, mesh.geometries.get(i).geometryExpressID).GetVertexDataSize();
    console.log(api.GetLine(m, mesh.expressID).Name.value, "->", v, "vertex floats");
  });
  api.CloseModel(m);
})();

Result

REVOLVE          ->   0 vertex floats
CONTROL_EXTRUDE  -> 204 vertex floats

No console output from web-ifc in between — the revolve fails silently.

What is already ruled out

ruled out how
the profile CONTROL_EXTRUDE uses the same #25 and renders
the profile type an IfcRectangleProfileDef revolve is also empty
the angle 60° and a full 360° are both empty
the Position frame identity and rotated IfcAxis2Placement3D both empty
Axis frame interpretation tested Axis expressed as world-frame too — still empty
the schema identical result under IFC4 and IFC4X3_ADD2
parsing GetLine returns #28, #27, #25 correctly; it is the geometry stage

The type appears in the supported-types list in the docs, which is what made
this hard to spot: the failure is indistinguishable from an element having no
geometry at all.

Impact

Any curved floor plate, arc beam or turned component is silently absent from
the scene. We hit it on a hospital model where 77 elements — floor plates,
arc beams and roofs — rendered as nothing while the file validated clean in
ifcopenshell and every element tessellated correctly there.

Happy to test a patch against the same file.

Version

0.0.77

What browsers are you seeing the problem on?

No response

Relevant log output

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions