f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Add measurement tools similar to CAD software

Open drtrigon opened this issue 3 years ago • 19 comments

Context F3D can load CAD dataset however it does not have any measuring tool. Adding a simple ruler widget that user would be able to manipulate with the mouse would go a long way.

First step would be to prototype this to see if it is feasible in the F3D framework.

Notes Issue was initially:

I have several proposals, that I would like to discuss here. May be some of them could be included in a next release:

  • [ ] enable to browse all files in same folder as the one dropped/opened by using keyboard (left/right keys) - may be add as a parameter
  • [ ] add measurement and may be further inspection functions like in CAD software - have no idea how much effort or space this might cost
  • [ ] add an appimage for linux - could make it even simpler to use

I would be willing to help testing.

drtrigon avatar Dec 06 '21 14:12 drtrigon

  1. is already supported, just drop a folder :)
  2. Can you precise what you have in mind, maybe woth a screenshot from another software ?
  3. I suppose we can take a look, but I believe this is something someone from the community could take care of ?

mwestphal avatar Dec 06 '21 14:12 mwestphal

For 2, I was thinking about an axes actor (see https://gitlab.kitware.com/f3d/f3d/-/issues/81)
I'm afraid more complex inspection tools like measure, clipping planes, are out of scope of f3d which is supposed to be a simple visualizer. But we may reconsider it if we find a way to integrate it without being too intrusive.

Meakk avatar Dec 06 '21 16:12 Meakk

  1. Would it be possible to add a key that allows to add all files from a folder after opening one file out of it? E.g. I drop a file from a folder, then - while looking at the file - consider to look at all. Also (it's a shame to say that, but) as I am forced to use win at work I got used to its picture viewer that by default allows to browse all files in the same folder.
  2. I was thinking about something like https://wiki.freecadweb.org/Part_Measure_Menu and yes may be a cut plane - something that allows looking into models/parts. I not sure whether I understand the point of the actor but having axes with ticks would for sure be a good starting point.

drtrigon avatar Dec 07 '21 19:12 drtrigon

  1. That sounds like a good idea. We do not have a binding for the down key yet :)
  2. Ok I see what you are looking for, I'm not enterely sure F3D should provide that, I would suggest opening a dedicated issue to see if there is other F3D users interested.

mwestphal avatar Dec 07 '21 20:12 mwestphal

(to criticize myself: 2. I have to agree with @Meakk this is sort of against the "lightweight" viewer strategy - but as said if it could be done without blowing up code and binary it would be a great thing to have...)

drtrigon avatar Dec 07 '21 23:12 drtrigon

  1. Making its installation more user friendly is a good start: Bash script for example and it could be released in the next release

Some more content on this. I use Linux Mint Cinnamon(Debian based like any .deb distro) and I couldn't quite find a clear installation procedure. I didn't wanna bother having to compile things. I used common sense and old school copy/paste:

- bin/ 			-> /usr/bin/
- lib/			-> /usr/lib/
- share/applications/	-> /usr/share/applications/
- share/icons/		-> /usr/share/icons/
- share/metainfo/	-> /usr/share/metainfo/
- share/mime/		-> /usr/share/mime/
- share/thumbnailers/	-> /usr/share/thumbnailers/
- config.json		-> YOUR_USER_HOME/.config/f3d/config.json

I was still unable to see the thumbnails which were solved with the command. Safer than deleting the folder right away as suggested, you never know.

mv YOUR_USER_HOME/.cache/ YOUR_USER_HOME/bkp_cache/

No less important, since the bin file was copied over to the system, right-click in a STL file, "Open With" and F3D will be displayed as an option, and I can just call f3d via terminal, no need to navigate to a folder.

A bash script taking care of those 2 code blocks and no .appimage is needed.

HakunMatat4 avatar Dec 08 '21 04:12 HakunMatat4

@whiiiskyy we do not recommend copying f3d files to the /usr directory from the archive we provide.
It's better to just copy the files somewhere in your home directory, and add the directory to your PATH variable.
We should document it for sure.
We can also provide a .deb package for Debian-based distro but we need help for testing, would you be interested to help @whiiiskyy?

I'll create a specific issue for it.

Meakk avatar Dec 08 '21 09:12 Meakk

@Meakk ,

I did check the files and although it isn't recommended, I did what I did hoping to have everything working. You have no idea how frustrating it has been not having a decent Linux solution for that, until now.

I'm more than happy to test the .deb package. I can undo the binary, etc, and use the deb package instead.

Please, let me know how to proceed.

Cheers

HakunMatat4 avatar Dec 08 '21 09:12 HakunMatat4

Continuing the discussion on https://github.com/f3d-app/f3d/issues/123

Meakk avatar Dec 08 '21 10:12 Meakk

@drtrigon @whiiiskyy : I have separated this issue in smaller bites:

  • Add an option to keep dynamic options when changing files:https://github.com/f3d-app/f3d/issues/130
  • Add an hotkey for loading containing folder: https://github.com/f3d-app/f3d/issues/129
  • Add measurement tools: Lets keep this very issue for it
  • Improve installations steps: https://github.com/f3d-app/f3d/issues/128
  • Provide a .deb package: https://github.com/f3d-app/f3d/issues/123

mwestphal avatar Dec 09 '21 21:12 mwestphal

may i add some notes and picture to clarify. in another software which the same as using VTK library, it's called Query Tool, then requires to select two nodes for showing distance info's

software_VTKlib_query_distance

xyont avatar Feb 15 '22 03:02 xyont

Nice picture that makes me ask; can we also add a ruler or axes, grid, ticks labels that use real units like mm, e.g.?

drtrigon avatar Feb 15 '22 06:02 drtrigon

There is no such things as real units in VTK world. Nice visual input though.

mwestphal avatar Feb 15 '22 10:02 mwestphal

I'd like to implement that, but I think it's out of the scope of f3d right now.

Meakk avatar Feb 15 '22 11:02 Meakk

There is no such things as real units in VTK world. Nice visual input though.

No possibility to display a rules by assuming the units are millimeters? Or allowing the user to enter a scaling? That would allow to easily disinguish between an model from architecture and one from microscopy. It would allow to get a rough understanding of the models dimensions. (E.g. the current windows .stl viewer does have something like that.)

If no possibilities exist to have something like this we can actually close the issue.

drtrigon avatar Mar 15 '22 13:03 drtrigon

We could add a parameter to let user specify a scaling unit, but it is down to the user to specify it. VTK cannot guess it.

The issue can stay open though.

mwestphal avatar Mar 19 '22 18:03 mwestphal

I think adding a simple ruler could go a long way for CAD users,

mwestphal avatar Apr 26 '23 13:04 mwestphal

I will try to prototype that soon, we will see

mwestphal avatar May 14 '23 06:05 mwestphal

Rewording the issue to add a ruler.

mwestphal avatar Jan 22 '24 07:01 mwestphal