You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Model: 2,547 elements (2,264 with geometry), 12 Revit categories, structural
Best filed against vimaec/vim-format (data layer shared by vim-web and VIM Flex), with
a vim-web doc/helper on top.
Problem. When building a cost/takeoff/QC tool, you need to keep physical building elements
and drop conceptual ones (Views, Cameras, Levels, Grids, Reference Planes, Section Boxes,
groups/containers). Today consumers reinvent this filter — and the obvious heuristics are all wrong:
el.instances?.length > 0 includes Cameras: the 9 OST_Cameras here are saved-3D-view
cameras (family "3D View"), each with instances: 2 but getBoundingBox() === null — phantom
instances, no mesh. So instance count ≠ "has geometry".
category.getCategoryType() === 'Model' also includes Cameras (OST_Cameras reports Model; see table).
await el.getBoundingBox() != nulldoes correctly exclude them, but it's async/per-element
and doesn't scale (Initial Rust support #5), and hasMesh/hasGeometry — which should encode exactly this — are
broken (RemoteG3d #1).
The discriminating data exists but is undocumented (category.getCategoryType() and category.getBuiltInCategory()):
Category
categoryType
builtInCategory
Physical / costable?
Structural Framing
Model
OST_StructuralFraming
✅
Floors
Model
OST_Floors
✅
Structural Columns
Model
OST_StructuralColumns
✅
Structural Foundations
Model
OST_StructuralFoundation
✅
Walls
Model
OST_Walls
✅
Levels
Annotation
OST_Levels
❌
Model Groups
Internal
OST_IOSModelGroups
❌ (container)
So categoryType alone is leaky; the reliable discriminator is builtInCategory against a
curated set of non-physical OST_* categories.
Asks (any of):
DocumentgetCategoryType() / getBuiltInCategory() (values, semantics, and the caveat
that categoryType === 'Model' is not sufficient to mean “physical”).
Ship a maintained classification so every consumer doesn’t re-derive it, e.g. category.isModelGeometry / category.classification (physical | annotation | datum | view | container), or an element-level el.isPhysical.
Provide the curated non-physical exclusion set (OST_Cameras, OST_Levels, OST_Grids, OST_ReferencePlanes, OST_SectionBox, OST_Views, OST_RvtLinks, …) as data.
Why it matters for VIM specifically. This same classification is needed by VIM Flex
(Estimator, takeoffs, model-health dashboards). Putting it in vim-format means web + desktop
share one correct definition instead of three subtly-different ones.
Environment
1.0.0-alpha.0, IIFE build (dist/vim-web.iife.js) loaded via<script>VIM.Core.Webgl.createViewer()(headless, custom UI)Problem. When building a cost/takeoff/QC tool, you need to keep physical building elements
and drop conceptual ones (Views, Cameras, Levels, Grids, Reference Planes, Section Boxes,
groups/containers). Today consumers reinvent this filter — and the obvious heuristics are all wrong:
el.instances?.length > 0includes Cameras: the 9OST_Camerashere are saved-3D-viewcameras (family "3D View"), each with
instances: 2butgetBoundingBox() === null— phantominstances, no mesh. So instance count ≠ "has geometry".
category.getCategoryType() === 'Model'also includes Cameras (OST_CamerasreportsModel; see table).await el.getBoundingBox() != nulldoes correctly exclude them, but it's async/per-elementand doesn't scale (Initial Rust support #5), and
hasMesh/hasGeometry— which should encode exactly this — arebroken (RemoteG3d #1).
The discriminating data exists but is undocumented (
category.getCategoryType()andcategory.getBuiltInCategory()):categoryTypebuiltInCategoryModelOST_StructuralFramingModelOST_FloorsModelOST_StructuralColumnsModelOST_StructuralFoundationModelOST_WallsAnnotationOST_LevelsInternalOST_IOSModelGroupsSo
categoryTypealone is leaky; the reliable discriminator isbuiltInCategoryagainst acurated set of non-physical
OST_*categories.Asks (any of):
getCategoryType()/getBuiltInCategory()(values, semantics, and the caveatthat
categoryType === 'Model'is not sufficient to mean “physical”).category.isModelGeometry/category.classification(physical|annotation|datum|view|container), or an element-levelel.isPhysical.OST_Cameras,OST_Levels,OST_Grids,OST_ReferencePlanes,OST_SectionBox,OST_Views,OST_RvtLinks, …) as data.Why it matters for VIM specifically. This same classification is needed by VIM Flex
(Estimator, takeoffs, model-health dashboards). Putting it in
vim-formatmeans web + desktopshare one correct definition instead of three subtly-different ones.