sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
Hola folks.

I'm pleased to announce the release of the blender caliper script.

It allows you to measure between certain points in your scene (between objects/ in meshes)

It also creates 3d objects to display the measurement.

It was developed commercially for: Render Reality LCC
Thankfully the company was all for GPL release!



Find the script here:
http://www.alienhelpdesk.com/python_scripts/caliper
............................................
http://www.macouno.com

Last edited by macouno; 10-Aug-07 at 10:38.
#1   Old 30-Apr-06, 17:53   
Reply With Quote


Jedrzej_s's Avatar
Jedrzej_s Jedrzej_s is offline
Member
 
Join Date: Mar 2005
Posts: 253
I remember discussion about this script . THX for made this and posted here !!! And of course thankfully the company was all for GPL release !!!

P.S. I noticed that not everything working correctly...
For example colors and layers.

I hope that you will work still on this script.

I have feature request: select measure position (front or top). Now all measure generate only in front view...

Last edited by Jedrzej_s; 01-May-06 at 03:09.
#2   Old 01-May-06, 02:19   
Reply With Quote
karpov's Avatar
karpov karpov is offline
Member
 
Join Date: Jan 2005
Location: Paris, France
Posts: 275
Excellent script !

Just one little thing : it would be perfect if you could ajust level of precision :
eg. 28 cm instead of 28,567 cm ( not possible in real world construction ....)
#3   Old 01-May-06, 08:00   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
Jerdzej_s: I need more information than "not working correctly". Remember the material is only created once! Thus the first time you run the script you'll have to set the color. I'll have a look at the layers.

And yes... measurements align to the front... that was a choice. I didn't want to overcomplicate it.

karpov: in the output style settings, all the way on the right, you can set the ammount of detail you want.

edit: Though I'm at work I had a quick look, there was a small error in the layers, where the text was concerned... the colors and "rounding" seem to work correct to me. I'll get a fixed version online tonight.
............................................
http://www.macouno.com

Last edited by macouno; 01-May-06 at 10:09.
#4   Old 01-May-06, 09:28   
Reply With Quote
Jedrzej_s's Avatar
Jedrzej_s Jedrzej_s is offline
Member
 
Join Date: Mar 2005
Posts: 253
Quote:
Originally Posted by macouno
Remember the material is only created once! Thus the first time you run the script you'll have to set the color.
OK. Now I understand why I thought that make colors have bug...

Quote:
Originally Posted by macouno
And yes... measurements align to the front... that was a choice. I didn't want to overcomplicate it.
measurements align choose (top or front) would be very handy... In my opinion this wouldn't complicate this script...

Another feature request: menu for choose font.

Regards .
#5   Old 01-May-06, 17:50   
Reply With Quote
pildanovak's Avatar
pildanovak pildanovak is offline
Member
 
Join Date: May 2004
Posts: 958
really a nice one thx
#6   Old 02-May-06, 11:01   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
Fixed the layer bug for the 3d text. Version 1.1 also available from the site:

http://www.alienhelpdesk.com/index.php?id=38

jerdzej_s: Yes those could be quite helpfull, but right now I have a few jobs to do, thus creating more functions is not a priority for me.
............................................
http://www.macouno.com
#7   Old 02-May-06, 12:28   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
I just wanted to take a moment to thank macouno for his hard work on this script. I am Render Reality and funded the script, tested a few versions along the way and provided input as to what I wanted to see. However, macouno put in a lot of effort and was solely responsible in making this script a reality. It has already become a part of my work flow. I can take measurements of meshes or object distances now. In the past, i would have to add a cube and scale it to a size and then convert the blender units to measurements by hand. This has taken all of that pain away and left me with professional, renderable results.

So, thanks macouno for going above and beyond on this project. If anyone is considering commercially developing a script, I highly recommend working with macouno. He is very professional, timely and easy to work with. I hope the community get as much use out of this work as I will.

reaper
Joseph Schrand
Render Reality LLC

Last edited by reaper; 02-May-06 at 13:26.
#8   Old 02-May-06, 13:24   
Reply With Quote
Jedrzej_s's Avatar
Jedrzej_s Jedrzej_s is offline
Member
 
Join Date: Mar 2005
Posts: 253
Quote:
Originally Posted by macouno
jerdzej_s: Yes those could be quite helpfull, but right now I have a few jobs to do, thus creating more functions is not a priority for me.
OK. I hope that in future you will do this .

reaper <- Can you show us any example (screenshot / render) of your usage this script ???

And again: BIG THX for GPL release of this script .
#9   Old 02-May-06, 14:44   
Reply With Quote
patricks's Avatar
patricks patricks is offline
Member
 
Join Date: Apr 2004
Posts: 119
Just want to give a big THANK YOU to macouno for his work , not only on this script but also on all the other scripts hi has realest so far . All of them are very useful and in my opinion a great ad on to Blender.
(Wonder what kind of script you cam up next? )

Patrick

Last edited by patricks; 02-May-06 at 15:13.
#10   Old 02-May-06, 15:11   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
Here's a new thought I just had. Say you know you always use this script with certain defaults, would it be easy to modify the script to set these as permanent? Is there a section of variables that are well named and easy to identify that would let me set my input measurement style, output measurement style, etc. I don't care so much about the arrows and such because I like your defaults there. But it might be nice to allow users (myself included) to indicate in the script that I always want it to come up with Feet.inches to 1/16 of an inch and that my scale is in inches and 10 scale factor etc. Not a big deal, just a nicety.

Joe
#11   Old 04-May-06, 14:59   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
reaper: if you look in the code of the script... right near the top there's the GLOBALS section. In there is the DATAHASH.

