[Plugin] Reports coordinates of a cpoint

[Plugin] Reports coordinates of a cpoint

Postby mmyoung » Fri Apr 09, 2010 1:13 am

Does anyone know of a Ruby that would report the coordinates of a construction point when it is selected? Would be very helpful in DTM work. Thanks
0
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)

mmyoung 
Premium Member
Premium Member
 

Re: [Plugin] Reports coordinates of a cpoint

Postby TIG » Fri Apr 09, 2010 12:55 pm

Here...
Copyright 2010 (c), TIG
All Rights Reserved.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES,INCLUDING,WITHOUT LIMITATION,THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
###
cpointtext.rb
###
This tool adds a piece of text with a leader to any selected Cpoints
[guide-points].
It is shown thus [0, 123, 4567].
The numerical values reflect the 'precision' of the model's units
settings - in the example above it's 0 - typical for 'mm' model.
If it were a 'meter' model then the precision might be 3, giving
[0.000, 0.123, 4.567].
To use it Select some Cpoints [other things selected will be ignored].
Type cpointtext in the Ruby Console to run it...

It's other use is to draw a Cpoint at a given 3d-point, to do this type
in the Ruby Console 'xyz' values or an actual point thus:

cpointtex 1,2,3.4 or cpointtex(1,2,3.4)
or
cpointtext [1,2,3.4] or cpointtex([1,2,3.4])
or
cpointtext point3d or cpointtext(point3d)
or
cpointtext vertex3d or cpointtext(vertex3d)

Note the space between the cpointtext and the first argument OR the
parentheses enclosing all arguments without a gap before the (
cpointtext(x,y,z) - this is the safer option.
You call this method from within other commands.
Units are in current units - i.e. inches, feet, mm, cm or m.
It draw a cpoint at that point's location with associated text...
###
Donations:
Are welcome [by PayPal], please use 'TIGdonations.htm' in the
../Plugins/TIGtools/ folder or PM @TIG...
###
Version:
1.0 20100409 First release.
1.1 20100411 If 3 arguments/array [x,y,z] draws cpoint+text, gsub! fixed.
1.2 20100412 Argument can also be a 'Point3d' or 'Vertex3d'. Now undoes.
###
cpointtext.rb
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Reports coordinates of a cpoint

Postby mmyoung » Sat Apr 10, 2010 12:57 am

TIG:
Brilliant. Thank you so much. This is saving my cookies.
And I love my cookies!
0
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)

mmyoung 
Premium Member
Premium Member
 

Re: [Plugin] Reports coordinates of a cpoint

Postby TIG » Mon Apr 12, 2010 12:07 am

Version 1.1 now available viewtopic.php?p=238662#p238662
Fixed a glitch with gsub! sometimes not reporting location correctly, and it now has option to take 3 arguments or an array [x,y,z] to add a cpoint and text...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Reports coordinates of a cpoint

Postby mmyoung » Mon Apr 12, 2010 6:33 am

Ah! Thank you so much.
If any of you are not using SkUp for DTM work,
now you have no excuse!
0
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)

mmyoung 
Premium Member
Premium Member
 

Re: [Plugin] Reports coordinates of a cpoint

Postby Chris Fullmer » Mon Apr 12, 2010 8:16 am

whats dtm.
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Reports coordinates of a cpoint

Postby TIG » Mon Apr 12, 2010 11:55 am

Here's another update v1.2 viewtopic.php?p=238662#p238662
It now lets you pass a Point3d OR a Vertex3d as an argument as well as in raw x,y,z values or an array [x,y,z].
Now has one step undo for plain cpoint texting...
You can call it from other scripts so for example you could read a number of points an array of them, or say vertices from faces...
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Alpheratz, HSBBSB, owl99 and 11 guests

Visit our sponsors: