Vous êtes sur la page 1sur 17

VISUHOLE

DRILLING HOLES AND CARVING / EMBOSSING SHAPES


VERSION 1.0 – 19 SEP 14
BY FREDO6

DRILL THRU PUNCH THRU

CARVE EMBOSS

STAMP PUNCH

Fredo6 – VisuHole Page 1 / 17 v1.0 – 19 Sep 2014


Contents
1. Overview.................................................................................................. 3
2. Specifications ........................................................................................... 3
3. Installation ............................................................................................... 4
4. Menus, Toolbar and Configuration ........................................................... 5
5. Stencils..................................................................................................... 7
1) Creating a Stencil ............................................................................................................. 7
2) Navigating in the History of Stencils ............................................................................... 7
6. Selection .................................................................................................. 8
1) Dynamic Selection from a face at Top Level.................................................................... 8
2) Dynamic Selection from a face in a Group or Component .............................................. 8
7. Tools for Drilling, Stamping and Extruding................................................ 9
1) General procedure ........................................................................................................... 9
2) Drilling ........................................................................................................................... 10
3) Stamping ....................................................................................................................... 11
4) Carving and Embossing ................................................................................................. 11
5) Working on Curved Surfaces – FOLLOW SURFACE option .................................................. 13
8. Material Assignment ...............................................................................15
9. Other Options .........................................................................................16
1) Grouping IN and OUT .................................................................................................... 16
2) Smoothing Local Normals.............................................................................................. 16
3) Ignoring Sharp curvatures ............................................................................................. 17

Fredo6 – VisuHole Page 2 / 17 v1.0 – 19 Sep 2014


VISUHOLE
Drilling, Carving, Embossing, Stamping shapes on Surfaces
VERSION 1.0 – 19 SEP 14

by Fredo6

1. Overview
VisuHole is a suite of interactive tools dedicated to holes and extrusions on planar and
curved surfaces. In the current version, VisuHole supports the following tools:
- DRILL THRU (with tubes) and PUNCH THRU (without Tubes). In addition, you can
create the hole with edges or with guide lines.
- CARVE and EMBOSS with a specified offset and a few options to control the
direction of extrusion.
- STAMP (no hole) and PUNCH (just the hole) and MARK (with Guide lines).
VisuHole can drill through one or several surfaces, including when embedded in
groups or components. The scope of the selection can be specified implicitly or by pre-
selection. A few additional options are available:
- Material assignment: you can choose or pick a material in the model for painting
the extrusions, tubes and stamped shapes
- Grouping, with 2 modes:
o GROUP IN for putting extrusions in groups in the selection context
o GROUP OUT for putting all extrusions and tubes in a master group,
without altering the original selection
- Follow Surface for Carve and Emboss on curved surfaces, allowing to respect the
shapes relative dimensions (versus Projection mode, where they would be
distorted)

2. Specifications
 Sketchup Versions: 6 and above (Free, Make and Pro). Works better with v8 M2
and above.
 Platforms: Windows XP, Vista, Win7, Win8 and Mac OSX all versions
 IMPORTANT: VisuHole requires the Shared Library LibFredo6 v6.1 or
higher.
 Language: English and French. Other languages may be provided by kind translators.

Fredo6 – VisuHole Page 3 / 17 v1.0 – 19 Sep 2014


3. Installation
The original publishing of this script is on Sketchucation.

If you run SU8 and above, the recommended method is to auto-install VisuHole via
the SCF Plugin Store available for free on Sketchucation (you will need to register but it
is free). You can also download the RBZ file on this site for installation via the Extension
Manager of Sketchup.

For SU6 and SU7 users, you have to Unzip into the SU Plugins directory from a .zip file
(see details below)

All installations however will end up with the following footprint in the SketchUp
Plugins directory:
• one script file Fredo6_VisuHole.rb
• one subfolder Fredo6_VisuHole. This subfolder contains the library files, the
icons, cursor files, language files (please do not alter, rename or move files there).

