Representations - alternative geometries

How many geometries does a door have? The question sounds like it has an obvious answer, and in IFC, the open standard Bonsai keeps your building model in, it doesn’t. A door may have none, or one, or half a dozen - and a model full of doors may have a different number for each.

Each of those geometries is a representation, and the plural is the point of this page.

A representation is addressed by what it is for

Representations aren’t a list you index into. Each one is filed under what it is for, using three things: a context, an identifier, and a target view.

A new Bonsai project sets up several of these in your IFC file before you have drawn anything. The 3D shape of an object lives in Model / Body / MODEL_VIEW. Its centreline - the line a wall is actually built about - lives in Model / Axis. Its bounding box lives in Model / Box. And its two-dimensional shape, the one that belongs on a plan, lives somewhere else again: Plan / Body / PLAN_VIEW.

There are more, for reflected ceiling plans, sections, elevations, clearance zones, centres of gravity and survey points. You don’t need to learn the list; you need to know that it exists, so that an object can carry a different geometry for each purpose.

The plan symbol is stored, not projected

When Bonsai builds a parametric window, it makes the 3D body you can see - and then it goes and fetches the plan context and builds a second representation, the window as it should appear looked down upon, and writes that into the file too. Your IFC file now contains a picture of that window in plan. Not a rule for drawing one. The thing itself.

If you have come from software where the plan is a projection - where the program looks down at the 3D model through a cutting plane and works out what you should see - this is a different arrangement, with consequences in both directions.

In your favour: the symbol travels. Anybody who opens your file gets the plan geometry you intended, without needing your software or your conventions or a settings file. A door swing isn’t a thing their viewer has to guess how to draw.

Against: it is a second thing that exists, and things that exist can disagree with each other. A plan representation isn’t automatically re-derived because the 3D changed, so after a substantial change the plan has to be brought back in step.

Having no geometry at all is normal

An object with no representation isn’t broken and isn’t incomplete.

Much of what is in a model has nothing to draw in the first place - a task, a cost item, an organisation, a system. But even physical things are allowed to have none: a space is often just a volume with no body, and an element can be placed and classified and scheduled long before anybody has decided what it looks like. That is a legitimate state, and a useful one when the information arrives before the shape does.

It follows that “I opened it and couldn’t see anything” isn’t a diagnosis: most of what is in a model has no geometry at all.

Swept solids and tessellations

Representations also differ in kind, and the kinds aren’t equivalent.

A swept solid is a profile and an instruction: this shape, extruded this far. It knows it is an extrusion, so the profile and the depth can be edited as what they are. Most walls, columns and beams in a competently made model are swept solids.

A tessellation is a bag of triangles. It describes exactly the same shape and knows nothing whatever about how that shape came to be. It is the right answer for something genuinely complicated like a Corinthian capital, and the wrong answer for a rectangular column. It also takes far more of the file to say the same thing, which is how an exported model gets to be enormous.

Bonsai will convert between them, and the documentation warns that converting may lose parametric information. The direction matters: going from a swept solid to a tessellation turns a description into a result - the shape survives, the account of how it was arrived at doesn’t.

You can ask for the description back: Bonsai will read the mesh, look for the face that could be a profile and the edge along which it appears to have been pushed, and rebuild a swept solid out of what it finds. That is a heuristic rather than a reversal. It works a good deal of the time, on shapes that really were extrusions once. It can’t recover a description of something that never had a simple one, and it is guessing at your intent rather than remembering it.

For the same reason, a swept solid isn’t something you edit by pushing its vertices about in Blender. The extrusion is the thing; the mesh is what the extrusion produced. It is one instance of a general hazard: Blender’s own tools reaching past Bonsai and leaving the data saying one thing and the geometry another.

What this sets up

Because the drawing geometry is in the model, drawings come out of the model rather than being kept alongside it. And because representations can be present, absent or of the wrong kind, “does it look right” is a poor test of a model, which is why checking the model needs its own tools.