SketchUcation Plugin Store

 

 

[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
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)
mmyoung
 
Posts: 9
Joined: Sun Jan 10, 2010 4:05 am
Name: Michael Young

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
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14008
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)
mmyoung
 
Posts: 9
Joined: Sun Jan 10, 2010 4:05 am
Name: Michael Young

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...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14008
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!
Michael Young
Albuquerque
OSX; SketchUp, Vectorworks, and Wings3D
(which play nicely together)
mmyoung
 
Posts: 9
Joined: Sun Jan 10, 2010 4:05 am
Name: Michael Young

Re: [Plugin] Reports coordinates of a cpoint

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

whats dtm.
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6699
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

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...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14008
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: a256378, asep3suryana, Bob James, Heedicalking, ikmijjij, joao3350, Majestic-12 Bot, thomthom, tvmuska, unclex and 8 guests