Repository navigation
feat(model_physical_properties): physical properties of a model and their values per component - #306
Merged
Merged
Conversation
… their value range on each component carrying them Each property gives its component type, the mesh element and the name of the attribute holding its values (it may differ from the property name, e.g. "pressure" for boundary_pressure), and per component the minimum and maximum of each item. An item without value, such as a free axis of a boundary displacement, is null: NaN is not JSON.
…ith free axes on Surfaces, models without any
…eat/physical_properties # Conflicts: # requirements.txt
MaxNumerique
left a comment
Contributor
There was a problem hiding this comment.
Cross-repo review — feat/physical_properties
The contract lines up: the route, its JSON schema, the dataclasses and the generated .d.ts match what OpenGeodeWeb-Front#610 consumes.
- Design —
blueprint_routes.py_physical_property:element_type,attribute_nameandnb_itemscome from the first component that has the attribute. Each later component is then read from whichever element manager it matches first, and could land on a different one (e.g.vertex) without any error; the front would then color it as the wrong element. Either check that every component matches the first one, or restrict the search to that element after the first match. - Design / readability —
schemas/model_physical_properties.json: the nested item type is generated as a top-levelComponentinterface. Too generic for the shared typed-schema module: the front already imports it asComponent as PhysicalPropertyComponent, and the next route with a nested "component" will collide or get an auto-generated name. Give the nested schema atitlesuch asPhysicalPropertyComponent. - Design — same schema:
element_typeandcomponent_typeare free strings, but onlypolyhedron | polygon | edge | vertexand the BRep component types are valid. Anenumwould carry that into the TypeScript types; the front builds style-store method names from these strings, so a bad value only fails at runtime today. - Readability —
no_datais computed and returned but nothing in the front reads it (nullitems already mean "no value"). Use it or drop it to keep the contract minimal.
Contributor
|
🤖 claude-cross-repo-review: complete |
…named component schema, no no_data
…ent of the first one
MaxNumerique
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Back side of the physical properties in Vease: the model tree shows them, and the Vease-Modeling simulation setup will read them. The Front is on the branch with the same name.
What changes
model_physical_propertiesroute: the physical properties of a BRep (or a model built on one, such as a StructuralModel). Each property gives:polyhedron,polygon,edgeorvertex), searched on the elements before the vertices, as the physical property only records the component type;picasso_mecha,boundary_pressureis stored in an attribute namedpressure. The front needs the attribute name to color the model by the property.null, because NaN is not JSON. This is the case of a free axis of aboundary_displacement, e.g.[null, 0, null].Tests
cube.og_brepduring the test, with:displacement.