Newbie - Probably a Dumb Question

The ideal place for beginners to get help using SketchUp

Newbie - Probably a Dumb Question

Postby 30KView » Mon Dec 28, 2009 3:34 pm

Good Morning:

So, i downloaded import points cloud, including the example, and saved to plugins foler. When i click plugins, the file shows up and allows me to select the example. after i import the file, and place the point of origin, nothing shows up on my model.

Actually, i was trying this with another file for a model i am trying to get ground surface placed and encountred the same problem and arrived at this forum in quest of solutions. looks like a useful an well run forum, congrats to all participants.
0

30KView 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Tue Dec 29, 2009 4:44 pm

30KView wrote:Good Morning:
So, i downloaded import points cloud, including the example, and saved to plugins folder. When i click plugins, the file shows up and allows me to select the example. after i import the file, and place the point of origin, nothing shows up on my model.
Actually, i was trying this with another file for a model i am trying to get ground surface placed and encountered the same problem and arrived at this forum in quest of solutions. Looks like a useful an well run forum, congrats to all participants.

Do you have 'Guides' ticked in your current Style Settings ?
The points cloud is guide-points only and won't be visible otherwise...
Open the Outline Window and click on any group that could also be this and it should highlight it ?
You need to run a separate 'triangulation' script on the points to make them into a TIN mesh...
0
Last edited by TIG on Thu Dec 31, 2009 12:53 pm, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby 30KView » Thu Dec 31, 2009 3:10 am

Thanks for resonding TIG, guides are on and nothing shows up on the Outliner. Below is the Ruby console message i get when i try to insert the origin of the points cloud. Once i can see the points to select, i can then triangulate. Any help is appreciated.