Name Type
SU Plugins root directory Plugins Root Folder
Fredo6_VisuHole Folder
Fredo6_VisuHole.rb Ruby file
Fredo6_!LibFredo6 Folder
Fredo6_!LibFredo6.rb Ruby file

The Sketchup Plugins root directory is:

On Windows, SketchUp 8.0


C:\program files\google\google Sketchup 8\plugins\

On Windows, SketchUp 2013


C:\program files\SketchUp\SketchUp 2013\Plugins\

On Windows, SketchUp 2014


C:\program files\SketchUp\SketchUp 2013\Plugins\

On Mac OSX, SketchUp 8.0


Macintosh HD/Library/Application Support/Google SketchUp 8/SketchUp/Plugins

On Mac OSX, SketchUp 2013


~/Library/Application Support/ SketchUp 2013/SketchUp/Plugins

On Mac OSX, SketchUp 2014


~/Library/Application Support/ SketchUp 2014/SketchUp/Plugins

Fredo6 – VisuHole Page 4 / 17 v1.0 – 19 Sep 2014


For SU6 and SU7 users, you must install the plugin from its Zip archive file. You can
obtain this Zip file via the following procedure:
1) Download the file VisuHole.rbz file on Sketchucation Plugin Store page
2) Rename VisuHole.rbz to VisuHole.zip
3) Open the Zip archive
4) Select All files
5) Press the Extract button and select the Sketchup Plugin folder as the destination
6) Answer YES to overwrite existing files if any

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.

Note: you can select an alternative plugin directory (see AdditionalPluginFolders at


http://sketchucation.com/forums/viewtopic.php?f=323&t=39073#p345150).

4. Menus, Toolbar and Configuration

Main menu:
By default in Tools > Fredo6 Collection > VisuHole. All functions are available in
this menu, whether shown or not in the toolbar.

Contextual menu
No contextual menu on selection

Toolbar
Toolbar name is Fredo6_VisuHole by default (you can change it to put the icon in an
existing toolbar). There is only one icon in the current version.

Fredo6 – VisuHole Page 5 / 17 v1.0 – 19 Sep 2014


Buttons Palette
The buttons palette is organized in 7 zones.

Error Handling
In some circumstances, VisuHole may be unable to perform the operation, either
because the geometry is too complex for computing intersections or simply because
there are still bugs in the script. If this happens, you may get an error message shown
as the dialog box below:

Although this is purely technical information related to the Ruby script, it can be
useful for the author in order to trace the cause of error. For instance, exporting as txt
file (or simply copy / paste) and posting on Sketchucation could be helpful.

Fredo6 – VisuHole Page 6 / 17 v1.0 – 19 Sep 2014


5. Stencils
The object used for drilling or extruding is called a STENCIL. This is actually a set of 2D
shapes, with or without holes.

1) Creating a Stencil

In the current version, Stencils must be picked in the model. To enter the Pick Stencil
mode, click on the button in the palette or press TAB.
The main buttons palette will disappear. When you move the mouse on faces and
components, a small axis system is displayed. The blue axis shows the direction for 2D
projection (on faces it is simply the face normal).
• Click on a Face or on a group / component to pick the stencil.
• Click and Drag to pick and orientate the X axis

NOTE: if the selection is a group or component, press CTRL to force picking the individual
face.
IMPORTANT: the point clicked becomes the origin of the Stencil. This is the Insertion
point used when you will later apply the stencil to drill or extrude a selection.

2) Navigating in the History of Stencils

VisuHole keeps a history of created stencils within a Sketchup session. Note however that
in the current version of VisuHole, this history is NOT kept across Sketchup sessions.
Just click on the arrows to navigate thru the list of Stencils. The active stencil is
displayed below the buttons palette. The Insertion point is shown in red. The centroid of
each individual shapes is shown as a small dot in blue.

