JointPushPull - User Manual
JointPushPull - User Manual
JOINT EXTRUDE
ROUND FOLLOW
https://sketchucation.com/plugin/715-jointpushpull
1
See http://sketchucation.com/forums/viewtopic.php?p=197828#p197828 on Sketchucation forum
by Fredo6
1. Overview
JointPushPull is a suite of interactive tools generating the offset geometry of one or
several faces, typically push-pull or thicken.
The common characteristics of JointPushPull tools are:
- Pre-selection mode (faces and groups / components) with launch from toolbar,
main menu, and contextual menu
- Interactive selection mode, where faces can be selected across the boundaries of
components and groups, individually, as a surface, all connected or connected by
material. Interactive selection works across boundaries of Components and
Groups.
- Visual dragging of faces, with enabling / disabling of Sketchup inferences
- Preview mode, for faster feedback when selection includes a large number of
faces
- Modification of parameters after generation, with recalculation of shape
- Various options: support of thicken and push pull mode, 3 modes of generation
of borders (contour, grid, none), generation as a group, etc….
- Random Push-Pull, with specification of range
- Quick Launcher and configurable icon toolbar
The new version includes all functionalities of JPP 2.x (and more), except:
- Auto-scaling of holes and faces embedded within faces (can be done if there
is a request)
- More accurate texturing of borders when original faces are textured
https://sketchucation.com/plugin/715-jointpushpull
All installations however will end up with the following footprint in the SketchUp
Plugins directory:
one script file Fredo6_JointPushPull.rb
one subfolder Fredo6_JointPushPull. This subfolder contains the library files,
the icons, cursor files, language files, …
Name Type
SU Plugins root directory Plugins Root Folder
Fredo6_JointPushPull Folder
Fredo6_JointPushPull.rb Ruby file
Fredo6_!LibFredo6 Folder
Fredo6_!LibFredo6.rb Ruby file
CAUTION: NEVER rename or move files from their folders. If you are unsure of
your unzip operation, do it in a neutral folder and check that you reconstruct the right
footprint. Then transfer the folders and files to the SU Plugins Directory.
Main menu
By default in Tools > Fredo6 Collection > JointPushPull. All functions are available
in this menu, whether shown or not in the toolbar.
Contextual menu
Whenever the selection includes a face, the contextual menu shows an entry for
JointPushPull:
Note: From the Default Parameters dialog box, you can configure which commands
are shown in the contextual menu (you can even remove them all).
Quick Launcher
This is a small floating window which displays all JointPushPull tools in a list. It can
be invoked from the menu or the toolbar icon:
Toolbar
Toolbar name is Fredo6_JointPushPull by default (you can change it).
All icons2 are shown right after installation. However, you can configure which icons
are visible in the Default Parameters dialog box.
Buttons Palette
The buttons palette shows the available parameters. Parameters may differ between
tools.
Since JointPushPull 4.0, the Button Palette has a Simple mode, with only basic
parameters, and an Expanded mode for more advanced usage. You can toggle
between the two modes using the button with chevrons on the left side of the
palette. For instance, here are the Simple and Expanded mode for the Joint tool:
2
Thanks to Daniel S. for designing the icons
Although this is purely technical information related to the Ruby script, it can be
useful for the author to trace the cause of error. For instance, exporting as txt file (or
simply copy / paste) and posting on Sketchucation.
Note: when there is already an initial selection, the selection is blocked. You cannot add
or remove faces by hovering over faces. Just type ESC to clear the initial selection if
you wish to do the selection interactively.
For surfaces, that is, a set of adjacent faces connected by smooth and/or soft edges, the
whole surface is automatically selected if you are in Geometry Hidden mode.
Note that in the examples above, a Bounding-box is shown when you hover over faces
within components or groups. The selection is reflected on all instances of components.
JointPushPull tries simulating the resulting shape when pushing or pulling faces:
- Original faces are hidden temporarily when you have the finishing option “push-
pull” on (i.e. not thickening)
- Properties of edges are also simulated. When in push-pull mode, lower border
edges are hidden to show border continuity
Note: During the dragging and Preview steps, JointPushPull only displays a limited
amount of faces and borders. Therefore, when there is large number of faces in the
selection, you may not see a simulation of all faces and borders as in the final geometry
(like above).
Note: the offset value is preserved across JPP sessions and Sketchup sessions.
6) Repeating Push-Pull
You can repeat a push-pull operation with the same offset on other faces by:
- Selecting faces and double-clicking on them
- Hovering over the selection and typing Return
Before repeating push-pull, you can of course modify some parameters, in particular the
offset. So a fast way to Push Pull without dragging faces is:
- Change the offset in the VCB, with the mouse NOT on a face
- Double-click on the face(s) to push-pull.
You can repeat within the same JPP session, across JPP sessions or even across
Sketchup sessions, since parameters are always kept.
7) Sketchup Inferences
JointPushPull supports Sketchup inferences when picking and push-pulling faces.
Actually, the choice of the face and the point under the cursor when you drag the
mouse may be important, because the initial picked point and face are used to
determine:
- the reference origin-target, in particular in the Vector push-pull mode
- the face-side orientation, taken from the face under the mouse.
a) In Vector Mode, pressing Shift (down and toggle) will lock / unlock the current
direction
b) In other JPP modes, Shift will turn inferences on or off. This may be useful to
avoid being bothered by undesired inferences.
Note: when you drag faces, offset faces and borders drawn in the viewport occult
inferences to underlying model objects.
9) Rollback
At each step you can rollback to go to the previous step. This can be achieved by
pressing the orange back arrow button in the button palette. You can also press Escape.
In Selection Mode
- Rollback will undo the selection
In Preview Mode
- Rollback will go back to selection, with selected faces selected again
- You can also resume dragging by pressing Escape
When the geometry is just generated
- Rollback will go to Preview mode. You can change parameters and click again.
Sketchup Undo, via Ctrl-Z or Undo button is supported and normally safe. It will first
act as a rollback on the current operation and then as a classical undo, resetting the
selection.
IMPORTANT: The main difference between Ctrl-Z and ESCAPE is that Escape will
just undo the current operation, whereas Ctrl-Z will undo ALL past operations,
possibility beyond the initial state when you launched JointPushPull (this is as it works
in native Push Pull).
1) Finishing
As for the native Sketchup Push-Pull, there are 2 modes: Offset and Thickening.
Push-Pull offsets the face and therefore erases the original face.
Thickening preserves the original faces and creates the offset faces. For
convenience, the orientation of the original and offset faces is adjusted so that
their recto side points toward the outside. A small + is shown in the bottom-
right corner of the cursor.
b) Pressing Ctrl in toggle mode (i.e. press-release), like for the native SU Push-Pull
Note that the finishing option is preserved across JPP sessions (and SU Sessions)
individually for each tool.
Note that, in general, borders inherit the material of the corresponding top face. There is
however an exception in Push-Pull mode, borders will inherit the material of the
adjacent face which is coplanar if any.
This is the behavior of the native Sketchup push-pull. However, if you prefer that
borders always inherit the material of their adjacent coplanar face (if any) whatever is
the finishing option, you can set this parameter in the Default Parameter dialog box.
For Joint and Extrude tools, Molding operates on the contours of all selected faces:
The palette allows to set the angle of the slope for the border faces. The angle can be
positive or negative, corresponding to expanding versus shrinking the extruded faces.
An angle of 0 means NO molding. The Plus/Minus sign simply allows to switch to the
opposite angle.
Note that groups are generated for each adjacent set of faces, at the same level of
embedding as the original faces when included in components and groups (i.e. not at the
top level of the model).
As you can notice, the top thickening surface is not planar. To get it planar, you need to
project the offset on the horizontal plane:
For all JPP modes except Vector3, you can set a privileged plane via the button sub-
palette:
3
For Vector tool, you will set a privileged direction. See the section on Vector Push-pull later in this document
a) Click on the ‘Question Mark’ yellow button. You enter a special mode:
Custom Plane Picker. The button palette is not displayed.
b) Pick a face (plane = plane of the face) or pick an Edge (plane = plane
perpendicular to the edge). The plane is indicated by a semi-transparent grid.
c) The Plane Picker is closed and the privileged plane is set as the current custom
plane.
Note: if there is a current plane active, axis or custom, it is shown as a small grid by
the cursor in the viewport.
In the settings above, the offset of faces will range between 0.5 times and 4 times the
current offset set by the user.
Hereunder are some randomizations with Joint Push Pull (note: you should set the
borders to Grid for making sure they are filled)
Faces are offset along their normal but are kept jointed. This is the most appropriate tool
for thickening shapes.
The Joint mode works on smooth surfaces as well as ‘boxy’ shapes with sharp edges and
corners:
The direction at a vertex is calculated by averaging the normal of the vertex faces
which are part of the selection. Other faces are ignored.
You can however enable the influence of these other neighboring faces (i.e. not
part of the selection), by setting the corresponding option in the palette. Not sure
this is useful, but this generates the offset as if the outside faces were part of the
selection.
However, it does not fully cover some features of the native tool:
Create automatic intersections and holes when pushing in solid objects
Prevent push-pull beyond certain offset (this can be a plus or a minus however)
On top of the common options, there are 2 specific functions for Normal Push-Pull:
2) Quad Preservation
When faces are arranged in quads, that is 2 triangles whose common edge follows
the diagonal conventions (Cast Shadows = false), you have the possibility to force
a jointed push-pulling by quad instead of by individual triangle.
This function will scale the generated offset faces individually by a given
factor. The scaling is done radially about the barycenter of each face.
This is controlled by a button in the palette where you can enter the tapering factor
(increment are by 0.1, i.e. 10%). You can also enter the value, followed by ‘s’ in
the VCB.
The natural case is when the tapering factor is 1.0: offset faces have the same size
as the original faces.
If the factor is different from 1.0, you can create a tapering effect:
Actually, you can even generate spikes by setting the factor to 0.0
Note: I left the possibility to enter negative factors. In such cases, the faces will be
twisted. Not sure it is useful for architecture purpose, but maybe for modern art!
The objective, or at least the intention, is primarily to serve 3D printing, providing a way
to keep the thickness more uniform for some complex shapes mixing boxy and smooth
sections. In JointPushPull 3.0, the implementation is partial, because the script should also
round the original faces when the shape includes concave junctions.
In the example below, faces participating in the cylindrical section are kept jointed,
whereas faces participating in the box are offset along their normal and joined by a
rounding.
Note: I finally did not implement the mathematical solution for keeping thickness exactly
uniform. The reason is that it does not give aesthetical results when edges angles are not at
90 degrees. Instead, I used an algorithm close to RoundCorner. Still, it may not give a
‘nice’ result (see below in the concave part of the shape).
Round Push-Pull can handle corners with any number of edges. The corner junctions are
however handled differently than for RoundCorner:
The rounding occurrence and shape are controlled by 2 parameters, as shown in the button
palette:
The Joint Angle is used to determine when to round or to join two adjacent faces.
If their angle is lower than the Joint angle, then the extrusion keeps them jointed.
You can set the Joint Angle via the palette or by typing an angle in the VCB:
- Angle in degrees followed by ‘d’, ex: 30d for 30 degrees
- Angle in radians followed by ‘r’, ex: 0.4r for 0.4 radians (~22.9 degrees)
- Angle in grades followed by ‘g’, ex: 20g for 20 grades (18 degrees)
- Slope in % (i.e. tangent of the angle: 100% = 45 degrees)
Formulas are accepted.
The example below illustrates the impact of the value of the Joint Angle:
The specified offset length is counted along the direction vector, not the normal of
faces.
Once you have selected faces, you click and then drag the mouse to perform an
interactive push-pull. The faces follow the direction given by the mouse. The origin
point may be important as you’ll be matching a target to determine visually the
direction vector.
You can (and should) use inference to lock the end of the direction vector on a point
of the model. Moving the mouse in the ‘empty’ space of the viewport is quite
misleading otherwise.
For convenience, Vector push-pull offers the possibility to lock the direction by
pressing or toggling Shift. Once the direction is locked, you can freely adjust the
offset (or type it in the VCB).
Here is an illustration. A line has been drawn on the left to serve as a guide for
specifying the target.
You can set the directions to be along an axis by clicking on the corresponding
buttons in the palette.
In practice, you can also use the Arrow keys to specify the direction (Arrow-Down for
NO privileged direction).
If you want to set a particular direction, for example, if this direction is materialized
in the model by an edge or a face normal, or if you plan to use it for several Vector
push-pulls in other sessions, you specify a custom direction. It will be preserved
across Sketchup sessions for later re-use.
Just click on the button with a yellow question mark ?. You will enter the Custom
Direction Picker mode. You can later recall it by pressing the C button.
For convenience, the last direction used in a Vector push-pull is kept in memory.
When you pursue with another Vector push-pull in the same JPP session, or invoke
again Vector Push-Pull, or even close / reopen Sketchup and invoke Vector Push-Pull,
the vector direction is locked on this ‘last’ direction.
If you wish to specify another direction, just press Shift to unlock it.
Extrude Push-Pull is adapted to the extrusion of shapes embedded within shapes. Joint
Push-Pull will not give a nice result because, keeping the faces jointed will geometrically
create distortion.
In practice, Extrude push-pull is a particular case of Vector push-pull with the vector
computed as the average of face normals. So, extruded faces are always jointed.
On top of the common options, there are 2 specific functions for Extrude Push-Pull:
The top faces generated follow the shape and curvature of the original faces. You
can however impose that they are flattened on the plane of extrusion.
You can set a Tapering factor that will be applied collectively to all extruded
faces.
This special push-pull mode was introduced by a4chitect in a plugin called Smart Push
Pull. The implementation of Follow PushPull is simply a generalization of Smart Push
Pull to multi-faces and the support of the common options available in all JPP tools
(thicken / push-pull, borders, etc…).
The push-pull is guided by outside bordering edges for outer faces. For inner faces, Joint
push-pull is used.
Follow Push-Pull requires indeed that you are clear with the outside bordering edges
imposing directions.
The thickener is simply a version of Joint PushPull without the options and the button
palette. The idea was to have a simple mode similar to the native Sketchup puh-pull, but
acting on surfaces instead of an individual face.
The default selection mode is Single-Face (and Surface when faces are separated by
smooth/soft edges).
These 2 parameters allows controlling how many faces are drawn in the
viewport when dragging and in the Preview mode. The values should be
adjusted to the performance of your computer.
For convenience, JointPushPull displays tooltips in the viewport for each step of
the workflow. After a while, you may be familiar with the process, and may want
to disable them in order to gain more real-estate visible in the viewport.
When you select faces embedded within a component, the push-pull will also
apply to the other instances of the component in the model if any.
As this is impacting performance on slow computers, you may want to disable this
feature.
Note that the option only affects the visual feedback of JointPushPull. The
geometry will be generated in all component instances.
However, the generated shape may present sharper angle than in the original
shape or you may not correspond to a curve in the original shape. So, this option
allows performing automatic softening based on the specified angle, regardless of
the original edge properties.
JointPushPull is optimized for tools which maintain faces jointed, namely Joint,
Vector, Follow.
The Random offset option forces the algorithm to downgrade this optimization,
even for all cases when randomization of offset is not used.
Whenever you need Random for Joint, Vector or Follow tools, just enable this
option and re-launch the JPP tool. You will see the random parameters in the
palette. When finished, just disable the option.
For Thickening mode, this option allows altering the behavior of the texturing for
borders when coplanar to outside border faces:
Note that the middle picture corresponds to the behavior of the native Sketchup
Push-Pull.
The idea of transparency4 is to allow to better grasp visually the original shape
when dragging faces.
4
Original idea came from a suggestion by JQL
1) Texturing on borders with true textures: the texturing is not adjusted to the
proper scale and orientation inherited from the top face. This is better handled in
JPP v2.0.
2) Holes and Embedded faces for Joint push-pull: Holes and faces embedded
within faces are extruded orthogonally. In practice, there should be an option to:
- Either extrude orthogonally
- Or extrude with a scaling adjustment, as in JPP 2.0
3) Intersections: Unlike the native Sketchup Push-Pull, JointPushPull does not create
intersections allowing creating holes in back faces when applicable.