Skip to content

Implement ability to change model from the 3D Geometry Preview View (set Construction, ThermalZone, reverse Vertices)#863

Open
jmarrec wants to merge 15 commits intodevelopfrom
interactive_geometry
Open

Implement ability to change model from the 3D Geometry Preview View (set Construction, ThermalZone, reverse Vertices)#863
jmarrec wants to merge 15 commits intodevelopfrom
interactive_geometry

Conversation

@jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Mar 6, 2026

jmarrec added 12 commits March 6, 2026 10:50
…showStory to sessionStorage and restore it

  - C++: Before calling refreshClicked(), runs a JS snippet that persists settings.renderBy and settings.showStory to sessionStorage. The reload only happens in the async callback, guaranteeing the save  completes first.
  - JS (initDatGui): At the end, reads those keys back, updates settings directly, calls updateDisplay() to sync the dat.GUI dropdown UI, then calls the normal update(). Keys are immediately removed so   the next manual refresh starts clean.

  This preserves the render mode (and story filter) across any mutation-triggered refresh, without touching the camera state or other settings.
@eringold
Copy link
Contributor

eringold commented Mar 6, 2026

this is awesome. can you do a multi-select?

@jmarrec
Copy link
Collaborator Author

jmarrec commented Mar 6, 2026

Dude! let me be content for a day before asking for more 🙃

(I think that'd require a significant change)

}
}

void GeometryBridge::triangulateSurface(const QString& surfaceName) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, do you have a use case for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sun-related things like shading, having a non convex surfaces (eg a L, H shaped roof) is a problem, so I could see myself wanting to do this. I don't know, I was just in the flow and thought about adding it so I just did.

}
}

void GeometryBridge::setOutsideBoundaryCondition(const QString& surfaceName, const QString& value) {
Copy link
Collaborator

@macumber macumber Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the adjacent surface could be cool, although I guess you can do that from the surface tab too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a valid point.

You can also set the outside boundary condition and all from the surface tab too, it's just more tedious especially if you have auto-named surfaces like "Surface 114", which makes it quite hard to remember what you're touching.


function displaySelectedObjectContextMenu() {

contextMenu.innerHTML = '<h2>Actions</h2>';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to give this menu a close button?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but is that necessary? Just click outside of it and it goes away. We don't have a close button on the left-click info panel (displaySelectedObjectDetails)


GeometryBridge::GeometryBridge(model::Model& model, QObject* parent) : QObject(parent), m_model(model) {}

void GeometryBridge::reverseSurfaceVertices(const QString& surfaceName) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set surface type could be useful as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that one definitely makes sense.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be worthwhile to add DisplayName and CadObjectId to the info messages if they exist?

Copy link
Collaborator Author

@jmarrec jmarrec Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure if that's valuable for people or not. I'm guessing if you care about these, you're definitely using another 3D editor as the driver (eg: Rhino with Ladybug tools) and probably less likely to be trying to do that in the 3D GeometryPreview.

The question is whether this info is in the ThreeJSForwardTranslator export or not (I will have to check, cant remember)

It's a simple code change though for us, and most models won't have it, so I guess it would be fine to add it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macumber
Copy link
Collaborator

macumber commented Mar 8, 2026

This is really cool @jmarrec great job!

@macumber
Copy link
Collaborator

macumber commented Mar 8, 2026

Left some optional comments but approving as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement ability to change model from the 3D Geometry Preview View (set Construction, ThermalZone, reverse Vertices)

3 participants