Fredo6 – VisuHole Page 7 / 17 v1.0 – 19 Sep 2014


6. Selection
When there is a preselection, the elements selected, faces, groups and components,
represent the scope of the model that will be affected by the drilling or extrusion.

When there is no pre-selection, VisuHole computes dynamically a selection from the


picked face with respect to the active model.

1) Dynamic Selection from a face at Top Level

If the picked face is at top-level (i.e. not embedded in a group or component), then the
selection is taken as all connected faces. Note that by pressing CTRL, you can restrict the
selection to the picked face or picked surface.

Dynamic selection is All connected face Pressing Ctrl, dynamic selection is


to the picked face restricted to the picked face

2) Dynamic Selection from a face in a Group or Component

If the picked face belongs to a group or component, then the selection depends on the
options selected in the button palette:

SINGLE: Only the picked RECURSE: the picked FROM TOP: all components
component / group is component / group and all / groups are selected from
selected its descendants are selected the top-most parent of the
selected face

The choice of options in reflected in the display: the resulting selection is highlighted in
thick lines.

Note: you can force the SINGLE option by pressing control, regardless of the status of the
buttons in the palette.

Fredo6 – VisuHole Page 8 / 17 v1.0 – 19 Sep 2014


7. Tools for Drilling, Stamping and Extruding
The VisuHole tool can be selected in the button palette, along with their options:

1) General procedure

Setting the direction of projection: by default it is the normal to the picked face. You
can however impose a direction, either an axis or a custom normal (as in MoveAlong or
DrawAlong). For custom direction, mouse over a face and either type ENTER or LONG-
CLICK. Once the Z-axis is set, the other axes in X and Y are computed by default.

You may also set the Material options and Group options (see details later in this chapter).

Then, to execute the operation,


• Either double click on a face
• Or Click–Release–Move–Click–Release or Click-Drag-Release to set a different
orientation of the X and Y axis.

Once the operation is executed, you can either proceed with another operation or modify
the settings for the current operation. If you change any parameter in the buttons palette,
the button “APPLY CHANGE” will be enabled. When pressing this button, VisuHole will
undo the operation and redo it again with the new settings.

Note: if some shapes of the Stencil fall outside of the selection they would be ignored if
their centroid is outside any face.

Fredo6 – VisuHole Page 9 / 17 v1.0 – 19 Sep 2014


2) Drilling

By default the Drill tool will create Holes with tubes in the whole selection.

There are 3 options that can be combined together:


a) Limiting the drill to the first tube
b) Creating the holes without the tubes (i.e. Punch Thru)
c) Generate the holes with Guide lines (i.e. Mark Thru)

There are 3 options that can be combined together:

Default: Thru with tubes First Tube only Thru with NO Tube

First Tube only with no Tube Mark with Tubes Mark with NO tube

IMPORTANT: The Drill tool always operates Front-to-Back from the picked face,
whatever is the selection

Drill on the second block of the component

Fredo6 – VisuHole Page 10 / 17 v1.0 – 19 Sep 2014


3) Stamping

You can Stamp, Punch or Mark. The shapes are printed on the front faces.

STAMP
The shapes are printed as faces on the selection.
Sholes in the stencils are left out.

PUNCH
Holes are created for the Stencil shapes

MARK
The contours of the stencil shapes are created with
Guide lines

4) Carving and Embossing

The Offset (and other options) are common to these two forms of extrusion. You can type
the offset in the VCB or click on the palette button to set it. Both methods support formula
and optional units.

By default the direction for carving and embossing is calculated from the average
directions of the extruded faces in the selection (so not based on the normal of the
picked face). This is similar to Joint Push Pull Extrude method. The objective is to avoid
unrealistic distortions on curved surfaces.

Carve Emboss

Fredo6 – VisuHole Page 11 / 17 v1.0 – 19 Sep 2014


Option: FLATTEN EXTRUDED FACES

By default the extrusion keeps a uniform depth (or height). Therefore the extruded faces
follow the curved surface. You may want however to flatten the extruded faces.