In the DATAHASH are all the defaults. You can change the values in there.. in most cases it shouldn't be hard to figure out what's what.

For instance

'TEXTSIZE': Draw.Create(0.3),
is the default size for the created text.

'MOUT': Draw.Create(1),
is the default output for a measurement (1 = millimeters 2 = centimeters and so forth, according to the order in the dropdown box)

Just make sure you keep them in the current format... so if it's a text string like "a" don't change it to a nr... and if it's a float like 0.01 don't change it to 1 but 1.00
............................................
http://www.macouno.com
#12   Old 04-May-06, 18:32   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
Awesome. It wasn't too hard to figure out. I now have all my defaults set.

Thanks!
#13   Old 05-May-06, 09:57   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
In using your script, I recently thought I found a bug. I later realized the script was working properly and it was a user error. I was essentially trying to measure the horizontal distance between two objects. But since it mesures face to face and the objects were not vertically aligned, I was getting a distance that was at an angle between the two faces and thus longer than expected.

Is there a way in your script to measure the horizontal distance between two objects that are not vertically aligned? If not, how much effort would be required to add this feature?
#14   Old 05-May-06, 10:08   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
That's exactly why I use a DATAHASH type thing in all my scripts.

BTW: I did receive a bug report... but I haven't gotten the details yet, so a bugfix is on the way sometime this weekend.
............................................
http://www.macouno.com
#15   Old 05-May-06, 10:08   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
Any thoughts on the previous question, macouno? Not sure if you missed it.
#16   Old 05-May-06, 13:05   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
ah yeah I overlooked that.

There is no way currently, but it's doable.

Right now basicly the script gets the two locations (whatever the method or mode is) and then gets the distance. Finding the distance along only one axis between two locations isn't that hard... just discard the other bits.

It might be tricky to make the arrow & text display properly though. The positioning by doing what I suggest below should be fine, but the length of the arrow would be wrong (too short). So you'd want to get the length of the arrow once, then get the distance in that direction as well (add an extra bit to the DATAHASH)

If you want to try something yourself:
Look for the EDGE LENGTH FUNCTION section
in there is: def vertDist(v1, v2):

v1 and v2 are basicly lists like [0.0, 0.0, 0.0]

So if you only want the distance in the x direction this version should work:

Code:
## Function for getting the distance between two points. def vertDist(v1, v2): length = Mathutils.Vector(v1[0]-v2[0], 0.0, 0.0).length return length
BTW: if coding of extra features is required I am of course for hire
............................................
http://www.macouno.com
#17   Old 05-May-06, 13:45   
Reply With Quote
reaper reaper is offline
Member
 
Join Date: Jun 2004
Posts: 618
Quote:
Originally Posted by macouno
ah yeah I overlooked that.

There is no way currently, but it's doable.

Right now basicly the script gets the two locations (whatever the method or mode is) and then gets the distance. Finding the distance along only one axis between two locations isn't that hard... just discard the other bits.

It might be tricky to make the arrow & text display properly though. The positioning by doing what I suggest below should be fine, but the length of the arrow would be wrong (too short). So you'd want to get the length of the arrow once, then get the distance in that direction as well (add an extra bit to the DATAHASH)

If you want to try something yourself:
Look for the EDGE LENGTH FUNCTION section
in there is: def vertDist(v1, v2):

v1 and v2 are basicly lists like [0.0, 0.0, 0.0]

So if you only want the distance in the x direction this version should work:

Code:
## Function for getting the distance between two points. def vertDist(v1, v2): length = Mathutils.Vector(v1[0]-v2[0], 0.0, 0.0).length return length
BTW: if coding of extra features is required I am of course for hire
Thanks for the response. I will take a look at doing it myself, evaluate the difficulty and necessity of this functionality and decide what to do from there. If I decide I want it and cannot code it myself, I will seek your help first. Of course, now that the code is open source, anyone in the community is welcome to add this function for me for free too . *hint hint* *nudge nudge*
#18   Old 05-May-06, 17:42   
Reply With Quote
youngbatcat youngbatcat is offline
Member
 
Join Date: Mar 2002
Posts: 2,037
stupid question.. It's like very cool tool. But silly me I see potential for it to do something else...

two things, Like counting updateings,,

So as I move something around it will adjust it's length and number value.
And
when something is reaching a destination it could count down the time it reaches it's destinated keyframe....

It's a very neat abstract design art tool as well :P
#19   Old 06-May-06, 13:49   
Reply With Quote
macouno's Avatar
macouno macouno is offline
Member
 
Join Date: Jan 2002
Location: netherlands
Posts: 2,514
Yeah it's possible to update each measurement as a scene is animated or edited, if the clean function works for those measurements (cause that means it can find the measurement). It tries to store the object names, edge/face/vert id's and method of measurement in the measurement.

I was actually thinking of experimenting with something like that for fun but I'm working on something a bit more nuts and experimental for myself now
............................................
http://www.macouno.com
#20   Old 06-May-06, 14:12   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script works in blender interface but not when I click ANIM? reaper Python & Plugins 2 21-Jan-06 01:46
ARE YOU A NEW USER? (Updated Nov 25) Fligh News & Discussion 23 23-Dec-05 20:09
Blender won't load .ps script. No faq shows how. Want .obj MakeIt Python & Plugins 4 01-Dec-05 14:10
Links.py - Python basics. Fligh Python & Plugins 7 20-Jul-05 05:00
Blender Courses and Certification Program RCAS News & Discussion 48 12-Oct-04 20:24


All times are GMT. The time now is 18:41.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists