PushPull question

PushPull question

Postby JuanV.Soler » Fri Oct 26, 2012 1:45 pm

I want to pushpull all these faces of a contoured terrain at an exact z-distance of 1.05m in between them.
The total height is 105m.
Doing it one by one is too much.
I was wondering if there is a plugin that might do that.
I saw the random pushpull from TIG and thought maybe it could be done.
Or already exists and I am unawared of.
Thanks for listening.
0
_,_)))_,_

JuanV.Soler 
 

Re: PushPull question

Postby sdmitch » Fri Oct 26, 2012 3:04 pm

Doubtful, since it would be difficult if not imposible to identify the order of the contours/faces. At best, an interactive plugin, that would accept a starting elevation and increment, could do the pushpull as you click on each successive face.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: PushPull question

Postby JuanV.Soler » Fri Oct 26, 2012 3:07 pm

...mmm...thanks sdmitch
0
_,_)))_,_

JuanV.Soler 
 

Re: PushPull question

Postby TIG » Fri Oct 26, 2012 3:17 pm

How can a script 'know' which faces want which heights?

This is a part manual method that avoids having to write an entire Tool where you pick by incrementing values.
It minimizes the picking etc needed...
Select all of the faces to be processed.
Copy then Paste the one-liner [below] into the Ruby Console + <enter>
ALL selected faces are Pushpulled by 1.05.m.
Selection tool [spacebar], hold Ctrl+Shift and click the face[s] that are now at the desired height, so they are removed from the selection.
Repeat the Paste with the same one-liner into the Ruby Console + <enter>
Currently selected faces are Pushpulled by another 1.05.m.
Repeat till done...
This must be done ~100 times in all !
Code: Select all
d=1.05.m;m=Sketchup.active_model;m.start_operation('p');s=m.selection;z=0;s.each{|e|(z=e.bounds.center.z+d;e.pushpull(d))if e.is_a?(Sketchup::Face)};m.active_entities.each{|e|s.add(e)if e.is_a?(Sketchup::Face)&& e.bounds.center.z==z};m.commit_operation
It is one step undo-able...
You could make a toolbar button or a menu item from it and a shortcut key to avoid having to paste into the Console...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: PushPull question

Postby JuanV.Soler » Fri Oct 26, 2012 3:36 pm

no idea TIG
I just thought that if you could make a random push for a lot of faces it could be possible to change the random and establish the exact distance to push.
but,..., so far so good.
Thanks for answering.
0
_,_)))_,_

JuanV.Soler 
 

Re: PushPull question

Postby flyashy » Sun Oct 28, 2012 2:56 pm

One of the things I do when I have to do a lot of these stepped pushpulls is to make a visual reference (lines, points or anything that is stacked vertically).
That saves me the hassle of typing the values each time and just keep push pulling one by one. Just a method.
Cheers!
0

flyashy 
 

Re: PushPull question

Postby TIG » Sun Oct 28, 2012 3:43 pm

Of course you don't have to type a PushPull value every time. a double click on a face while in PushPull will repeat the last used distance, but I accept that when the steps get more than a few multiple clicking can become tedious, so the idea of making some vertically spaced lines/guides can help a lot...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: PushPull question

Postby wyatt » Sun Oct 28, 2012 4:00 pm

Juan, do you have a CAD program? It might be easier to set the elevations in CAD, export back to SU, and use the Sandbox tools. Unless of course, you actually want the stepped geometry.

TIG, would it be possible for a script to run based on the order of the selection. For example, the script would start by asking for a contour interval, n. Then the user would select the lines, and the script would apply n*1, n*2, etc. based on the order that the lines were selected. There would be a problem if multiple lines needed the same elevation so the user may need to run the script more than once for a given set of contours.

As an alternative, is there a way to create a dialog box where the z could be user defined, similar to CAD? Ideally, this should be integrated into the entity info box by the Trimble SketchUp team.
0

wyatt 
 

Re: PushPull question

Postby JuanV.Soler » Sun Oct 28, 2012 5:08 pm

flyashy wrote:One of the things I do when I have to do a lot of these stepped pushpulls is to make a visual reference (lines, points or anything that is stacked vertically).
That saves me the hassle of typing the values each time and just keep push pulling one by one. Just a method.
Cheers!
Yes I have been doing that too .
Wyatt wrote:Juan,... Unless of course, you actually want the stepped geometry.
Yes I do sometimes ;)
sdmitch wrote:Doubtful, since it would be difficult if not imposible to identify the order of the contours/faces. At best, an interactive plugin, that would accept a starting elevation and increment, could do the pushpull as you click on each successive face.

sdmitch kindly sent me a script that does it and it is a time_saver ¡
I do hope he posts it public
Cheers
0
_,_)))_,_

JuanV.Soler 
 

Re: PushPull question

Postby rami_lpm » Fri Nov 02, 2012 8:39 pm

Here's a plugin (another?) that does what you asked.

Moved the plugin Stepped Extrude to it's own post.
http://sketchucation.com/forums/viewtopic.php?f=323&t=48812
0
Last edited by rami_lpm on Mon Nov 05, 2012 2:18 pm, edited 1 time in total.
User avatar
rami_lpm 
PluginStore Author
PluginStore Author
 

Re: PushPull question

Postby JuanV.Soler » Fri Nov 02, 2012 9:50 pm

Ok thanks rami_lpm
getting easier to achieve the stepped geometry I am looking for .
0
_,_)))_,_

JuanV.Soler 
 

Re: PushPull question

Postby thomthom » Sat Nov 03, 2012 10:12 am

rami_lpm wrote:Here's a plugin (another?) that does what you asked.

Please posts plugins in their own separate thread - they otherwise get lost when burried deep into thread like this.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Arki18, napk1n, pcxx31 and 23 guests

Visit our sponsors: