Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render engine plugin settings missing in the geometry report #1323

Closed
hlg opened this issue Aug 12, 2024 · 0 comments
Closed

Render engine plugin settings missing in the geometry report #1323

hlg opened this issue Aug 12, 2024 · 0 comments

Comments

@hlg
Copy link
Member

hlg commented Aug 12, 2024

Currently, the geometry creation report does not display all render engine settings. For example opensourceBIM/IfcOpenShell-BIMserver-plugin commit cc68637 introduced a new setting. We want to see a list of all render engine settings in the report. This can be achieved by iterating over renderEngine.getSettings().getParameters() and adding the name and value of each parameter to the report, around here:

// TODO there must be a cleaner way of getting this info, since it's in the database...
// The render engine plugin settings from the database are here: renderEngine.getSettings();
// But the layerset handling and quantity calculation must not necessarily be configurable and if it is
// then the plugin can name the settings randomly. But for the report, all the settings should be used.
RenderEngine engine = renderEnginePool.borrowObject();
try {
applyLayerSets = engine.isApplyLayerSets();
report.setApplyLayersets(applyLayerSets);
calculateQuantities = engine.isCalculateQuantities();
report.setCalculateQuantities(calculateQuantities);
} finally {
renderEnginePool.returnObject(engine);
}

Some more information for later reference: Contrary to the render engine attributes applyLayerSets and calculateQuantities, the new attribute is not used in the GeometryRunner and StreamingGeometryGenerator, and thus not necessary to keep it as a property of the any render engine implementation. The keeping of calculateQuantities as a render engine property might also deserve a review and refactoring.

zaqifathis added a commit to zaqifathis/BIMserver that referenced this issue Sep 13, 2024
hlg added a commit that referenced this issue Sep 19, 2024
* improve the earlier solution to #1323
* separate general (implementation independent) engine settings from
  implementation-specific user settings. This involves bringing back the
  engine settings "calculateQuantities" and "applyLayersets". If these
  are user-configured in a render engine plugin implementation like in
  the IfcOpenShell plugin, then they are intentionally show twice.
* account for all possible setting definitions, including nested
  array/object types). To test we need a sample plugin implementation
  with complex setting definition.
* TODO: implement the full conversion in PluginConfiguration and use
  this as a helper.
@hlg hlg closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant