SketchUcation Plugin Store

 

 

[Plugin] Create 3d mesh from construction points... ver 1.0

[Plugin] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Sun Aug 02, 2009 8:42 pm

Description: Little plug-in, which creates approximate 3d mesh from a set of selected construction points.

Usage: 1) put “pnts2mesh.rb” to “Google SketchUp 6\Plugins” folder
2) start SketchUp 6
3) draw some construction points (or import dxf file with points cloud)
4) select a set of construction points, which you want to be processed, on the screen
5) choose “Plugins>> Create 3d mesh from construction points...” command from the main menu
6) “Mesh Settings” input box appears, specify appropriate values for “Cells count” and click “Ok” (note: big values of “Cells count” takes a lot of time to process)

Videos of usage:
http://www.youtube.com/watch?v=iM4foc0MLTU
http://www.youtube.com/watch?v=NZw-PwH9bDY
Please, register (free) to access all the attachments on the forums.
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby massimo » Sun Aug 02, 2009 9:25 pm

Thanks Kirill, really a good plugin and it works fine!
User avatar
massimo
Global Moderator
 
Posts: 1369
Joined: Thu Mar 19, 2009 10:52 am
Location: Italy
Name: Massimo Siracusa
Operating system: Windows
SketchUp version: 7
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby Didier Bur » Mon Aug 03, 2009 11:26 am

Hi Kirill,
Maybe a progress bar would be handy, because when generating a 20x20 mesh or higher takes a long time.
I've PM'ed you a version of your script with Todd's progress bar class (renamed to avoid any conflict with other scripts ;) ). It is based on the "m" size of mesh, that's-to-say if you select a 20x10 mesh, you'll get 5% by 5% progress numbers in the status bar.
Of course feel free to keep it or delete it, but users may think SU is frozen when creating big meshes :P .
Another question: is it due to the "z" calculation formula that the mesh doesn't "stick" to the construction points exactly ? or did I miss something ?
Best regards,

pts2mesh.jpg
Please, register (free) to access all the attachments on the forums.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1239
Joined: Wed Nov 14, 2007 10:07 pm
Location: Nancy, France
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Mon Aug 03, 2009 3:29 pm

Thanks for feedback! Especially for progressbar, of course I keep it :thumb:
Didier, you did not miss about exactness... As I mentioned in description, plugin creates only approximate 3d mesh surface and it is really due to the "z" calculation formula.
I'm going to make it more accurate. I just need to adapt cumulative mesh length minimization algorithm from another project (more info: http://lss2008.livejournal.com/9938.html). Of course, it will take a little time ;)
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby Jim » Mon Aug 03, 2009 3:41 pm

Need a test model?
Please, register (free) to access all the attachments on the forums.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby ideas_arte » Mon Aug 03, 2009 3:49 pm

This is very impressive, thank you very much! :D
ideas_arte
 
Posts: 57
Joined: Tue Sep 09, 2008 7:20 pm
Location: Guatemala
Name: Ivan Alvarado

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Mon Aug 03, 2009 4:35 pm

Jim wrote:Need a test model?

I'm afraid 'pnts2mesh.rb' will fail in such test :(
You see, plugin creates only rectangular 3d mesh and calculates only one z level for each x,y position. It has no enough power to process a bunny :oops:
Last edited by kirill2008 on Tue Aug 04, 2009 5:52 pm, edited 1 time in total.
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby Chris Fullmer » Mon Aug 03, 2009 7:52 pm

Maybe a roadkill bunny that got squashed by a truck, so all its z values are the same? :)

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
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] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Tue Aug 04, 2009 9:20 am

Chris Fullmer wrote:Maybe a roadkill bunny that got squashed by a truck, so all its z values are the same? :)

Chris

Well... Actually a rectangular (not necessary flat) bunny would be more suitable, I guess :).

The initial 6000 points girl:


Failed 'pnts2mesh.rb' test:


Only rectangular hat is more or less succesful:


Well, the current algorithm is better when you've got few construction points and need to obtain a smooth rectangular piece of terrain (similar to the sandbox tool).

The plugin treats each construction point as a local extremum of the result surface.
If the points cloud is quite dense, then Constrained Delaunay Triangulation (CDT) is more proper choice.
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby mitcorb » Tue Aug 04, 2009 1:00 pm

Hi, kirill2008:
Thank you for this timely and very useful plugin.
I am in the process of using it for a site topo.
I hope you can refine the z precision. Currently, I am correcting z's by moving the geometry one by one. This probably affects the local surrounding slopes and elevations and produces a surface no more accurate than leaving the z's alone.

You mentioned the Constrained Delaunay Triangulation. Is this available for use in Sketchup 6 or 7 through the User Interface?

Thanks once again.
mitcorb
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3429
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby Gaieus » Tue Aug 04, 2009 2:08 pm

Hi Mitcorb,

You could either use points_cloud_triangulation (if you already have the points imported) or Cloud_V6 (if you "only" have the xyz data). Practically, both use the same (Delaunay) triangulation method - at least as far as I know.
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27722
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby mitcorb » Tue Aug 04, 2009 3:00 pm

Thanks, Gaieus
I will give these a look.
I salute you for your tireless efforts.
mitcorb
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3429
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Tue Aug 04, 2009 5:47 pm

mitcorb wrote:Currently, I am correcting z's by moving the geometry one by one.

OMG, it's no good... I'll try to fix z calculation as soon as possible. But I guess you need to try alternative terrain generation tools also, because I doubt whether little (btw, experimental) plugin has enough power to perform complex topo site work.

mitcorb wrote:You mentioned the Constrained Delaunay Triangulation. Is this available for use in Sketchup 6 or 7 through the User Interface?

Yes it is available. If you have terrain contours (horizontals), then you may try to generate triangulated surface from contours. It is one of "Sand box tool" (built-in) possibilities.
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby mitcorb » Tue Aug 04, 2009 6:00 pm

OK, thanks.
I did not realize that Sketchup was already using these concepts in its standard tools.
That is what is so good about this forum.

By the way, I am merely experimenting with the plugin and I do realize that the original intention of Sketchup was to be a "quick" vizualization tool. Actually, doing the tedious knitting to tweak a model is a learning process in itself, and having gone through the process, I feel that my learning curve is beginning to level out a bit, as far as modeling goes. (still much to learn about ruby and rendering)

Thanks again, I am having fun.
mitcorb
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3429
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Create 3d mesh from construction points... ver 1.0

Postby kirill2008 » Wed Aug 05, 2009 4:55 am

mitcorb wrote:That is what is so good about this forum.

I agreee. This forum keeps very friendly atmosphere as well and it's great :thumb: and positive.
kirill2008
 
Posts: 107
Joined: Sun Aug 02, 2009 8:06 pm
Location: Chelyabinsk, Russia
Name: kirill2008

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Keyframe Animation plugin - animate your SketchUp model by adding movement to any object.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: asep3suryana, mrshevqeti, rodman100, vizz, wiskill, zenon8088 and 10 guests