[Plugin] Drape Cpoints

[Plugin] Drape Cpoints

Postby TIG » Mon Aug 24, 2009 12:11 pm

drape_cpoints.rb



Adds Plugins Menu Item 'Drape Cpoints' which makes a regular grid of
grouped cpoints over a 'mesh': it works on selected face(s), group(s)
or component-instance(s) or combinations of these; other types of
entities in the selection are ignored.
When the cpoint group is made you can use 'Triangulate Points' on the
it to re-make the 'mesh' with a regular grid.

v1.1 First release. 20090824
:ugeek:
drape_cpoints.rb
0
Last edited by TIG on Mon Aug 24, 2009 2:51 pm, edited 2 times in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby EarthMover » Mon Aug 24, 2009 1:31 pm

:berserk: Perfect perfect perfect! Exactly what I was looking for. Thank you so much TIG!

Now I just need a "paint select faces" tool to quickly isolate faces in the triangulated topology. This will be a very useful tool for doing things like adding snow to an irregular shaped object, or adding water to a waterfall.
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby TIG » Mon Aug 24, 2009 2:35 pm

To 'paint selected faces' you select the faces as apply the Material with the Paint-bucket - all selected are painted ? What else do you need ??? :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby EarthMover » Mon Aug 24, 2009 2:49 pm

TIG - sorry, poor wording on my part. By "paint select" I mean hover select, not applying a material. Looking for a tool that you can click the mouse down once and drag over the faces you want to select. Similar to Fredo's script for edges, but just a simple one for faces. It would be easier than window selecting or individually clicking on faces to select triangles in a subdivided mesh.
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby TIG » Mon Aug 24, 2009 2:51 pm

Fredo ? 5 minutes work ? :ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby monk77 » Mon Aug 24, 2009 7:16 pm

Thanks for sharing. Great plugin.

Cheers
monk77
0

monk77 
 

Re: [Plugin] Drape Cpoints

Postby Chris Fullmer » Mon Aug 24, 2009 7:48 pm

How about Use Fredo's tool to select the edges, then right click on one of the selected edges and use the "Selection - Select connected Faces" option. That should do the trick!

Chris
1
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Drape Cpoints

Postby fredo6 » Mon Aug 24, 2009 8:34 pm

TIG wrote:Fredo ? 5 minutes work ? :ugeek:

Yes, sure. I would have to apologize if it takes longer :ecstatic: .
I had this in mind, and it is why HoverSelect is not called HoverEdges.
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Drape Cpoints

Postby mitcorb » Mon Aug 24, 2009 10:13 pm

Whoa!
I like it already. Can't wait to try it.
Thanks
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Drape Cpoints

Postby mitcorb » Mon Aug 24, 2009 10:16 pm

Hmmm
Next thing you know, one of these giants is gonna present a floating xyz gizmo for local mesh editing.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Drape Cpoints

Postby EarthMover » Tue Aug 25, 2009 12:38 am

Another use for the script.....5 minute bedspread. (Bed model from warehouse)
2
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby dedmin » Tue Aug 25, 2009 8:35 am

EarthMover wrote::berserk: Perfect perfect perfect! Exactly what I was looking for. Thank you so much TIG!

Now I just need a "paint select faces" tool to quickly isolate faces in the triangulated topology. This will be a very useful tool for doing things like adding snow to an irregular shaped object, or adding water to a waterfall.


Sorry, but how did you made triangulated mesh from the points?
0

dedmin 
 

Re: [Plugin] Drape Cpoints

Postby pibuz » Tue Aug 25, 2009 8:48 am

Sorry guys: I can't find the rb to triangulate the CPoints..
Could you please head me to?

...btw GREAT RB! I can't wait to test it!
0

pibuz 
 

Re: [Plugin] Drape Cpoints

Postby TIG » Tue Aug 25, 2009 9:03 am

The script 'points_cloud_triangulation.rb' [which shows in the Plugins menu as 'Triangulate Points'] is here...
http://www.crai.archi.fr/RubyLibraryDep ... ulation.rb
that also requires 'delauney2.rb' - which you can get here...
viewtopic.php?p=117071#p117071
:geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby dedmin » Tue Aug 25, 2009 9:06 am

TIG wrote:The script 'points_cloud_triangulation.rb' [Shows in the Plugins menu as 'Triangulate Points'] is here...
http://www.crai.archi.fr/RubyLibraryDep ... ulation.rb
that also requires 'delauney2.rb' - which you can get here...
viewtopic.php?p=117071#p117071
:geek:

:berserk: :berserk:

I tested it - SUPER USEFUL!!!!! BIG THANKS!! :ecstatic:
0

dedmin 
 

Re: [Plugin] Drape Cpoints

Postby Ben Ritter » Tue Aug 25, 2009 2:12 pm

Earthmover,

For some reason, by looking at your images, I can't figure out what this script actually does or what happens in each step (e.g. bedspread example).

Can you explain? Thanks.
0

Ben Ritter 
 

Re: [Plugin] Drape Cpoints

Postby TIG » Tue Aug 25, 2009 2:34 pm

Ben Ritter wrote:Earthmover,
For some reason, by looking at your images, I can't figure out what this script actually does or what happens in each step (e.g. bedspread example).
Can you explain? Thanks.

You select some faces/groups/components etc [the bed]. You give an XY grid spacing in a dialog and it makes a horizontal grid of Cpoints that's initially put just above the selection: the regular grid extends to the XY bounds of the selection. These Cpoints are then dropped down till they hit something in the selection OR, if not, then down to the minimum bounds of the selection. These Cpoints are grouped. This is all done so quickly you won't see it till the grid appears - there is a counter that shows its progress making the Cpoints and draping [dropping] them - there's also some 'behind the scenes' temporary grouping, erasing and exploding etc but you don't really need to worry about that ! Existing ruby tools can then work on these Cpoints to make a triangulated mesh face.

I surmise what was done with the 'bed' was to make the draped Cpoints, a faced mesh was made with 'Triangulate Points' and then some vertices forming the bottom edge were manually moved randomly to form the 'folds' of the bedspread. Perhaps a few top face vertices were moved a little to give some 'dints'. The sheet part was probably selected and moved up a little to form a change of plane for the different material. It was then all smoothed and the materials applied...

Its general use is if you have a triangulated site mesh made from survey data-points it'll likely be irregular - it's often preferable to make it into a regular XY grid (like those made by the Sandbox Tools). This tool lets you quickly drape a regular XY grid of Cpoints over the form and then reform them into a regular faced mesh using another tool, the original form is left unchanged...
0
Last edited by TIG on Tue Aug 25, 2009 4:23 pm, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby Ben Ritter » Tue Aug 25, 2009 4:12 pm

TIG,

Thanks for the explanation. I suppose it sounds more complicated than it really is.

Ben
0

Ben Ritter 
 

Re: [Plugin] Drape Cpoints

Postby jamma-pcb » Fri Mar 12, 2010 1:27 pm

ANy chance you could add gravity physics to this plugin.

The idea is to hover a face over multiple components and any space inbetween curve based on the gravity amount. Like draping a quilt over many pillows. The edges it would follow on Z and any space inbetween to curve out on multiple edges.

ANy chance of such a any tool
0

jamma-pcb 
 

Re: [Plugin] Drape Cpoints

Postby TIG » Fri Mar 12, 2010 2:13 pm

Sounds pretty complicated ! :o
Don't you want something inside SketchyPhysics like a 'chain of hinged links' that you anchor at its two ends and it then 'sags' appropriately ?
Each 'chain' would be made representing a 'rib' of a 'mesh' or 'net'...
You'd then swap the links for simple edges and explode stuff and you have the basis of the surface ???
My brain hurts already... :knockout:
Thomthom is making a Vertex Editor and that might help ?
Remus has also done some work on Catenary Curves...
These things combined might do what you want BUT it'd be at the end of along list for me... others might pick up the gauntlet ? :)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby EarthMover » Tue Mar 16, 2010 5:37 pm

