[Plugin] Cloud
-
Hoo-bloody-ray!
Didier - you listening ?
I thought that Ruby's '\n' took any version of carriage-return appropriately ???
Weird.............
At least we have a 'fix'... -
Seems that CR in Ruby is "\r" while CRLF is "\n".
I've tweaked the script to check if lines end with CRLF or CR, and here's what I got from the file:
See new release at top of this thread.
-
Cool, thanks Didier. Your image is correct except I delete all the internal edges/faces and use only the outer edge. Next I am trying to learn how to loft multiple edges/curves in Sketchup.
I downloaded your new cloud_v8.rbs and tested it on my iMac. Sorry to be such a pest but unfortunately I believe it is broken. When I run the plugin, it goes immediately to selecting an origin for placing the point cloud, and never gives the dialog box to select the input file, etc. The plugin throws the following error to the Ruby console:
Error: #<TypeError: no implicit conversion from nil to integer>
(eval):252:in[]' (eval):252:in
initialize'
(eval):164:innew' (eval):164:in
endTool'
(eval):105:in `onLButtonUp'At first I thought I must have done something wrong, so I quit Sketchup, cleared out all plugins (completely empty plugins folder), downloaded a new copy of cloud_v8.zip, and put cloud_v8.rbs into the (now empty) plugins folder. This way I could guarantee that only Cloud plugin was installed. I started Sketchup again and verified that only Cloud_v8 available (i.e., no Plugins menu, and 'Points Cloud' option available via File menu). Unfortunately same result, plugin appears broken.
I am confident this is not a LF-CR-CR/LF problem as the script is never letting me pick a file. it goes straight to 'pick origin'. Just to be certain, I reverted back to cloud_v71.rbs as the only script in the plugins folder, and it works great on iMac (as long as I pick Unix LF or Win CR/LF as end-of-line, and do not pick Mac CR).
Sorry Didier but can you make another try at cloud_v8.zip? It would be nice to have it so as to avoid converting every file, etc. I will be happy to test for you.
Thanks for your support on this, I appreciate it.
-
@didier bur said:
:oops:
Seems that CR in Ruby is "\r" while CRLF is "\n".CR = \r
LF = \n
CRLF = \r\n (best compatibility between systems) -
It is common to use
.strip!
or.chomp!
on lines read from file. Either should take care of whitespace chars. This make the strings more consistent and less prone to comparison errors.chomp
will remove trailing whitespace from a String.strip
will remove both leading and trailing whitespace.whitespace is: spaces, tabs, \n, \r, and \r\n
-
Hi,
@unknownuser said:
Error: #<TypeError: no implicit conversion from nil to integer>
I see. Bug found (although the script works on my machine).
@unknownuser said:
When I run the plugin, it goes immediately to selecting an origin for placing the point cloud
Yes, this is normal. The updated PDF doc says it: "The first thing you'll have to do is click a point to set the points cloud origin".
Download the new version at top of the thread and replace the 'old' RBS file with the one in the archive.
Hope it will work now
-
Didier,
Thanks for the update, it works great. Well, almost. On my setup (Mac OS 10.5.8, Sketchup 8.0.3161) the plugin now handles files correctly with Unix (LF) ending and with Mac (CR) ending... but now it does not correctly handle Win (CR/LF) ending! I feel for you buddy, apparently Ruby is not so easy to coax into the desired behavior.Here is my report. I downloaded your latest plugin (cloud_v8a) and tested it as the only plugin. I tested Unix (LF) ending first - worked great. Then I tested Mac (CR) ending - worked great. I almost wasn't going to test Win (CR/LF) ending but thought for completeness that I should. So I did that and (if memory serves) it worked great. However, I just happened to click again in the window and the file box came up again. So I thought that the plugin was set up to load another point cloud without having to re-initiate the script (via file menu). So I thought, ok great, I'll do it again. However, the second load of the same file to a different location, and it only loaded one point (first point in the file). It would did not load the rest of the file. So I thought, hmm, maybe I should try this again. I selected another tool and drew a random shape, then re-selected cloud and it failed again to load, only loaded one point. On the plus side: in the past when it loaded only one point (or no points), the dialog box for assigning coordinates to data in the line would always be very long as in my previous post in this thread; however, that dialog is now always working correctly, i.e., the dialog box only has three coordinates even if the cloud does not load properly. Now here is the problem, I have to confess that I was not paying close attention when I tested CR/LF; and I am not certain that the first load worked correctly. I may be confusing that test with another.
So I quit and re-started Sketchup and tested each file ending again. I notice that for Unix and Mac endings, the script always works; however, it will not correctly load the point cloud a second time. In other words, to load multiple point clouds, it is required to select another tool (like the pointer) and restart the script via file menu. So I went and RTFM per your suggestion (lol, point taken) and the manual does not say whether the script should be 'looping' or whether it should end after the loading of the first point cloud that I could find. I've sort-of concluded that the second appearance of the file dialog box, resulting from clicking in the window after loading the first point cloud, is actually a minor defect? In any case it is not critical, it always worked to select another tool (like pointer), restart the script, and load a new point cloud.
So I could always very easily and quickly load multiple point clouds in Mac when the lines are terminated with Unix (LF) or Mac (CR). In that sense it is a great script and will be very useful on Mac now.
However, when continuing on to test Win (CR/LF) line termination on Mac, no joy. On all subsequent tests, I could not get the script to properly load the point cloud. I restarted Sketchup several times and re-verified the line endings via Xcode several times, no joy. It always loaded only the first point. So I am convinced that my memory is flawed, and that the first time I tested Win line ending (described above) I actually was testing Unix or Mac and didn't realize it; thus the first load would work, but not the second (as described). So I believe that Win endings on Mac machines are not working in this latest cloud_v8a version. Now on one of the tests when it loaded only one point, I did happen to select 'triangularize' the point cloud, with the following result:
which I found a bit odd, since there is only one construction point, but clearly the script thinks there are other points not at the origin, which do not have construction points, and which do not match data in the file (i.e., compare to pictures of correct loadings in your previous post). I don't think this is a major problem since the script isn't loading the data correctly in this case to begin with, however I describe this here in case it provides any additional clues for troubleshooting purposes.Apologies for yet another long post, I know this must be frustrating. I am trying to describe what is happening in as much detail as possible and as accurately as possible to help you find any problems. If it would help for me to post a video of me doing the testing, please let me know and I will try that also, maybe I am making a mistake somewhere and you will then be able to see it.
Conclusion, the script is working great on Mac now with the one exception, a Mac user attempting to load a point cloud file originating from Win (with CR/LF in it) will not work. Some people may be able to fix it on their own, more inexperienced users may not.
In any case the best option for a Mac user needing to load a point cloud is Cloud_v8a.
Thanks for your continued effort, I am using the plugin heavily and appreciate it.
-
Weird...
So v8b is here.
Hope it will work in all cases now, although v8a was working with CRLF line endings here. -
Thx for the update Didier.
Ben
-
Success with all line endings!
Thanks Didier!
-
Encore - merci beaucoup.
-
Why so many versions? There are four threads for Cloud - and even this one got multiple downloads. Hard to find the "correct" one. At least the old redundant versions should be removed and untagged so they don't appear in the Plugin Index.
-
Didier Bur,
I'm a new and relatively inexperienced user of SU, my introduction is in the newbie forum.
First of all. I Just tried your cloud tools and it's really good. Thank you for sharing.
I'd like to pick your brains a little, do you know of any other point cloud tools or tools for manipulating the meshes created from point clouds. I would be particularly interested in a tool which could produce a best fit surface from
a number of selected meshes and perhaps report on the fit residuals i.e difference between the best fit surface and the
individual points.It would be particularly good if the tool enable a best fit planar surface, dome, pyramid etc.Thank you in advance
Brian.
@unknownuser said:
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
[attachment=3:bpyvk05a]<!-- ia3 -->Cloud_v71.zip<!-- ia3 -->[/attachment:bpyvk05a]
EDIT: 28.11.10: (Cloud_v8) support for CR/CRLF text files, cloud origin selectable.
[attachment=2:bpyvk05a]<!-- ia2 -->Cloud_v8.zip<!-- ia2 -->[/attachment:bpyvk05a]
EDIT 29.11.10 Bug fix.
[attachment=1:bpyvk05a]<!-- ia1 -->Cloud_v8a.zip<!-- ia1 -->[/attachment:bpyvk05a]
EDIT 01.12.10
[attachment=0:bpyvk05a]<!-- ia0 -->Cloud_v8b.zip<!-- ia0 -->[/attachment:bpyvk05a] -
Hi,
I'm not aware of a free plugin that do these kinds of thing, but here is a (payware) interesting plugin:
http://scanable.org/software/modeling/pointools-introduces-point-cloud-plug-in-for-google-sketchup/
Rather expensive -
Dear Sir,
Please advise on possible work-flow concerning storing the "ID" tag from CSV as a component attribute.
Any/all advice will be appreciated.
Kind regards,
Q
-
I am having problems trying to install Cloud_v8b on my mac, does this version work for mac?
-
Hi,
What kind of problem to install ? Please describe it more precisely so I can help. -
Hello Didier,
It seems Cloud and SU 2014 are not getting along.
When I open SketchUp 2014, cloud_v8b.rbs throws a Load Error.
Fixable?Error: #<SyntaxError: c:/users/george/appdata/roaming/sketchup/sketchup 2014/sketchup/plugins/cloud_v8b.rbs:347: Invalid break> c:/users/george/appdata/roaming/sketchup/sketchup 2014/sketchup/plugins/cloud_v8b.rbs
Dell Precision T3400
MS Windows 8.1 32-bit
Intel Core 2 Quad Q9650 @ 3.00GHz
4GB RAM
NVIDIA Quadro FX 1800 768GB -
For v2014 compatibility I suspect that it's something simple that Didier needs to fix is his RB version and recompile into the RBS...
Unfortunately, because it encrypted only Didier knows what is going on inside the code...I suggest you PM him - he needs nagging to get several of his plugins updated to be v2014 compatible.
Where he has supplied a 'packed' RB file I have offered a temporary fix using the final.to_s
->[0]
- which several users are successfully using, BUT unfortunately for his RBS versions that's NOT possible -
Having trouble installing on SU-2014. Am I missing something? Alternatives available?
Regards
Nino
Advertisement