Newbie - Probably a Dumb Question
-
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.
-
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:ineach' (eval):302:in
draw_geometry'
(eval):217:in `onLButtonUp'
(eval):302 -
@30kview said:
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... -
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...
-
Thanks for being so helpful. AttachedThis is the points file. Basically, i am trying to get a similar file to import points into my model so that i can work with the ground surface.
-
@30kview said:
Thanks for being so helpful. Attached[attachment=2:o5q1s2ld]<!-- ia2 -->examples.rb<!-- ia2 -->[/attachment:o5q1s2ld]. 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/RubyLibraryDepot/Ruby/em_geo_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...
-
-
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 - theoptions
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###
beforeu =
...
Then insert the new lineu=opt
... below that###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 -
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.
-
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
-
George
Can you link him to here http://forums.sketchucation.com/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...
-
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.
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 useu=opt["UnitsOptions"]["LengthUnit"]
### the TIG fix that always works...
-
Thanks for your help TIG. This Cloud_v6 script has been driving me nuts.
@tig said:
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.
BTW, Do you know if Didier added your fix to the RLD download copy of the script?@tig said:
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.eval %q{IyBDb3B5cmlnaHQgRGlkaWVyIEJ1ciAtIDIwMDQKIyBBIHBlcnNvbmFsIGxp
Y2Vuc2UgaXMgZ3JhbnRlZCB0byB5b3UgdG8gdXNlIHRoaXMgcHJvZ3JhbSBm
cmVlbHkKIyBZb3UgYXJlIG5vdCBhdXRob3JpemVkIHRvIG1vZGlmeSBvciBj
b3B5IHRoaXMgc2NyaXB0CiMgdG8gdXNlIGF0IGVuZHMgb2YgdHJhZGUKIyBUIs this the script?
-
Thank you, TIG
Your generosity, dedication and Uber Geekness know no bounds.
Geo
Advertisement