[Plugin] Simple Shell (scaled copy)

[Plugin] Simple Shell (scaled copy)

Postby Jim » Mon Dec 06, 2010 5:29 pm

Simple Shell creates an inner or outer shell by copying and scaling symmetrical Group or geometry. The plugin uses a simple scaling technique that likely will not work well on non-symmetrical geometry or surfaces.

To make a shell,

* Select a single Group or surface.
* Select JF Simple Shell from the Plugins menu.

A Dialog will prompt for the wall thickness.


The Faces of the shell will be reversed from the original's. Use a negative thickness to make an outer shell.



Download
jf_simple_shell.rb
0
Last edited by Jim on Tue Dec 07, 2010 10:00 pm, edited 2 times in total.
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby dedmin » Mon Dec 06, 2010 5:34 pm

:berserk: :berserk: :berserk: :berserk: :berserk:
0

dedmin 
 

Re: [Plugin] Simple Shell (symmetrical)

Postby solo » Mon Dec 06, 2010 5:48 pm

Cool stuff, thanks.
0
My site

I'm a social vegan, I avoid meet.
User avatar
solo 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Rich O Brien » Mon Dec 06, 2010 9:30 pm

Jim,

An excellent time-saver. Thanks! :thumb:
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Mon Dec 06, 2010 11:52 pm

What is the process?
I take a square 10 * 10 m
pushpull 10 m
so a cube
make Group
Call Simple Shell
enter 0.5m
nothing :o
What I miss? :oops:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Rich O Brien » Tue Dec 07, 2010 12:04 am

It works on your exact proposal Pilou so the problem between the keyboard and the chair :roll:
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 12:16 am

The answer is within.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby mitcorb » Tue Dec 07, 2010 1:52 am

Good job, Jim
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Tue Dec 07, 2010 11:05 am

so the problem between the keyboard and the chair

Surelly :mrgreen:
Does the plug works in any version or just in the last V8?

I have this in the ruby console (i am in V6)
Code: Select all
jf_simple_shell.rb
Error: #<NameError: (eval):27: undefined local variable or method `jf_simple_shell' for main:Object>
(eval):27


Edit: Works in the V7 ! ;)
so the problem is outside the keyboard and the chair :mrgreen:

So does it possible to make something for working in the V6?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Tue Dec 07, 2010 11:40 am

And some add for have a "complex result" ?
because now there is no inside the plug close function of open surfaces ;)
And Scale function from Specific axis
complex.jpg
0
Last edited by pilou on Tue Dec 07, 2010 12:45 pm, edited 2 times in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Dave R » Tue Dec 07, 2010 12:40 pm

Jim, I tried running your plugin on a simple sphere in V8. I got the following:

Code: Select all
Error: #<NoMethodError: undefined method `copy' for #<Sketchup::Face:0xd44930c>>
C:/Program Files/Google/Google SketchUp 8/Plugins/jf_simple_shell.rb:31:in `simple_shell'
C:/Program Files/Google/Google SketchUp 8/Plugins/jf_simple_shell.rb:2
C:/Program Files/Google/Google SketchUp 8/Plugins/jf_simple_shell.rb:31:in `call'
C:/Program Files/Google/Google SketchUp 8/Plugins/jf_simple_shell.rb:31
0
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 1:26 pm

Dave R wrote:Jim, I tried running your plugin on a simple sphere in V8. I got the following:


Dave,

Are you selecting a Group? I've modified the menu to be grayed-out unless a single Group is selected.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 1:28 pm

Pilou wrote:I have this in the ruby console (i am in V6)


This I don't understand at all. Nowhere have I used jf_simple_shell in the plugin.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Dave R » Tue Dec 07, 2010 1:48 pm

No. I just selected loose geometry. The input box came up so I didn't think I was doing anything wrong. Just got to work and downloaded it. Will give it a try. I assume this is a change from the version I downloaded at home? Could it be made to work on components, too?
0
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Dave R » Tue Dec 07, 2010 1:56 pm

Jim, it does work on a group in V8. I must have missed the part about making a group.

And while I'm being a pain, would it be possible to have an option to make the inner shell part of the selected group/component instead of its own component or group?

Maybe it wouldn't be Simple Shell, then.
0
Last edited by Dave R on Tue Dec 07, 2010 2:37 pm, edited 1 time in total.
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Tue Dec 07, 2010 2:24 pm

This I don't understand at all. Nowhere have I used jf_simple_shell in the plugin.


There is no possible conflict with forbidden names of variables in Ruby language?
Or maybe V6 Ruby engine is too old for new version?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 2:32 pm

Did you type jf_simple_shell.rb in the Ruby Console? Because that has no meaning in Ruby.

It would be: load "jf_simple_shell.rb"

Followed by: JF.simple_shell

But there should be a menu: Plugins/JF Simple Shell available when a single Group is selected. Is the menu visible?
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 2:49 pm

Dave R wrote:And while I'm being a pain, would it be possible to have an option to make the inner shell part of the selected group/component instead of its own component or group?

Maybe it wouldn't be Simple Shell, then.


So you want a Group in a Group, or 2 Groups in a Group?

