[Plugin] Reports coordinates of a cpoint
-
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
-
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.Put this file into the Plugins folder and restart SketchUp...
-
TIG:
Brilliant. Thank you so much. This is saving my cookies.
And I love my cookies! -
Version 1.1 now available http://forums.sketchucation.com/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... -
Ah! Thank you so much.
If any of you are not using SkUp for DTM work,
now you have no excuse! -
whats dtm.
-
Here's another update v1.2 http://forums.sketchucation.com/viewtopic.php?p=238662#p238662
It now lets you pass aPoint3d
OR aVertex3d
as an argument as well as in rawx,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...
Advertisement