[Plugin] PushPull & Group
-
Hello all,
I've been lurking here a few months soaking up the info, to learn to write plugins. Though I would give something back, starting with this one. My background is wanting to learn cnc. And I found the phlatboyz, who use sketchup and their phlatscript plugin to generate cnc gcode directly from sketchup. Lots of the interest is making models and puzzles out of sheet foam. That's how I started using sketchup. So my 1st few plugins, I wrote to make drawing easier. So here is the plugin:
@unknownuser said:
Name: Push/Pull & Group
Version: 1.0
SU Version: 7.0
Date: 05-04-2010Purpose: This plugin helps with the drawing of 3D models & puzzles for 1/4" sheet stock.
Description: *As Tool: Push/Pull and group(optional), all with one click of the mouse.
*Or Select multiple parts and right click context menu
Usage:Automatic face picker - just hover mouse over face (I found it useful for selecting faces to delete also)
Left mouse button => perform the Push/Pull & Group
Right mouse button => toggle group or don't group (check for message on status bar)
Hold down Shift Key => add to selection
Hold down Contol Key => reverse the direction of Push/Pull
If you change height (default=0.25"), the value is remember for the entire sketchup session.
VCB will only except decimal inch values.
Can be used from right click context menu, also.
Credits: I learned alot buy studying TBD's Rotix plugin. Thanks you, for making it!
You can see it in action in the following video where I build a F15 display puzzle in 3D from a dxf plans. At about 3 minutes, I use it to mouse over and delete faces. And about 5 minute mark, I use it to push/pull & group. I have since added the feature to simply select all the parts and use context menu to push/pull. You also see another plugin used to rotate with keystroke's. And recently, I did write a plugin to delete all interior faces. If there is any interest, I could release those as well.
http://www.youtube.com/watch?v=5NZ2Ea5-7LU
[rclub24 has embeded the video, 2 post down. Thanks.]-Kwok
-
Thanks for sharing you code - interesting ideas...
On a side note I see you used a make-face tool that seemed to take forever...
Have you tried drawing a large rectangle around all of the shapes drawn flat on the ground ?
Select all and then the shapes should all face separately using 'intersect' - it should be much quicker. Finally erase the four outer edges of the rectangle... -
Hi Kwok,
Interesting idea and well implemented, will we see metric inclusion at some stage? Anyway here's how to embed video
[flash=800,600:1e2u4y53]http://www.youtube.com/watch/v/5NZ2Ea5-7LU[/flash:1e2u4y53]
[flash=800,600] - Here i've inserted the size of the displaying video i need
Then i changed this, http://www.youtube.com/watch?v=5NZ2Ea5-7LU
to this, http://www.youtube.com/watch/v/5NZ2Ea5-7LU
and finally this, [/flash]
[flash=800,600]http://www.youtube.com/watch/v/5NZ2Ea5-7LU[/flash]
or
[flash=800,600]http://www.youtube.com/watch/v/insert code here[/flash]
-
TIG, I wouldn't have though of that in a million years. It will sure come in handy. It does take a long time to make faces, but also the video recording slowed it down alot. 2 or 3 time slower, I think. I did try you method on that dxf data and there is unforeseen problems. Dragging a large rectangle around all the parts, the face did not form. But did form on one of the small parts. I suspect the data is not 100% flat. Anyway, I've grown to hate importing dxfs, as there are always problems.
rclub24, thanks for the lesson on embedding. As far as the metric question, It's not just metric. The VCB input can't do much of anything right now, like even fractions which I am used to. I had assumed the conversion was built into the VCB, like in all the standard sketchup tools. But seems not. If anyone has the VCB code or can direct me to an example, I would be happy to put that in.
-Kwok
-
TIG,
I was able to get it to work your way, by leaving the drawing full size instead of scaling it down to 1/4" slots. Got no clue what the difference is. I drew a rectangle and got a face covering everything. But it's still very slow, even with the intersection method. So it might just be a large number of edges (~5800) and my old pentium 4 computer.
-Kwok
-
It's best to do all of your stuff 'full-size', then scale down as needed... Very small faces don't form well in SUp/OpenGL woth FollowMe/PushPull etc
-
Crashes SU18 and 19 as soon as I install. I manually deleted it from my Plugins folder and all is well again.
-
After 9 years one might expect a plugin to be unsupported and unsuitable for newer versions of SketchUp !
However, some of the ideas discussed in this thread are still useful today...
Advertisement