Commit Graph

56 Commits

Author SHA1 Message Date
Ryan Schultz 6ca69d20d9 dev-notes: record the material usage trap in should_map_representations
The note under "assign_type preserves per-instance" carried a caveat that
skipping the mapping also keeps the occurrence's own profile/material, "fine
when all types share one profile -- revisit if reassigning across different
profiles". That is exactly what bit: map_material_usages lives inside the same
if-block, so the occurrence kept a usage pointing at the old type's profile set
and the material panel edited the old type.

Replace the caveat with what actually happens, why the fix reuses
material.assign_material rather than setting ForProfileSet by hand, and where
the coverage lives. Tick the matching checklist item.

Generated with the assistance of an AI coding tool.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 21:37:34 -05:00
Ryan Schultz 44339de804 Bonsai: toggle a profile type's length between typed and per-instance
Lets an occurrence's extrusion length be either driven by the type
(typed/shared, e.g. Revit-mapped mullions) or owned by the occurrence
(per-instance, editable), and lets the user switch between the two.

- bim.make_profile_length_per_instance: un-maps a shared mapped body into a
  per-instance SweptSolid (shared IfcProfileDef kept; the old mapped body is
  orphaned, not deleted, to avoid cascading to sibling instances), gives the
  occurrence its own IfcMaterialProfileSetUsage (so the Length UI appears), and
  normalizes the placement so the extrusion runs local Z 0->depth -- Revit puts
  the object and extrusion origins on opposite ends, which made extend_profile
  flip the origin.
- bim.make_profile_length_type_driven: the inverse -- re-maps the occurrence
  onto the type's shared representation, promoting the occurrence's body onto
  the type first if the type has no RepresentationMap.
- A "Per-instance Length" checkbox in the Type panel (a get/set property that
  reads the current mode straight from the IFC, so there is no stored state to
  desync).
- New occurrences of a mapped/typed profile type default to per-instance.
- recreate_profile now skips mapped bodies (reloading the mesh instead of
  regenerating), so assigning a length-driven type keeps the occurrence typed
  rather than un-mapping it mid-assign and emptying sibling instances via the
  shared-representation removal cascade.
- assign_type preserves a per-instance occurrence's own geometry/length
  (should_map_representations=False) instead of converting it to typed.

Design/working notes under docs/dev-notes/profile-length-per-instance.md.

Closes #8657
Closes #8656

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 12:39:47 -05:00
Andrej730 dbb4e91d55 apply cmake file formatting 2026-01-26 17:10:03 +05:00
Andrej730 13be6ccd45 Sort imports 2025-12-19 18:53:14 +05:00
Dirk Olbrich 7806dc1d6a docs: include doxygen-awesome as git submodule 2024-04-16 11:28:55 +02:00
Dirk Olbrich 9f0a781d05 docs: add README with instructions 2024-04-16 11:27:33 +02:00
Dirk Olbrich 15d58e32d1 docs: modify doxygen config to new folder 2024-04-16 11:27:33 +02:00
Dirk Olbrich 05b3a55e08 docs: move C++ API docs to subfolder 2024-04-16 11:27:33 +02:00
Dirk Olbrich b298f24275 docs: include doxygen-awesome theme 2024-04-16 11:27:31 +02:00
Dirk Olbrich 97a261ba54 docs: remove duplicate cmake for Sphinx setup 2024-04-16 11:26:47 +02:00
Dirk Olbrich fcfaa5238e docs: remove geom setting docs and images
- these are duplicated in /src/ifcopenshell-python/docs/ifcopenshell/
2024-04-16 11:26:47 +02:00
Dirk Olbrich d7d1198a1a docs: update doxygen file to 1.9.8 2024-04-16 11:26:47 +02:00
Dirk Olbrich 576bd6742e docs: set LOOKUP_CACHE_SIZE 2024-04-16 11:26:47 +02:00
Dirk Olbrich 3db3e93d87 docs: update Doxyfile to v1.9.4
- specify ./output/doxygen as main path for output
- use relative paths for subfolder output
2024-04-16 11:26:47 +02:00
aothms 27eb9d340a sphinx theme 2021-02-06 15:24:17 +00:00
aothms af6aed80da Documentation changes 2021-02-06 15:10:41 +00:00
aothms ea34c3de85 Changes to docs 2021-02-05 12:01:57 +00:00
Thomas Krijnen 6aeddcabc0 Delete file 2021-02-05 11:54:03 +01:00
Thomas Krijnen 2703dce209 Small changes 2021-02-05 11:52:05 +01:00
Thomas Krijnen 8648b16e00 Small changes to script 2021-02-05 11:41:44 +01:00
johltn 30fa59960d Clean branch 2021-01-16 14:42:34 +01:00
johltn 6444376ecd Script to generate docs outside CMake 2021-01-15 07:30:09 +01:00
johltn 6e4bb95e82 Update 2021-01-03 13:10:57 +01:00
johltn efea9d429e Verbose 2021-01-02 15:48:34 +01:00
johltn 424069893e Include ifcparse 2020-12-28 06:38:06 +01:00
johltn b6cf97a291 Change RST file title 2020-12-21 09:32:52 +01:00
johltn f8e57b04b0 Update 2020-11-08 11:30:40 +01:00
johltn 3ca2a8be39 Update 2020-11-08 10:42:17 +01:00
johltn 1eaa2ca8b4 Update Doxyfile 2020-11-07 19:30:51 +01:00
johltn e366c15dde Update conf.py 2020-11-07 19:12:33 +01:00
johltn 63f0c87920 Try to fix index.rst and also incude python docs 2020-11-07 18:55:39 +01:00
johltn 247a285b68 Test customized Doxyfile 2020-11-07 18:41:15 +01:00
johltn a75ced62ce Try first commit 2020-11-02 12:43:17 +01:00
johltn c263012287 Modify conf 2020-11-01 12:13:54 +01:00
johltn 5aae70875d Change doxygen output directory abd try to commit generated docs 2020-11-01 12:03:49 +01:00
johltn 0fb6d5a903 Re Comment python doc generation in CMake 2020-11-01 11:09:00 +01:00
johltn 9d6468bbf6 Install sphinx with apt-get 2020-11-01 08:12:01 +01:00
johltn cb0a5c90e3 Test sphinx directly from Travis 2020-10-31 20:02:04 +01:00
johltn 6267187950 New test 2020-10-31 19:44:09 +01:00
johltn 3575aff235 Comment test section 2020-10-31 19:15:24 +01:00
johltn 54d5d4cc63 Try pip install for sphinx 2020-10-31 16:35:35 +01:00
johltn f2bdcda369 Try without python docs generation 2020-10-31 15:31:23 +01:00
johltn 4020e9a1ce Update conf.py 2020-10-31 15:20:35 +01:00
johltn 1d51d6cac0 Update conf.py 2020-10-31 15:03:30 +01:00
johltn d1f8832af6 Cleaner RST file 2020-10-31 11:21:30 +01:00
johltn 6e589527db Update CMakeLists.txt 2020-10-29 20:55:42 +01:00
johltn cac5203523 Find Sphinx module 2020-10-29 20:43:24 +01:00
Johan Luttun a25c6245bf Update conf.py 2020-10-25 12:28:51 +01:00
Johan Luttun 0b6d55a8a3 Delete make.bat 2020-10-25 12:20:48 +01:00
Johan Luttun 9eaeea5462 Delete Makefile 2020-10-25 12:20:38 +01:00