It is currently Thu Sep 02, 2010 9:52 pm

Registration
Login Help

Advertise Here

[Plugin] SketchyFFD (Updated Aug 22, 2009)

FAQMembersRegisterLogin

[Plugin] SketchyFFD (Updated Aug 22, 2009)

Postby CPhillips on Wed Feb 06, 2008 6:29 am

Unfortunately, I am out of time to work on this script. If anyone wants to pick it up contact me. The code is simple and (for me) well commented. It needs a UI and bug fixes.

Funny thing, I don't really have a need for this script. :) But I would love to see what others can do with it. If you make something cool with it post here.

Chris

Image

Install by putting the script in your plugins directory.

Instructions: (somewhat out of date. see updates for changes)
-Create a group with all the geometry you wish to deform. This group should contain just faces and/or lines.
-Right click the group and select one of the options in the FFD submenu. Either 2x2 or 3x3 or NxN FFD. Depending on the size of the model it could take a while (seconds I hope). At the end you should see a new group containing nothing but control points
-Open the control point group and move the control points as you wish. The object should deform as you move the points. NOTE: it can take a long time for complex models. Look at the status bar in the lower left to see the status of the deformation.

Bugs and limitations:
-BUG. If you start a FFD and the control points don't match the object you need to explode and regroup the object. Then try the FFD again.
-Only one FFD at a time. The script uses a few globals for speed.
-Only works on geometry in a group and only one layer deep.
-Sometimes hidden edges don't move right. Dont know why. Might be a bug in Sketchup.

Image

Update: Fixed a bug.

Update Feb 12. New version:
-Support for NxN deforms.
-Mesh automatically when you move control points.
-Added status text progress when it is weighing and deforming the mesh.

Update Mar 21.
-Moved all FFD right click menu items to a sub menu.
-Fixed a bug that forced you to have a least 2 control point in each direction. You can now have do 2D grids. IE. 1x4x3.
-Added an option to create a NxN 2d patch. A grid with a control point at each intersection.

Updated May 9 2008
-Added ability to lock edges in the mesh so they don't move during FFD. Select edges then right click->FFD->Lock edges.
-Added an option to subdivide the mesh when doing a NxN deformation.

Updated Aug 24 2009
-Optimized the initial weighting to be about 3x faster. Idea by Stefan.
You do not have the required permissions to view the files attached to this post.
Last edited by Jim on Mon Aug 24, 2009 9:54 pm, edited 14 times in total.
Reason: Updated Plugin Date
CPhillips
 
Posts: 993
Joined: Fri Nov 23, 2007 11:12 pm

Re: SketchyFFD (Free Form Deformation)

Postby Coen Naninck on Wed Feb 06, 2008 8:19 am

Thank you for releasing this Chris. I will test this out tonight and get back here about it.

I really appreciate all the work you do for this community. Your scripts really make a difference and impact a much greater audience than SketchUp lovers alone.
"When you're one step ahead of the crowd you're a genius.
When you're two steps ahead, you're a crackpot." -- Rabbi Shlomo Riskin (Feb. 1998)
User avatar
Coen Naninck
Administrator
 
Posts: 5870
Joined: Wed Oct 17, 2007 10:50 pm
Location: Rotterdam, Netherlands.
Operating system: Ubuntu 10.04
SketchUp version: 8.0.0014a Build 2f

Re: SketchyFFD (Free Form Deformation)

Postby kwistenbiebel on Wed Feb 06, 2008 12:13 pm

Wow Chris,
Thank you for sharing this ruby.
That is a great contribution!

[EDIT]: the ruby doesn't seem to work on my PC. updating the FF seems broken.
I must be doing something wrong....(I tried it on a sphere)
kwistenbiebel
 
Posts: 2625
Joined: Thu Nov 22, 2007 6:13 pm

Re: SketchyFFD (Free Form Deformation)

Postby remus on Wed Feb 06, 2008 1:04 pm

cheers chris, just had a really quick go with it and it seems to work fine for me. Thanks for all the work youve already put into this.
User avatar
remus
Global Moderator
 
Posts: 7995
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus
Operating system: vista
SketchUp version: 7.whatever

Re: SketchyFFD (Free Form Deformation)

Postby Daniel S on Wed Feb 06, 2008 2:47 pm

Fantastic script Chris!!!

Hope that somebody pick it up and help with the UI.

It works very fast!! To show interactively the deformation of the group in wireframe mode (like in Fredo6´s Shear) would be a good feature... perhaps will go more slow.. but will be a time saver because you don´t have to close the group, make a right click and select Update FFD and then wait to see if is the deformation you wanted and then make all the process again to fix it.

This is other ruby that looks like a SU7 feature :ecstatic:.

Thank You!!!!!!

Daniel S
Presenting my New SketchUp Blog:
http://www.sketching3d.com.ar/
User avatar
Daniel S
 
Posts: 319
Joined: Mon Nov 12, 2007 6:06 pm
Location: Mar del Plata, Buenos Aires, Argentina
Operating system: Windows 7
SketchUp version: SketchUp Pro 8

Re: SketchyFFD (Free Form Deformation)

Postby Pilou on Wed Feb 06, 2008 3:38 pm

impressive task :fro:
Works fine except the control points stay on the screen after deformation :?:
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
 
Posts: 4345
Joined: Wed Jan 23, 2008 10:33 pm

Re: SketchyFFD (Free Form Deformation)

Postby Boofredlay on Wed Feb 06, 2008 4:29 pm

Pilou wrote:impressive task :fro:
Works fine except the control points stay on the screen after deformation :?:

That is the new group created by the FFD. You can simply delete or hide it when done with it.

This is great! Thanks for this script.
Form Fonts Artist
Please visit my blog
User avatar
Boofredlay
Latest Challenge Winner
 
Posts: 6208
Joined: Mon Oct 22, 2007 1:50 pm
Location: Huntsville/Madison Alabama
Name: Eric Lay
Operating system: Win XP Pro SP 3
SketchUp version: Black Ops

Re: SketchyFFD (Free Form Deformation)

Postby Boofredlay on Wed Feb 06, 2008 4:44 pm

Here is a quickie test. I drew a circle with 24 segments and copy/push/pull. Then I ran the script and moved the points.
This is one more step towards organics indeed. :thumb:
You do not have the required permissions to view the files attached to this post.
Form Fonts Artist
Please visit my blog
User avatar
Boofredlay
Latest Challenge Winner
 
Posts: 6208
Joined: Mon Oct 22, 2007 1:50 pm
Location: Huntsville/Madison Alabama
Name: Eric Lay
Operating system: Win XP Pro SP 3
SketchUp version: Black Ops

Re: SketchyFFD (Free Form Deformation)

Postby Pilou on Wed Feb 06, 2008 4:48 pm

That is the new group created by the FFD. You can simply delete or hide it when done with it.

THX: very simple indeed ! :enlight:
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
 
Posts: 4345
Joined: Wed Jan 23, 2008 10:33 pm

Re: SketchyFFD (Free Form Deformation)

Postby krash88 on Thu Feb 07, 2008 2:11 pm

It looks great in it's current form, but I get this error in the console... Maybe I'm doing something wrong...

Error: #<NoMethodError: undefined method `definition' for #<Sketchup::Group:0xbec0960>>
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:224:in `analizeLattice'
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:60:in `updateFFD'
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:13
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:13:in `call'
User avatar
krash88
 
Posts: 21
Joined: Mon Feb 04, 2008 9:02 pm
Operating system: WinXP
SketchUp version: 6.4.112

Re: SketchyFFD (Free Form Deformation)

Postby Mike Lucey on Thu Feb 07, 2008 5:55 pm

Thanks Chris, this could really be a useful Ruby for SketchUp.
I hope someone picks it up (as you say) and copper fastens it.
Even if they don't I imagine you will in your own good time
finalise the Script ;)

Mike
"Reality is merely an illusion, albeit a very persistent one." - Albert Einstein
User avatar
Mike Lucey
Mayor
 
Posts: 4949
Joined: Mon Oct 22, 2007 1:22 pm
Location: West of Ireland
Operating system: Mac OSX
SketchUp version: SU Pro V7.1

Re: SketchyFFD (Free Form Deformation)

Postby CPhillips on Thu Feb 07, 2008 7:38 pm

krash88 wrote:It looks great in it's current form, but I get this error in the console... Maybe I'm doing something wrong...

Error: #<NoMethodError: undefined method `definition' for #<Sketchup::Group:0xbec0960>>
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:224:in `analizeLattice'
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:60:in `updateFFD'
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:13
C:/Program Files/Google/Google SketchUp 6/Plugins/SketchyFFD.rb:13:in `call'



Ooops! I fixed it and updated the script in the original post. Kwistenbiebel this is probably the same bug you were seeing.

Chris
CPhillips
 
Posts: 993
Joined: Fri Nov 23, 2007 11:12 pm

Re: SketchyFFD (Free Form Deformation)

Postby Coen Naninck on Thu Feb 07, 2008 10:38 pm

I can't get this script to work. Nothing happens.
I create a sphere, group it, right-click and do 3x3 FFD, enter the new group with Construction Points, move some to another position, exit the group, right-click the sphere group and choose Update FFD. Nothing happens.
"When you're one step ahead of the crowd you're a genius.
When you're two steps ahead, you're a crackpot." -- Rabbi Shlomo Riskin (Feb. 1998)
User avatar
Coen Naninck
Administrator
 
Posts: 5870
Joined: Wed Oct 17, 2007 10:50 pm
Location: Rotterdam, Netherlands.
Operating system: Ubuntu 10.04
SketchUp version: 8.0.0014a Build 2f

Re: SketchyFFD (Free Form Deformation)

Postby CPhillips on Fri Feb 08, 2008 12:20 am

Coen Naninck wrote:I can't get this script to work. Nothing happens.
I create a sphere, group it, right-click and do 3x3 FFD, enter the new group with Construction Points, move some to another position, exit the group, right-click the sphere group and choose Update FFD. Nothing happens.


Can you open the ruby console and see if it is printing any errors?

Chris
CPhillips
 
Posts: 993
Joined: Fri Nov 23, 2007 11:12 pm

Re: SketchyFFD (Free Form Deformation)

Postby kwistenbiebel on Fri Feb 08, 2008 3:58 am

...exactly the same here. I see no errors in the ruby panel though.
kwistenbiebel
 
Posts: 2625
Joined: Thu Nov 22, 2007 6:13 pm

SketchUcation One-Liner Adverts

by Ad Machine on 5 minutes ago

1001bit Tools - Architectural tools for Google SketchUp
Ad Machine
Robot
 
Posts: 2010

Next

 

Advertise Here

Who is online

Users browsing this forum: No registered users and 3 guests