importIfc brings parts in as bare boxes at the box's centre, with no parameters or connectors

Aperta
#65 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, databases

Direzione di ricerca

Start with packages/bim-kernel/src/import/rules.ts:272-312, which creates the shared imported part and currently fills in its type, connectors, position, and rotation from a bounding box. Read the export behavior described in the issue and inspect how the import rules can access product placements, Pset_ElectricalDeviceCommon and MutinyBIM_* values, and IfcDistributionPort placements. Done when imported parts retain their placement, mapped type values, and ports as connectors; check the panel and rooftop unit examples.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
The problem

As someone who exports a model and reads it back, I want a part to come back as the part it was, not as a box. Today, with electrical-room's panel LP-1 (observed):

Before export After importIfc
Type parameters 9 (width, height, depth, bus_rating 125, voltage 208, phases 1, circuits 30, mains "125A MCB", enclosure "NEMA 1") 0
Type values as above {}
Connectors 1 0
Position (304.8, 3962.4), offset 0 (304.8, 4013.2), offset 300
Rotation 0 0, always

The rooftop unit's report note: 10 ton: its 2 connection points weren't brought in; join it by hand (observed).

The export already writes what's needed to do better (observed in #57 and in export.ts): the panelboard type with its Pset_ElectricalDeviceCommon values, the part's insertion placement, and an IfcDistributionPort for each connector.

Where in the code (observed, at 94513ba):

  • packages/bim-kernel/src/import/rules.ts:288-300: a new part type with typeParams: [], typeValues: {}, connectors: [] and one bounding box.
  • rules.ts:304: the "connection points weren't brought in" note.
  • rules.ts:310-312: position is the box's plan centre, offsetMm is the box's lowest z, and rotationDeg: 0. The panel's body sits 300 mm up and 50.8 mm off its insertion point (the panel is 101.6 mm deep), so it moves.

An AI agent helped find this and ran the repro on its own machine against 94513ba; I reviewed the output.

What you would like to happen
  • Position and rotation come from the product's own placement, not from its box.
  • The type's property values that a known add-on maps (Pset_ElectricalDeviceCommon and MutinyBIM_*) come back as type values.
  • Ports come back as connectors, at their placements, so that links can be made (see the connections issue).
The shared idea underneath

Parts and part types are a kernel concept. The import rule is shared by every trade (rules.ts:272).

Discipline

Not trade-specific

Area

Kernel

Engineering content
  • This involves an engineering calculation, code rule or design default (it will need review by a licensed professional).
Helping
  • I would like to work on this.
Lingua principale
TypeScript
Stelle
85
Fork
10
Merge medio
1h 28m
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di permitzip/mutinybim

Tutte le issue di permitzip/mutinybim

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.