Flattened Flattened

Option: FORCE MASTER DIRECTION

By default the direction of extrusion is calculated for each individual shapes as the local
normal at the centroid of each individual shapes. You may however want to force the
direction normal to the picked face for ALL shapes. You can also combine this option
with the FLATTEN EXTRUDED FACES option.

Fredo6 – VisuHole Page 12 / 17 v1.0 – 19 Sep 2014


By combining the 2 options and imposing a global direction (here the vertical axis), you
can create platforms in terrains:

5) Working on Curved Surfaces – FOLLOW SURFACE option

VisuHole uses straight projection for each individual faces for all operations Drill, Stamp
and Carve / Emboss.

On curved surfaces, a straight projection is not necessarily adapted, especially when you
have several shapes. Only the shape close to the insertion point will not be too much
distorted but others will. Carve and Emboss attenuates this effect by using local normals,
but this is not perfect.

In Projection mode, individual


shapes are drilled along the
master direction

With the option FOLLOW


SURFACE, individual shapes are
drilled along the local direction
on the surface.
The result is very different

Fredo6 – VisuHole Page 13 / 17 v1.0 – 19 Sep 2014


Likewise, when you stamp or carve / emboss, individual shapes can be distorted is you
don’t use the option Follow Surface (here the circle appears as an ellipse):

Fredo6 – VisuHole Page 14 / 17 v1.0 – 19 Sep 2014


8. Material Assignment
By default, the material is assigned as follows:
• For DRILL tool, Default material
• For STAMP, EXTRUDE and EMBOSS, the material of the faces below the extrusions

You can change this behavior and force a material with the dedicated buttons in the
palette, allowing you to navigate in the material list of the model or interactively pick
a material in the model.

Here are some illustrations:

No Material assignment No Material assignment Material assigned


Emboss Drill Emboss

Material assigned Material assigned Material assigned


Carve Drill Stamp

Fredo6 – VisuHole Page 15 / 17 v1.0 – 19 Sep 2014


9. Other Options
1) Grouping IN and OUT

By default, the generated geometry is created in the individual context of the selection and
therefore merged with the original geometry.

GROUP IN: with this option, the generated geometry is put into individual groups in the
individual context of the selection. The original selection is however changed (actually
just punched).

GROUP OUT: with this option, the generated geometry is created in a Master group at
the top level of the model. Each shape is put into individual groups within this master
group. The original selection is unchanged.

2) Smoothing Local Normals

Curved surfaces present another issue (among others) related to the calculation of local
normals. If local normals are taken as the normal of the face hit by the centroid of each
individual shapes, then you may have an irregular spacing of the shapes. This is because
in Sketchup, there is no real ‘curved’ surface but a succession of flat faces.

By default, VisuHole handles this issue by computing a true smooth profile for the curved
surface when the curvature is ‘gentle’ (defined by a smoothness angle). By default the
angle is 25 degrees. You can however adjust it if you need in special situations by going
to the Default Parameters:

Fredo6 – VisuHole Page 16 / 17 v1.0 – 19 Sep 2014


Here is an illustration of the subtle effect of this option

No smoothing of local normal Smoothing of local normal


Angle = 0° Angle = 25°
Shapes in the back are not well spaced Shapes in the back are equally spaced

3) Ignoring Sharp curvatures

Another issue with curved surfaces is related to stamping or extruding on surfaces


presenting sharp deviations. The question is whether some shapes should be ignored.

The behavior is controlled by a maximum angle of deviation which can be set in the
Default Parameters (default is 45 degrees):

Here is an illustration:

Cylinder shape is drawn (angle = 180°) Cylinder shape is NOT drawn (angle = 45°)
Here the deviation is 70° So smaller than the deviation of 70°

Fredo6 – VisuHole Page 17 / 17 v1.0 – 19 Sep 2014

Vous aimerez peut-être aussi