Either way, I don't think moving Groups in this way is directly supported by the API, and there may be a bug involved if not done right. But I'll see what can be done.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Dave R » Tue Dec 07, 2010 3:10 pm

Actually, I'd rather not have the inner shell made as a group at all. I'd rather it be part of the selected group, or better in my case, component. Better, it could be an option to have it made into a separate component/group and if the selected thing is a component, make a component. If it is a group, make a group.

Here's a quick example of where it would be nice to have the shell be part of the selected C/G.



I made a simple sphere to test the plugin. After getting the shell, I decide to cut it open to make a sort of bowl. I had to explode the shell and then cut and paste in place the shell into the Sphere group before slicing off the top with a cutting surface. If the shell geometry was loose inside the selected G/C, there'd be no need to explode, cut and paste in place because the shell would be part of the selected component definition.

Not that it makes any difference but I used the circle from the Follow Me path as the cutting plane and didn't delete the edge of the circle.
0
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Tue Dec 07, 2010 3:13 pm

Yes I have the Menu JF Simple Shell ;)

Here the code in Ruby Console after I select the group and call the plug by the Menu
and enter some measures in the Dialog box
(same result with the direct Ruby console commands)
Code: Select all
Error: #<ArgumentError: wrong number of arguments(2 for 1)>
C:/Program Files/Google/Google SketchUp 6/Plugins/jf_simple_shell.rb:30:in `start_operation'
C:/Program Files/Google/Google SketchUp 6/Plugins/jf_simple_shell.rb:30:in `simple_shell'
C:/Program Files/Google/Google SketchUp 6/Plugins/jf_simple_shell.rb:2
C:/Program Files/Google/Google SketchUp 6/Plugins/jf_simple_shell.rb:2:in `call'
0
Last edited by pilou on Tue Dec 07, 2010 3:33 pm, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 3:23 pm

Ah, version 6 compatibility - should be fixed now.

First Post
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby pilou » Tue Dec 07, 2010 3:38 pm

Works fine now in the V6 :fro:
You rocks! :thumb:
I don't retry with the V8 and V7 :mrgreen:
shell.jpg


Edit : works also with the V7 ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 6:13 pm

@Dave, I would like to keep the created shell as a Group. This is so the operator can make sure the shell does not intersect with anything else before moving on. There may be scaling or other adjustments (snoothing, reverse faces) that should be done, too. This allows the operator the most choices on the next action.

One small thing I will have the plugin do is to select the created shell Group as the last step. Then at least it is ready to explode if you want.

For shelling a Component, right now you could open the Component, select all, make it a Group, shell it, then explode again. I know it's not optimal, but is one way to do it.

It's possible to make the plugin work on a selected surface as well as a selected Group, so then you could open the Component, make the selection, and generate the shell; which is fewer steps. This is something I want the script to do, so it'll be available soon either way.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby dtrarch » Tue Dec 07, 2010 8:31 pm

Hi Jim
FYI: ?
I get this error loading SU 7.1 free with the script installed per your first thread posted.
Error Loading File jf_simple_shell.rb
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:1: syntax error
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:2: syntax error
<html xmlns="http://www.w3.org/1999/xhtml">
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:3: syntax error
<head>
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:5: syntax error
<title xmlns="http://www.google.com/ns/jotspot">Download Attachment</title>
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:6: syntax error
<style xmlns="http://www.google.com/ns/jotspot">
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:19: syntax error
content: ".";
^
C:/Program Files/Google/Google SketchUp 7/Plugins/jf_simple_shell.rb:70: syntax error
<body xmlns="http://www.google.com/ns/jotspot">
^
dtr
0

dtrarch 
Premium Member
Premium Member
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 8:36 pm

dtrarch,

That looks like a HTML file.

Try right-clicking this link, then select Save Link As (or Save Target As) to download the file.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (symmetrical)

Postby Jim » Tue Dec 07, 2010 9:57 pm

Updated to create a shell from selected surface, in addition to a selected Group.

See First Post.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Simple Shell (scaled copy)

Postby pilou » Wed Dec 08, 2010 12:29 am

Cool! But the same with scale from a opposite point will be also useful ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Simple Shell (scaled copy)

Postby dtrarch » Wed Dec 08, 2010 12:53 am

Jim

Somehow I did download the html. :oops:
Your link worked perfect and thank you so much :ecstatic:
OK for SU V8 pro too.
Very handy tool. :thumb: :thumb:

Dave #2
0

dtrarch 
Premium Member
Premium Member
 

Re: [Plugin] Simple Shell (scaled copy)

Postby sahi » Wed Dec 08, 2010 9:43 am

Hi,
Cool. It reminds me my old Object :roll:
here: viewtopic.php?f=180&t=11677
0

sahi 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Simple Shell (scaled copy)

Postby Jim » Wed Dec 08, 2010 1:39 pm

Thanks sahi,

Yes, my plugin is almost exactly the same as yours - I may not have written another if I knew one already existed.

One reason it couldn't be found is the topic lacks the [Plugin] text that is used by the Plugins Index, and so is not listed. I have requested the mods add the tag so the plugin will be listed.
0
Hi

Jim 
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: pandey and 12 guests

Visit our sponsors: