SketchUcation Premium Membership

 

 

[Plugin] Triangulate Points

[Plugin] Triangulate Points

Postby TIG » Sat Jan 15, 2011 4:23 pm

This is a version of Didier's points_cloud_triangulation.rb but with a protecting class and a new delauney3 file to avoid clashes with other scripts.
Extract both .rb files from the zip into ../Plugins - the Plugins menu item is 'Triangulate Points [TIG]'
All triangles now face 'up'
Colinear vertical cpoint errors trapped
Triangulated mesh is now grouped
Layer dialog asks for layer if you cancel = Layer0 - type in Layer to use... that if not exists its made.
The ZIP contains TIG's 'delauney3.rb' that can also be used by other tools quite independently...
TIG_points_cloud_triangulation.zip
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby simon le bon » Sat Jan 15, 2011 5:34 pm

Thank you TIG,
All these old good plugins actually revisited and enforced by the gold ruby team is very appreciated :thumb:
Well-done,
+++simon

PS:for who don't know, this release come from a very interesting request from Solo: [REQ] drop and drape ;)
User avatar
simon le bon
 
Posts: 1077
Joined: Sat Jan 26, 2008 10:22 am
Location: Chouy/ Picardie/ France
Name: Simon Bonnet

Re: [Plugin] Triangulate Points

Postby gring » Tue Jan 18, 2011 3:18 pm

Thank you TIG,
gring
 
Posts: 2
Joined: Sat Jun 27, 2009 4:32 pm

Re: [Plugin] Triangulate Points

Postby pav180 » Tue Mar 22, 2011 2:41 pm

TIG,

It's a great plugin. Does it work with SU 8? I have installed it fine into SU 8, but I do not think it works. I could have done something wrong and I am not sure. Please clarify.
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby TIG » Tue Mar 22, 2011 4:13 pm

pav180 wrote:TIG,

It's a great plugin. Does it work with SU 8? I have installed it fine into SU 8, but I do not think it works. I could have done something wrong and I am not sure. Please clarify.

It works fine in v8 [as it should in v6&7].
Is the .rb file place directly into the v8 Plugins folder?
Do you get a item in the Plugins menu?
Do you preselect faces first?
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby pav180 » Wed Mar 23, 2011 10:19 am

My answer is positive to all your questions. But it is negative if you ask me if I was sucessful. I have attached a sample point cloud I am working with.
Please, register (free) to access all the attachments on the forums.
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby pav180 » Wed Mar 23, 2011 10:37 am

And one additional question please: your plugin works for selected spoints which is great, but it doesn't work for a group or whichever it's called in SU. After having imported a point cloud into SU with say Point_V8 it is a component or a group, but I have to unglue/ungroup it and than select it all again if I want to triangulate it as a whole with TIG plugin. Is it on purpose or I am doing something wrong as usually?
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby Gaieus » Wed Mar 23, 2011 10:45 am

Why don't you just edit the group and triangulate inside?
Any new geometry created with ruby is safest inside a group anyway. You never know what other, loose geometry it encounters (and ultimately merges) with otherwise.
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27725
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] Triangulate Points

Postby pav180 » Wed Mar 23, 2011 11:02 am

Right, Gaieus, this is what I have to do: triangulate portions of a group, and it is in fact very safe. I have experienced bad triangulation results of the whole group if it has complex organic shape. I was wondering if TIG has made this limitation on purpose to avoid inaccurate meshing of a compex shape, or I haven't figured something out. It's not a big deal anyway. Thanks for your suggestion!
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby Rich O Brien » Wed Mar 23, 2011 11:14 am

I have experienced bad triangulation results of the whole group if it has complex organic shape


What is the bad result?

SU has problems skinning faces less than 1mm. If your points are closer than 1mm try scaling the point cloud up by 10 the Triangulating. Afterwards scaled it down by 0.1.
:::Blog:::

I'm a Trimbler now!
User avatar
Rich O Brien
Administrator
 
Posts: 8418
Joined: Fri Oct 31, 2008 9:05 am
Location: Limerick, Ireland
Name: Rich O'Brien
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby TIG » Wed Mar 23, 2011 12:29 pm

If you examine the points cloud it occupies barely 1 sq mm - so some are very close!
I scaled it up x100 and it faced fine...
As Rich says you can make very small facets in Sketchup <~0.5mm will usually fail.
I suspect the points were perhaps let's say in 'm' and you imported in 'mm' ?
Capture.PNG
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby pav180 » Wed Mar 23, 2011 1:04 pm

Wow! While I was working on my reply TIG has triangulated my point cloud. Great! But it was a planar model and I did the same in SU 7.1 (I can still not manage TIG's package in SU 8), let's do something more difficult.

I scan with my3dscanner.com, I receive and download a .ply point cloud, than I import it into SU as CSV via Cloud_V7.1 (6 or 8).

I am testing SU plugins to triangulate. I get bad results if I try to triangulate the whole model either by Cloud_V8 or great TIG package.

I have scaled the model, but it didn't work. I am a little confused about scaling (my3dscanner HAS NO SCALE AT ALL which is bad), but scaling proposed by Rich did not work for Lion model.

My point is to illustrate bad results (this is what Rich has asked for) if you mesh the model as a whole and if it is complex, not planar.

This is a workflow: .ply dense point cloud, csv sparse point cloud imported into SU, bad triangulation results.

LionSUNotGood.jpg


I do know that if I triangulate a model in portions it will work. Little by little. I also suspect model orientation is a key. You are welcomed to play with the file I tried to triangulate (unfortunately CSV format is not supported here).

Please be forgiving to my questions and comments. Sadly I know very little about SU and I am here to learn, not to promote my3dscanner which I used to be one of the developers. I feel awkward discussing these matters with gurus of SU.
Please, register (free) to access all the attachments on the forums.
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby TIG » Wed Mar 23, 2011 1:35 pm

You might have made it too big by x10 but that's better than too small...
The use of a points cloud import is typically from surveyed land, so it's not expecting a 3D object - more a countoured surface.
I suggest you slice you points in something like 'half' horizontally and then merge the two surfaces together later... More like making a mold or a face-mask than a full 3D object straight off...
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby pav180 » Wed Mar 23, 2011 3:30 pm

TIG,

I see your point. Size limitation comment was very helpull as well. Thank you, guys!
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby pav180 » Thu Mar 24, 2011 11:18 am

And TIG, your triangulation plugin works in SU8 beautifully. I was a dumb head...
pav180
 
Posts: 12
Joined: Tue Feb 15, 2011 9:09 am
Name: Paul

Re: [Plugin] Triangulate Points

Postby thomthom » Thu Jul 07, 2011 3:15 pm

It does not respect "Cancel" as a response to the inputbox...
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17907
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Triangulate Points

Postby TIG » Thu Jul 07, 2011 3:28 pm

It never did - even in Didier's original version!
If you cancel the layer naming dialog then it'll use layer 'nil' - e.g. 'Layer0'.
Once you run the tool it runs the processing to the end - the layer dialog only lets you determine a layer for the mesh-group if desired, with cancel canceling the layer naming but not the main tool's operation, which carries on relentlessly. Frankly the whole layer part could be omitted, it's results are all grouped and you could easily re-layer that as desired later... :roll:
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need SketchUp Books, Models, Styles or Textures? Check out our One Stop Shop for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: Google Bot, studiofishfilet and 8 guests