[Plugin] Cloud

[Plugin] Cloud

Postby Didier Bur » Mon Jun 21, 2010 2:28 pm

Hi,
Here is an updated version of my cloud script:
- Imports and exports (new!) DEM points cloud, several CSV formats supported.
- All units (import/export) supported.
- Saves id's, altitudes, or any other field as attributes or insert them as texts (new!).
- Manage layers, triangulation option.
- Doc, sample files and tutorial included.

Also downloadable at my RLDsite: http://rhin.crai.archi.fr/RubyLibraryDepot/plugin_details.php?id=678

Enjoy,

EDIT: 23.06.10: (Cloud_v71) units bug fix, especially for users of SU 7.1
Cloud_v71.zip

EDIT: 28.11.10: (Cloud_v8) support for CR/CRLF text files, cloud origin selectable.
Cloud_v8.zip

EDIT 29.11.10 Bug fix.
Cloud_v8a.zip

EDIT 01.12.10
Cloud_v8b.zip


Get the latest version from the PluginStore

Download

0
Last edited by Didier Bur on Wed Dec 01, 2010 9:42 pm, edited 4 times in total.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby TIG » Mon Jun 21, 2010 2:57 pm

Thanks Didier :D
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Cloud update

Postby Ben Ritter » Mon Jun 21, 2010 3:51 pm

Thanks again for sharing.
0

Ben Ritter 
 

Re: [Plugin] Cloud update

Postby broomstick » Mon Jun 21, 2010 4:02 pm

now, if only I could find reliable dem sources for Italy...

Anyone know where I could look?
0
User avatar
broomstick 
 

Re: [Plugin] Cloud update

Postby Gaieus » Mon Jun 21, 2010 8:20 pm

:sketchstatic:

Thanks Didier,

I am about starting a new project where we not only reconstruct Roman architecture in my city but also contemporary ground surface (based on geological and archaeological research).

This is exactly the tool I need in these cases. :thumb: :thumb: :thumb:
0
User avatar
Gaieus 
 

Re: [Plugin] Cloud update

Postby Didier Bur » Mon Jun 21, 2010 10:07 pm

Nice to see it is useful :P
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby mozzie » Mon Jun 21, 2010 11:58 pm

For me, it's an essential tool.
And it just gets better!
Merci Didier!
0

mozzie 
 

problem with export

Postby mozzie » Tue Jun 22, 2010 2:45 am

The Points Cloud Export function will be a wonderful new tool for me, but I am having trouble with the Export dialog - if I highlight a face with one divide line, then choose Points Cloud >> Export, nothing happens. The Ruby Console shows:

Error: #<TypeError: no implicit conversion from nil to integer>
(eval):655:in `[]'
(eval):655:in `initialize'
(eval):1269:in `new'
(eval):1269:in `exportPointsCloud'
(eval):1281
(eval):1281:in `call'

screenshot attached

Also - would it be possible to nominate a new (not World) origin for export, just as for Import? I will understand if you decide that it will make the tool too complicated.
0

mozzie 
 

Re: [Plugin] Cloud update

Postby MALAISE » Tue Jun 22, 2010 6:44 am

Very useful, specially for terrain modelling :berserk:

MALAISE
0
La Connaissance n'a de valeur que partagée
User avatar
MALAISE 
 

Re: [Plugin] Cloud update

Postby Didier Bur » Tue Jun 22, 2010 10:41 am

Hi,

@ Mozzie: please open the ruby console and copy-paste this line: Sketchup.active_model.options[0][2]
Hit enter and post what happens. You should have an integer returned, from 0 to 4. Any other result shows who's the culprit...
They changed the units options hash between 7.0 and 7.1 :twisted:
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby thomthom » Tue Jun 22, 2010 10:57 am

Didier Bur wrote:They changed the units options hash between 7.0 and 7.1 :twisted:

!!! ?
What? that has not been documented anywhere - has it?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cloud update

Postby Didier Bur » Tue Jun 22, 2010 11:04 am

Hi,

v6: length unit is: Sketchup.active_model.options[0][2]
v7.0 length unit is: Sketchup.active_model.options[0][2]
v 7.1. length unit is: Sketchup.active_model.options[3][2]

Am I right ?
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby thomthom » Tue Jun 22, 2010 11:17 am

oh, you meant the array index - I thought the hash key had changed:

Sketchup.active_model.options.keys.each {|key| p key; Sketchup.active_model.options[key].each {|k,v| puts "> #{k} - #{v}"} }
"PageOptions"
> ShowTransition - false
> TransitionTime - 2.0
"SlideshowOptions"
> LoopSlideshow - true
> SlideTime - 1.0
"NamedOptions"
"UnitsOptions"
> LengthPrecision - 0
> LengthFormat - 0
> LengthUnit - 2
> LengthSnapEnabled - false
> LengthSnapLength - 0.0393700787401575
> AnglePrecision - 1
> AngleSnapEnabled - true
> SnapAngle - 15.0
> SuppressUnitsDisplay - false
> ForceInchDisplay - false
"PrintOptions"
> PrintWidth - 7.0
> PrintHeight - 5.0
> ComputeSizeFromScale - false
> SizeInPrint - 1.0
> SizeInModel - 307.906005859375
> VectorMode - false
> FitToPage - true
> NumberOfPages - 1
> LineWeight - 0.5
> PixelsPerInch - 150.0
> SectionSlice - false
> ModelExtents - false
> PrintQuality - 3
> ScaleAdjustment - 1.0
> QualityAdjustment - 0.5
["PageOptions", "SlideshowOptions", "NamedOptions", "UnitsOptions", "PrintOptions"]


This is the same in all versions?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cloud update

Postby TIG » Tue Jun 22, 2010 11:19 am

You shouldn't hard-code the units items like that [or any other option for that matter] - because the order can change with each build - instead use model.options["UnitsOptions"]["LengthUnit"] that will work no matter what :ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Cloud update

Postby Didier Bur » Tue Jun 22, 2010 11:52 am

use model.options["UnitsOptions"]["LengthUnit"] that will work no matter what

:enlight: :idea:
Of course ! I don't know why I didn't though of that before...

Bug fixed, new version available, same place.
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby mozzie » Tue Jun 22, 2010 2:50 pm

Thanks for the fix ... it is no longer necessry but result is;

Sketchup.active_model.options[0][2]
nil

for 7.1
0

mozzie 
 

Re: [Plugin] Cloud update

Postby thomthom » Mon Sep 27, 2010 11:36 am

There are four Cloud threads - can we clean these up please?
For instance;
Removing the download for the old ones,
Replacing [Plugin] with [Obsolete]
Add a link to the new version
Then finally lock the old ones?

When I was looking at the plugin index it was confusing to what was the latest version.
1
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cloud update

Postby thomthom » Mon Sep 27, 2010 12:31 pm

Coen Naninck wrote:Difficult to keep track of what's new, some topics contain plugins but not the [Plugin] prefix, other topics are posted as questions and then a plugin is added but the first post not renamed with the prefix, etc.

Yea - we should do a cleanup of all these - have them reposted fresh and remove any outdated version.
1
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cloud update

Postby JGA » Mon Sep 27, 2010 10:25 pm

Thanks very much for providing this plugin, we've recently invested in a Total Station & this translates the point data reliably. Providing a help file is also a boon.
We're also using TIG's contourmaker plugin, which helps when exporting to data to AutoCAD.
0
Regards,
JGA

JGA 
 

Re: [Plugin] Cloud update

Postby Erkki » Tue Oct 05, 2010 9:57 pm

Hi,

How to get Cloud_71.rbs and Cloud_6.rb to work?

My intention is to load elevation data of a terrain collected with the help of a GSP-logger to create a terrain model for a village. I noticed that there is a plugin Cloud_71.rbs in the Ruby Library Depot by Didier Bur. I understand that the plugin accepts elevation data, if it is in the CSV-format described in the pdf of the plugin. I downloaded Cloud_71.rbs in the plugin folder of Sketchup 7.1 (Windows XP Pro).

For some reason the Cloud_71.rbs didn't show up in the Plugin menu or any other menu either after restart of Sketchup 7.1. The older "Clouds" with extension .rb show up, but unfortunately I wasn't able to get them work with the downloaded sample files, although I browsed all the possible SketchUcation discussion forums and also some others for help.

Does anyone know if there is an any easy way to get the Cloud_xx.rb plugins to work? And how to get the Cloud_71.rbs plugin show up and make terrain in Sketchup 7.1 or even in the newer Sketchup 8? I'm convinced that there are ways - I just couldn't find the way.

I'd be grateful for your help.

Kind regards Erkki Finni
0

Erkki 
 

Re: [Plugin] Cloud update

Postby Didier Bur » Wed Oct 06, 2010 11:28 pm

Hi,
Avoid having more than one version of a plugin installed at the same time, remove older versions of cloud script, this may cause the problem.
Hope this helps,
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby Erkki » Thu Oct 07, 2010 8:00 am

Didier Bur wrote:Hi,
Avoid having more than one version of a plugin installed at the same time, remove older versions of cloud script, this may cause the problem.
Hope this helps,


Hi,

Thanks for the hint! I'll try to do this.

Regards Erkki Finni
0

Erkki 
 

Re: [Plugin] Cloud update

Postby Erkki » Thu Oct 07, 2010 7:07 pm

Didier Bur wrote:Hi,
Avoid having more than one version of a plugin installed at the same time, remove older versions of cloud script, this may cause the problem.
Hope this helps,


Hi again,

1) I removed the oldest versions of the Cloud_xx.rb plugins and
2) left only Cloud_71.rbs in the Plugin folder of Skecthup 7.1.
3) I started Skecthup
4) As it was opened, the File menu included Points Cloud option
5) After this everything was childsplay - all the test files were
drawn beatifully on the screen. I didn't test the Export-option yet.
6) I repeated the test with Skecthup 8.0.3117 and the result was also good.

This success made me happy and confident to use the plugin for my orginal purpose; to create terrain by using GPS-logger data as input. So many thanks for your help!

Kind regards Erkki Finni
0

Erkki 
 

Re: [Plugin] Cloud update

Postby Sir » Wed Nov 17, 2010 1:01 pm

anyone tried this on a file with about half a billion points?
0

Sir 
 

Re: [Plugin] Cloud update

Postby Didier Bur » Wed Nov 17, 2010 6:33 pm

Hi,
It should import the points quite quickly, but for triangulation: forget it (the delaunay algorithm is slow and SU is lazy when drawing such a bunch of new entities).
Regards,
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby thomthom » Wed Nov 17, 2010 6:42 pm

Didier Bur wrote:Hi,
It should import the points quite quickly, but for triangulation: forget it (the delaunay algorithm is slow and SU is lazy when drawing such a bunch of new entities).
Regards,

Tried building the geometry with fill_from_mesh ?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cloud update

Postby Didier Bur » Wed Nov 17, 2010 10:06 pm

Yes
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cloud update

Postby Sir » Thu Nov 18, 2010 3:59 am

ok great thanks for your quick response
0

Sir 
 

Re: [Plugin] Cloud update

Postby aerostreak » Fri Nov 26, 2010 4:47 pm

Hello,
I have tried all of the Cloud_xx plugins into Sketchup 8 and I can't make any of them work. The file I am loading is very very simple. I will paste it below.

I reverted all the way back to the very first Cloud_V6, the earliest that I could find, and the Ruby console says:

Error: #<TypeError: nil can't be coerced into Length>
(eval):151:in `*'
(eval):151:in `import_points_cloud'
(eval):144:in `each'
(eval):144:in `import_points_cloud'
(eval):481
(eval):151:in `call'
(eval):151

The file I am trying to load is:


1.000000,-0.003780
0.953817,-0.022681
0.907732,-0.040530
0.861844,-0.057373
0.816250,-0.073241
0.771049,-0.088146
0.726337,-0.102087
0.682209,-0.115043
0.638758,-0.126983
0.596079,-0.137864
0.554262,-0.147631
0.513396,-0.156226
0.473568,-0.163589
0.434864,-0.169660
0.397365,-0.174382
0.361153,-0.177706
0.326304,-0.179594
0.292893,-0.180019
0.260991,-0.178968
0.230666,-0.176444
0.201983,-0.172465
0.175003,-0.167064
0.149783,-0.160288
0.126378,-0.152200
0.104837,-0.142872
0.085206,-0.132385
0.067528,-0.120827
0.051839,-0.108290
0.038174,-0.094864
0.026562,-0.080638
0.017027,-0.065692
0.009590,-0.050101
0.004266,-0.033926
0.001067,-0.017214
0.000000,0.000000
0.001067025,0.017214296
0.004265824,0.033925754
0.009589569,0.050101133
0.0170269,0.065692279
0.026561946,0.080637625
0.038174357,0.094864216
0.051839352,0.108290174
0.067527771,0.120827496
0.085206132,0.132385097
0.104836709,0.142871957
0.126377609,0.152200267
0.149782864,0.160288431
0.175002525,0.167063819
0.201982773,0.172465155
0.230666029,0.176444437
0.260991083,0.178968318
0.292893219,0.180018886
0.326304356,0.179593805
0.361153194,0.177705805
0.397365364,0.174381539
0.434863586,0.169659848
0.473567837,0.16358949
0.513395521,0.15622643
0.554261644,0.147630793
0.596078995,0.137863597
0.638758334,0.126983409
0.68220858,0.115043056
0.72633701,0.102086543
0.77104945,0.088146303
0.816250482,0.07324092
0.861843645,0.05737344
0.907731641,0.040530362
0.953816541,0.022681392
1,0.00378

which are the coordinates for a landing gear fairing. I have also appended ",0" to the lines in order to have a z-coordinate. I have also used the dialog box to tell the plugin that there is no Z data. Also have selected flattening (or not) in trying to make it work. Have tried every version of plug in from beginning to latest, no luck, will not work in any configuration. In one version of the plugin, it brings up a massive dialog box, so long that I cannot see the bottom, asking me to tell it which elements are which. I can never figure out how to see the bottom of the dialog box (I am amateur Mac user, there must be a way?), but there is no longer a "nothing" option, so I am not sure getting to the bottom would help me.

These are my questions:
1. Do any of the Cloud plugins work in Sketchup 8?
2. Is there something wrong with my data, and that is why the Cloud plugin is failing?

I am running Mac OS 10.5.8 on iMac Intel dual core with Sketchup 8.0.3161.

In responding, please keep in mind I don't know anything about Ruby. Thanks for your help.
0

aerostreak 
 

Re: [Plugin] Cloud update

Postby aerostreak » Sat Nov 27, 2010 12:53 am

Update:

I went back to verify that I had, in fact, tried every possible version on Mac. In the process of doing that, I found TIG's fixups, in these two posts:

latest: viewtopic.php?f=79&t=24733#p240869
slightly earlier fixup: viewtopic.php?f=79&t=24733#p212737

I can't get either fixup to work in Mac in OS 10.5.8 and Sketchup 8.0.3161 as posted.

I jumped over to WinXP and Sketchup 7.0.10247 using the 'slightly earlier fixup' and was able to load my coordinates (attached PNG).
naca36.png


I saved this over to Mac and can keep working now, however, I would really like to be able to work only on the Mac.

I studied TIG's posts a bit and it seemed like the problem was some statements in the script that 1) were not portable from Win to Mac, and 2) were possibly non-standard usage of Sketchup API that might break the script in future versions. However, I also noticed some strange behavior on Mac that leads me to believe there is something wrong in the file handling of some sort.

When used on Mac with the file as shown, I get this error:

"More than 3 XYZ coordinates per line (139).
Please select X, Y, and Z in the following line sample."

When I look at the line sample in the dialog box, it appears to show three coordinates, i.e., "1.000000,-0.003780,0" (note that I went back and added the extra ",0" just in case that was a problem - it wasn't). However, I can use the arrow keys and it turns out that a much larger part of the file is in the text box that shows the line sample. I can use the arrows to scroll around inside the tiny text box and see many other coordinates. I didn't think to see if the whole file were in that text box, but I did delete everything after the first line - but the same problem happens, the script simply will not process any data. I then get the same error as in my post above.

I have become convinced that the problem has something to do with how files are represented on the Mac versus Win. Is it possibly to do with CR/LF problems? Or something else wrong with my file?

Otherwise, I have found it extremely difficult to get any XYZ data into Sketchup, and not possible at all on the Mac (for me so far). It is very difficult to find the latest versions (I search for well over an hour to find TIG's fixups), to understand which ones have bugs and which ones not, etc etc. Even in the Plugin index there are four versions of Cloud_V6 referenced.

I am not able to sort out whether I have the wrong plugin or whether I am doing something wrong. Help is greatly appreciated, I have done everything I know how to do. Thanks.
0

aerostreak 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: gtowinkwink, JBKoto, Yahoo Bot and 8 guests

Visit our sponsors: