Skip to content

Conversation

@aerogt3
Copy link
Contributor

@aerogt3 aerogt3 commented Nov 30, 2025

add resetCameraScreenSpace method with offsetRatio input, essentially a resetCamera call that fills the entire screen space (where 90% offsetRatio means visible actors will fill 90% of the screen space)

#1285

Context

#1285

Results

See image here:
#1285 (comment)

Changes

Duplicated the resetCamera method, with logic to ensure visible actors fill a percentage of the screen (default: 90%)

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • Tested environment:
    • master
    • ubuntu 2240
    • firefox 144.0.2 & chrome 142.0

add resetCameraScreenSpace method with offsetRatio input, essentially a resetCamera call that fills
the entire screen space (where 90% offsetRatio means visible actors will fill 90% of the screen
space)

Kitware#1285
@aerogt3 aerogt3 force-pushed the 1285-fix-resetCameraScreenSpace branch from 5173f89 to 3f36750 Compare December 1, 2025 11:10

return true;
};

Copy link
Member

Choose a reason for hiding this comment

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

why not recoding the VTK C++ implementation ?

This ensures you have the same behavior between VTK C++ and VTK.js. Which is important.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1.) don’t have C++ knowledge
2.) never used VTK C++ (just vtk.js & paraview) Can’t find out how to use/compare resetCameraScreenSpace anywhere in paraview. Either way, #1 is the end of the road.

I think this contribution is better than having nothing, either with the name cameraResetScreenSpace, or maybe cameraZoomExtents. If someone with C++ knowledge can improve it later on (or take this solution to C++ if it’s better) that would be great.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants