Measurement
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Measurement
Hi,
I added a command to do simple measurement task on Objects in FreeCAD.
An example you can see here:
http://freecad-project.de/svn/ExampleDa ... ents.FCStd
Have fun
I added a command to do simple measurement task on Objects in FreeCAD.
An example you can see here:
http://freecad-project.de/svn/ExampleDa ... ents.FCStd
Have fun
- Attachments
-
- Measurement.jpeg (40.23 KiB) Viewed 3579 times
Stop whining - start coding!
Re: Measurement
Hmm, I'm not sure if it's such a good idea to combine the measurement method with the selection framework because there are some strong limitations. For instance, objects which only have one SoFCSelection node like meshes or a component of a shape are not able to be measured. Another point is when selecting objects by tree because then the result is always garbage.
BTW, the above link is invalid.
BTW, the above link is invalid.
Re: Measurement
Thats right, its far from perfect. But at least you can use it in the Part world relatively good. But the usage its not very intuitive.
Surly it would be good to implement for each main module (like Part and Mesh) a special one which can also use the
specialties of the module. E.g. if you select a Circle he can give you the diameter...
But that would be much more work....
Something is better as nothing. I have no time for more, Im busy getting the sketcher to fly....
Here the right link:
http://freecad-project.de/svn/ExampleDa ... ents.FCStd
Surly it would be good to implement for each main module (like Part and Mesh) a special one which can also use the
specialties of the module. E.g. if you select a Circle he can give you the diameter...
But that would be much more work....
Something is better as nothing. I have no time for more, Im busy getting the sketcher to fly....
Here the right link:
http://freecad-project.de/svn/ExampleDa ... ents.FCStd
Stop whining - start coding!
Re: Measurement
What did you guys think of the draft dimension? It does more or less the same job... And you can place it quite precisely. The only small problem I have is to orient the dimension text so it is well aligned with the dimension "bridge". I have to look at how 3D text is oriented. And of course it needs all kinds of user settings like precision, unit suffix, markers style, etc...
Maybe we could join both features into a killing, total powerful one?
Maybe we could join both features into a killing, total powerful one?
Re: Measurement
Why not!
Can you point me to the code where you build up the scene graph?
Can you point me to the code where you build up the scene graph?
Stop whining - start coding!
Re: Measurement
I disagree. The measurement tool should only do what it is supposed to do, i.e. measuring the distance between two arbitrary points. If we need special tools for things like measuring the diameter of a circle then we should call it like that.Surly it would be good to implement for each main module (like Part and Mesh) a special one which can also use the
specialties of the module. E.g. if you select a Circle he can give you the diameter...
Furthermore we already had a measurement tool under the View menu which works as expected. However, I have polished a few issues to make it working properly.
Oh yes, they work very similar.Maybe we could join both features into a killing, total powerful one?
Re: Measurement
Sure, the python feature definitiion is in src/Mod/Draft/Draft.py at line 707, and the command that creates it is in the same file at line 1678...jriegel wrote:Can you point me to the code where you build up the scene graph?
The only real difference with yours is that it supports the snapping mode of the draft module, so you can pick a point precisely, and also it asks you for 3 points, the third point being where passes the dimension line.
I haven't looked, but your dimension is not bound to the selected objects, right? i mean, if you move one of the objects the dimension stays where it was, right? Then really both are very similar...
Re: Measurement
Hi again,
@Werner
Your right, you creation command is better, I exchanged it and put yoriks ruler SVG to it (nice icon!)
I put it also in the view toolbar, IMO its a very often used tool, it should be easy accessibly.
@Yorik
Your basically right, but I still cautious to put pivy stuff in the core system. We have so much
trouble with pivy. IMO core (GUI) should run without pivy..... Sorry
Anyway its a great prototype for any custom measurement facility in FreeCAD and Python!
@Werner
Your right, you creation command is better, I exchanged it and put yoriks ruler SVG to it (nice icon!)
I put it also in the view toolbar, IMO its a very often used tool, it should be easy accessibly.
@Yorik
Your basically right, but I still cautious to put pivy stuff in the core system. We have so much
trouble with pivy. IMO core (GUI) should run without pivy..... Sorry
Anyway its a great prototype for any custom measurement facility in FreeCAD and Python!
Stop whining - start coding!
Re: Measurement
Yes I agree totally... Pivy is really a pain in the ass and it would give much hassle.jriegel wrote:IMO core (GUI) should run without pivy
Too bad the guy who created pivy has disappeard, because it is really useful.
But reproducing my little code in C++ won't be too hard either, so maybe later I have a try.
Re: Measurement
Sure,
be welcome to improve the ViewProvider for the measurement object!
http://free-cad.svn.sourceforge.net/vie ... iew=markup
I think we have more stuff to work out together since I now work seriously at the
sketch solver and thats very close to your work.
The first package I will work on is the python interface to the solver itself.
be welcome to improve the ViewProvider for the measurement object!
http://free-cad.svn.sourceforge.net/vie ... iew=markup
I think we have more stuff to work out together since I now work seriously at the
sketch solver and thats very close to your work.
The first package I will work on is the python interface to the solver itself.
Stop whining - start coding!