Sounds like he's looking for a real physics based cloth simulation plugin for sketchup. That seems as though it would be better integrated into sketchy physics as it has the framework for gravity simulation. I would love to see it, but I imagine it's still a far way off unless SU 8 implements a better engine under the hood.
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby xrok1 » Tue Mar 16, 2010 6:58 pm

great plugin. thankyou. here is the .zip file that contains this and the other two plugins needed to create a mesh. maybe you could add it to your original post. would be less confusing for some. :oops:
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Drape Cpoints

Postby olishea » Wed Apr 21, 2010 9:39 am

TIG..I've got a problem.

The construction points appear, but they are not draped over the mesh (see screengrab). It just creates a regular, flat grid of c points under my mesh.

Am I doing something wrong?

0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby olishea » Wed Apr 21, 2010 10:20 am

Never mind, I've got it to work now. You have to drape points over a group....I was triple clicking the mesh and then trying to use the plugin. duh!

I am using this to simplify a dirty 3D topographical survey and it work beautifully! such a good idea. I was just about to start manually draping construction points then I thought, "hang on a minute.....there MUST be a plugin for this"

so thank you ever so much for taking the time to make and share this wonderful ruby! It will save me lots and lots of time and stress so hats off to TIG! bravo!
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby thomthom » Wed Apr 21, 2010 11:14 am

olishea wrote:Never mind, I've got it to work now. You have to drape points over a group....I was triple clicking the mesh and then trying to use the plugin. duh!

I am using this to simplify a dirty 3D topographical survey and it work beautifully! such a good idea. I was just about to start manually draping construction points then I thought, "hang on a minute.....there MUST be a plugin for this"

so thank you ever so much for taking the time to make and share this wonderful ruby! It will save me lots and lots of time and stress so hats off to TIG! bravo!

If I remember correctly, the Archiland plugin has a tool that recreates a terrain in a regular pattern: viewtopic.php?f=323&t=13760#p102771
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] Drape Cpoints

Postby olishea » Wed Apr 21, 2010 11:52 am

ah thomthom thank you!! i didnt know that plugin existed. you can really simplify a mesh with it, nice one!! and cheers to cadfather too.

here is a screenshot of my mesh tests.

Think i will be using the triangulated construction points at 5000mm centres....detailed enough for my needs. I love the archiland "simplify contours" tool as well, its a great idea.

0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby Edson » Wed Apr 21, 2010 12:41 pm

EarthMover wrote:Another use for the script.....5 minute bedspread. (Bed model from warehouse)

adam,

did you just move the points using the regular move tool or did you use another plugin to make the bedspread?
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Drape Cpoints

Postby EarthMover » Thu Apr 22, 2010 4:17 pm

Yes, Edson I just moved the Cpoints manually before running the triangulate plugin to give the appearance of ruffled edges. I also used JPP to give thickness to simulate the fold over atop the pillows.
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Drape Cpoints

Postby yukonhoo » Wed Feb 02, 2011 10:20 pm

TIG wrote:The script 'points_cloud_triangulation.rb' [which shows in the Plugins menu as 'Triangulate Points'] is here...
http://www.crai.archi.fr/RubyLibraryDep ... ulation.rb
that also requires 'delauney2.rb' - which you can get here...
viewtopic.php?p=117071#p117071
:geek:


Thanks!!
0

yukonhoo 
 

Re: [Plugin] Drape Cpoints

Postby TIG » Wed Feb 02, 2011 11:08 pm

yukonhoo wrote:
TIG wrote:The script 'points_cloud_triangulation.rb' [which shows in the Plugins menu as 'Triangulate Points'] is here...
http://www.crai.archi.fr/RubyLibraryDep ... ulation.rb
that also requires 'delauney2.rb' - which you can get here...
viewtopic.php?p=117071#p117071
:geek:


Thanks!!

I have recently updated a version of the 'cloud' tool and a related delauney3 - do a search on the Plugins forum... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: Anton_S, FJKARCH and 15 guests

Visit our sponsors: