fstl-app / fstl

A fast STL file viewer
449 stars 105 forks source link

Show axes #55

Closed mboerwinkle closed 3 years ago

mboerwinkle commented 4 years ago

Added an option to show model-space axes, an axis flower, and model info. image image

Also:

No part of this change should be platform dependent, but I have only tested on 64bit linux, qt 5.15.0. I look forward to your thoughts. Thanks, Martin

DeveloperPaul123 commented 3 years ago

Thanks for this! This is a pretty cool feature. My only feedback is a question: Is it possible to make the axes labels always orthogonal to the camera?

2020-07-13_10-01-03

There are some angles where the axes labels are not visible. I don't think it's a big deal but it would be a nice piece of polish IMO.

mboerwinkle commented 3 years ago

Hi Paul, Thanks for the feedback. Currently, hud_vbuf contains all the info for the axis-flower model. If I were to implement that, I would probably split hud_vbuf into multiple chunks (one for the axis flower, and one for each letter) and rotate each letter linesegment group to face the camera during the paintgl tasks. Alternatively, the 'industry-approved' method (which I don't plan on doing unless you have a wildly different viewpoint than me) would probably be to get setup to render arbitrary font textures to the canvas, and then render the characters (X, Y, Z) at the ends of the flower spokes. I feel like this might be a bit over-complex and long for this project, though. I'll branch this branch to play around with the first option, and I'll comment here again once I have findings to share. Thanks again, Martin

mboerwinkle commented 3 years ago

Hi Paul, Sorry for the delay! The period around classes starting is always hectic... How does this look to you? Please let me know if you have any thoughts. I guess the next step would be to merge this into my ShowAxes branch rather than open a new PR here? image Thanks, Martin

DeveloperPaul123 commented 3 years ago

@mboerwinkle Looks good to me!

Yes I would suggest just merging/pushing your changes to the ShowAxes branch and then I can take a look on my end one more time. But should be ok based on the image. Nice work! 👍

mboerwinkle commented 3 years ago

@DeveloperPaul123 Done. Let me know if you find anything funky please.

DeveloperPaul123 commented 3 years ago

Looks good to me @mboerwinkle ! Nice work 👍

@mkeeter Your thoughts?

DeveloperPaul123 commented 3 years ago

@mkeeter Sorry for the ping, but are you ok with this being merged?

mkeeter commented 3 years ago

Sure!