Error: #<TypeError: nil can't be coerced into Length>
(eval):305:in `*'
(eval):305:in `draw_geometry'
(eval):302:in `each'
(eval):302:in `draw_geometry'
(eval):217:in `onLButtonUp'
(eval):302
0

30KView 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Thu Dec 31, 2009 12:58 pm

Let's back track a little - what is the exact script and points file you are having problems with> Please zip them and upload here or PM me... :?:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby 30KView » Thu Dec 31, 2009 7:17 pm

Thanks for being so helpful. Attached
examples.rb
. Basically, i am trying to get a similar file to import points into my model so that i can work with the ground surface.
0

30KView 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Thu Dec 31, 2009 8:47 pm

30KView wrote:Thanks for being so helpful. Attached
examples.rb
. Basically, i am trying to get a similar file to import points into my model so that i can work with the ground surface.

Sorry to say but your uploaded examples.rb is NOT a points file :?:
A points file must be in the form x,y,z [as numbers] one 'point' per line, with a .csv suffix on the file name - this is how point data is imported from surveys etc.
To import a file of points you need to use something like 'cloud.rb': see http://www.crai.archi.fr/RubyLibraryDep ... o_page.htm and get 'cloud_v6.zip' and unzip the files as directed into the Plugins folder...
Then import the points from a points.csv file and when you have a cloud of points made run the triangulation tool on them to make a meshed surface...
:enlight:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby 30KView » Fri Jan 01, 2010 4:17 am

oops, sorry, here it is
0

30KView 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Fri Jan 01, 2010 4:10 pm

I just tried to use this with cloud_v6 and it failed for me too because $mult isn't set before it is run - also found this error in the original 'cloud' script !
It used to work for me - Didier has used a way of accessing the 'units' that relies on the listed order being constant - the options list order must have changed with a recent SUp version or maintenance upgrade...
The fix is quite simple...
Open the file cloud_v6.rb in Notepad.
Find line 39.
opt = Sketchup.active_model.options
On the line below add ### before u =...
Then insert the new line u=opt... below that
Code: Select all
###u = opt[0][2]
u=opt["UnitsOptions"]["LengthUnit"]###TIG fix

You'll need to set the model's units to match the imported '.dat' file's units...
This is a 'fixed' file that now works as expected...
cloud_v6.rb
CloudSurface.png
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby 30KView » Fri Jan 01, 2010 6:26 pm

Thanks, that s just awesome. it works for me now with the fix. I am sure you will update the library file. thanks a lot again.

:berserk:
0

30KView 
 

Re: Newbie - Probably a Dumb Question

Postby George » Tue Apr 20, 2010 6:07 am

Hello TIG,

Our friend Will, over in the SU Help Forum, is having a similar problem with Cloud_v6.

I have posted copies of his csv file and a copy of the Cloud_v6 script that works perfectly on my XP system but fails on his Mac OS X 10.5.8.

As a test, I downloaded the example.zip file in this thread. It works fine with my copy of Cloud_v6 ... The same copy of Cloud_v6 that fails on Will's Mac.

Your Ruby expertise would be most welcome here: http://www.google.com/support/forum/p/sketchup/thread?tid=7b04ae9067b5834a&hl=en

Thanks,

Geo
0
"Everyone is entitled to his own opinions, but not to his own facts." ~Patrick Moynihan
User avatar
George 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Tue Apr 20, 2010 11:42 am

George

Can you link him to here viewtopic.php?p=212737#p212737 - to make sure he's downloaded the 'fixed' cloud_v6.rb first...

The glitch I fixed seems related to a recent maintenance update that changed the 'order' of the units options that Didier fell foul of - my fix got what's needed in a different way, and thereby avoided that problem - so it should be future-proofed, at least for that particular issue !

As Will is also on a Mac, can he also check he's using the correct 'Plugins' folder to put new script files into. There's been some confusion over this and duplicate folders made in odd places on Macs so you can have duplicate scripts were the old one loads after the newer one, and so you don't get the upgraded functionality of the newer one... If he types Sketchup.find_support_file("Plugins") into the Ruby Console it will return the path to the 'Plugins' folder that's to be used...
:ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby George » Wed Apr 21, 2010 2:44 am

Thanks for your help TIG. This Cloud_v6 script has been driving me nuts.

TIG wrote:Can you link him to here viewtopic.php?p=212737#p212737 - to make sure he's downloaded the 'fixed' cloud_v6.rb first...

That's already been done ... by another poster, which is how I found this thread. :thumb:
BTW, Do you know if Didier added your fix to the RLD download copy of the script?


TIG wrote:The glitch I fixed seems related to a recent maintenance update that changed the 'order' of the units options that Didier fell foul of - my fix got what's needed in a different way, and thereby avoided that problem - so it should be future-proofed, at least for that particular issue !

Now I'm confused (more). I'm running XP-Pro SP3 and the latest version of SU Pro 7.1.
I've worked with this original copy of Cloud_v6 several times in the past with various csv files, including the one posted by 30KView above and it has never failed.

Why do you think the script (which I downloaded from RLD long ago ... Prior to your posted fix) runs on my XP system yet fails on Vista as related in this thread? Is the script problem/fix OS related ?

Another thing that is a mystery (to me).
When I open the Cloud_v6 file.rb I am using, it looks like (technical term) gobbledygook.
Below are the first four lines I copied from the script as it appears in MS-Notepad.
I neither read, write nor speak Ruby, but I've opened a few scripts and I've never seen the likes of this. :shock:


eval %q{IyBDb3B5cmlnaHQgRGlkaWVyIEJ1ciAtIDIwMDQKIyBBIHBlcnNvbmFsIGxp
Y2Vuc2UgaXMgZ3JhbnRlZCB0byB5b3UgdG8gdXNlIHRoaXMgcHJvZ3JhbSBm
cmVlbHkKIyBZb3UgYXJlIG5vdCBhdXRob3JpemVkIHRvIG1vZGlmeSBvciBj
b3B5IHRoaXMgc2NyaXB0CiMgdG8gdXNlIGF0IGVuZHMgb2YgdHJhZGUKIyBU

Is this the script? :?
0
Last edited by George on Wed Apr 21, 2010 12:42 pm, edited 1 time in total.
"Everyone is entitled to his own opinions, but not to his own facts." ~Patrick Moynihan
User avatar
George 
 

Re: Newbie - Probably a Dumb Question

Postby TIG » Wed Apr 21, 2010 9:27 am

It's an encrypted script. I do know how to decrypt/re-encrypt them...
The version I fixed a while ago was issued 18/6/7: this encrypted one was issued 9/11/7, with a new 'pick origin' option - unfortunately Didier didn't fix the earlier bug with 'model options' that I had fixed, so I have done so again.
Here is the fixed file - re-encrypted to preserve his 'algorithm confidentially'...
If Didier sees this he might fix the 'official' version on crai...
The PDF guide from crai... will still apply.
:geek:
cloud_v6.rb
I suspect that the Ruby version for XP parses 'model options' slightly differently to Vista's and Mac's versions - Didier assumed they were always in a certain order ### u = opt[0][2] ### original - but often they return in a different order after a SUp version upgrade etc, so I use u=opt["UnitsOptions"]["LengthUnit"] ### the TIG fix that always works...
:ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Newbie - Probably a Dumb Question

Postby George » Wed Apr 21, 2010 4:41 pm

Thank you, :ugeek: TIG

Your generosity, dedication and Uber Geekness know no bounds.

:enlight: Geo
0
"Everyone is entitled to his own opinions, but not to his own facts." ~Patrick Moynihan
User avatar
George 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Newbie Forum

Who is online

Users browsing this forum: PotatoTattoo and 6 guests

Visit our sponsors: