You are on page 1of 240

KUBRIX GEO

MANUAL & TUTORIALS

Automatic & Interactive Grid Generation for Geomechanics

KUBRIX Geo Manual & Tutorials REV05132015 Version 15 Page 1


KUBRIX Geo/BlockRanger Users Manual Rev REV05132015 Version 15 Page 2
Content
Content ................................................................................................................................. 3
Quick start ............................................................................................................................ 4
About this manual ................................................................................................................. 5
Setting up your work environment ......................................................................................... 7

Using the KUBRIX-Geo automatic mesher ...................................................................... 12

Using the KUBRIX-Geo interactive mesher (BlockRanger) .............................................. 13


Tutorial 1: A single cylinder.................................................................................................. 16
Tutorial 2: Vertical shaft in a stratified soil........................................................................... 19
Tutorial 3: Bifurcating circular tunnels ................................................................................. 33
Tutorial 4: Mesh cleanup and de-featuring (Geo/Hex) .......................................................... 48
Tutorial 5: Model from contour lines (Geo/Hex) ................................................................... 63
Tutorial 6: Interactive model building for 3DEC (Geo/Hex) ................................................... 82
Tutorial 7: Interactive hexahedral meshing (BR) ................................................................... 90
Tutorial 8: Modeling intermittent faults in mining applications (Geo) ................................. 109
Tutorial 9: Incorporating interfaces in legacy models (Geo/Hex) ........................................ 146
Tutorial 10: Open pit with intermittent faults..................................................................... 167
Exercise 1A: Interactive Meshing of a Salt Cavern (BR) ....................................................... 199
Exercise 2: Using Mesh from Points (Geo/Hex) ................................................................... 209
Exercise 3: Building Complex Hex Meshes Using BR ............................................................ 211
Using BubblePack to automatically build clumps for PFC3D................................................ 217
CAD Representation of surfaces and volumes..................................................................... 220
SpaceRanger: A surface-based range Function ................................................................... 222
Tips and tricks of the trade ................................................................................................ 231
Troubleshooting ................................................................................................................ 235
index ................................................................................................................................. 239

KUBRIX Geo/BlockRanger Users Manual Rev REV05132015 Version 15 Page 3


Quick start

Installation
After installation, your license key determines which product you are licensed to use. KUBRIX is only
available in 64-bits. After the installation procedure below, two icons, for automatic meshing and,
for interactive meshing (BlockRanger) will be installed in Rhino5.

1. Install the latest version of KUBRIX (64 bit) from the Itasca KUBRIX website.
2. Install Rhino 5 (64bit) from http://www.rhino3d.com/download and start Rhino up.
3. Navigate to C:\ProgramData\ItascaRhinoStuff (if you cannot find ProgramData , this folder may be
hidden on your machine. Simply, start typing C:\ProgramData in the address bar of your folder to
see it), select the following files:

BlockRanger.rhi

ColorizeObjects.rvb

Kubrix15.rui

MakePFCClump.rvb

drag these files over the Rhino graphic screen and drop them. The Rhino Package installer dialog box
opens.

4. Follow the instructions, close the dialog box and exit Rhino. You are done.

The KUBRIX license


To run KUBRIX, you need either a soft license (usually an encrypted string that you receive by Email) or a
USB dongle which is a small device that plugs into your computer. To use your soft license:

5. Create a text file called kubrix_lock.txt and place the encrypted string you received, including any
trailing -, if there is any, on the first line of this file, and save it.
6. Place the kubrix_lock.txt file in your C:\ folder.

To use the dongle, plug it into a USB slot in your computer.

Running KUBRIX
You can run KUBRIX in three ways. By clicking on a KUBRIX icon in Rhino, by typing Run Kubrix on
the Rhino command line, or by opening a Command Window and typing kubrix. If you are unable to
run KUBRIX in Rhino or in a command window, please restart your machine. The easiest way to use
KUBRIX is to click on to use the KUBRIX automatic or to use KUBRIX interactive in Rhino.

KUBRIX Geo/BlockRanger Users Manual Rev REV05132015 Version 15 Page 4


About this manual
This document describes the use of the KUBRIX grid generation programs, in conjunction with the Rhino
solid modeling tool, through detailed tutorials focused on geomechanical applications. KUBRIX features
the latest innovations in CAD-based automatic and interactive grid generation, and integration with
CAD. The interactive portion of KUBRIX is available as a standalone product and is called KUBRIX
BlockRanger. KUBRIX automatic and interactive, together, are referred to as KUBRIX-Geo.

KUBRIX offers engineers capabilities that cover a wide range of volume grid generation needs.

8. Interactive solid-based mapped hexahedral meshing to use with FLAC3D


9. Interactive solid-based convex block decomposition for use with 3DEC
10. Automatic all-hexahedral meshing using fuzzy-logic block decomposition for FLAC3D
11. Automatic tetrahedral/hexahedral meshing for FLAC3D
12. Automatic octree meshing for FLAC3D & 3DEC
13. Hybrid meshing combining any type of meshing with automatic hex and tet meshing for FLAC3D &
3DEC
14. Meshing of complex geometries featuring hundreds of internal discontinuities for both FLAC3D &
3DEC

Beyond FLAC3D and 3DEC, KUBRIX produces meshes in the following file formats:

abaqus, ansys, ensight, flac3d, ideas, marc, nastran, patran, gridpro, and vrml.

KUBRIX Geo/BlockRanger Users Manual Rev REV05132015 Version 15 Page 5


Interactive Automatic Block- Automatic Automatic Automatic Hybrid
Interactive Convex Automatic Convex
Hexahedral Mapped structured Tetrahedral/ Hexahedral Octree Octree, Hexahedral,
Blocking Blocking
Meshing Hexahedral Meshing Hexahedral Meshing Meshing Tetrahedral Meshing

Geo

Hex

BR

Table 1: A visual depiction of the variety of grids produced by KUBRIX

KUBRIX Geo Manual & Tutorials REV05132015 Version 15 Page 6


Setting up your work environment

Displaying useful Rhino Toolbars, buttons and Plug-ins.


Follow the Quick-Start Procedure in page 4 to add many useful toolbars, scripts and plug-ins.

The Rhino command area


The command area is the field (generally above the drawing area) where Rhino displays text
information. Figure 1 shows the Rhino window after the Rhino Toolbars and Plug-ins have been
installed.

Figure 1: The Rhino window featuring the Kubrix toolbar (highlighted).

Icons, menu items, commands and language


Anything you do in Rhino is a command that you can invoke by typing on the command line. For
instance, Shade is a command that changes the display to Shaded. If you enter _Shade, it will assume
that you refer to the English command Shade. Therefore, regardless of the language in which Rhino is
set up, _Shade creates a Shaded image whereas the command Shade will only be understood if the
installation language is English.

At times, we will refer to menu items and at other times, the command itself (as in _Shade). In all cases,
whether you click an icon, select a menu item or enter a command, use the Help|Command Help pane
on the right side as a context-sensitive help.

KUBRIX Geo/Rhino Users Manual REV04112013 Page 7


Rotating and panning views
In the Perspective view, rotate views by right-clicking, holding the mouse down and dragging. Pan a
view using <SHIFT> while dragging and holding the right mouse button down.

Colorizing objects in the model


All newly-created objects in Rhino are placed in the current Layer and adopt its color. To differentiate
objects from one another, select a number of objects and click on the icon marked ColorizeObjects to
assign different colors to each selected object (Figure 2). To revert to a colorization by layers, select the
objects, F3, and select color by Layer.

Figure 2: The ColorizeObjects icon and its tooltip in the Kubrix toolbar

Joining non-manifold surfaces


NonManifoldMerge joins several surfaces and polysurfaces into a single non-manifold PolySurface
(Figure 3). In its latest implementation, NonManifoldMerge builds a single non-manifold Polysurface
from a selected set of intersecting surfaces and Polysurface. Subsequently use ExtractSrf to get rid of
unneeded surfaces.

Figure 3: The NonManifoldMerge icon and its tooltip in the Kubrix toolbar

Useful Rhino shortcuts when working with KUBRIX & BlockRanger


The following keyboard shortcuts are pre-programmed into Rhino:

F3 Properties

F8 Ortho

F9 Snap

The following shortcuts may be added to Rhino to streamline certain tedious and repetitive tasks:

KUBRIX Geo/Rhino Users Manual Page 8


AlignMeshVertices:
Left-clicking on the Icon marked Align mesh vertices to tolerance launches the AlignMeshVertices
command which is very useful for cleaning up meshes. The most common use of this tool involves the
following preliminary actions:

left-clicking on the command


setting the DistanceToAdjust Parameter
clicking on SelectVertices
clicking on the first vertex that will host all the subsequent vertices
Clicking on the vertices that will collapse on the host vertex
hitting <RETURN>

You can set a shortcut, F4, that does all this. Left-click on the icon marked Options, on the left pane,
under Rhino Options select Keyboard. If the slot in front of F4 is available, type in _AlignMeshVertices
SelectVertices

SplitMeshEdge:
Set F6 to _SplitMeshEdge

Tolerances
Tolerances matter especially when intersecting meshes or doing Boolean operations on meshes. In all
cases, make sure that you move your model in case it is too far away from the origin. Moving objects
closer to the origin improves accuracy in Rhino, KUBRIX and the analysis software.

Avoiding accidental object dragging


It may happen that you inadvertently drag a highlighted object with the left mouse button. To avoid
this, left-click on the icon marked Options. In the left pane of the Rhino Options dialog box, click on
Rhino Options|Mouse, and in the Click and drag section, set the Object drag threshold to 100 pixels.
Now, dragging a highlighted objects requires a minimum of 100 pixel mouse movement before it takes
effect.

SetWorkingDirectory or "where are my files?"


When you start Rhino by double-clicking a 3dm file located in a folder, generally Rhino considers that
folder to be the working directory. As a result, when you run KUBRIX, it will search for the input in that
folder and will place the resulting mesh in the same folder. But in certain circumstances Rhino may not
know where the working directory is, and when you run Kubrix and click on the Input Surface, you may
not be able to see your mesh files. When in doubt, in Rhino, use the SetWorkingDirectory command to
tell Rhino (and thus Kubrix) where to read and write its files.

Object snap options


two snapping options are available in Rhino: Grid Snap and Osnap. Grid Snap is similar to Snap to Grid
in PowerPoint. Osnap or Objet Snap is the Rhino equivalent of PowerPoint's Snap to Objects. To be

KUBRIX Geo/Rhino Users Manual Page 9


able to snap lines, polylines, corners of objects, etc. to existing objects, Osnap must be active. Click on
the word Osnap at the bottom of the graphic window to activate it. Next, you can specify to which
particular point of an existing object you want to snap to by checking any of the words: End, Near, Point,
Mid, etc...appearing at the bottom the graphic window.

Orthogonal restriction of mouse movement


You can restrict the movements of the mouse to the x, y and z directions permanently by clicking on the
word Ortho appearing at the bottom of the graphic window or by hitting <F8>. You can restrict the
movement of the mouse temporarily by holding down <Shift> during mouse movement.

Getting rid of the background grid


You can get rid of the background grid in any window by hitting <F7>. To get rid of the grid in all
windows, left-click on the icon marked Options. In the left pane of the Rhino Options dialog box, click
on Document Properties|Grid, and in the Grid properties section, uncheck Show grid lines and Show
grid axes.

Thicker lines
The default representation of curves (1 pixel wide) may be too thin and difficult to see when a Rhino
window is projected on a screen. Figure 4, left, shows the default representation. The following
procedure shows how to draw Curves 3 pixels-wide whenever Shaded View is selected (Figure 4, right).

Figure 4: A regular (left) and "thick line" (right) representation

Select the Tools|Options menus item. In the Left pane of the Rhino Options dialog box, under Rhino
Options, select View|Display Models|Shaded|Objects|Curves. In the Curve Settings pane, to the right,
Change the default setting of Curve width from 1 to 3 and click OK (Figure 5).

KUBRIX Geo/Rhino Users Manual Page 10


Figure 5: Representing lines with 3 pixels in Shaded View

KUBRIX Geo/Rhino Users Manual Page 11


Using the KUBRIX-Geo automatic mesher
KUBRIX Geo is an automatic grid generator accessible from within Rhino 5. You can run KUBRIX-Geo by

clicking on the KUBRIX icon in Rhino (

Figure 6).

Figure 6: The KUBRIX Geo/Hex icon in the Kubrix toolbar

KUBRIX Geo fills the interior of a closed manifold or non-manifold triangular surface mesh with
hexahedral or tetrahedral volume elements (zones) and saves the resulting mesh as an ASCII file in
Rhino's Current Working Directory. The closed surface used as input to KUBRIX is prepared in Rhino and
saved as an ASCII STL mesh file.

Geo/Hex Options
A limited number KUBRIX Automeshing options are available from the GUI but all the options are
available through command line. To enter commands through the GUI, enter them through the New
Keywords field.

KUBRIX Geo/Rhino Users Manual Page 12


Using the KUBRIX-Geo interactive mesher (BlockRanger)
BlockRanger is the interactive mesher of KUBRIX-Geo. It is a Rhino 5 plug in and available only in 64 bit.
to use it, click on the BlockRanger icon highlighted below. (Figure 7).

Figure 7: The KUBRIX BR icon in the Kubrix toolbar

The BR commands converts selected 4, 5 or 6-sided solids into blocks of high-quality hexahedral (brick)
elements for use with most engineering analysis packages, including Itasca's FLAC3D and 3DEC , and
saves the resulting mesh as an ASCII file in your (Rhino's) Current Working Directory. Tutorial 7 and
Exercise 3 are devoted to the use of the BR command.

Qualifying solids (Figure 8) are:

6-sided solids (hexahedron-like) composed of 6 surfaces bound by 4 curves.


5-sided solids (prism-like) composed of 2 surfaces bound by 3 curves and 3 surfaces bound by 4
curves.
4-sided solids (tetrahedron-like) composed of 4 surfaces each bound by 3 curves.

Figure 8: Three mesh block primitives produced by BR.

If the selected solids are contiguous, BR ensures that the resulting grid maintains grid conformity and
continuity across block corners, edges and faces so that no dangling nodes will result.

All solids successfully processed by BR are saved as grid files in Rhino's Current Working Directory (see
Rhino's SetWorkingDirectory command) as an ASCII file of the form BlockRanger.xyz. Solids that did
not qualify or could not be successfully meshed remain highlighted on your screen. Use the Invert
Selection and Hide Objects of the Hide icon to just make these solids visible and correct them.

KUBRIX Geo/Rhino Users Manual Page 13


BlockRanger Options
MaxEdgeLength

Maximum element (zone) edge length in model coordinates. By default, this number is calculated as
one tenth the length of the model.

MinEdgeResolution

Minimum number of elements across each grid block edge. Its default value is 3.

TargetNumElements

Use this option if you want to reduce the maximum element aspect ratio in the grid. BR will Initially
build a grid based on the prescribed MaxEdgeLength and MinEdgeResolution. In a typical block-
structured grid, as BR reduces the maximum aspect ratio, the number of elements (zones) increases. BR
stops when the number of elements exceeds TargetNumElements.

OutputFormat

Format in which the resulting volume grid file should be saved. Choices are: 3DEC, ABAQUS, ANSYS,
CCFD, FLAC3D, I-DEAS, LS-DYNA, MARC, NASTRAN, PATRAN and VRML.

Local Edge Resolution Control

Once a grid has been build using the above global parameters, you can control the local mesh resolution
by manually setting the edge resolution you want. Below is the bathtubSolids.3dm model which you can
find in your Tutorial Files.

Running BlockRanger using the default parameters results in the grid below.

KUBRIX Geo/Rhino Users Manual Page 14


Use the command DupEdges or the icon provided in the KUBRIX toolbar to extract any edge (the edge
highlighted to the right). Once an edge is extracted and highlighted, use F3 to open its Property dialog
box, and in there enter 8 in the Name field. 8 will be the resolution of that edge. Extract a second edge
(left) and in the Name field of its Property enter 5.

Run BlockRanger again, this time making sure to include the edges as well. This results in the grid
below.

KUBRIX Geo/Rhino Users Manual Page 15


Tutorial 1: A single cylinder
In this tutorial, you will learn the basics of automatic grid generation with KUBRIX.

Creating a single-material model


1. Start Rhino and select Small Objects-Meters.
2. Click on the label of the window marked Perspective. Select the Solid|Cylinder menu item. Enter 0
followed by <RETURN> to center of the base of the cylinder at the origin. , Enter 2 followed by
<RETURN> to set the Radius of the base to 2. Enter 10 followed by <RETURN> to set the Height of
the cylinder to 10 and complete the construction of a vertical cylinder (Figure 9).

Figure 9: Solid representing a cylinder

You have created a cylindrical solid. A solid is a closed surface. It has a clear interior and exterior. You
are now going to create a triangular mesh representing the surface of the cylinder. Creating a triangular
surface mesh is a necessary step on the way to creating a volume mesh of the cylinder.

3. Select the File|Save As menu item and save your model as cyl.3dm.
4. Select the cylinder and select the menu item Mesh|From NURBS objects. The Polygon mesh
detailed options dialog box opens. If you see a button in the lower-right corner of the box marked
Simple control, click it to see a simplified version of this dialog box.
5. In the simplified dialog box, slide the horizontal cursor all the way to the right towards More
Polygons and click on Preview to see a preview of the resulting surface mesh. Click on OK to create
a surface mesh (Figure 10).

KUBRIX Geo/Rhino Users Manual Page 16


Figure 10: Original highlighted cylindrical surface and the newly-created surface mesh superimposed on it.

6. While the original cylindrical surface is still highlighted (seen in light yellow in Figure 10), select it
and hit <DELETE> to keep only the surface mesh.
7. Select the mesh, select the menu item File|Export Selected and when the Export dialog box opens,
enter cyl for the File name and select stereolythography (*.stl) for the Save as type.
8. When the STL Export Options dialog box opens, make sure that ASCII File type and Export open
objects are both checked. Click OK to complete the Save operation.

A triangular surface mesh saved as a formatted STL file serves as input to the Kubrix automatic mesh
generator. Kubrix can be run from Rhino by clicking on the Kubrix icon (Figure 11).

Figure 11: The Kubrix icon in Rhino

9. Run the Kubrix program by clicking on the Kubrix icon and select the Structured Hexa tab. Click on
Default to set all parameters to their default values then click on the Input File button and select
cyl.stl. Kubrix will use the file cyl.stl as input to generate a hexahedral mesh of the interior.
10. Set the Max Edge Length to 0.5 and click on Compute.
11. Kubrix generates two files: kubrix_out.flac3d and kubrix_out.wrl. You can inspect the resulting
model by launching a new instance of Rhino and importing kubrix_out.wrl to visualize it.

KUBRIX Geo/Rhino Users Manual Page 17


12. You can also run FLAC3D and use File|Grid|Import to read kubrix_out.flac3d and display it (Figure
12).

Figure 12: Mesh of cylinder read into FLAC3D

END OF TUTORIAL 1

KUBRIX Geo/Rhino Users Manual Page 18


Tutorial 2: Vertical shaft in a stratified soil
In this tutorial, you will create a vertical shaft (140 ft deep, 20 ft diameter) inside a cubic block of soil
(200 ft 200 ft 200 ft) composed of two materials. The surface separating the two types of soil is
located at a height of 50 ft (Figure 13).

Figure 13: A FLAC3D model (left) and a 3DEC model (right) of a vertical shaft in a stratified soil

Startup and excavation of the shaft


1. Start Rhino and select Solid|Box|Diagonal to define a Box by 2 points. Enter -100,-100,-100 for the
coordinates of the first point, followed by <RETURN>. Enter 100,100,100 for the coordinates of the
second point followed by <RETURN>.
2. Right-click on the Zoom Extents button to make the box fit to each window. This completes the
creation of a Box (Figure 14).

Figure 14: Four-view of a box

3. Double-click the Perspective viewport title to maximize the Perspective viewport (Figure 15).

KUBRIX Geo/Rhino Users Manual Page 19


Figure 15: Wireframe view of the box

4. Double-click the Perspective viewport title to return to a 4-view window and click on the title of the
Top viewport to activate it.
5. Select Solid|Cylinder. Enter 0,0 followed by <ENTER> to specify the coordinates of the center of
the cylinder base (in the x, y coordinate system). Enter 20 followed by <ENTER> for the radius.
Enter 200 followed by <ENTER> to specify the center of the top of the cylinder.

Please note that Rhino accepts both 0,0,200 and 200 as the 3rd parameter of the Cylinder Command.
Since we are in a Top view, Rhino rightly assumes that 200 means 0,0,200.

6. Left-click on the button marked Shaded Viewport to see the box and cylinder (Figure 16).

Figure 16: Box and cylinder

7. To move the cylinder down by 40 feet, select the cylinder and select the menu item
Transform|Move. Enter 0,0,0 followed by <ENTER>. Enter 0,0,-40 followed by <ENTER> (Figure
17).

KUBRIX Geo/Rhino Users Manual Page 20


Figure 17: The lowered cylinder is highlighted

8. To excavate the well, we must subtract (in the Boolean algebra sense) the cylinder from the box. To
do so, select the menu item Solid|Difference. First select the box followed by <ENTER>, then select
the cylinder followed by <ENTER> (Figure 18).

Figure 18: The Boolean subtraction of the cylinder from the box represents the excavation

Creating a triangular surface mesh of the model


Mesh generation for FLAC3D and block generation for 3DEC requires a closed triangular surface
representing the surface of the object in which we want to create the model

1. Prior to creating a surface mesh based on a solid model, you should save the Rhino model. Select
File|Save As and when the Save dialog box opens, enter t2_0 for the File name and make sure that
the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t2_0.3dm is created in your
current folder.
2. Select the model and select the Mesh|From NURBS objects menu item. The Polygon mesh detailed
options dialog box opens. If you see a button in the lower-right corner of the box marked Simple
control, click it to see a simplified version of this dialog box.

KUBRIX Geo/Rhino Users Manual Page 21


3. In the simplified dialog box, slide the horizontal cursor to the middle and click on Preview to see
what the resulting surface mesh will look like (Figure 19).

Figure 19: Preview of the surface mesh

4. Click OK to accept the surface mesh. Note that the original solid is still highlighted (in yellow) while
the mesh is drawn in black.
5. Hit <DELETE> to delete the (highlighted) solid. What is left is the surface mesh.
6. Select the mesh and left-click on the icon marked Check located in the Geometry Fix toolbar. Rhino
responds with information that indicates that the mesh has no naked edges. Naked edges are
edges attached to only one polygon and are symptomatic of a mesh that is not closed.
7. The mesh contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an
all-triangular surface mesh to proceed. To triangulate the mesh, select the mesh and left-click on
the icon marked Triangulate Mesh.
8. Select the model and select the File|Export selected menu item and when the Export dialog box
opens, enter t2_0 for the File name and select stereolythography (*.stl) for the Save as type.
9. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open
objects are both checked. Click OK to complete the Save.

Creating an all-hexahedral mesh for FLAC3D using Kubrix


1. Run the Kubrix program by clicking on the Kubrix icon. Select the Structured Hexa tab (Figure 20).
Click on the Input file button and select t1_0.stl.

KUBRIX Geo/Rhino Users Manual Page 22


Figure 20: Kubrix Structured Hexa default values

2. Click on the Default button to revert to default parameters. Please note that the output file type is
.flac3d which is an ASCII file that can be directly read into FLAC3D as a grid file. Click Compute to
launch the computation. The screen output is shown blow.
............................................................................

Welcome to KUBRIX version 15.0.3

Copyright (C) 1995-2015 Itasca Consulting Group, Inc. All rights reserved.
............................................................................
PLI123: The input surface will be remeshed ...
PLI001: The input surface name is:
C:/Users/t1_0.stl ...
PLI007: REQUEST: STL input surface (-it stl) ...
PLI002: The output mesh file name is:
kubrix_out ...
PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ...
PLI003: The minimum mesh block resolution is 1 ...
PLI056: The blocking efficiency is 0.50 (-e) ...
PLI042: A block-structured mesh is built (-str 2) ...
PLI044: Correct all negative Jacobian elements ...
ISI002: Finished reading 292 triangles and 148 nodes.
ISI032: Checking for surface self-intersection ...
MGI088: Surface remeshing completed...
MGI096: Remeshed surface contains 922 triangles ...
MGI096: Remeshed surface contains 463 nodes ...
ISI032: Checking for surface self-intersection ...
ISI025: Translating input into an STL file ...
PLI093: STL translation completed.
MGI066: Feature refinement: final triangles count 922 ...
MGI068: Fuzzy-logic block decomposition ...
MGI037: Done. 1/1 iters beta 0.000100, sp 11, st 8.89e+000 ...
MGI001: Block decomposition completed (17) ...
MGI013: Volume decomposed into 17 blocks and 1 material...
MGI018: Final check ........ all Jacobians are positive.
MGI082: Block reduction complete (9)...
MGI012: Output mesh contains 9 hex elements ...
MGI012: Output mesh contains 24 vertices ...
MGI012: Output mesh contains 1 material ...
MGI054: Max. edge offset ... 7.51e+000 u between nodes 19, 20
MGI057: Max. non-dim offset 0.2421 between nodes 19, 20
MGI018: Final check ........ all Jacobians are positive.
MGI021: Max. edge length ... 2.00e+002 u between nodes 1, 10
MGI052: Min. edge length ... 2.52e+001 u between nodes 20, 21

KUBRIX Geo/Rhino Users Manual Page 23


MGI020: Max. aspect ratio .. 7.92e+000 at element 7
............................................................................
MGI031: Writing a VRML file ...
MGI067: Writing a FLAC3D file ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MGI999: Successful termination of KUBRIX in 60.2 seconds!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

3. KUBRIX generates a file called kubrix_out.flac3d. Run FLAC3D and use File|Import grid to read
kubrix_out.flac3d. FLAC3D will display the zone plot. You can also read the kubrix_out.wrl file in
Rhino to examine the mesh.
4. Hit <i> to see an axonometric perspective view (Figure 21).

Figure 21: View of the grid in FLAC3D containing 9 zones and 24 vertices

By default, KUBRIX produces a coarse mesh. In the KUBRIX screen output, the maximum edge length in
the mesh is reported as 200. To create a finer mesh, you need to specify a smaller maximum edge
length.

5. Go back to the Kubrix application and set Max Edge Length to 10 in the corresponding field. In the
same section, choose a Resolution of 3 to make sure that all details are captured with at least 3
elements across. Click Compute to launch the hexahedral mesh generation.
6. In FLAC3D, click on the Command Window to activate it. Select File|New to remove the existing
model, followed by File|Import Grid. Read kubrix_out.flac3d into FLAC3D and display it (Figure 22).

Figure 22: A structured FLAC3D grid

KUBRIX Geo/Rhino Users Manual Page 24


Creating a model of both the inside and outside of the excavated shaft
1. In your current folder, double-click the file t2_0.3dm you saved earlier. This file contains the solid
model prior to surface meshing. Double-click the title of the Perspective view port to maximize it.
2. Select the menu item Surface|Planar Curves and click on the circle representing the rim of the shaft
opening (Figure 23). Hit <ENTER> to complete the command and create a planar surface the cap of
the shaft.

Figure 23: Highlighted curve representing the shaft rim (top) and the capped shaft (bottom)

Rhino Solids are closed Polysurfaces that have clearly defined interiors. The Polysurfaces defining such
solids are called manifold Polysurfaces. In contrast, consider a solid cut in half. Consider the surface
made up of the surface of the solid and the surface of wall separating the two walls. This surface is
closed but doesnt have a clear interior. To be exact, it has two interiors. Such surfaces are called non-
manifold surfaces.

The addition of the cap creates two separate interior regions: inside the well, and outside the well but
inside the box. The set of surfaces representing this object constitute non-manifold Polysurfaces.
Joining surfaces into a non-manifold Polysurface in Rhino cannot be done with the usual Join command.
It has to be done with a new command, NonManifoldMerge.

3. Select all the surfaces and click on the NonManifoldMerge icon. The resulting polysurface is a non
manifold Polysurface. This can be verified by highlighting the model and pressing <F3> to display
the Properties of the selected surface and clicking on Details.
4. Select File|Save As and when the Save dialog box opens, enter t2_1 for the File name and make
sure that the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t2_1.3dm is created in
your current working folder.

KUBRIX Geo/Rhino Users Manual Page 25


5. Select the model and select the Mesh|From NURBS Objects menu item. If the Polygon Mesh
Detailed Option dialog box opens, click on the Simple controls button to bring up the simpler
Polygon Mesh Options dialog box.
6. Move the slider to the middle of the scale and click OK to create the surface mesh (Figure 24).

Figure 24: Mesh of the capped model showing the highlighted solid model

7. While the solid model is still selected hit the <DELETE> button to just keep the mesh.
8. Check the mesh by left-clicking on the icon marked Check located in the Geometry Fix toolbar.
Rhino responds with the following message box:

This is a bad mesh.

Here is what is wrong with this mesh:


Mesh has 29 non manifold edges.
Skipping face direction check because of positive non manifold edge count.

General information about this mesh:


Mesh does not have any degenerate faces.
Mesh does not have any zero length edges.
Mesh does not have any naked edges.
Mesh does not have any duplicate faces.
Mesh does not have any disjoint pieces.
Mesh does not have any unused vertices.

Rhino qualifies this mesh as bad because it contains non-manifold triangles (edges shared by 3 or more
triangles), but this was expected because the solid model itself non-manifold.

9. The mesh contains both triangular and quadrilateral polyhedra. Select the model, select the
File|Export selected menu item, and when the Export dialog box opens, enter t2_1 for the File
name and select stereolythography (*.stl) for the Save as type.
10. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open
objects are both checked. Click OK to complete the Save operation. Please note that even though

KUBRIX Geo/Rhino Users Manual Page 26


the mesh is composed of both quad and triangular faces, quad faces will be automatically split into
triangles prior to exports as STL.
11. Run the Kubrix program by clicking on the Kubrix icon. Select the Structured Hexa tab and make
sure that the input file is t2_1.stl.
12. If you have not changed any meshing parameters they should have remained unchanged, but if you
have changed them, click on Default. In the Mesh parameters section of the dialog box, check the
square marked Max Edge Length, and enter 10 in the corresponding field. In the same section,
choose a Resolution of 3 to make sure that all details are captured with at least 3 elements across.
Click Compute to launch the hexahedral grid generation.
13. The resulting grid is composed of two groups. All the zones located outside the shaft belong to
Group 1. The rest belongs to Group2.
14. Run FLAC3D and visualize the mesh (Figure 25).

Figure 25: FLAC3D grid of the capped model.

Creating an all-hexahedral mesh of the capped model, with stratified soil


1. In your current folder, double-click the file t2_1.3dm you saved earlier. This file contains the Rhino
solid model prior to surface meshing. If the Perspective viewport is maximized, double-click the title
of the Perspective view port to return to a 4-Viewport view.
2. You are now going to represent the stratification by a cut at height z=50. To do so, double-click the
Front viewport title to maximize the Front view, and select the Curve|Line|Line segment menu
item.
3. Enter -150,50 followed by <ENTER> to set the first point, then 150,50 followed by <ENTER> to set
the second one (Figure 26).

KUBRIX Geo/Rhino Users Manual Page 27


Figure 26: View of the model with horizontal line segment at z=50.

4. Select the Polysurface and enter WireCut. Click on the horizontal line and hit <ENTER>. Delete the
horizontal line and note that the model is now split into 2 parts. These are 2 closed non-manifold
Polysurfaces.
5. Select both Polysurfaces and click on left-click on the Explode icon. Edit|Select Objects|Duplicate
Objects (Figure 27).

Figure 27: Perspective view of the lower part of the split model

6. Hit <DELETE> to get rid of the duplicate surface. Select everything and click on the
NonManifoldMerge icon to create a new non-manifold Polysurface. Select a ghosted view
rendering(Figure 28).

KUBRIX Geo/Rhino Users Manual Page 28


Figure 28: Ghosted view of the new non-manifold Polysurfaces representing the stratified geometry.

7. Prior to creating a surface mesh based on the solid model, you should save the Rhino model. Select
File|Save As and when the Save dialog box opens, enter t2_2 for the File name and make sure that
the Save as type is set to Rhino 4 3D Models (*.3dm). Note that a file named t2_2.3dm is created in
your current folder.
8. Select the model and select the menu item Mesh|From NURBS Objects. If the Polygon Mesh
Detailed Option dialog box comes up, click on the Detailed Controls button to bring up the simpler
Polygon Mesh Options dialog box.
9. Move the slider to the middle of the scale and click OK to create the surface mesh. Delete the solid
model which has remained highlighted (Figure 29).

Figure 29: Surface mesh of capped shaft in stratified soil

10. Select the model, select the File|Export Selected menu item and when the Export dialog box opens,
enter t2_2 for the File name and select stereolythography (*.stl) for the Save as type.
11. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open
objects are both checked. Click OK to complete the Save operation

KUBRIX Geo/Rhino Users Manual Page 29


12. Run the Kubrix program by clicking on the Kubrix icon. Select the Structured Hexa tab. Make sure
that the input file is t2_2.stl
13. If you have not changed any meshing parameter they should have remained unchanged, but if you
have changed the parameters, click on Default. In the Mesh parameters section of the dialog box,
check the square marked Max Edge Length, and enter 10 in the corresponding field. In the same
section, choose a Resolution of 3 to make sure that all details are captured with at least 3 elements
across. Click Compute to launch the hexahedral grid generation.

The resulting grid is composed of 3 groups. Group2 represents the shaft interior; Group1 and Group3
represent the exterior of the shaft (Figure 30).

Figure 30: FLAC3D model of the capped shaft in a stratified soil with Group3 masked

Creating 3DEC blocking of the capped model, with stratified soil


1. Run the Kubrix program by clicking on the Kubrix icon. Select the Convex Blocking tab. Make sure
that the input file is t2_2.stl.
2. Click on Default, then click on Compute. The resulting file is kubrix_out.3dec.
3. Run 3DEC, call kubrox_out.3dec as a data file and in the Plot Item Menu select color by Region
(Figure 31).

Figure 31: 3DEC model of the capped shaft in stratified soil. Note that the default relative offset of 100 result in a coarse
depiction of the shaft periphery.

KUBRIX Geo/Rhino Users Manual Page 30


Creating Octree mesh of the capped model, with stratified soil
Octree meshes are based on an increasingly finer subdivision of space into hexahedral blocks (Figure 32
& Figure 33). One of the main attractions of this approach is that the input surface need not be closed.
In fact, octree meshes can be obtained from surface data containing many gaps and overlaps. This
approach is to be compared with other forms of meshing requiring a perfectly watertight input surface
in which all surface intersections are accounted for.

Figure 32: Octree blocking: left, mesh featuring 5 levels of refinement, right, a balanced octree where adjacent zones are at
most one generation apart.

Figure 33: Octree meshing: left: boundaries are detected in dark blue, right; there are no boundary (joint) regions.

1. Run Kubrix by clicking on the Kubrix icon. Select the Octree Meshing tab (Figure 34).

KUBRIX Geo/Rhino Users Manual Page 31


Figure 34: Octree meshing dialog box

2. You can use this approach for both 3DEC and FLAC3D model generation. Click on Default, select
FLAC3D for the Output type, select 7 for the Octree level, and click on Compute to create the mesh.
3. Run FLAC3D, import t1_2.flac3d and display it (Figure 35).

Figure 35: Octree model where a portion of the zones have been masked for the sake of clarity

END OF TUTORIAL 2

KUBRIX Geo/Rhino Users Manual Page 32


Tutorial 3: Bifurcating circular tunnels
In this tutorial, you will learn to create a circular tunnel bifurcating into two circular tunnels making an
angle of 20 degrees between them and located inside. A FLAC3D hexahedral, tetrahedral and octree
mesh as well as a 3DEC blocking will be built(Figure 36).

Figure 36: A FLAC3D hex, tetra and octree grid, and a 3DEC block model of the bifurcating tunnels

Startup and creation of a horizontal tunnel of diameter 10 and length 200


1. Start Rhino, select the Large Objects - Meters template, and double-click on the label of the Right
view to maximize it. Click on Grid Snap at the bottom of the screen to activate background grid
snap.
2. Select the Curve|Circle|Center, Radius menu item and click on the coordinate system origin in the
Right view. This sets the center of the circle. Type 10 on the command window to specify its radius
3. Double-click the label of the Right view to once again bring up the four views. Select the
Surface|Extrude Curve|Straight menu item and select the circle in the Perspective view, followed
by <ENTER>. The curve extrusion parameters appear in the command window.
4. If you need to modify any option, simply click on the option in the command window. Direction
should be, by default, already be set to 1,0,0 since the circle was built in the Right viewports
Construction Plane. Set the remaining options as follows: BothSides=Yes, Solid=Yes,
DeleteInput=Yes.
5. Enter 100 on the command line followed by <RETURN> to complete the construction of a closed 200
m long horizontal cylinder. Right-click on Zoom Extents All Viewports 1 to get a full view of the
model so far (Figure 37).

1
The commands associated with left or right-clicking on each icon can be seen by moving your mouse over the
icon and leaving it there for a second.

KUBRIX Geo/Rhino Users Manual Page 33


Figure 37: First horizontal cylinder

Creating the bifurcation and the box surrounding it


1. Select the cylinder in any view, select Edit|Copy followed by Edit|Paste to duplicate it in place.
While the copy is still selected, left-click on Hide Objects to hide it.
2. In the Right viewport, select the remaining visible cylinder and select Transform|Scale 2D, and, click
on the origin of the coordinate system. Type 0.7 followed by <RETURN> to scale the cylinder down
to a diameter of 7.
3. While the cylinder is still selected, select Transform|Rotate. In the Top view, click on the origin of
the coordinate system. Enter 20 followed by <RETURN> to complete the rotation of the smaller
cylinder by 20 around the z-axis. Right-click on the button marked Show Objects to render both
cylinders visible (Figure 38).

Figure 38: Two intersecting tunnels

You must now split the smaller cylinder with the larger one and delete a portion of the smaller cylinder
to create the bifurcation.

KUBRIX Geo/Rhino Users Manual Page 34


4. Hit the <ESC> button to unselect everything. Select the Solid|Boolean Split menu item. Select the
smaller cylinder, then type <ENTER>. Select the larger cylinder for the Cutting polysurface, followed
by <ENTER>. This operation splits the smaller cylinder into 3 sections.

Figure 39: In the Top view, the highlighted section of the smaller cylinder must be deleted to create the branching

5. In the Top view, select the lower-left and the middle sections of the smaller cylinder (Figure 39) and
delete them. This leaves only one section (upper right) of the smaller cylinder.
6. Select the two remaining polysurfaces, and select Solid|Union to complete the creation of one
single closed solid representing the bifurcation. Click on the button marked Shaded Viewport to
display a shaded view of the completed bifurcation (Figure 40).

Figure 40: Bifurcation resulting from the union of the larger and the remaining section of the smaller cylinder

To create a model of the soil surrounding the tunnels, you must create a cube representing the volume
in which the tunnels are excavated, and subtract the tunnels from it.

KUBRIX Geo/Rhino Users Manual Page 35


7. To create a parallelepiped, select the Solid|Box|Diagonal menu item. Enter -60,-60,-60 followed by
<ENTER> to specify one end of the diagonal, and 60,60,60, followed by <ENTER> for the other end
to create a cube of side 120 centered at the origin.
8. To subtract the tunnels from the cube, select the Solid|Difference menu item. For the First set of
polysurfaces, select the box, then type <ENTER>. For the second set, select the bifurcation, then
<ENTER> to complete the Boolean difference operation (Figure 41).

Figure 41: Result of the Boolean difference

Creating a Triangular Surface Mesh of the Model


Mesh generation for FLAC3D and block generation for 3DEC require a closed triangular surface
representing the surface of the object in which we want to create the model

1. Prior to creating a surface mesh based on the solid model, you should save the Rhino model. Select
File|Save As and when the Save dialog box opens, enter t2_0 for the File name and make sure that
the Save as type is set to Rhino 4 3D Models (*.3dm). As a result, a file called t2_0.3dm is created
in your current folder.
2. Select the model and select the Mesh|From NURBS objects menu item. The Polygon Mesh Option
dialog box opens. If you see a button in the lower-right corner of the window marked Detailed
controls, click it to see the Polygon Mesh Detailed Option dialog box.
3. Set all parameters to 0 (inactive) except for the Maximum distance, edge to surface which should
be set to 0.1 and Aspect ratio which should be 1. All check buttons should be unchecked except for
Refine mesh (Figure 42). Click OK to create the surface mesh.

KUBRIX Geo/Rhino Users Manual Page 36


Figure 42: The surface meshing dialog box

4. While the original solid model is still selected, hit the <DELETE> button to delete it so the mesh is
the only remaining object in the model (Figure 43).

Figure 43: Preview of the surface mesh

5. Select the mesh and left-click on the icon marked Check located in the Geometry Fix toolbar. A
message box opens and provides global information about the mesh indicating that, among other
qualities, the mesh contains no naked edges. Naked or Free edges are edges attached to only one
polygon. The presence of naked edges indicates that the mesh is not closed.

This mesh is closed. It contains both triangular and quadrilateral polyhedra. As mentioned earlier, we
need an all-triangular meshes. Exporting it as an STL file will split quads into triangles automatically.

6. Select the mesh, select the File|Export Selected menu item and when the Export dialog box opens,
enter t3_0 for the File name and select stereolythography (*.stl) for the Save as type.
7. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open
objects are both checked. Click OK to complete the Save operation

KUBRIX Geo/Rhino Users Manual Page 37


Creating a convex blocking for 3DEC
1. To run Kubrix, left-clicking on the Kubrix icon. Select the Convex Blocking tab. Click on Default and
set the Relative offset to 1 (Figure 44). Click on the Input File button and select t3_0.stl as the
input file.

Figure 44: Convex blocking dialog box

2. Click on Compute to create the blocking. Kubrix generates two files: kubrix_out.3dec and
kubrix_out.wrl. You can inspect the resulting model by launching a new instance of Rhino and
importing kubrix_out.wrl to visualize it.
3. You can also run 3DEC and use File|Call to read kubrix_out.3dec and display it (Figure 45).

Figure 45: 3DEC model where each block is a different color

Creating an all-hexahedral grid for FLAC3D Using KUBRIX


1. Start Rhino. Open t3_0.stl. Click on the Kubrix icon and select the Structured Hexa tab (Figure 46).
Make sure that the input file is t3_0.stl. Click on the Default button to revert to the default values of
all parameters. Please note that the output file type is .flac3d which is an ASCII format that can be
directly read into FLAC3D.

KUBRIX Geo/Rhino Users Manual Page 38


Figure 46: Kubrix Structured Hexa default values

2. Click Compute to launch the computation. The screen output is shown below.
............................................................................

Welcome to KUBRIX version 15.0.5

Copyright (C) 1995-2015 Itasca Consulting Group, Inc. All rights reserved.
............................................................................
PLI001: The input surface name is:
t3_0.stl ...
PLI007: REQUEST: STL input surface (-it stl) ...
PLI002: The output mesh file name is:
kubrix_out ...
PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ...
PLI003: The minimum mesh block resolution is 1 ...
PLI056: The blocking efficiency is 0.50 (-e) ...
PLI043: REQUEST: build a fully structured mesh (-str 3) ...
PLI044: Correct all negative Jacobian elements ...
PLI058: REQUEST: capture fillets (-fillet) ...
ISI002: Finished reading 6300 triangles and 3148 nodes.
ISI032: Checking for surface self-intersection ...
ISI014: Sharpest wedge 161 deg @ (4.785e+001,9.987e+000,-3.523e-001)
MGI066: Feature refinement: final triangles count 6412 ...
MGI068: Fuzzy-logic block decomposition ...
MGI037: Done. 33/1 iters beta 0.000100, sp 15, st 2.16e+001 ...
MGI001: Block decomposition completed (37) ...
MGI013: Volume decomposed into 37 blocks and 1 material...
MGI033: First check ........ 4 elems (10%) need Jacob. correction
MGI018: Final check ........ all Jacobians are positive.
MGI012: Output mesh contains 37 hex elements ...
MGI012: Output mesh contains 96 vertices ...
MGI012: Output mesh contains 1 material ...
MGI054: Max. edge offset ... 5.58e+000 u between nodes 78, 79
MGI057: Max. non-dim offset 0.4097 between nodes 37, 40
MGI018: Final check ........ all Jacobians are positive.
MGI021: Max. edge length ... 1.07e+002 u between nodes 39, 48
MGI052: Min. edge length ... 6.86e-001 u between nodes 47, 48
MGI020: Max. aspect ratio .. 1.56e+002 at element 22
............................................................................
MGI031: Writing a VRML file ...
MGI067: Writing a FLAC3D file ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MGI999: Successful termination of KUBRIX in 4.9 seconds!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

KUBRIX Geo/Rhino Users Manual Page 39


3. KUBRIX generates two files: kubrix_out.flac3d and kubrix_out.wrl. You can import kubrix_out.wrl
in Rhino to examine it, or for a more in-depth inspection of the grid launch FLAC3D and use
File|Import grid to read kubrix_out.flac3d (Figure 47).

Figure 47: View of the grid in FLAC3D containing 33 zones and 84 vertices

By default, KUBRIX builds a coarse mesh. In the KUBRIX screen output, the maximum edge length in the
mesh is reported as 107. To create a finer mesh, you must specify a smaller maximum edge length.

4. Launch KUBRIX and set Max Edge Length, to 10. Set Resolution to 5 (makes sure that all details are
captured with at least 5 elements across). Set Smoothing to 1000 and click Compute (Figure 48) to
launch the hexahedral mesh generation.

Figure 48: Kubrix Structured Hexa parameter for the fine mesh

5. In FLAC3D, use File |Open to read the kubrix_out.flac3d grid file (Figure 49).

KUBRIX Geo/Rhino Users Manual Page 40


Figure 49: Flac3D grid containing 20,125 zones and 23,034 vertices

Creating a tetrahedral grid for FLAC3D Using KUBRIX


6. Start Rhino. Open t3_0.stl. Run the Kubrix program by clicking on the Kubrix icon. Select the
Tetrahedral meshing tab (Figure 50).

Figure 50: The tetrahedral meshing dialog box

7. Click on the button marked Default, then on Compute to create a tetrahedral grid. Read
kubrix_out.flac3d in FLAC3D to see your grid (Figure 51).

KUBRIX Geo/Rhino Users Manual Page 41


Figure 51: An all tetrahedral grid

8. To build an unstructured hexahedral grid (tetrahedra split into hexahedra) , use the Tetrahedral tab,
click on default but also check Tetra Split. View the resulting unstructured hexahedral grid in
FLAC3D (Figure 52).

Figure 52: An unstructured hexahedral grid

Creating octree grids for FLAC3D or blocks for 3DEC


See "Creating Octree mesh of the capped model, with stratified soil", page 31, for a description of
octree grids.

1. Start Rhino. Open t2_0.stl. Run the Kubrix program by clicking on the Kubrix icon. Select the Octree
Meshing tab (Figure 34).
2. You can use octree meshing for both 3DEC and FLAC3D model generation. Click on Default, select
3DEC for the output type and click on Compute to create the blocking.

KUBRIX Geo/Rhino Users Manual Page 42


Figure 53: Octree meshing dialog box

3. Kubrix generates a file called t3.3dec. Run 3DEC 4.0 and use File|Call to read t3.3dec and display it
(Figure 54).

Figure 54: Coarse octree blocking where blocks intersecting the boundary have been masked

4. To obtain a finer FLAC3D grid, run Kubrix , select the Octree Meshing tab, click on Default, select 7
for the Octree level, select FLAC3D as the output type and click on Compute to create a file called
t3.flac3d
5. Run FLAC3D, import t3.flac3d and display it (Figure 55).

KUBRIX Geo/Rhino Users Manual Page 43


Figure 55: An octree FLAC3D mesh using an octree level of 7. Group 2 has been masked for clarity purposes

Creating a FLAC3D or a 3DEC model featuring sequential excavation


1. Start Rhino and open t3_0.3dm. Double-click the label of the Top view to maximize this view.
Right-click on the icon marked Wireframe Viewport to see a wireframe representation.
2. Select the model and left-click the icon marked Explode. This operation which is the reverse of the
Join operation breaks up the model into 8 separate surfaces (Figure 56, left). Left-click on the icon
marked ColoriseAllObjects to give each surface a different color. Select the main tunnel (the
horizontal one in the figure), left-click the icon marked Hide Objects, hold the mouse button down
and select Invert Selection and Hide Objects to see the main tunnel alone (Figure 56, right).

Figure 56: Top view of the branching tunnels (left) and main tunnel, alone, after the Explode and ColorizeAllObjects
command (right)

3. Select Curve|Line|Single Line. Enter -30,30 followed by <ENTER> to define the first point of a
vertical line. Enter -30,-30 followed by <ENTER> to complete the line. This line will be used to split
the main tunnel.
4. Select Edit|Split, select the main tunnel for Objects to Split followed by <RETURN>. Select the
vertical line for the Cutting Object, followed by <RETURN> to finish splitting the main tunnel with
the vertical line. Click on the icon marked ColorizeAllObject to see the two parts of the tunnel
(Figure 57, left).

KUBRIX Geo/Rhino Users Manual Page 44


5. Double-click the label of the Top view to return to a 4-view representation of the model. Double-
click the label of the Perspective view to maximize that view. Select the left portion of the tunnel,
left-click the icon marked Hide Objects, hold the mouse button down and select Invert Selection
and Hide Objects to see the left portion of the tunnel alone (Figure 57, right). Note the line used to
cut the main tunnel in two.

Figure 57: Top view showing line along which the tunnel will be cut (left) and perspective view of the portion of the main
tunnel after hiding the right portion (right)

6. Delete the line that was used to cut the tunnel. Select Curve|Curve From Objects|Duplicate Edge.
Left-click on the newly cut edge of the tunnel to extract the circle representing that edge (Figure 58,
Left). Select the edge and select Surface|Planar Curves to create the circular surface bounded by
the circle (Figure 58, Center). This surface represents an excavation front dividing the tunnel into
two regions. Right-click on the Icon marked Show Objects, then right-click on the icon marked
Shade All Viewports. When Choose Shade Settings appears on the command line click on the word
DisplayMode and select Ghosted to see a transparent view (Figure 58, Right).

Figure 58: Extracting the circular edge of the cut tunnel (Left), creating a planar wall representing an excavation front
(Center) and the complete model with the internal wall (Right)

Before the addition of the internal wall, the model was composed of one closed volume, namely the
volume comprised between the tunnels and the outer box. The addition of an internal wall did not add
to the number of closed volumes. For Kubrix to treat the interior of the tunnels as groups, you must

KUBRIX Geo/Rhino Users Manual Page 45


close the tunnels at their three openings. This will result in two groups in the tunnels and one group
outside

7. In the Perspective view, right-click on the label of the Perspective view and select Set
View|Perspective to set the current view to the default axonometric view. Select Curve|Curve
from Object|Duplicate Edge and click on the two visible tunnel openings (Figure 59, Left).
8. Hit the Right Arrow () a few times to rotate the model around the z-axis and expose the tunnel
opening located on the other side of the model, and select it (Figure 59, Center). Hit <ENTER> to
indicate that you have finished extracting the three curves.
9. While the 3 curves are still selected select Surface|Planar Curves to create three circular surfaces
spanning each selected curve (Figure 59, Right).

Figure 59: Extracting the curves representing tunnel openings (Left and Center) and creating the additional surfaces that cap
the tunnels (Right).

10. Select Edit|Select Objects|All Objects to select all the surfaces constituting the model. Click on the
icon marked NonManifoldMerge to create a single closed and non-manifold polysurface. Please
note that by selecting all objects you may have selected a number of curves. This doesnt matter
since the NonManifoldMerge command operates only on surfaces and polysurfaces.
11. Select the model and hit the <F3> button to open the Properties box. Click on the button marked
Details to see a description of your model as:

Geometry:

Valid polysurface.

Closed nonmanifold polysurface with 13 surfaces.

One or more surface normals are not oriented.

Please note that your model is now a non-manifold polysurface on account of the many edges where
more than two surfaces meet.

KUBRIX Geo/Rhino Users Manual Page 46


12. Select the model and select Mesh|From NURBS Objects (If the Polygon Mesh Options dialog box
comes up click on the button marked Detailed Controls). When the Polygon Mesh Detailed Options
opens, use the same values as you did before, namely, set all parameter to 0 (inactive) except for
the Maximum distance, edge to surface which should be 0.1 and Aspect ratio which should be 1. All
buttons should be unchecked except for Refine mesh. Click OK to create the surface mesh.
13. The mesh you have created contains a number of quadrilateral elements. Select the mesh and click
on the icon marked Triangulate Mesh to turn quadrilateral elements into triangles (Figure 60).
14. Select the mesh. Select File|Export Selected and save the mesh as an ASCII STL file called t2_1.stl.

Figure 60: Mesh of the model featuring an internal wall in the main tunnel

15. Run Rhino. Read in t2_1.stl. Click on the Kubrix icons and select the Hexahedral Mesh Generation
tab. In the Mesh parameters section of the dialog box, check the square marked Max Edge Length,
and enter 10 in the corresponding field. In the same section, choose a Resolution of 5 to make sure
that all details are captured with at least 5 elements across. Set Structure of the mesh to 3 to
create a fully-structured mesh and Nb. Of Surface Smoothing Iterations to 500. Click Compute to
launch the hexahedral mesh generation. Make sure that the input file is t2_1.stl.
16. Run FLAC3D, click on the Command Window to activate it. Select File|New to remove the existing
model, followed by File|Import Grid. Read t3.flac3d into FLAC3D and display it (Figure 49).

Figure 61: Flac3D grid containing 36504 zones. The model has now 3 groups. Group 3 has been masked to show that the
tunnel is now zoned and features an internal wall

END OF TUTORIAL 3

KUBRIX Geo/Rhino Users Manual Page 47


Tutorial 4: Mesh cleanup and de-featuring (Geo/Hex)
In this tutorial, you will learn to clean up an existing triangular definition of a complex mine available as
a DXF file (Figure 62) and create a FLAC3D and a 3DEC model for analysis.

Figure 62: geometry of a mine

Startup and reading, joining and centering the model around the origin
1. Startup Rhino, read Tutorial4.dxf, and double-click the label of the Top view to maximize it.
2. Moving the mouse around the screen and looking at the coordinates in lower-left corner of the
screen (Figure 63) you may note that the model is far from the origin. This is problematic since it
limits the number of significant digits available for all sorts of geometrical calculations. It is good
practice to translate the model and center it on the origin of the coordinate system.

Figure 63: Top view of the model

3. Curve|Line|Single Line, enter 10400,90800,0 for the for the Start of line, and 0 for the End of line.
Zoom out in the Perspective view to see the line you have just created. Select the line, left-click on

KUBRIX Geo/Rhino Users Manual Page 48


Edit layers, hold the button down until a new set of icons open. Select the icon Change object
layer. This opens the Layer for objects dialog box. Click New, enter TranslationLine for the name of
the new layer and click OK to place line in the layer TranslationLine.
4. Select the mesh and select Transform|Move in the menu bar. Click on the first end of the line for
the coordinates of the Point to move from, followed by <ENTER>. Click on the second end of the
line for the coordinates of the Point to move to. The mesh is now nearly centered on the origin.
And, for your own record, you have the translation vector appearing as a line in its own layer called
TranslationLine.
5. In the Layers Panel, turn off the light bulb in front of the TranslationLine layer. In the Perspective
view, click on the Zoom Extents to find the model at its new location.

Automatic sewing of neighboring free edges


1. To check the mesh for pathological triangles, click on Check icon located in the Geometry fix
toolbar.

This is a bad mesh.

Here is what is wrong with this mesh:


Mesh has 1 non manifold edge.
Skipping face direction check because of positive non manifold edge count.

Important things to consider with this mesh:


Mesh has 89 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.
Mesh has 4 pairs of faces that intersect each other. Although this does not
necessarily mean that the mesh is bad, it can cause problems if you're doing mesh boolean operations with it.

General information about this mesh:


Mesh does not have any degenerate faces.
Mesh does not have any extremely short edges.
Mesh does not have any duplicate faces.
Mesh does not have any disjoint pieces.
Mesh does not have any unused vertices.

Below are a few definitions to help interpret this message:

Degenerate faces are faces made up of 0-length edges, resulting in a null-area face.

Naked edges or free edges are edges attached to a single triangle. The presence of naked edges means
that the volume defined by the surface mesh is not not watertight.

Duplicate faces are just that: extra copies of the same face at exactly the same location. Automatic
mesh generation with Kubrix requires the input surface to be free of duplicate faces.

Non-manifold edges are edges attached to more than two triangles: in other words, more than 3
triangles attached to the same edge. Non-manifold edges may exist by design (for example, when a wall
partitions a tunnel in two) but, in the present example, their presence indicates problems with the
geometry.

KUBRIX Geo/Rhino Users Manual Page 49


2. Select the mesh and click on the icon marked Match mesh edges in the Mesh Tools toolbar.
3. The command MatchMeshEdges has 3 options. Type d or move your cursor over the word Distance
to highlight it, and then click on it to activate the Distance to adjust option. Enter 0.1 and hit
<RETURN>. Hit <RETURN> again to complete the merging of matching edges that are at most
separated by 0.1 meters. This is a fairly large tolerance but it operates on edges that are fairly
parallel to each other. High values of the merge distance tolerance may introduce distortions in the
mesh.
4. To check the mesh again, click on Check icon located in the Geometry fix toolbar.

This is a good mesh.

Important things to consider with this mesh:


Mesh has 17 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.

General information about this mesh:


Mesh does not have any degenerate faces.
Mesh does not have any extremely short edges.
Mesh does not have any non manifold edges.
Mesh does not have any duplicate faces.
Mesh does not have any faces with directions different from the mesh as a whole.
Mesh does not have any self intersecting faces.
Mesh does not have any disjoint pieces.
Mesh does not have any unused vertices.
The number of naked edges has dropped from 89 to 17.

Removal of degenerate, duplicate, non-manifold and isolated triangles


1. To remove all degenerate faces, if there are any, select the mesh and click on the icon marked Cull
degenerate mesh faces in the Mesh tools toolbar.
2. To remove all duplicates faces, if there are any, select the mesh and click on the icon marked
Extract mesh toolbar located in the Mesh tools toolbar. Hold the button down to open the Extract
mesh toolbar. Click on the icon marked Duplicate faces. All duplicate faces will be highlighted. Hit
<DELETE> to eliminate them.
3. To remove all isolated triangles directly connected to non-manifold edges, in the Rhino command
window, type ExtractNonManifoldMeshEdges, followed by <RETURN>. When the
ExtractHangingFacesOnly option appears, click on it and set it to YES. Click on the mesh to highlight
them. Hit <DELETE> to get rid of all isolated triangles attached to non-manifold edges.
4. To remove all triangles connected to non-manifold edges, select the mesh and in the Rhino
command window, type ExtractNonManifoldMeshEdges, followed by <RETURN>. Delete the
highlighted triangles if there are any.
5. Select the mesh and click on Split disjoint mesh in the Mesh Tools toolbar. This operation splits
disconnected triangles into separate mesh entities so you can select them individually.
6. If the splitting operation results in more than one mesh, select the main mesh, left-click on the
Visibility icon, hold the mouse down and select Invert selection and hide objects. This selects the
smaller disjoint pieces. Hit <DELETE> to eliminate them.
7. Right-click the Visibility icon to unhide everything and Check the mesh again:

KUBRIX Geo/Rhino Users Manual Page 50


This is a good mesh.
Importants thing to consider with this mesh:
Mesh has 17 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.

Automatic closure of all nearly planar open holes


1. Select the mesh and right-click on the icon marked Fill all holes in mesh, located in the Mesh Tools
toolbar. This operation identifies holes that can be closed automatically without any ambiguity.
2. As described above, remove any degenerate, duplicate, non-manifold and disjointed faces (if there
are any) and Check the mesh:

Importants thing to consider with this mesh:


Mesh has 2066 faces that could make it better if their directions were flipped. Although this does not
necessarily mean that the mesh is bad, it can cause problems if you're doing meshManual repair and closure of the remaining open
holes
3. Select the mesh and click on the icon marked Unify mesh normals located in the Mesh toolbar. This
function makes sure that adjacent triangles are oriented in a consistent manner. Rechecking for
errors results in:
This is a good mesh.

General information about this mesh:


Mesh does not have any degenerate faces.
Mesh does not have any zero length edges.
Mesh does not have any non manifold edges.
Mesh does not have any naked edges.
Mesh does not have any duplicate faces.
Mesh does not have any faces that could make it better if their directions were flipped.
Mesh does not have any disjoint pieces.
Mesh does not have any unused vertices
4. Double-click the label of the Top view to toggle back to 4-view. Click on the icon marked Zoom
extents to get a full top view of the mesh (Figure 64).

Figure 64: corrected mesh

Removal of artifacts due to triangulation noise: de-featuring.


One could build a model with KUBRIX based on this closed triangular mesh but this model contains many
unwanted details that will produce a very complex and possibly highly distorted mesh resulting in a
model that will be very inefficient. De-featuring consists in removing surface features caused by bad

KUBRIX Geo/Rhino Users Manual Page 51


triangulation (triangulation noise) and not intended to be actual design features. Folds or isolated
triangles making sharp angles with their neighbors unduly stress the mesh generation algorithm and at
best result in meshes that have too many elements and/or very small elements resulting in tiny time
steps. In the worse case, triangulation noise results in the failure of the automatic mesh generation
algorithm. The removal of triangulation noise is akin to low-pass filtering of the geometry.

We will use a feature of Rhino called Extract Connected Mesh Faces. Given a seed triangle, this feature
extracts all faces connected to the seed triangle and their neighbors through smooth wedges (dihedral
angles less than a specified threshold). In this fashion, it is possible to extract isolated triangles and
delete them.

1. Chose the Top View and click on the icon marked Zoom extents to get a complete view of the mesh.
Click on Shaded viewport. Click on the icon marked Extract Mesh Toolbar, then click on the icon
marked Connected faces.
2. Click on any triangle on the surface of the mesh. The triangle will be highlighted and the Extract
Connected Mesh Faces dialog box will open. The field marked Angle between contains the value 0.
This means that currently all triangles connected to the highlighted triangle through dihedral angles
less or equal to 0 are highlighted. Since there are none, only the selected triangle is highlighted.
3. Left-click in the field marked Angle between and use the up arrow next to it or your mouse wheel to
increase its value. You will notice that as you increase the angle, the patch of candidate triangles
expands in size.
4. Enter 170 for the angle and note that almost the totality of the mesh is highlighted (Figure 65).

Figure 65: Using Extract Connected Mesh Faces to "defeature" the mesh

5. Click OK, select the mesh and click on the icon marked Hide object. Left-click on Zoom Extents to
see the two small slivers remaining in the mesh (Figure 66). These triangles were connected to the
rest of the mesh through angles greater than 170 and clearly represent bad triangles.

KUBRIX Geo/Rhino Users Manual Page 52


Figure 66: Slivers remaining on the screen after the main mesh is hidden

6. Zoom away then select all the bits and pieces and delete them. Right-click on the icon marked
Show objects to unhide everything.
7. Select the mesh and use the Check icon to diagnose the mesh:

Mesh has 6 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.

8. Removing the bad triangles has resulted in several naked edges. Note that using Fill holes is the
reverse of triangle removal and will recreate the triangles you have just removed. Instead, Match
mesh edges will treat all holes as gaps and will close them by joining neighboring edges without
adding triangles. This is what we want.
9. Select the mesh and click on Match mesh edges. In the command line, make sure that
DistanceToAdjust is still 0.1, if not click on the word DistanceToAdjust and set it. Hit <RETURN> to
complete the edge matching.
10. Check and notice that there remain no naked edges.

The preceding steps may be repeated with a smaller angle to remove less and less prominent features
from the model

11. Again, click on the icon marked Extract mesh Toolbar, and then click on the icon marked Connected
faces. Click on a triangle on the mesh and, this time; select an angle of 120.
12. Click on OK to select all the highlighted triangles and click on Hide object to hide them. What is left
is shown in Figure 67.

KUBRIX Geo/Rhino Users Manual Page 53


Figure 67: Perspective view of all isolated groups of triangles

13. Click on any triangle and note that everything is highlighted. This means that they are all part of a
single mesh. Click on the icon marked Split disjoint mesh in the Mesh tools toolbar. This operation
turns disconnected groups of triangles into independent mesh entities so you can select each group
of triangles individually.

Groups of connected triangles that represent actual features should not be deleted. Only unconnected
isolated triangles need to be deleted.

14. While holding the Shift button click on groups of triangles (in the present case, we have only one big
piece) to select and hide them by clicking on the icon marked Hide object. What are left are the
isolated triangles shown in Figure 68. Delete the triangles that are left.

Figure 68: Selecting large recognizable groups of triangles and living isolated triangles

15. Right-click on the button marked Hide object to unhide everything. Since the complete mesh is now
a collection of several parts (recall that we used Split Disjoint Mesh to separate the mesh into many
parts and hid the main part as well as several large groups of triangles) it is necessary to rejoin all

KUBRIX Geo/Rhino Users Manual Page 54


the parts. Use <CTRL> < A> to select all parts and <CTRL> < J> to join all the meshes into one single
mesh. Checking the mesh shows naturally that there are number of naked edges due to the
removed triangles.

Mesh has 48 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.

16. Again, as was done earlier, select the mesh and click on Match mesh edges. In the command line,
make sure that DistanceToAdjust is 0.1, if not click on the word DistanceToAdjust and set it to 0.1.
Hit <RETURN> to complete the edge matching.
17. Check and notice that there are some non-manifold and naked edges.

Mesh has 47 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.

18. One more time, remove connected faces, this time using a threshold angle of 60, hiding large
pieces of connected triangles. Continue selecting and hiding large connected pieces until what is
left is a collection of isolated triangles (Figure 69). What is left represents islands of triangles
connected to their neighbor by dihedral angles larger than 60, This does not mean that all these
triangles represent noise. Simply, by removing them, we create holes which need to be examined
closely to assess whether they were wanted features or triangulation noise.

Figure 69: Triangles left after all groups of triangles connected through 60 or less have been removed

19. Delete the remaining isolated triangles.


20. Unhide everything and join all the connected pieces into a single mesh.

Please note, this time, that using match mesh edges with a tolerance of 0.1 will not close any of the
gaps because the triangles that have been removed are larger than the tolerance. Increasing the
tolerance may cause distortions in the geometry. It is therefore advisable to close holes manually.

21. Checking mesh for errors shows:

KUBRIX Geo/Rhino Users Manual Page 55


Mesh has 54 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.
22. Select the mesh and left-click on the icon marked Show edges. When the Edge analysis dialog box
opens, make sure that Naked edges is checked. Click on Zoom to highlight every naked edge in your
model (Figure 70).

Figure 70: Highlighted naked edges

23. Click on Current in the command window to look at one particular naked edge. Zooming and
rotating the view around will give you a good view of what this naked edge looks like (Figure 71).

Figure 71: First naked edge, isolated.

24. Left-click on the icon marked Fill mesh hole to close the hole. Click on Zoom in the Edge analysis
dialog box, and then click on Current in the command line to see the next available naked edge.
Rotate around and zoom to get a better view (Figure 72, top, left).

One could close this hole automatically but by removing and reconstructing the triangles around the
hole, some of the noisy artifacts can be removed, resulting in a simpler mesh that is less likely to cause
trouble during mesh generation with Kubrix.

KUBRIX Geo/Rhino Users Manual Page 56


25. Left-click on the icon marked Delete mesh faces and click on the 3 triangles adjacent to the hole
(Figure 72, top, right). Hit <RETURN> to delete the selected triangles (Figure 72 bottom, left).
26. Left-click on the icon marked Single mesh face and click on the top 3 vertices, followed by
<RETURN> to complete the creation of a single triangle. Create a second triangle, this time using
the 3 remaining vertices (Figure 72, bottom, right).

Figure 72: top, left, the next naked edge. Top, right, the highlighted triangles will be removed to reconstruct the area of the
hole. Bottom, left, the triangles have been removed. Bottom, right, the triangle have been reconstructed.

After closing each hole, click on zoom (in the Edge analysis dialog box) and click on Current on the
command-line. Continue this hole closure process until the last hole is closed.

Saving the closed triangular surface as a formatted (ASCII) STL file


1. Save the model as a Rhino model called tutorial4.3dm.
2. Select File|Export selected to export the model as an STL file named tutorial4.stl. After you click
OK, in the STL Export Options dialog box, check Ascii to make sure that a formatted STL file (and not
a binary file) is produced.

Using the Kubrix surface diagnostics to identify and repair mesh self-
intersections.
As the Kubrix tetrahedral mesh generator runs, it opens a command window on your screen showing
the various stages of mesh generation. Kubrix conducts several diagnostics on the input surface, one of
which is the detection of triangle-triangle intersections. Every such intersection is listed with the x, y, z
coordinates of the point of intersection. If there are intersections, you can use these coordinates as a
guide to locate them in the Rhino model.

KUBRIX Geo/Rhino Users Manual Page 57


If Kubrix indicates any triangle-triangle intersection, use Rhino to locate the problem area as follows.

1. Start Rhino and open the tutorial4.stl. Run the Kubrix program by clicking on the Kubrix icon. Select
the Tetrahedral meshing tab and click on the button marked Default then on Compute.
2. In Rhino, click on the label of the Top view and select the Curve|Polyline|Polyline menu item.
Select and copy one of the x,y,z coordinates from the KUBRIX window and paste it on the Rhino
command line, followed by <ENTER>. This specifies one end-point of a line segment. Left-click
anywhere else outside the model to define a second point of the segment. Hit <ENTER> to
complete the creation of the line segment. The line segments points to the trouble spot.
3. Examine the mesh near the end-point of the segment and repair any anomalies you see.

Creating a box representing the computational volume


The previous runs of Kubrix were carried out to diagnose the surface. Now that we are satisfied with
the quality of the surface, we must create a box around the tunnels so there are zones both inside the
tunnel and in the surrounding rock.

1. To create a box containing the model, select the menu item Mesh|Polygon mesh primitives|Box.
When Rhino asks for the coordinates of the First corner of the mesh, click on the options XFaces,
YFaces and ZFaces and set them all to 1.
2. Enter -480,220,200 followed by <ENTER> for the coordinates of the first point.
3. Enter -280,320,200 followed by <ENTER> for the coordinates of the second point.
4. Enter 50 for the height followed by <ENTER> to complete the box which a quad mesh with 1
element along each edge. Select the mesh and click on the icon marked Triangulate Mesh (Figure
73).

Figure 73: Model in a box

5. Save the entire Rhino model as tutorial4.3dm (for future reference) and export it as an ASCII STL file
called tutorial4.stl.

KUBRIX Geo/Rhino Users Manual Page 58


Reading the STL file into KUBRIX and automatic Structured Hexa
1. Run the Kubrix program by clicking on the Kubrix icon. Select the Structured Hexa and make sure
that the input file is set to tutorial4.stl.
2. To create a FLAC3D model, click on Default, set the Max Edge Lengthto 5, the Resolution to 2 and
the Nb. Of surface smoothing iterations to 500 (Figure 74), and click on Compute by launch mesh
generation.

Figure 74: Tetrahedral meshing parameters needed to create a FLAC3D model

Kubrix produces the output shown below:

Welcome to KUBRIX version 11.3

Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved.


............................................................................
PLI001: The input surface file name is:
C:/Users/Sina/Documents/Visual Studio 2005/Projects/kubrix/Manuals/t
utorial4.stl ...
PLI007: REQUEST: STL input surface (-it stl) ...
PLI002: The output mesh file name is:
kubrix_out ...
PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ...
PLI023: REQUEST: block resolution is 2 (-n) ...
PLI033: REQUEST: 500 surface smoothing iterations (-m) ...
PLI030: REQUEST: max. element size is: 5.000000e+000 (-s) ...
PLI056: The blocking efficiency is 0.50 (-e) ...
PLI042: A block-structured mesh is built (-str 2) ...
PLI044: Correct all negative Jacobian elements ...
ISI002: Finished reading 1950 triangles and 979 nodes.
MGI066: Feature refinement: final triangles count 5694 ...
MGI068: Fuzzy-logic block decomposition ...
MGI037: Done. 48/1 iters beta 0.000100, sp 45, st 1.75e+001 ...
MGI001: Block decomposition completed (1050) ...

KUBRIX Geo/Rhino Users Manual Page 59


MGI028: Volume decomposed into 1050 blocks and 2 materials...
MGI043: Block resolution enforced (8400) ...
MGI048: Global size enforced, round 0 (49647) ...
MGI033: First check ........ 38 elems (0%) need Jacob. correction
MGI018: Final check ........ all Jacobians are positive.
MGI082: Block reduction complete (49647)...
MGI012: Output mesh contains 49647 hex elements ...
MGI012: Output mesh contains 54400 vertices ...
MGI012: Output mesh contains 2 materials ...
MGI054: Max. edge offset ... 1.96e+000 u between nodes 403, 5888
MGI057: Max. non-dim offset 0.6552 between nodes 88, 2002
MGI033: First check ........ 5 elems (0%) need Jacob. correction
MGI018: Final check ........ all Jacobians are positive.
MGI021: Max. edge length ... 5.99e+000 u between nodes 96, 23372
MGI052: Min. edge length ... 2.11e-001 u between nodes 2467, 2469
MGI020: Max. aspect ratio .. 2.08e+001 at element 28275
............................................................................
MGI031: Writing a VRML file ...
MGI067: Writing a FLAC3D file ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MGI999: Successful termination of KUBRIX in 122.3 seconds!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The resulting kubrix_out.flac3d file represents a zoning of both the inside and outside of the mine. It
contains 2 materials (inside and outside the tunnels) and 49,647 zones. It can be read into FLAC3D using
the File|Grid|Import (Figure 74).

Figure 75: FLAC3D mesh generated by KUBRIX

3. To create a 3DEC block model, launch Kubrix, select the Convex Blocking tab and click on Default.
4. Enter 3dec in the Output type field (Figure 76).

KUBRIX Geo/Rhino Users Manual Page 60


Figure 76: Tetrahedral meshing parameters needed to create a 3DEC model

5. Click on Compute to launch Kubrix:

............................................................................

Welcome to KUBRIX version 11.3

Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved.


............................................................................
PLI001: The input surface file name is:
C:/Users/Sina/Documents/Visual Studio 2005/Projects/kubrix/Manuals/t
utorial4.stl ...
PLI093: REQUEST: generate tetra blocks: optimal size
PLI007: REQUEST: STL input surface (-it stl) ...
PLI002: The output mesh file name is:
kubrix_out ...
PLI094: REQUEST: output type is 3DEC (-ot 3dec) ...
PLI092: The maximum relative offset is 100.0000 (-offset)...
ISI002: Finished reading 1950 triangles and 979 nodes.
MGI093: Remeshing surface prior to blocking...
MGI088: Surface remeshing completed...
MGI096: Remeshed surface contains 286 triangles ...
MGI096: Remeshed surface contains 147 nodes ...
MGI091: Generating blocks..
MGI092: Blocking completed...
MGI012: Output mesh contains 1153 tetra elements ...
MGI012: Output mesh contains 230 vertices ...
MGI012: Output mesh contains 2 materials ...
MGI031: Writing a VRML file ...
MGI095: Writing a 3DEC POLY file ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MGI999: Successful termination of KUBRIX in 12.0 seconds!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The resulting tutorial4.3dec4 model is composed of 1,153 coarse tetrahedral blocks. It can be read into
3DEC version 4 as a data file.

KUBRIX Geo/Rhino Users Manual Page 61


Figure 77: 3DEC blocking

END OF TUTORIAL 4

KUBRIX Geo/Rhino Users Manual Page 62


Tutorial 5: Model from contour lines (Geo/Hex)
In this exercise, you will learn to construct a model of an open pit by manually tracing over topographic
contour lines to simplify the geometry (Figure 78)

Figure 78: Simplified model obtained by tracing over contour lines shown (top) and final 3DEC model (bottom)

Startup and manual retracing of contour lines


1. Start Rhino, select Large Objects, Meters for your template, and select File|Import to read in
Tutorial5.dxf.
2. Type SetWorkingDirectory in the command line and set your working directory to your current
working directory.
3. In the Top view, zoom in, in order to see and highlight the contour line representing the floor of the
pit (Figure 79).

KUBRIX Geo/Rhino Users Manual Page 63


Figure 79: The highlighted contour line represents the floor of the pit.

4. While the floor contour (the innermost) is selected, left click over Hide Objects and select Invert
Selection and Hide Objects (Figure 80). This tool hides everything except for what was highlighted.

Figure 80: Left-clicking and holding over Hide Objects and selecting Invert Selection and Hide Objects

5. Make sure that Object Snap is on by clicking over the word osnap at the bottom of the screen, and
make sure that Near, Point, Mid and Cen are checked (Figure 81). This ensures that while tracing
over contour lines, Polylines can snap to existing points.

Figure 81: Turning on osnap as well as End, Near, Point, Mid & Cen

6. Left-click on Zoom Extents to maximize the floor contour on your screen. Select
Curve|Polyline|Polyline and click on a starting point located preferably at the North-East corner of
the contour line in the Top view (Figure 82).

KUBRIX Geo/Rhino Users Manual Page 64


Figure 82: Building a Polyline starting from a North-East point on the floor contour.

7. Continue clicking on points, approximating the contour as you go, all the way around. For the last
point, click exactly on the first point to ensure that the resulting Polyline is closed (Figure 83).

Please note that, as you approach the starting Point, and if you have Point checked as objects to snap to
in Osnap, the word Point pops up among all the other options such as End, Int, Knot, etc. When the
word Point pops up, it is an indication that you are over the first Point you created, so you can click it to
close the curve.

Figure 83: Close-up showing the closure of the Polyline by clicking on the starting point (left), and overal view of the
completed polyline representing the floor of the pit (right)

8. Delete the original (light blue) contour line, select the Polyline you just created and select
Surface|Planar Curves to create a surface spanning across the Polyline. Delete the Polyline (Figure
84).

KUBRIX Geo/Rhino Users Manual Page 65


Figure 84: Planar surface representing the floor of the pit

9. Right-click on Show Objects to show all objects (all contour lines), and select the next (next level up)
contour line. While holding the <SHIFT> button down, select the surface representing the bottom of
the pit (Figure 85).

Figure 85: Surface (representing the floor) and the next contour line selected.

10. Left click on Hide Object, hold and select Invert Selection and Hide Object to hide everything except
the surface and the next contour line (Figure 86).

Figure 86: After Invert Selection and Hide Object, the surface and the next contour line remain

KUBRIX Geo/Rhino Users Manual Page 66


11. Select Curve|Polyline|Polyline and start tracing the next contour line, again, starting from near the
North-East corner, all around until closure (Figure 82).

Figure 87: Closure of the second contour

12. Delete the original contour line, select the Polyline you just created and select Surface|Planar
Curves to create a surface spanning across the Polyline. Delete the Polyline.
13. Right-click on Show Objects to show all objects (all contour lines), and select the next contour line.
While holding the <SHIFT> button down, select the last surfaces you created. Left click on Hide
Object, hold and select Invert Selection and Hide Object to hide everything except the surface and
the next contour line (Figure 88).

Figure 88: The 2 surfaces that have already been created and the next contour

14. After all the contours have been traced and turned into surfaces, right-click on Show All Objects and
click on the button marked ColorizeAllObjects to show all the planar surfaces representing various
benches of the pit (Figure 89). Save the model as Tutorial5.3dm. 3dm is the native Rhino file
format.

KUBRIX Geo/Rhino Users Manual Page 67


Figure 89: Perspective view of all the planar surfaces representing the benches

Creating benches
1. Select the Top view, select all surfaces and select Curves|Curves from Objects|Duplicate border to
extract the curves representing the boundaries of all the surfaces you have created. These curves
are essentially the polylines you created by tracing over the contours (Figure 90).

Figure 90: Top view of all the surfaces with all the border curves highlighted

2. To trim the highest bench, zoom in on the South-East corner of the Top view. Left-click on Shaded
Viewport, hold and click on Ghosted Viewport (Figure 91). A ghosted view renders the surfaces
semi transparent making the surfaces beneath visible.

KUBRIX Geo/Rhino Users Manual Page 68


Figure 91: Close-up of the South-East corner of the top view and selection of a Ghosted Viewport

3. Click on the edge of the surface immediately below (where the surface changes color) and select
Curve to highlight the border of the lower surface. While the curve is selected, select Edit|Trim. To
trim off the part of the top surface located inside the curve, click to the left of the highlighted curve
just inside the curve (Figure 92).

Figure 92: Selecting the boundary of the surface below the top surface (left and center) and trimming the top (purple)
surface with it, revealing the pink lower surface (right)

4. Trimming the top surface results in the final form of the top bench shown in Figure 93. The top
bench will have to be later on connected to a flat surface representing the ground.

KUBRIX Geo/Rhino Users Manual Page 69


Figure 93: Perspective view of the top bench (purple) obtained by trimming the top surface with the outer border of the
surface immediately below it

5. Hide the newly-created top bench and the curve used to trim off the top surface, adopt a Top view
and zoom in somewhere on the South-East corner (Figure 94, right).

Figure 94: Perspective (left), top (middle) and detail view of the South-East corner of the next surface (right) from which the
next bench will be trimmed. The top surface is shown in pink.

6. If the curve (representing the outer border of the surface below) is not selected, select it (as
highlighted in Figure 94, right), select Edit|Trim and click somewhere slightly to the left of the
highlighted curve to trim off the part of the top surface that is inside the curve (Figure 95).
Trimming reveals the surface below which is green.

Figure 95: Top view detail (left), full top view, showing lower surface now visible in green (center) and perspective view of
the newly created bench obtained by trimming off the portion of the purple surface located inside the border of the lower
surface (right)

KUBRIX Geo/Rhino Users Manual Page 70


7. Hide the newly-created bench and the curve used to trim off the surface, adopt a Top view and
zoom in somewhere on the South-East corner (Figure 94, right).

Figure 96: Perspective (left), top (center) and detail view of the South-East corner of the next surface (right) from which the
next bench will be trimmed. The top surface is shown in green

8. If the curve (representing the outer border of the surface below) is not selected, select it (as
highlighted in Figure 96, right), select Edit|Trim and click somewhere slightly to the left of the
highlighted curve to trim off the part of the top surface that is inside the curve (Figure 97).
Trimming reveals the surface below which is brown.

Figure 97: Top view detail (left), full top view, showing lower surface now visible in brown (center) and perspective view of
the newly created bench obtained by trimming off the portion of the green surface located inside the border of the lower
surface (right)

9. Hide the newly-created bench and the curve used to trim off the surface, adopt a Top view and
zoom in somewhere on the South-East corner and trim the top surface with the curve representing
the border of the surface below.
10. Continue this sequence of operations until you reach the floor of the pit, which is just a solid surface
and doesnt need any trimming (Figure 98). Select File|Incremental Save to save the current model
as Tutorial5 001.3dm. Each incremental save increments the last 3 digits concatenated to the root
name, Tutorial5.

KUBRIX Geo/Rhino Users Manual Page 71


Figure 98: Top and perspective view of all the benches. The benches are obtained by trimming each surface with the border
of the surface immediately below it, starting from the topmost surface representing the ground surface

Creating the bench faces


1. To create the bench faces, we must extrude each bench boundary curve vertically thus creating a
surface joining each bench with its immediate neighbor above it. In the Perspective view, zoom in
close to the top bench, select Curves|Line|Single Line and create a line by connecting any point of
the inner boundary of the top bench with the corresponding point on the outer boundary of the
bench immediately below it (Figure 99, left).
2. Select Edit|Select Objects|Surfaces to select all the surfaces in the model. Select Curve|Cruve from
Objects|Duplicate Border to extract all the curves representing the boundaries of all the benches.
3. Since we know that the benches are at regular height intervals, instead of creating each bench face
separately, we will extrude all the curves at once along the vertical line we just created. While all
the curves are still selected, select Surface|Extrude Curve|Along Curve, and click on the lower part
of the vertical line (Figure 99, right). Please note that by clicking on the lower part of the curve, you
indicate the end of the curve that represents the starting point of the extrusion.

Figure 99: Creating a vertical line joining the outer boundary curve of a bench with the inner boundary curve of the bench
immediately above it (left), and extruding all boundary curves along it (right)

4. In extruding all the curves, we may have inadvertently extruded the outer curve of the topmost
bench. The topmost bench is at the same level as the ground surface and doesnt need to be

KUBRIX Geo/Rhino Users Manual Page 72


extruded. Select the Polysurface resulting from the extrusion of the outer curve of the topmost
bench and delete it (Figure 100).

Figure 100: Overall view of all the benches and bench faces

5. Select Edit|Select Objects|Surfaces to select all surfaces, press the <SHIFT> key, hold it down, and
select Edit|SelectObjects|Polysurfaces to add all the polysurfaces to the selection. Select Edit|Join
to join all the surface and polysurfaces into a single polysurface (Figure 101). Select
File|Incremental Save to save the current model as Tutorial5 002.3dm.

Figure 101: Joining all surface and polysurfaces into a single polysurface

An alternative method of creating the benches and the bench faces


Rhino offers a command called MeshPatch which can be used to create an approximate surface defined
by a number of curves. Using MeshPatch directly with the starting DXF lines would result in a highly
detailed approximate surface and would take a long time. If you want to use MeshPatch, retrace all
the contours as you did in section 1, Startup and manual retracing of contour lines, page 63. Once all
the contours are created

1. Type in the Rhino command line the command MeshPatch, followed by <RETURN>. Rhino
responds by asking for all the curves and points through which you want the surface to pass.
2. Hide the original contours and select all Polylines resulting from retracing all the contours. Do not
select the original contours, followed by <ENTER>.
3. To the request for a closed inner boundary curve respond by <ENTER>.
4. To the request for a closed outer boundary curve, select the topmost (outermost in a top view)
curve. Rhino will compute an approximate surface passing through all the curves (Figure 102).

KUBRIX Geo/Rhino Users Manual Page 73


Figure 102: Approximate surface resulting from the use of the MeshPatch command

Please note that the resulting surface does not properly capture the critical features of pits which are
the bench and bench faces.

Creating an outer box


1. Restore Tutorial5 002.3dm to go back to the original accurate representation of benches and bench
faces.
2. Select the Top view, select Solid|Box|Diagonal, enter -1500,-1500,-1500, press <ENTER> and enter
1500,1500,0 followed by <ENTER> to create a box of width 3,000, length 3000 and height 1,500
centered around the origin. In the Top view, select the box, left-click on it and drag it on top of the
pit (Figure 103).

Figure 103: Dragging the box on top of the pit

3. Right-click on Zoom Extents All Viewports to resize all the windows at once. Click on the label of
the Front view to set it as the current view, select Transform|Align, select the box, then the pit and

KUBRIX Geo/Rhino Users Manual Page 74


press <ENTER>. On the command-line, you will see several alignment options. Click on the Top
option to align the top of the box with the top of the pit (Figure 104).

Figure 104: Box and pit after alignment

4. Select the box and select Edit|Explode to break the box up into 6 surfaces. Select the pit and the
top surface of the box, click on Hide Objects, hold and click on Invert Selection and Hide Objects
(Figure 105). Only the pit and the top surface of the box remain visible.

Figure 105: The pit and the surface representing the top of the box

5. Double-click the label of the Top view to maximize it. Click on the button marked ColorizeAllObjects
to colorize the top patch and the pit in two different colors (Figure 106, left). Select the pit and
select Curve|Curve from Objects|Duplicate Border to extract the curve representing the boundary
of the pit. Hide the pit to just leave the top surface and the pit boundary (Figure 106, center).
Select the curve and select Edit|Trim. Click inside the curve to trim off the interior of the curve
(Figure 106, right).

KUBRIX Geo/Rhino Users Manual Page 75


Figure 106: The pit and the top surface of the box (left), the pit boundary and the top of the box (center) and the result of
trimming the top surface with the pit boundary (right)

6. Unhide everything by right-clicking on Show Objects, delete everything other than surfaces and
polysurfaces, select all surfaces and polysurfaces and select Edit|Join to join everything into one
single polysurface representing the pit, the ground, the walls and the bottom of the box (Figure
107). Select File|Incremental Save to save the current model as Tutorial5 003.3dm.

Figure 107: Model of the whole pit

Creating a surface mesh


1. Select the polysurface you created and select Surface|Edge Tools|Show Edges. If the model had
any naked (free or unconnected) edges, the naked edge would be highlighted. Note that Rhino
responds by the message no naked edges on the command line.
2. Select the polysurface and select Mesh|From NURBS Object to open the Polygon Mesh Options
dialog box. If the Polygon Mesh Detailed Option box opens, click on the button marked Simple
Controls to open the Polygon Mesh Options dialog box. Move the cursor all the way to the left and
click on Preview to see the resulting mesh. Click on OK to confirm, and while the polysurface is
selected, press the <DELETE> key to delete the polysurface.
3. Select the mesh and select File|Export Selected to open the Export dialog box. Select
Stereolythography (*.stl) for the Save as Type and enter Turorial4 in the File name field, then click
OK. When the STL Export Options dialog box opens, check Ascii (this is the only STL file type Kubrix
reads) and click on OK to save an STL file.

Creating a 3DEC model


1. Click on the button marked Kubrix, click on Convex Blocking tab and click on Default. Click on Input
File and when the Select an STL File dialog box opens, select Tutorial5.stl, and then click on Open.
Click on Compute the launch the 3DEC block generation (Figure 108,).

KUBRIX Geo/Rhino Users Manual Page 76


Figure 108: The Convex Blocking dialog box prior to block generation for 3DEC

2. Open another Rhino session, or in your current Rhino, hide your model and select File|Import to
open the Import dialog box, select VRML (*.vrml, *.wrl) for Files of Type, and select the file
kubrix_out.WRL which is a VRML 2.0 model of the outer surface of the 3DEC model and which was
generated alongside a 3DEC POLY file called kubrix_out.3dec readily callable by 3DEC 4.0 and
displayed in Figure 109.

Figure 109: 3DEC model produced by Kubrix

Creating a FLAC3D model


1. Click on the button marked Kubrix, click on the Tetrahedral Meshing tab and click on Default. Click
on Input File and when the Select an STL File dialog box opens, select Tutorial5.stl, and then click on
Open. Click Compute the launch the FLAC3D mesh generation. Checking the option Split Tetras will
cause all tetrahedra to be split into 4 hexahedra creating an all-hexahedral grid for FLAC3D (Figure
110, top and bottom).

KUBRIX Geo/Rhino Users Manual Page 77


Figure 110: All-tetrahedral (top) and all-hexahedral (bottom) grid of the pit for FLAC3D

Creating an Octree model


1. Click on the button marked Kubrix, click on the Octree Meshing tab and click on Default. Click on
Input File and when the Select an STL File dialog box opens, select Tutorial5.stl, and then click on
Open. Enter 6 for the Octree Level, uncheck Intersecting Elements, enter 13100 for Box Center x, -
24100 for Box Center y, -120 for Box Center z, 2000 for Box Dimension x and Box Dimension y and
1000 for Box Dimension z (Figure 111).

KUBRIX Geo/Rhino Users Manual Page 78


Figure 111: The Octree Meshing dialog box.

2. Click Compute the launch the octree mesh generation. The Octree approach detects two separate
groups in the mesh which are illustrated in Figure 112, top.

Figure 112: Octree mesh of the pit, with (top) and without the group representing the interior of the pit (bottom)

KUBRIX Geo/Rhino Users Manual Page 79


A better Octree model
1. To reduce the number of zones in the octree mesh, we can forego of the implicit representation of
all the surfaces that are flat and along the x, y and z directions. Read into Rhino one of the
intermediate saved models called Tutorial5 002.3dm. This model represents the pit without the box
or the ground surface.
2. Select the model and select Mesh|From NURBS Objects. If the Polygon Mesh Detailed Option
dialog box opens, click on Simple Controls to open the Polygon Mesh Options dialog box. Slide the
cursor all the way to the left and click OK to create a mesh. While the Polysurface is still selected,
delete it (Figure 113).

Figure 113: The pit model (left) and the meshed model (right)

3. Select the mesh and select File|Export Selected to open the Export dialog box. Select
Stereolythography (*.stl) for the Save as Type and enter Turorial4_1 in the File name field, then
click OK. When the STL Export Options dialog box opens, check Ascii (this is the only type Kubrix
reads) and click on OK to save an STL file.
4. Click on the button marked Kubrix, click on the Octree Meshing tab and click on Default. Click on
Input File and when the Select an STL File dialog box opens, select Tutorial4_1.stl, and then click on
Open.
5. The values you entered the last time you ran an octree mesh should still be current. If not, enter 6
for the Octree Level, uncheck Intersecting Elements, enter 13100 for Box Center x, -24100 for Box
Center y, -120 for Box Center z, 2000 for Box Dimension x and Box Dimension y and 1000 for Box
Dimension z . Click on Compute to create the octree mesh (Figure 114).

KUBRIX Geo/Rhino Users Manual Page 80


Figure 114: Improved octree model, both groups shown (top), with the interior removed (bottom)

END OF TUTORIAL 5

KUBRIX Geo/Rhino Users Manual Page 81


Tutorial 6: Interactive model building for 3DEC (Geo/Hex)
So far Rhino was used to create closed triangular surfaces that are meshed by Kubrix. But Rhino can
also be used as a stand-alone tool to create VRML files that describe a 3DEC model. VRML 2.0 files can
be translated into 3DEC POLY files using VTPT.exe, a utility provided with the Kubrix installation
package.

Fundamentals
3DEC POLY files contain a description of blocks and faces. In Rhino solids may be exported as VRML 2.0
files where the individuality of each solid is preserved as a separate VRML Shape constructs. In other
words, a collection of convex solids in Rhino, can be exported as a VRML 2.0 file which can be translated
into a usable 3DEC POLY file.

Only certain Rhino operations result in solids


Splitting a Solid in Rhino does not result in two solids. Edit|Split or Edit|Trim operate on the surface
of the solid and, as such, result in unclosed surfaces. If you use Split or Trim, make sure that you use
Solid|Cap Planar Holes or some other device to close them.
Instead of Split or Trim, use Solid|Solid edit tools|Wire cut which always results in two solids.
Boolean operations among solids always result in solids.

Exporting solids as VRML 2.0 files


A VRML file represents a facetized (triangulated) surface. To create a VRML file, Rhino discretizes solids
prior to export. As a result, a solid may not be perfectly convex but its coarse facetization result may,
itself, be convex. If the solid you want to output is almost convex, when exporting it as a VRML 2.0 file
use preferably the Detailed Controls (instead of the Simple Controls) menu. Uncheck everything except
Simple plane and set everything to zero, except for the Minimum edge length which should be set to a
large value. This will ensure that curved regions of the solid will be flat in the VRML output file (Figure
115).

Figure 115: Left, this solid is not convex. Middle, during the VRML export process, the solid is facetized but the curve is
discretized with multiple segments and the result is not convex. Right, the facetization is as coarse as possible, (large
Minimum edge length) resulting in a convex VRML representation.

Exporting meshes (instead of solid) as VRML 2.0 files


If your model is not a solid model but a collection of closed surface meshes Rhino does not
automatically interpret a closed triangular surface as a solid. Instead, you have to tell Rhino that each

KUBRIX Geo/Rhino Users Manual Page 82


closed surface mesh is a solid. You can do that by using the Mesh|Mesh edit Tools|Weld function with
a weld threshold angle of 180. Weld each closed triangular mesh, individually, then export the
complete model as a VRML 2.0 file.

Translating VRML 2.0 files into 3DEC POLY file


To create a POLY file, first export the solids as a VRML 2.0 file called a.wrl. Then click on the 3DEC icon
(Figure 116) to create a POLY file called a.3dec.

Figure 116: The VRML 2.0 to 3DEC POLY file translation icon. Make sure that the VRML 2.0 file is called a.wrl. The translator
will translate it into a.3dec.

The 3DEC icon launches a script, called VTPT, which reads a VRML 2.0 file. Each Shape statement in the
VRML 2.0 file is interpreted as the start of a new 3DEC bloc. For each Shape, neighboring coplanar
triangles are assembled into polygonal faces. Faces and blocks are then written out to a POLY file
called a.3dec.

The criterion for assembling neighboring triangles into a single face is that the angle made by the
normals of two neighboring triangles should be less than 1. If you wish to change this criterion and use
a different triangle merge criterion, launch the VTPT translator on the Rhino command line. For
instance, to use a merge threshold angle of 5, in the Rhino command window type:

Run VTPT 5

If you prefer to launch VTPT outside of Rhino, open a Command prompt and type

VTPT 5

Example 1: Dynamic analysis of a Flemish bond brick wall


1. Start Rhino, use Solid|Box|Corner to corner, height to create a 0.2 x 0.1 x 0.05m brick.
2. Using Edit|Copy, Edit|Paste, Transform|Rotate and Transform|Move to create a 6-brick
repeatable module of the wall (Figure 117).
3.

Figure 117: Creating a Flemish bond wall module

KUBRIX Geo/Rhino Users Manual Page 83


4. Using Transform|Array, with an x-spacing of 0.3 and a z-spacing of 0.1 to create a complete wall.
Use Solid|Box again to create a support for the wall (Figure 117) wide enough for the bricks to fall
onto.

Figure 118: Final brick wall with support

Export the support


1. Select the support and select File|Export selected. When the Export dialog box opens, select VRML
as the Save as type and set the file name to a.
2. In the VRML Export options window, select version 2.0, and when the Polygon mesh detailed
options dialog box opens, uncheck everything except Simple planes, set all values to 0 except for
the Minimum edge length which should be set to a large number, such as 1000, and click on OK.
This will create a file called a.wrl in your working folder.
3. Click on the icon marked 3DEC to create a file called a.3dec. Rename the file to support.3dec.

Export the wall


1. Select all the wall bricks and select File|Export selected. When the Export dialog box opens, select
VRML as the Save as type and set the file name, again, to a.
2. In the VRML Export options window, select version 2.0, and when the Polygon mesh detailed
options dialog box opens, uncheck everything except Simple planes, set all values to 0 except for
the Minimum edge length which should be set to a large number, such as 1000, and click on OK.
This will create a file called a.wrl in your working folder, overwriting the previous one.
3. Click on the icon marked "Create a 3DEC POLY file from solids saved as a VRML2 file named a.wrl",
located in the KUBRIX toolbar, to create a file called a.3dec. Rename the file to wall.3dec.

Running 3DEC
Start 3DEC and call both support.3dec and wall.3dec. Double-click the block plot item to show the
model (Figure 119).

KUBRIX Geo/Rhino Users Manual Page 84


Figure 119: brick wall and support read into 3DEC 4.0

Type New in the 3DEC command window and call the following 3DEC data file (Figure 120) to simulate
the dynamics of the wall under the effect of earthquake. An x-y sinusoidal translation movement
imposed on the support wall causes the wall to collapse (Figure 121).

Figure 120: 3DEC data file for simulating the effect of earthquake on a wall

Figure 121: 3DEC simulation: Collapsed wall after 1 second.

KUBRIX Geo/Rhino Users Manual Page 85


Example 2: borehole in a block
1. Start Rhino and select Solid|Box|Corner to corner, height. Rhino asks for the location of the first
corner of the base.
2. Enter (with no blanks in between values) -4,-4,-4 then hit <ENTER>. Rhino asks for the location of
the other comer of the base.
3. Enter 4,4,4. Rhino asks for the height. Hit <ENTER> to set the height equal to the width of the box.
An 8x8x8 box is created.
4. In the top view, Select Curve|Circle|Center, radius. Click on the origin (0,0,0) to place the center of
the circle and enter 1, followed by <RETURN> to complete a Circle of radius 1 centered on the
origin.
5. Select the circle and enter WireCut in the command line.
6. Click on the Cube and hit <RETURN> twice to split the cube into two solids. Notice that the circle is
still highlighted. Hit <DELETE> to delete it.
7. Click on the button marked ColorizeAllObjects to assign different colors to the two solids.
8. Select the cylindrical core and hit <DELETE> to delete it.
9. In the Top view select Curve|Line|Single line. Enter -8,0,0 for the Start of the line, followed by
<ENTER>.
10. Enter 8,0,0 for the End of line, followed by <ENTER> ,to complete the line.
11. Click on the label of the Top view to activate it. Select the line, and select Transform|Rotate (not
Rotate 3D). Rhino responds with Center of rotation (Copy).
12. Click on the word Copy to tell Rhino that you want Rhino to rotate a Copy of your line. Rhino asks
for the center of rotation.
13. Click on the origin of coordinates in the Top view. Rhino asks for the Angle of rotation
14. Enter 22.5 to complete the rotation. Hit <RETURN>, twice.
15. Select both segments (holding down the <SHIFT> button) and select Transform|Rotate. Rhino
responds with Center of rotation (Copy).
16. Click on the word Copy to tell Rhino that you want Rhino to rotate a Copy of what you have
selected. Rhino asks for the center of rotation.
17. Click on the origin of coordinates in the Top view. Rhino asks for the Angle of rotation
18. Enter 45 to complete the rotation. Hit <RETURN>, twice. You should now have 4 lines
19. Select all 4 segments, use Copy, Paste, and a Rotation of 45 to get a total of 8 line segments
fanning out of the origin in the Top view (Figure 122).

KUBRIX Geo/Rhino Users Manual Page 86


Figure 122: The cored block and 16 line segments used to cut the block into equal pieces

20. In the Top view, select the horizontal line segments (the first one you created). Select the icon
marked Wire cut (Error! Reference source not found.). Rhino asks for a Surface.
21. While still in the Top view, select the cube. Enter <RETURN> twice to complete the cutting
operation. Left-click on the icon marked Shaded viewport, then click on the icon marked
ColorizeAllObjects (Figure 123).

Figure 123: The model after the first use of WireCut

22. In the Top view, select another line segment (inclined at 22), select Wire cut, and select the top
half of the box then hit <RETURN> twice.
23. While the same line segment is selected, select Wire cut, again, this time select the lower half of the
box then hit <RETURN> twice to cut the lower half in two, as well (Figure 124).

KUBRIX Geo/Rhino Users Manual Page 87


Figure 124: The model after cutting with the second line

24. Use WireCut repeatedly with the remaining lines and solids, solid and continue splitting until you
obtain 16 pieces (Figure 125).

Figure 125: The cored block has been cut into 16 equal sections using Wire cut

25. Select the 16 solids and use File|Export selected to export the solids as a VRML 2.0 file. In the VRML
Export options window, select version 2.0, and when the Polygon mesh detailed options dialog box
opens, uncheck everything except Simple planes, set all values to 0 except for the Minimum edge
length which should be set to a large number, such as 1000, and click on OK. This will create a file
called a.wrl in your working folder.
26. Click on the icon marked "Create a 3DEC POLY file from solids saved as a VRML2 file named a.wrl",
located in the KUBRIX toolbar (Figure 116) to create a POLY file called a.3dec. Start 3DEC, call the
file a.3dec and double-click the block menu item to see your model (Figure 126).

KUBRIX Geo/Rhino Users Manual Page 88


Figure 126: The bore model in 3DEC 4.0

END OF TUTORIAL 6

KUBRIX Geo/Rhino Users Manual Page 89


Tutorial 7: Interactive hexahedral meshing (BR)

Objective
In this tutorial you will learn in detail how to build a quality block-structured hexahedral mesh from a
CAD model described by a DXF file, the reference model. To create a mesh using BR, you must create an
assembly of 6, 5 or 4-sided Rhino solids that conforms to the reference model. The creation of such an
assembly is the objective of this tutorial. The reference model is shown in Figure 127 left. The final
hexahedral mesh is depicted to the right.

Figure 127: Reference model (left) and BlockRanger-generated mesh

Initial steps
1. Start Rhino and select Large Objects, Meters as your template. If Rhino does not ask you for a
template, File|New and select Large Objects, Meters.
2. If you have not already done so during an earlier work session, drag the content of Rhino Toolbars
and Plugins onto your Rhino5 window to install the plug-ins, menu items and icons contained in that
folder in Rhino5. The installation is permanent and you will not need to do this for later sessions.
3. in Rhino, type SetWorkingDirectory and navigate to the your current working directory. In this
fashion Rhino knows where to read, import from and save files.

Importing the geometry


1. File|Import bt.dxf, and if you are asked about the model units, enter meters. Millimeters for the
layout units is OK. You can hide the construction plane grids in all the viewports by clicking on the
Options icon to open the Rhino Options dialog box. In the left pane, in Document Properties, select
Grid and turn Show grid line and Show grid axes off.
2. Edit|Select Onjects|All Objects to select everything, and Edit|Layers|Change Object Layer. In the
Layer for objects dialog box that opens, click on New, and in the New Layer dialog box enter
reference. Click OK, and OK again to finish moving the selected lines into a new layer called
reference.
3. Select Shaded View (see subsection Thicker lines in section Setting up your work environment) and
maximize the Perspective Viewport (Figure 128).

KUBRIX Geo/Rhino Users Manual Page 90


Figure 128: The reference model

Choosing the right mesh block layout for your model


BR processes a layout of solids into a layout of mesh blocks . The present model may be decomposed
into solid blocks in many ways. The figures below show 5 different Rhino solid layouts (left) resulting in
5 mesh blocking configurations. In this tutorial you will build the layout depicted in Figure 131 which is
composed of eight six-sided solids.

Figure 129: Solid layout resulting in 5 mesh blocks

KUBRIX Geo/Rhino Users Manual Page 91


Figure 130: Solid layout resulting in 6 mesh blocks

Figure 131: Solid layout resulting in 8 mesh blocks

Figure 132: Solid layout resulting in 9 mesh blocks

KUBRIX Geo/Rhino Users Manual Page 92


Figure 133: Alternate solid layout resulting in 9 mesh blocks

Building the first solid


Below is a quick summary of the rules to follow in building solids for BR

Solids may be:


4-sided solids made of 3-sided faces
5-sided solids made of two 3-sided faces connected through three 4-sided faces
6-sided solids made of 4-sided faces
Faces may be simple faces that cannot be further exploded into simpler faces
Face sides may only be simple curves that cannot be further exploded into simpler curves

The curves in the reference model are all Polylines. Some are made of single line segments and the rest
are composed of multiple line segments and may not be used directly to build surfaces. You will need
to retrace them with arcs (Curve|Arc) or higher order curves (Curve|Free-Form|Interpolate Points, for
instance) which are simple curves.
1. Click on Osnap (Object Snap) at the bottom of the screen (Figure 134) to highlight it. Make sure that
End, Near, Point, Mid, Cen, Int, Perp, Tan, Quad, Knot and Vertex are checked, as shown below.
Grid Snap may be turned off.

Figure 134: Osnap bar

The first solid you are going to build is shown in gray in Figure 135. The details follow.

KUBRIX Geo/Rhino Users Manual Page 93


Figure 135: First solid to be built

2. Select Curve|Arc|Start, Point, End and Zoom in around the curved area and click on the left end of
the left upper eight-circle (Figure 136, left) to set the Start of arc. Note that a bubble saying End,
Int, Knot appears momentarily near the corner vertex, before you click on it.
3. Following along the same curve, click on a second vertex somewhere near the middle of the curve
(Figure 136, center). This sets the 2d point of the arc. For the End point of the arc, click on the
vertex at the upper T junction to finish the arc highlighted in Figure 136, right.

Figure 136: Building the upper curve

For complex curves, InterpCrv (Curve|Free-form|Interpolate Points) may be used. Essentially, any
curve tool in Rhino is acceptable as long as it produces a single curve, i.e. when exploded, it results in
one curve.

4. Similarly, use Curve|Arc|Start, Point, End to retrace the lower eighth-circle that parallels the curve
you just built (Figure 137).

Figure 137: Building the lower curve

KUBRIX Geo/Rhino Users Manual Page 94


5. Select the two arcs you have just built (highlighted in Figure 138, left), select Surface|Loft, use the
settings shown Figure 138, right, and click OK to build a lofted surface between the two curves
(Figure 138, right).

Figure 138: Building the first surface for the first solid

In order to build the opposite surface you first need to build a couple of construction lines...

6. Select Curve|Line|Single Line. Click on the lower-left corner of the surface you just built to set the
first point of the first construction line (Figure 139, left). Move your cursor over the vertical line
opposite the first point (Figure 139, left). As you move your cursor up and down the vertical line,
stop when a bubble with the word Perp pops up. This is the location on the vertical line where the
line you are building will be perpendicular to it. Click when Perp pops up to set the second point of
the line (Figure 139, right).

Figure 139: Building the first construction line

7. Select Curve|Line|Single Line and click on the end of the last line, then move your cursor over the
opposite vertical line and click when the bubble Perp appears Figure 140.

KUBRIX Geo/Rhino Users Manual Page 95


Figure 140: Completing the second construction line

You now have what you need to build the opposite surface.

8. To build the rectangular surface opposite the curved face you built earlier, select the two horizontal
lines highlighted in Figure 141 and use Surface|Loft.

Figure 141: Building the opposite surface

Note that the flat rectangular surface could have been created using EdgSrf, PlanarSrf or by Extruding
one of the horizontal lines.

The following sequence of operations builds the solid between the two surfaces and will be used
repeatedly throughout this tutorial.

9. Select both surfaces, then Curve|Curve from Objects|Duplicate Border (Figure 142, left). While the
two borders are highlighted, select the Surface|Loft menu item.
10. Note that Rhino responds with: Drag seam point, and the Loft preview may indicate that Rhino will
connect the red vertex to the green one (Figure 142, left). If this were the case, the lofted surface

KUBRIX Geo/Rhino Users Manual Page 96


would be twisted. To force Rhino to connect the red vertex with the blue one instead, click on the
green vertex, then on the blue one to move the destination point from green to blue (Figure 142,
right).

Figure 142: Lofting a surface between the borders of two existing surfaces

11. Hit <RETURN> and the Loft Options dialog box opens. Make sure that Straight sections and Do not
simplify are selected (Figure 143, left), and click on OK to complete the loft operation (Figure 143,
right).

Figure 143: Completing the Loft operation

12. While the two borders are still highlighted, Delete them. You now have the two initial surfaces and
a polysurface representing the lateral walls of the solid you want to build. Select the two surfaces
and the polysurface and Edit|Join to complete the creation of your first solid (Figure 144).

KUBRIX Geo/Rhino Users Manual Page 97


Figure 144: Completing the first solid

The last few steps represent essentially the sequence of operations that you will use to build the
remaining 7 six-sided solids

Building the remaining upper solids


1. Retrace the remaining 2 eighth circles (highlighted in Figure 145, left) using Curve|Arc|Start, Point,
End, then use Loft to build the surface between the two (Figure 145, left).
2. Build 3 construction lines. The first starting at the far lower back corner of the solid you built,
ending on the vertical line across and perpendicular to it ( left). The second starting at the lowest,
forward right corner of the surface you just built and perpendicular the construction line you built in
the previous step (center). The third, starting at the end of the last line and perpendicular to the
horizontal line above it (right).

Figure 145: Building a curved surface (left) and additional construction lines

3. Make sure nothing is selected, and select Surface|Loft. Click on the far-right vertical edge of the
Solid and when the Selection Menu appears (Figure 146, left), click on any of the Polysurface edge
items to select the first curve of the Loft operation (right): you have selected one curve of the Loft.

KUBRIX Geo/Rhino Users Manual Page 98


Figure 146: Selecting the correct vertical line

4. Click on the vertical line opposite the highlighted edge to specify the second curve of the Loft. Hit
<ENTER> to bring up the Loft settings dialog box. Click OK to complete the Loft (Figure 147).
5.

Figure 147: Completing the Loft operation

Building the solid between the two surfaces follows the procedure used earlier.

6. Select the opposing faces, followed by Curve|Curve from Objects|Duplicate Border, and while the
two borders are highlighted, Surface|Loft.
7. Again, the guide line in the Loft preview indicates that Rhino will connect the wrong corners (Figure
148, left). Click on any of the two white points at the ends of the guide line connecting the two
surfaces, then click on the appropriate corner so that the guide line connects the right corners
(right).

Figure 148: Lofting the two surface borders

8. Click OK to complete the loft. Delete the borders (which have remained highlighted). Select the
two end faces and the newly created lofted polysurface, and Edit|Join to complete your second
solid (Figure 149, left). Complete the third solid in the same fashion (Figure 149, right).

KUBRIX Geo/Rhino Users Manual Page 99


Figure 149: Completing the second (left) and third (right) solids

Building the lower solid layer


Three solids located immediately below the ones you just built may be created at once by extracting the
lower surfaces of the existing 3 solids and extruding them downward.

9. Look below the model and right-click on the Extract Surface icon. On the resulting command line,
click on Copy=No to change it to Copy=Yes. Click on each of the lower surfaces of the 3 solids, then
hit <Enter> to complete the surface extraction process (Figure 150).

Figure 150: Extracting copies of the 3 lower surfaces of the solids

10. While the surfaces are highlighted, Solid|Extrude Surface. Drag the cursor down to any of the 4
lower corners of the model (Figure 151, left) and click. Note that after the extrusion is complete the
surfaces remain highlighted (right). Hit <Delete> to delete them.

Figure 151: Extruding 3 surfaces at once

Only two more solids remain to be built.

KUBRIX Geo/Rhino Users Manual Page 100


11. Use Curve|Line|Single Line to build the two highlighted horizontal line segments shown in Figure
152, left. Use Curve|Line|Single Line to build a vertical line segment joining the two T-junctions
(Figure 152, right).

Figure 152: Building additional construction lines

12. Use Loft to build the vertical surface between the two highlighted horizontal construction lines
shown in Figure 153, left. Use Loft to build an additional vertical surface shown in Figure 153, right.

Figure 153: Building 2 additional surfaces

13. Left-click on the Extract Surface icon and click on the 2 cylindrical surfaces, then hit <Return>.
While the two surfaces are selected, hold the <Shift> button down and select the two small
rectangular surfaces you just built. With these 4 surfaces selected, Edit|Join them into a
Polysurface (Figure 154, left). With the Polysurface selected, select Solid|Cap planar holes to turn
it into a solid (right).

Figure 154: Building a quarter-cylinder solid. Left, the lateral surfaces. Right, the completed solid.

14. Left-click on Extract Surface and click on the larger of the two rectangular surfaces bordering the
remaining empty space (Figure 155, left). Select Solid|Extrude Surface|Along Curve and click on

KUBRIX Geo/Rhino Users Manual Page 101


any of the smaller horizontal lines perpendicular and adjacent to the extracted surface, and delete
the highlighted surface (Figure 155, right).

Figure 155: Building the last solid

Your solid model is now complete.

Verification and Cleanup


1. <Ctrl> A to select everything in your model (Figure 156). Rhino should respond with the message "8
polysurfaces, added to selection". If a number of surfaces also appear in the list, this is an
indication that as you were building the solids, you did not Join certain surfaces into solids. Find
them and join them so that you have 8 closed Polysurfaces (solids).

Figure 156: Completed model before verification

2. Select all 8 solids (by clicking on them or using Edit|Select Objects|Polysurfaces) , and select
Edit|Object Properties (F3). The Property dialog box indicates that the selected polysurfaces
constitute 8 closed polysurfaces (Figure 157). Again, if any of the polysurfaces is not closed (i.e.
not a Solid), join them into solids.

KUBRIX Geo/Rhino Users Manual Page 102


Figure 157: Property dialog box indicating that 8 closed Polysurfaces have been selected

Now, you can assign solids to various layers so that when the mesh is generated elements belong to
groups with the same names as the layers.

3. Hide all solids and delete everything else (curves, points, etc..). Unhide everything (right-click on
the light bulb icon) to recover all solids. The model now contains only solids.
4. Select the 3 upper solids, then select the Edit|Layers|Change Object Layer menu item. When the
Layer for objects dialog box opens, click on New, enter Upper solids in the New Layer dialog box,
click OK, followed by OK, again in the Layer for objects dialog box to complete the moving of the
selected solids to the Upper solids layer. Similarly, move the remaining lower solids to a new layer
called Lower solids.
5. If the Layer pane is not open, click on the Edit layers icon to open it. Click on the black square next
to the Upper solids layer and when the color chooser pops up, select Gold. Similarly, set the color
of the Lower solids layer to Lavender (Figure 158).

Figure 158: The model after the Upper solids and Lower solids layer have been specified

KUBRIX Geo/Rhino Users Manual Page 103


Running BlockRanger

1. Select All solids, and click on the Hex meshes from solids icon: located in the KUBRIX toolbar
in Rhino5, or just type BR in the command line.
2. Rhino responds with the current BR Parameters. Hit <RETURN> to accept these parameters and to
run BR.
3. If your OutputFormat parameter was set to FLAC3D, Rhino should responds with "8 solids
processed, 0 errors. Flac3d grid file was output to block_ranger.flac3d." If your working directory is
properly set, the resulting mesh file with the appropriate extension should appear in your working
directory. If you have not set it, enter SetWorkingDirectory in the Rhino command line, navigate to
your target and set it.

If a solid does not comply with the 6, 5 or 4-sided work rule or if any of the solid faces is not a 3 or 4-
sided face, the corresponding solids will remain highlighted in your Rhino model.

4. If your OutputFormat parameter was FLAC3D, start FLAC3D and select the File|Import|Grid menu
item in FLAC3D. Select block_ranger.flac3d to view your model in FLAC3D. For other output
formats, run your application and import the grid. Note that Rhino layers become groups (slot 1) in
FLAC3D (Figure 159).

Figure 159: In Rhino, solids organized in layers are processed into FLAC3D groups

5. In FLAC3D, Slot 2 contains all the blocks (Figure 160).

KUBRIX Geo/Rhino Users Manual Page 104


Figure 160: FLAC3D Slot 2 groups contains the individual mesh blocks generated by BR

6. Selecting all solids, rerunning BR and setting MaxEdgeLength to 0.05 results in the grid below.

7. Rerunning with MinEdgeResolution set to 5 results in the grid shown in Figure 161.

Figure 161: BlockRanger run with a minimum resolution of 5 instead of the default value of 3

KUBRIX Geo/Rhino Users Manual Page 105


Controlling grid density
You may noticed that MaxEdgeLength and MinEdgeResolution, which are global numbers, do not allow
for a proper control of local grid resolution. Below, you will learn how control the edge resolution of
each individual grid block.
1. Run BlockRanger with default MaxEdgeLength and MinEdgeResolution. Read the resulting
kubrix_out.wrl into Rhino and use Colorize Selected Objects to colorize all mesh blocks. Figure 162
shows the .wrl file overlaid on the solids.

Figure 162: Default BlockRanger grid wrl file overlaid on the solids

2. Click on located in the KUBRIX toolbar. This is the DupEdge (Duplicate Edge) icon, a copy of
which has been added to the KUBRIX toolbar for convenience.
3. Click on any slope edge (Figure 163), then hit <ENTER>.

Figure 163: Clicking an edge (Left) followed by <ENTER> (Right)

4. While the extracted edge is selected, hit F3 to open its Properties dialog box. Note that the Name
field is empty. Enter 5 in that field, then hit <RETURN> to register it (Figure 164).

KUBRIX Geo/Rhino Users Manual Page 106


Figure 164: Assigning an edge resolution of 5 to the selected slope edge

5. Delete the wrl mesh you read earlier by selecting Edit|Select Objects|Polygon Meshes and hitting
<DELETE>.

Note the extracted edge in Figure 165. If you select this edge, you will note that in its Property dialog
box (hit F3 if the Property box is not open) the "value" of Name property is 5.

Figure 165: Original solids and the extracted edge.

Select all solids, including any edge that you may have extracted and assigned a resolution to, and run
BlockRanger, using default values for everything. Import the resulting grid in FLA3D or simply import
the resulting wrl file into Rhino, and colorize the mesh blocks to see the effect of the assigned new mesh
resolution (Figure 166) .

KUBRIX Geo/Rhino Users Manual Page 107


Figure 166: New grid with a slope edge resolution of 5

End of the TUTORIAL No. 7

KUBRIX Geo/Rhino Users Manual Page 108


Tutorial 8: Modeling intermittent faults in mining applications (Geo)
Complex geometries including intersecting and intermittent faults may be meshed with Kubrix to
produce FLAC3D models with interfaces and 3DEC models with joints. Prior to mesh generation, all
mesh intersections must be computed. In other words, if two surface meshes intersect, the common
edge of each pair of intersecting triangles should be computed and the participating meshes should be
locally modified accordingly to take these intersections into account. In this tutorial you will learn the
following skills:

6. Extending a topography to a wider area


7. Trimming a topography and building a computational box
8. Mesh cleanup
9. Extending faults to create clean intersections
10. Intersecting meshes, methodically
11. Generating FLAC3D and 3DEC models with intermittent faults
12. Using Rhino and KUBRIX quality feedback info to correct the geometry
13. Assessing grid quality
14. Running a KUBRIX-generated model containing faults in FLAC3D
15. Running a KUBRIX-generated model containing faults in 3DEC

Importing meshes and extending the pit beyond its boundary


16. Start Rhino and read in the Tutorial8.dxf, This model includes a pit surface and two faults. Double-
click the label of the Perspective viewport to maximize it and left-click on the icon marked Shade. If
the Layers window it not already open, left-click on the icon marked Edit Layers to open it (Figure
167).

Figure 167: Shaded view of the pit and faults

KUBRIX Geo/Rhino Users Manual Page 109


Note that the model is composed of 3 layers, and that the pit geometry needs to be extended to cover
the entire computational domain.

17. In the Layers window, right-click on the Pit layer and Select Objects from the dropdown menu.
Note that Rhino responds with "6 meshes added to selection". Select the Edit|Join menu item to
join the 6 parts of the pit into a single mesh.
18. Hide the layers representing the faults and close the Layers window by right-clicking the Close
Layers icon in order to maximize the extent of the Perspective window. Left-click the icon marked
Shaded Viewport (Figure 168).

Figure 168: The pit

The pit geometry does not cover the entire computational domain. Therefore it is necessary to create a
surface that starts at the edge of the pit and fans away from it. To do so, you will use the curve
representing the outer rim of the pit mesh and expand it away from the pit.

Extension of the pit


The proposed method makes use of the Scale 2D transformation in Rhino. This is one of many ways you
can build the missing topography beyond the borders of the pit.

19. Select the Curve|Cruve from Objects|Duplicate Border. Select the mesh representing the pit, then
hit <RETURN> to extract the closed curve representing the boundary of the pit (Figure 169).

KUBRIX Geo/Rhino Users Manual Page 110


Figure 169: Extraction of the pit boundary

Note that in addition to the boundary curve an isolated line segment located in the lower right corner of
Figure 169 is also visible. This shows the existence of an internal free edge in the pit model.

20. Delete the stray curve representing the internal boundary. Select the boundary curve, left-click the
icon marked Hide Objects and hold the left mouse button down. In the Visibility toolbox, left-click
on the icon marked Invert Selections and Hide Objects so as to leave the outer boundary as the only
visible item in the view (Figure 170).

Figure 170: The outer boundary of the pit

To find a center point from which to expand the curve representing the outer boundary of the pit you
have to first build this curve's bounding box.

21. Select the outer boundary curve, select the Analyze|Bounding Box menu item and hit <ENTER> to
create the bounding box containing the curve.

KUBRIX Geo/Rhino Users Manual Page 111


Figure 171: Bounding box containing the outer curve

22. Select the bounding box and select the Analyze|Mass Properties|Volume Centroid menu item.
Delete the bounding box while it is still highlighted.
23. Select the boundary curve and select the Transform|Scale|Scale 2D menu item. Rhino responds
with Origin point (Copy). click on the word Copy (to specify that a copy of your curve is to be scaled
up leaving the original curve unchanged) then click on the point representing the centroid of the
bounding box. For the Scale Factor, enter 5, and hit <RETURN> twice (Figure 172).

Figure 172: The pit boundary and its scaled copy

24. Delete the the centroid. Select the inner curve and the outer curve by holding the <SHIFT> key
down, and select the Surface|Loft menu item. Hit <RETURN> to open the Loft Options dialog box.
25. Select Straight sections from the dropdown menu in the Style section, and check the Do not
simplify radio button in the Cross-section curve options section, then click OK to create the surface
linking the boundary of the pit with its expanded copy (Figure 173).

Figure 173: Extension of the pit

KUBRIX Geo/Rhino Users Manual Page 112


26. Delete the two curves while they are still highlighted. Select the surface and select the Mesh|From
NURBS Object menu item. If the Polygon Mesh Detailed Options dialog box opens, click on the
Simple Controls button in the lower right corner to bring up the Polygon Mesh Options dialog box.
27. In the Polygon Mesh Options dialog box, slide the cursor all the way to the right and click on OK. A
triangular mesh appears superimposed on the surface which remains highlighted (Figure 174).

Figure 174: Surface and mesh

28. Hit <DELETE> to delete the surface. Right-click the icon marked show objects to bring the pit pack
into view. Select both the pit and its extension and select Edit|Join to join them into a single mesh.
29. Select the resulting mesh and left-click on the icon marked Show Edges to open the Edge Analysis
dialog box. Make sure that the Naked edges radio button is checked so that only naked edges are
highlighted. Click on the Zoom button to highlight the naked edges of the mesh (Figure 175).

Figure 175: Edge Analysis highlighting naked edges at the junction of the pit and its extension

Note the naked edges at the junction of the pit and its extension. Such gaps were expected since the
extension was meshed separately. You will need to repair these edges.

30. If the Command window is expecting input hit <ESC> to terminate the current command. The Edge
Analysis dialog box remains active; leave it on.

KUBRIX Geo/Rhino Users Manual Page 113


31. Select the mesh and left-click the icon marked Match mesh edges. The current value of the edge
matching distance is represented by the parameter DistanceToAdjust which is currently 0.001.
Click on it and change it to 10, then hit <RETURN> to let Rhino close all the gaps in the mesh.
Clicking again on the Zoom button to note that the only remaining naked edges are at the periphery
of the extension.
32. Select the mesh, left-click and hold the icon marked Layers and select the icon Change object layer
to open the Layer for objects dialog box. Double-click the Pit layer to move the selected mesh into
the Pit layer. Close the Edge Analysis dialog box.

Specifying the computational domain


33. Left-click the icon marked Edit layers to open the Layers window. In the Layers window, click on the
light bulbs in front of Fault1 and Fault2, then right-click on the icon marked Show object to unhide
everything (in case certain items remained hidden), and zoom in on the pit (Figure 176).

Figure 176: The pit and the faults

34. Double-click the label of the Perspective view to return to four views. Double click the label of the
Top view to - the Top view. Left-click on the Shaded Viewport Icon.
35. In the Top view, select the Curve|Rectangle|Corner to Corner menu item. Enter -3000,3000
followed by <ENTER> to specify the first corner of a rectangle. Enter 3000,-3000 to specify the
second corner. This rectangle will delineate the computational box
36. Select the rectangle and select the Mesh|Mesh Edit Tools|Mesh Trim menu item. Next, click
outside the rectangle to trim everything outside the rectangle. Note that he trimming tool
continues to remain active so hit <ESC> to end the MeshTrim command (Figure 177).

Figure 177: Before (Left) and after (Right) trimming the mesh

KUBRIX Geo/Rhino Users Manual Page 114


Note that to Trim or Split meshes you need to use special Trim and Split tools located in the Mesh Edit
Tool menu item whereas trimming or splitting other geometrical entities require the Trim and Split
tools that are in the Edit menu item.

37. Select the File|Save As menu item and Save the present model as t8.3dm making sure that you use
Rhino 4 3D Models (*.3dm) for the Save as type.
38. Double-click the label of the Top view to return to four views. Double-click the label of the
Perspective view to maximize that view on your screen, and left-click the icon marked Zoom
extents. Please note the rectangle at z=0 which was used to trim the surface (Figure 178).

Figure 178: Perspective view of the trimmed extent of the pit

39. Delete the trimming rectangle and select the Curve|Curve from Objects|Duplicate Border menu
item. Select the mesh representing the pit and hit <ENTER> to extract the boundary of the mesh
(Figure 179).

Figure 179: Extracting the boundary of the pit

40. Right-click on the label of the Perspective viewport and select Set View|Perspecctive from the
dropdown menu to revert to the standard Perspective view. Double-click the label of the current
view to return to four views. Right-click on the Zoom Extents All Viewports icon, and hit the <F8>
key to activate the Ortho state.

The Ortho state constrains the movement of the mouse to the x, y and z directions. When Ortho is on,
the word Ortho appears in bold letters at the bottom of graphic window near the words Snap, Planar
and Osnap.

41. Select the Curve|Line|Single Line menu item. Make sure that Ortho is on. In the Perspective
viewport, left-click the rightmost point of the boundary of the pit (highlighted in Figure 179). This
specifies the starting point of the line (Figure 180).

KUBRIX Geo/Rhino Users Manual Page 115


Figure 180: Four-view showing the creation of a vertical line starting at the Pit boundary curve

42. Move your cursor over to the Right view. Note that the end point of the line you are building
follows the cursor. Move the cursor all the way down in the Right view. Note that a vertical line
follows your mouse. Click somewhere far below the pit to specify the end point of your vertical
line.
43. Select the curve representing the boundary of the pit, select the Surface|Extrude Curve|Along
Curve menu item and click on the vertical line near the starting point (Figure 181).

Please note that where you click on the vertical line matters because it specified the direction in which
you wish to extrude the selected curve.

Figure 181: Extruding the boundary curve along the vertical line segment

44. Delete both curves: the one representing the outer boundary of the pit and the vertical line along
which you extruded the boundary curve. Select the surface resulting from the extrusion and select
the Mesh|From NURBS Object menu item. If the Polygon Mesh Detailed Option dialog box opens,
click on the Simple Controls button. In the Polygon Mesh Options dialog box, slide the cursor all

KUBRIX Geo/Rhino Users Manual Page 116


the way to the right, click on OK and delete the extruded surface which has remained highlighted
(Figure 182).

Figure 182: The model after the extruded surface has been meshed

45. Switch to a full Right view by first double-clicking the view label to go to four views and double-
clicking again on the Right view label. If you are not using a shaded view left-click on the icon
marked Shaded viewport. Left-click again on the icon marked Shaded Viewport but hold the left
button down until the Shade toolbox opens. Left-click on the icon marked Ghosted viewport to
obtain a transparent shaded Right view.
46. While in the Right view, Select the Curve|Line|Single Line menu item. Enter -4000,-2100 for the
Start of Line coordinates. Note that since you are in the Right view, this means that the Start of Line
will be placed at y=-4000 and z=-2100. Enter 4000,-2100 for the End of Line coordinates and right-
click on Zoom Extents All Viewports (Figure 183).

Figure 183: Right ghost view of the model with a horizontal trimming line placed at z=2000

47. Select the horizontal line and select the Mesh|Mesh Edit Tools|Mesh Trim menu item. In the Right
view, click on the mesh representing the vertical walls somewhere below the horizontal line to trim
it. Hit <DELETE> to end the trimming operation, and Delete the trimming line.
48. Switch to a Perspective view and rotate the model slightly so you can look at it from below. Select
the mesh representing the vertical walls and left-click the icon marked Show edges. When the Edge
Analysis dialog box opens, make sure that the Naked Edges radio button is checked and click on the
Zoom button to highlight all the naked edges of this mesh (Figure 184).

KUBRIX Geo/Rhino Users Manual Page 117


Figure 184: Perspective view from below of the mesh representing the vertical walls of the computational box

Note that there are naked edges both at the top and bottom of the vertical walls. The top naked edges
will be addressed later but, for now, you must close the bottom of the model.

49. To close the bottom of the model, left-click on the icon marked Fill mesh hole and click on any of
the lower naked edges of the mesh representing the vertical walls. Click again on the Zoom button
in the Edge Analysis dialog box ( Figure 185).

Note that the mesh representing the vertical walls and the bottom form a single mesh, distinct from
the mesh representing the pit and its extension. This is the reason why there remains naked edges on
top of the vertical walls at the junction with the pit.

Figure 185: Closure of the bottom of the model

50. Close the Edge Analysis dialog box. Rotate the model so you can see it from above, and select the
meshes representing the vertical walls (which includes the bottom of the model) and the pit (which
includes the extended topography), and select the Edit|Join menu item. Select the joined mesh and
left-click on the icon marked Show edges (Figure 186). Note the free edges at the connection of the
vertical walls and the topography that remain to be closed.

KUBRIX Geo/Rhino Users Manual Page 118


Figure 186: Remaining naked edges

51. Select the mesh and left-click the icon marked Match mesh edges. You will see the default values of
the various parameters used by this command in the Rhino Command window. DistanceToAdjust is
not set to 10, change it by clicking on it, then hit <RETURN> to complete the command.

Note that clicking on the Zoom button again in the Edge analysis dialog box results in the message
"Select objects with naked edges" message which means that the object on which you are checking for
naked edges has no naked edges.

52. Close the Edge Analysis dialog box. Select the mesh representing the pit, its extension, its vertical
wall and bottom. Left-click on the icon marked Edit layers and hold the left mouse button down to
open the Layer toolbox. Left click the icon marked Change Object Layer to open the Layer for
objects dialog box. Double-click the item marked Pit to change the layer of the selected mesh to the
layer called Pit.
53. In the Layers window, select layers Fault1 and Fault2, and click on one of the selected light bulbs to
turn off these two layers. Right-click on the icon marked Close layers to close the Layers window.

Under certain circumstances, a number of triangles in your mesh may appear transparent (Figure 187,
Left). This is most likely due to an incorrect orientation of triangle normals. Rhino's default appearance
setting displays triangles differently depending on whether triangle normals are directed towards to
observer or not. This is referred to as backface culling . Once a mesh has been closed (i.e. has no more
naked edges) you may want to left-click on the icon marked Unify Mesh Normals to reorient normals
(Figure 187, Right).

KUBRIX Geo/Rhino Users Manual Page 119


Figure 187: Final closed mesh: before unifying normals (Left), and after (Right)

54. Select the File|Incremental Save menu item. This command saves a model named t8 001.3dm in
your working folder.

Computing intersections
55. Left-click on the icon marked Edit Layers to open the Layers window. Turn all the light bulbs on in
that window to make all 3 layers visible. If you don't see the fault meshes, right-click on the icon
marked Show Objects to unhide any object that may have been inadvertently hidden.
56. Select everything by selecting the Edit|Select Objects|All Objects -3000menu item. Rhino should
respond with the message: " 3 meshes added to selection". Each of the 3 meshes belongs to a
separate layer. If there are any other objects, delete them.
57. While all 3 meshes are selected, left-click the icon marked Mesh Intersect to create all the curves
resulting from the intersections of the 3 meshes. Rhino reports that 4 intersection curves have
been created (Figure 188).

Figure 188: Curves (highlighted) representing the intersection of the 3 meshes of the model

Calculating intersection 1
We will call intersection 1 a group of two curves that seem to represent two pieces of one intersection
(highlighted in Figure 189)

KUBRIX Geo/Rhino Users Manual Page 120


58. In the Layers window, turn the light bulbs off for all 3 layers. While the intersection curves are still
highlighted, left-click on the icon marked Hide Objects and hold the mouse button down until the
Visibility toolbox appears. While holding down the mouse button move your cursor over the icon
marked Invert selection and hide objects and left-click it to show nothing but the curves.
59. Select the curves highlighted in Figure 189, Left, and once again left-click and hold Hide Objects,
then left-click on Invert selection and hide objects icon to only show the selected curves (Figure
189, Right).

Figure 189: Selecting intersection 1 (Left) and isolating it (Right)

60. While the curve is selected, turn each layer on and off (using the light bulbs) to see which two
meshes are at the origin of the selected intersection curve. Note that, in this case, it is the
intersection of Fault1 with Fault2 that resulted in this curve (Figure 190).

Figure 190: Intersection curve and the two meshes that cause it.

Extending Fault2 for a clean intersection with Fault1


Note that the intersection curve is interrupted midway and does not continue all the way to the top of
the faults. Fault2 should be extended. The 3 naked edges of Fault2 that are near the intersection curve
should be extended as a surface to ensure that the extended Fault2 will cut Fault1 in a clean fashion.

61. Select Fault1 and hide it using the Hide Objects icon. Select the Curve|Curve From
Objects|Duplicate Border menu item and click on Fault2, then hit <RETURN>. Use the Hide Objects
icon to hide Fault2 and select the border (Figure 191).

KUBRIX Geo/Rhino Users Manual Page 121


Figure 191: Extracting the border of Fault2

Note that the intersection curve partially overlaps with the border of Fault2, and here resides the
problem. Fault2 stops very close to Fault1 so the computed intersection curve (in black in Figure 191 )
is incomplete. You will extend Fault2 so it will make a clean cut with Fault1.

62. Delete the intersection curve (in black in Figure 191). Select the border, and select Edit|Explode.
Rhino explodes the border into 17 separate segments.
63. While the segments are highlighted, hold the <CTRL> key down and click on the two segments that
are not going to be extended but which are adjacent to the segments that make up the curve you
want to extend. Clicking on objects with the <CTRL> key down de-selects them (Figure 192).

Figure 192: The exploded border segments after two segments have been de-selected

64. Select the Edit|Join to join all the highlighted segments. Since the highlighted segments are
separated by two unselected ones, Join will result in 2 curves: one curve made up of the 3 edges
you want to extend, and another curve that is no longer needed. Delete all the curves, except the
one that you want to extend. (Figure 193).

Figure 193: Curve which will be extended and which was obtained by pruning the border curve

KUBRIX Geo/Rhino Users Manual Page 122


Please note that the technique used here to isolate a group of adjacent edges has many practical
applications. The sequence of operations is as follows:

65. Extract the border.


66. While the border is selected explode it into many segments.
67. While the segments are selected, with <CTRL> down, de-select two segments that bracket the curve
of interest.
68. Join everything that remains highlighted to create two separate curves: one, the curve of interest,
and another which includes all the segments you don't need
69. Delete the unwanted curve and the two segments you had de-selected earlier, and you are left with
the curve you wanted.

70. Unhide everything by right-clicking on the icon marked Show Objects (Figure 194).

Figure 194: Everything, including the extension curve

71. Select the curve to be extended and Fault2, left-click and hold the Hide Objects icon down, then
left-click on Invert Selection and Hide Object to just show the extension curve and Fault2 (Figure
195).

Figure 195: Fault2 and the curve representing its naked edges that must be extended

KUBRIX Geo/Rhino Users Manual Page 123


You are now going to extrude the curve over a certain line segment to create an extension of Fault2. To
create the extrusion segment (over which the extension curve will be extruded) you are going to use
one of Fault2's boundary edges.

72. Select Curve|Line|Single Line. Consider one of the naked edges of Fault2 adjacent to the extension
curve. Click on one point not adjacent to the extrusion curve to set the first point of the line
segment (Figure 196)...

Figure 196: Setting the first point of the extrusion guide segment

73. For the second point, click on the other end of the edge; which is the end adjacent to the extrusion
curve (Figure 197).
74.
75. Note that if the movement of the mouse seems constrained it may be because the Ortho state may
be on. If so hit <F8> to deactivate the Ortho state.

Figure 197: Specifying the line segment (highlighted in yellow) along which the extension curve will be extruded

76. Select the extension curve, select the Surface|Extrude Curve|Along Curve, and click near the start
point of the line segment representing the extrusion to complete the operation (Figure 198).

KUBRIX Geo/Rhino Users Manual Page 124


Figure 198: Extrusion of the extension curve

77. Delete both the extrusion segment and the extrusion curve. Select the extrusion Surface and select
the Mesh|From NURBS Objects. In the Polygon Mesh Options dialog box, slide the cursor all the
way to the left and click OK to create a mesh. Delete the surface (Figure 199).

Figure 199: Fault2 and its extension

78. Select the extension, left-click the icon marked Edit Layers, hold the button down and in the Layer
toolbox left-click on Change object Layer to open the Layer for object dialog box. Double-click
Fault2 to make this mesh part of the Fault2 layer. Select Fault2 and its extension and Edit|Join
them into one mesh (Figure 200).

Figure 200: The new Fault2 mesh

Please note that the extension perfectly matches Fault2 and no naked edges are created at the junction.
If the meshes did not perfectly match, you can use the Match Mesh Edges icon to get rid of unwanted
naked edges

KUBRIX Geo/Rhino Users Manual Page 125


Back to intersection 1 (now with a clean intersection curve)
79. Right-click on Show Objects to unhide everything. Select Fault1 and Fault2 and use Invert Selection
and Hide Objects to hide everything but Fault1 and Fault2, which has now been extended (Figure
201).

Figure 201: Fault1 and extended fault2 prior to intersection calculation

80. Select Fault1 and Fault2 and left-click on the icon marked Mesh Intersect to compute the
intersection curve (Figure 202) (Note that this is a new curve that should go all the way through)

Figure 202: The new intersection curve

81. Select Fault1 and, in the Rhino Command Window, type SplitMeshWithCurve, then click on the
curve. In the Layers window, right-click on the Fault1 layer and select the Select Objects item from
the dropdown menu to select the two pieces of Fault1 resulting from the split. Join them into one
mesh using Edit|Join.
82. Select Fault2 and split it with the curve, then Delete the unwanted part (appearing behind fault1 in
Figure 203). Remember that Fault2 is meant to stop right at Fault1 and any excesses should be
discarded.

KUBRIX Geo/Rhino Users Manual Page 126


Figure 203: Fault1 and Fault2 split with the intersection curve

83. Delete the intersection curve.

Comparing Figure 202 and Figure 203, you may note that new triangles have been added to both Fault1
and Fault2. This is what computing the intersection of the two faults is about: locally modifying Fault1
and Fault2 so that both meshes share common intersection edges.

Note that SplitMeshWithCurve may produce incorrect results such as stray triangles or altogether no
intersection at all. These are most likely caused by errors in the surfaces or round-off errors which are
accentuated when the model center far from the origin, among other factors. Please refer to the
Troubleshooting section of this manual for further details.

SplitMeshWithCurve splits a mesh into two meshes that belong to the same layer the original mesh
belonged to. When the splitting curve crosses a mesh all the way through, the two resulting meshes are
trivially split but when the curve cuts only partially through two non-trivial parts are obtained.
Following every splitting operation, make sure that, for each layer, you join the resulting meshes into a
single mesh. This will prevent the proliferation of meshes in your model.

Calculating intersection 2
84. In the Layers window, turn off all the layer light bulbs and right-click on the icon marked Show
Objects to make all the remaining intersection curves visible. Right-click the icon marked Zoom
Extents All Viewports to bring back into view curves that were outside the viewport (Figure 204).

Figure 204: Remaining intersection after intersection 1 is complete

Calculating intersection 2
85. Select the smaller intersection curve in Figure 204, and use Invert Selection and Hide Objects to
isolate it (Figure 205).

KUBRIX Geo/Rhino Users Manual Page 127


Figure 205: Intersection 2

86. One-by-one, turn on or off various layers in the Layers window to find which Layers contributed to
this intersection curve: there should be two meshes. Here, the intersection is the result of the Pit
and Fault2 (Figure 206).

Figure 206: The Pit, Fault2 and their intersection

87. Delete the existing intersection curve, select both meshes and left-click on the icon marked Mesh
Intersect to compute a new intersection curve (Figure 207).

Figure 207: Recomputed intersection curve

88. Select the Pit and enter SplitMeshWithCurve in the Command window to intersect the pit with the
curve. In the Layers window, right-click on Pit and select Select Objects from the dropdown menu.
Note that Rhino responds with "2 meshes added to selection", which confirms that Pit was split into
2 meshes as a result of the split operation. Join the two meshes of the Pit.
89. Similarly, select Fault2 and SplitMeshWithCurve it with the curve. Delete the intersection curve.
Fault2 is split cleanly into 2 parts. Delete the part that falls outside the computation domain and
delete the intersection curve (Figure 208). Note the trace of Fault2 on the pit.

KUBRIX Geo/Rhino Users Manual Page 128


Figure 208: Split Pit and Fault2 (the remaining portion of Fault2 is highlighted for clarity)

Please note that due to round-off errors and tolerance mismatches SplitMeshWithCurve may produce a
mesh that is split in two parts but incorrectly, in such a way that when attempting to select the part of
Fault2 that falls inside the pit, the entire Fault2 may be selected. Please refer to the troubleshooting
chapter in this manual for further detail on how to circumvent problems with SplitMeshWithCurve.

Calculating intersection 3
90. In the Layers window, turn off all the layer light bulbs and right-click on the icon marked Show
Objects to make all the remaining intersection curves visible (Figure 209). Select the curve on the
right as intersection 1.
91. Select intersection1 and use the Hide objects|Invert Selection and Hide Objects icon to isolate it.

Figure 209: Intersection 3

Calculating intersection 4
92. One-by-one, turn on or off various layers in the Layers window to find which Layers contributed to
this intersection curve. Again, please note that there should only be two meshes, no more, no less,
to produce an intersection. Here, the intersection is the result of the Pit and Fault1 (Figure
210Figure 206).

KUBRIX Geo/Rhino Users Manual Page 129


Figure 210: Pit, Fault1 and their intersection curve

93. Delete the intersection curve and recompute it by selecting Pit and Fault1 and using the Mesh
Intersect icon. SplitMeshWithCurve the Pit and repeat this operation with Fault1. Join the two
parts of the Pit and delete the portion of Fault1 that falls outside the computational domain.
Delete the intersection curve (Figure 211).

Figure 211: Split Pit and Fault1 (the remaining portion of Fault1 is highlighted for clarity)

Calculating intersection 5
94. In the Layers window, turn off all the layer light bulbs and right-click on the icon marked Show
Objects to make all the remaining intersection curves visible (Figure 209). Select the remaining
intersection curve (Figure 212).

Figure 212: Intersection curve #4

KUBRIX Geo/Rhino Users Manual Page 130


95. One-by-one, turn on or off various layers in the Layers window to find which Layers contributed to
this intersection curve. Here, the intersection is the result of the Pit and Fault1 (Figure 213)

Figure 213: Ghosted view of the pit and Fault1

96. Delete the intersection curve and recompute it by selecting Pit and Fault1 and using the Mesh
Intersect icon. Note that the Pit and Fault1 intersect along two curves, one of which (intersection 3)
was already dealt with (we are interested in the bottom-left intersection curve in Figure 214).

Figure 214: Calculated new intersections. The one at the bottom-left is what we call intersection 4

97. SplitMeshWithCurve the Pit and Join the two parts of the Pit. SplitMeshWithCurve Fault1 and
delete the portion of Fault1 that falls outside the computational domain (this mesh is extremely
thin and hard to distinguish from the intersection curve itself). Delete the intersection curve (Figure
215).

Figure 215: Computed intersection 4

KUBRIX Geo/Rhino Users Manual Page 131


Surface quality check
Quality check means making sure that the mesh you submit to Kubrix is closed (clearly defines one or
more volumes), does not contain degenerate (null are) and multiple (repeated) triangles. In Kubrix 12,
naked edges are admissible as long as the STL file containing them is understood by Kubrix to be a fault
file (see -fault keyword below).

Two levels of quality checks are available:

98. First, Rhino feedback reported by


99. Check(naked edges, degenerate or multiple faces)
100. Extract Mesh Toolbar|By Aspect Ratio, By Area, By Length...
101. Next, Kubrix feedback reported as coordinates of "problem" locations:
102. Self-intersections before surface remeshing, distorted
103. Self-intersections after surface remeshing (often due to the cut angle being too large)
104. Additional self-intersection occurring during tetrahedral meshing (often due to highly distorted
surface or small inter-surface clearnces)
105. A list of worst tetrahedra in terms of their collapse ratio with the x, y, z location of their
centroids.

Feedbacks direct you to modify the input surface. In general a change in the input surface necessitates
redoing Rhino quality checks followed by Kubrix checks, in that order.

Kubrix points you to the x,y,z coordinates of "problem" locations in the model. In general, these
locations are near triangles. Individual coordinates of "problem" areas outputted by Kubrix may be
copied from the Kubrix console window or from kubrix.log, and pasted into a Rhino Curve|Line|Single
Line command to specify the starting point of a guide line pointing to the "problem" location. The end
point of the line could be an arbitrary point clicked somewhere in the background away from the model.

When Kubrix outputs multiple x,y,z coordinates, you can copy several lines of coordinates at once from
kurix.log and paste it in a Rhino Curve|Polyline|Polyline command to create a Polyline connecting all
the "problem" areas. In this fashion, you can easily direct your attention to those locations. Again, for
the last point of the Polyline, you can click somewhere in the background, away from the model.

Quality check with Rhino


106. In the Layers window, turn the Fault1 and Fault2 light bulbs off but leave the Pit on. Select the
Pit and check it with the Check icon. Rhino responds with the following message (please note that
the message you receive may be different from this one due to round-off errors and variations in
the sequence of events):

This is a bad mesh.

Here is what is wrong with this mesh:

KUBRIX Geo/Rhino Users Manual Page 132


Mesh has 22 degenerate faces.

Mesh has 1 non manifold edge.

Skipping face direction check because of positive non manifold edge count.

Importants thing to consider with this mesh:

Mesh has 2 naked edges. Although this does not necessarily mean that the mesh is bad,

naked edges can cause problems if the ultimate goal is STL output.

General information about this mesh:

Mesh does not have any zero length edges.

Mesh does not have any duplicate faces.

Mesh does not have any disjoint pieces.

Mesh does not have any unused vertices.

107. Left-click the icon marked Cull degenerate mesh faces to delete degenerate (null area) faces. A
new click on Check will reveal a substantially greater number of naked edges due to the fact that a
number of triangles have been removed. You will deal with naked edges later on.
108. Make sure the mesh is not selected and enter the command ExtractNonManifoldMeshEdges in
the Command window. Click on the parameter ExtractHangingFaceOnly to turn it from No to Yes,
then select the mesh. Rhino responds with the message "Extracted 1 face".

The command ExtractNonManifoldMeshEdges, by default, extracts every triangle attached to any non-
manifold edge. By setting ExtractHangingFaceOnly to Yes, you extract only those that have free edges.
Setting ExtractHangingFaceOnly to Yes makes the extraction more discriminating, thus avoiding the
removal of perfectly good triangles.

109. Select the mesh and left-click on the icon marked Show Edges to open the Edge Analysis dialog
box (Figure 216).

KUBRIX Geo/Rhino Users Manual Page 133


Figure 216: Edge analysis after the removal of degenerate and non-manifold triangles

110. Select the mesh and left-click on the icon marked Match mesh edges. Click on the
DistanceToAdjust parameter and set it to 10, and hit <RETURN>. Clicking again on the Zoom button
of the Edge Analysis dialog box indicates that there are no more naked edges in the mesh of the pit.
A Check confirms that the pit mesh is good.
111. Turn Fault1 and Fault2 on in the Layer window and check their quality using Check. Look for
duplicate or degenerate faces. Both Fault1 and Fault2 should have naked edges because they are
not supposed to be closed.
112. Select the File|Incremental Save menu item. This command saves a model named t8 002.3dm
in your working folder.

Quality check & grid generation with Kubrix


113. Select the pit and select the File|Export Selected to export the pit as an ASCII STL file called
t8_outer.stl. Select both Fault1 and Fault2 and export them as a single ASCII STL file called
t8_faults.stl.
114. Click on the icon marked Kubrix, select the Tetrahedral Meshing tab and click on the Default
button. Click on the button marked Input file and select t8_outer.stl in the Select an STL file dialog
box. In the New keywords field of the KubrixGui dialog box type: -fault t8_faults.stl. Click the
Compute button to launch the meshing calculation.

the -fault keyword indicates to Kubrix the file t8_faults.stl should be read as an internal surface of
discontinuity into Kubrix. Kubrix will not check for free edges in the file t8_faults.stl. It will generate a
mesh that fits both STL files, t8_outer and t8_faults, and will mark all FLAC3D zone faces or all 3DEC
block faces adjacent to t8_faults as INTERFACES for FLAC3D and joints in the case of 3DEC.

Kubrix stops after indicating that the input surface intersects. Open the kubrix.log file in you working
directory and copy all the lines containing the coordinates of self-intersection points reported by
Kubrix.

ISI032: Checking for surface self-intersection ...

-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

KUBRIX Geo/Rhino Users Manual Page 134


-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

-2.240e+002,1.903e+002,-5.192e+002

----------------------------------------------------------------------------

WA-ISW010: Input surface self-intersects ...

----------------------------------------------------------------------------

115. Please note that all the coordinates are identical and point to the same location. Go back to the
Rhino model, select the Curve|Polyline|Polyline menu item an paste the copied lines into the Rhino
Command window to create a Polyline passing through all these points (Figure 217). For the last
point of the Polyline, click somewhere in the background away from the model.

Figure 217: Polyline passing through all the "problem" points. The last point of the Polyline is an arbitrary point somewhere
away from the model

116. Left-click on the icon marked Zoom Window and draw a small window around the end of the
line segment. Right-click on the Show Objects to unhide every the mesh (Figure 218).

KUBRIX Geo/Rhino Users Manual Page 135


Figure 218: Zooming in: the tip of the guide segment alone (Left) and after unhiding the meshes (Right)

Zooming in on the tip of the line segment without the rest of the mesh visible ensures that the zoom
and rotation centers will be near the tip of the segment and that subsequent rotations of the model will
keep the tip of the segment in the viewport. With the mesh present, Rhino places the center of
rotation at some depth inside the model and as a result in subsequent rotations the tip of the segment,
which is the location of interest, may no longer be in the viewport.

117. This is a case of multiple vertices that are not properly merged. This is most likely caused by
round-off errors in the mesh splitting process. To merge all the vertices, left-click on the icon
marked Align mesh vertices to tolerance. Click on the parameter DistanceToAdjust and set is to a
large value such as 100. Click on the parameter SelectVertices and click on the vertex indicated by
the guide segment. This vertex will be the vertex over which all other picked vertices will collapse.
118. Left-click, hold and drag your mouse across a small rectangle enclosing all possible vertices that
are in the immediate vicinity of the first vertex you chose to select them.

Figure 219: vertices picked for collapse

To avoid selecting vertices that appear to be at the same location but far behind the target collapse
vertex, rotate the model slightly, making sure that the picked vertices do no move with it. To unselect
vertices selected inadvertently, left-click on them while holding the <CTRL> key down.

119. Hit <RETURN> to complete the collapse. Rhino responds by indicating that a number of vertices
were adjusted. Check the Pit and the faults individually to make sure that the collapse has not
introduced new errors.

KUBRIX Geo/Rhino Users Manual Page 136


120. Select the pit, select the File|Export Selected and export the pit as an ASCII STL file called
t8_outer.stl. Select both Fault1 and Fault2 and export them as a single ASCII STL file called
t8_faults.stl.
121. Click on Kubrix and click on Compute since all the parameters must have remained unchanged
since the last use of Kubrix.
122. Kubrix stops after indicating that the improved surface intersects. Open the kubrix.log file in
you working directory and copy all the lines containing the coordinates of self-intersection points
reported by Kubrix.

MGI087: Remeshing surface...


MGI088: Surface remeshing completed...

MGI096: Remeshed surface contains 36034 triangles ...

MGI096: Remeshed surface contains 17867 nodes ...

ISI032: Checking for surface self-intersection ...

-2.672e+003,2.814e+002,1.580e+002

-2.449e+003,2.600e+002,1.766e+002

-2.404e+003,2.557e+002,1.804e+002

-2.165e+002,1.594e+003,8.164e+001

-2.303e+003,2.450e+002,1.829e+002

-2.157e+002,1.594e+003,8.114e+001

-2.173e+002,1.594e+003,8.208e+001

-2.336e+003,2.496e+002,1.866e+002

-2.335e+003,2.505e+002,1.900e+002

-2.340e+003,2.498e+002,1.863e+002

----------------------------------------------------------------------------

WA-ISW011: The improved surface self-intersects ...

----------------------------------------------------------------------------

KUBRIX Geo/Rhino Users Manual Page 137


123. Go back to the Rhino model, select the Curve|Polyline|Polyline menu item an paste the copied
lines into the Rhino Command window to create a Polyline passing through all these points (Figure
220). For the last point of the Polyline, click somewhere in the background away from the model.

Figure 220: Polyline pointing to "problem" locations (Left), details of one of these locations (Center) and close-up (Right)

Zooming in on the detail depicted in Figure 220, Right, you can note that there is no real surface
imperfection. The problem is caused by the cut parameter in Kubrix which, by default is set to 45;
meaning that any surface detail less sharp than 45 is smoothed over. This causes the remeshed surface
to become mangled at this location.

124. Click on the Kubrix Icon, in the Tetrahedral Meshing tab, enter 30 for the Cut angle and click on
Compute.
125. Kubrix successfully terminates with the following message:

MGI090: Grid generation completed...

MGI012: Output mesh contains 168352 tetra elements ...

MGI012: Output mesh contains 41360 vertices ...

MGI012: Output mesh contains 1 material ...

The 10 worst tet collapse ratios range from:

-3.932e-006 to 5.353e-006

They occur at the following coordinates:

-1.751e+003,1.608e+002,1.221e+002

-1.789e+003,1.829e+002,9.912e+001

-2.967e+003,3.000e+003,-1.777e+003

-2.961e+003,3.000e+003,-1.768e+003

-1.038e+003,-2.456e+002,-1.684e+003

-1.038e+003,-2.456e+002,-1.684e+003

KUBRIX Geo/Rhino Users Manual Page 138


-2.954e+003,3.000e+003,-1.760e+003

-9.869e+002,-2.610e+002,-1.729e+003

-9.869e+002,-2.610e+002,-1.729e+003

-9.960e+002,-2.626e+002,-1.715e+003

MGI012: Output mesh contains 2 interfaces ...

MGI031: Writing a VRML file ...

MGI067: Writing a FLAC3D file ...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

MGI999: Successful termination of KUBRIX in 42.1 seconds!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

126. Rename the kubrix_out.flac3d file produced KUBRIX tutorial8.flac3d.

Following a successful mesh generation Kubrix lists the FLAC3D zones or 3DEC blocks that have
marginal quality in terms of their tet collapse ratio. This is a non-dimensional number that measure
how close each pair of opposing edges are. In a tetrahedron (Figure 221), for each pair of opposing
edges (there are 3 such pairs) we compute e, the ratio of the distance h between the edges and the
length of the longest of the two edge lengths E1 and E2 as follows:

h
=
max(E1 , E2 )

The tet collapse ratio of a tetrahedron is defined as the smallest of the 3 values of e calculated for each
pair of edges.

= min()

KUBRIX Geo/Rhino Users Manual Page 139


Figure 221: Definition of the Tet Collapse Ratio

An e of 0 signifies that there is a pair of edges that intersect each other causing, among other things, a
null volume. Kubrix would not generate such a tetrahedron unless the boundary of the computational
domain imposes it. This happens when two input surface, including fault come so close to eachother
that no room is left for a good quality tetrahedron. The knowledge of the spread of tet collapse values
among the 10 worst tetras indicates that there are less than 10 "marginal" tetras. You can copy the 10
lines of the kubrix.log output corresponding to the 10 coordinates and paste it into the Rhino
Curve|Polyline|Polyline command to see where the 10 worse tetrahedra are located (Figure 222).

Figure 222: Location of the centroids of the 10 worst FLAC3D zones or 3DEC blocks

The resulting FLAC3D model is shown in Figure 223.

KUBRIX Geo/Rhino Users Manual Page 140


Figure 223: FLAC3D model

How does KUBRIX keep track of Zone faces for FLAC3D?


The FLAC3D file tutorial8.flac3d produced by this version of Kubrix is a grid file that contains grid points,
tetrahedral zones, groups -in the present case just one group- and face groups (following the keyword
FGROUP). All zone faces that match the STL file t8_faults.stl belong to a face group called Patch_1.
Please note that Kubrix no longer separates the model at these face groups. This can now be done in
FLAC3D. In the present case, Kubrix reads the file t8_faults.stl using the -fault keyword and finds that
this surface represents two patches so 2 face groups, Patch_1 and Patch_2, are created.

The tutorial8.flac3d file produced by KUBRIX is organized as follows:

* FLAC3D input deck produced by KUBRIX version 12.0.5

* mesh built: Sun Jan 15 10:11:34 2012

* -app rhino -i "C:/Users/Itasca/outer.stl" -aspect 1.3 -offset 0.1 -cut 45 -mode tetra1 -ot flac3d -it stl -
fault faults.stl

*GRIDPOINTS

G 1, 6.775449e+002, -3.000000e+003, -1.107416e+003

G 2, 5.129006e+002, -3.000000e+003, -9.576254e+002

..................................................................

G 34082, -7.181439e+002, 1.976127e+002, -7.918239e+002

G 34083, -6.105816e+002, 3.779762e+002, -5.326533e+002

*ZONES

KUBRIX Geo/Rhino Users Manual Page 141


Z T4 1, 17937, 17938, 17939, 17940

Z T4 2, 14615, 2333, 14617, 2205

..................................................................

Z T4 145371, 20871, 28965, 18058, 6916

Z T4 145372, 26405, 32520, 30551, 32521

*GROUPS

ZGROUP group1

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

..................................................................

145354 145355 145356 145357 145358 145359 145360 145361 145362 145363 145364 145365

145366 145367 145368 145369 145370 145371 145372

*FACES

F T3 1, 182, 14440, 14192

F T3 2, 982, 14047, 14214

..................................................................

F T3 2107, 33956, 34065, 33957

F T3 2108, 954, 33960, 34072

*Face groups

FGROUP Patch_1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

..................................................................

676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696

697 698 699 700 701 702 703 704 705

KUBRIX Geo/Rhino Users Manual Page 142


FGROUP Patch_2

706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726

727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747

..................................................................

1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050

1051 1052 1053 1054

Running the model with FLAC3D


Use the following data file to run this model in FLAC3D 5.0

NEW

;read geometry;

impgrid tutorial8.flac3d

set fish safe off

set deterministic off

his unbal

attach face tolerance 1e-5

;Separate the faces at patch that is destined to become interfaces. Zones are separated

;at every zone face belonging to face group Patch_1 and a new face group is created called

;slave

def _SeparateFaces

root1 = 'Patch_'

root2 = 'Slave_'

loop _h(1,2)

KUBRIX Geo/Rhino Users Manual Page 143


PatchName = root1 + string ( _h )

SlaveName = root2 + string ( _h )

command

gen separate face group SlaveName range group PatchName

endcommand

endloop

end

_SeparateFaces

;define interfaces

def _interface_props

root1 = 'Patch_'

loop _h(1,2)

PatchName = root1 + string ( _h )

command

interface _h face range group PatchName

interface _h prop kn 1e10 ks 1e10 cohesion 1.e1 tension 0.0 friction 30

endcommand

endloop

end

_interface_props

;property assignments....

model elastic

prop bulk 37e9 shear 22e9 dens 2700. ;e.g., granite

KUBRIX Geo/Rhino Users Manual Page 144


;load assignments....

SET grav (0,0,-9.81)

fix x range x -3000 tol 0.01

fix x range x 3000 tol 0.01

fix y range y -3000 tol 0.01

fix y range y 3000 tol 0.01

fix z range z -2100 tol 0.01

hist unbal

SOLVE ratio 1e-5

SAVE tutorial8_elas.sav

RET

END OF TUTORIAL 8

KUBRIX Geo/Rhino Users Manual Page 145


Tutorial 9: Incorporating interfaces in legacy models (Geo/Hex)
A hybrid grid is composed of several types of grids such as manually generated grids, automatically
generated unstructured hexahedral, block-structured hexahedral, octree or tetrahedral grids. A
practical application of hybrid grids is in incorporating smooth internal faults inside an existing grid. In
this tutorial, the zones of an existing FLAC3D model, model9.flac3d, that intersect 2 internal surfaces
surface9A.dxf and surface9B.dxf, are identified, removed and replaced with a boundary-fitted
tetrahedral grid that faithfully represents the internal surfaces while matching the remaining zones of
the original hexahedral mesh . In this tutorial you will learn the following skills:

Replacing certain zones of a hexahedral grid with tetrahedral zones

Using SpaceRanger to identify zones intersecting given surfaces

Mesh intersection cleanup

Splitting a mesh with another mesh

Generating FLAC3D and 3DEC models with intermittent faults

Using Rhino and Kubrix quality feedback info to correct the geometry

Assessing grid quality

Initial Rhino tolerance setup and model import


127. Start Rhino and select the Large Object: Meters template. Left-click the Options icon to open
the Rhino Options dialog box. On the left pane, left-click on Document Properties|Units. Set the
Absolute tolerance to 0.0001, the Relative tolerance to 0.01 percent and the angle tolerance to
0.01 degrees.
128. Select the File|Save As Template menu item and in the Save Template File dialog box, save your
Rhino document as Large Objects - MetersA4R2A2.3dm.

KUBRIX Geo/Rhino Users Manual Page 146


Simplifying the internal surfaces
129. In Rhino, select File|Import and import surface9.dxf. Note that surface is in 8 pieces
(Edit|Select All says "8 meshes added to selection"). Select all 8 meshes and hit <CTRL> + j to join
them into one mesh.

surface9 is very finely meshed. It needs to be simplified into a coarser mesh using the Rhino drape
command. This simplification will substantially speed up most operations

130. Maximize the Top view and select the Surface|Drape menu item. Among the parameters of the
Drape a window over the area to drape, leave the parameter spacing equal to 5, and draw a
rectangle as large as possible but contained within the boundary of the surface. Don't get too close
to the border as the draping may result in surface artifacts due to missing triangles (Figure 224,
Left).
131. Delete the initial mesh, select the surface you have just created and select Mesh|From NURBS
Control Polygon to extract a mesh from the surface. Delete the surface so the only remaining
object is the mesh (Figure 224, Right).

Figure 224: Drawing a draping rectangle in the top view (Left) and the mesh extracted from the draped
surface

132. Select the mesh you have just created and using File|Export selected export it as
surface9ADraped.stl.
133. Select the mesh you have just created, left-click and hold down the left mouse button on the
icon marked Edit Layers and left-click on the icon marked Change Object Layer to open the Layer
for objects dialog box.
134. In the dialog box, click on New, and in the New layer dialog box enter SurfaceA and click OK.
Click OK in the Layer for objects dialog box.
135. Left-click the icon marked Edit Layer to open the Layers window. In there, click on the light bulb
in front of SurfaceA to turn SurfaceA off.

KUBRIX Geo/Rhino Users Manual Page 147


136. In Rhino, select File|Import and import surface9B.dxf. Note that the content of this file is a
collection of contour lines. You must now build a surface from these lines

There are many ways to obtain a surface from contour lines. The most accurate method uses the
MeshPatch command. MeshPatch uses points on the contour lines to generate a Delaunay
triangulation. Delaunay triangulation is the most intuitive triangulation of a cloud of points. Here, we
will limit the number of points in order to speed up the triangulation. To this end, we will first extract
the control points of the contour lines, then ask MeshPatch to triangulate the extracted points.

137. Select all contour lines and select the Curve|Curve From Objects|Extract Points menu item to
extract the control points of the contour lines (Figure 225).

Figure 225: Contour lines and extracted points

138. While the points are highlighted, enter _MeshPatch in the Rhino command window, followed by
two <RETURN> . Delete the curves and the extracted points leaving only the mesh (Figure 226).

Note how Delaunay triangulation ensures that triangles are formed among points in the most natural
and logical manner to ensure good quality triangles.

Figure 226: Shaded view and detail of the surface mesh generated from Points

KUBRIX Geo/Rhino Users Manual Page 148


This triangulation is very fine and contains a lot of noise. To filter and even details use the Drape
command.

139. Switch to the Top view and maximize it. Select the Surface|Drape menu item and draw a
rectangle large enough and contained within the boundaries of the triangulated surface (Figure
226).

Figure 227: Draping the triangulated surface

140. Select the mesh you have just created and using File|Export selected export it as
surface9BDraped.stl.
141. Select the mesh you have just created, left-click and hold down the left mouse button on the
icon marked Edit Layers and left-click on the icon marked Change Object Layer to open the Layer
for objects dialog box.
142. In the dialog box, click on New, and in the New layer dialog box enter SurfaceB and click OK.
Click OK in the Layer for objects dialog box.
143. If the Layers window is not open left-click the icon marked Edit Layers, and in the Layers
window click on the light bulb in front of SurfaceA to make it visible, and left-click the icon marked
ColorizeAllObjects to see the two surfaces in different colors (Figure 228).

KUBRIX Geo/Rhino Users Manual Page 149


Figure 228: Surfaces A and B

Since you will work an existing FLAC3D model, to view the model in Rhino you must translate the
FLAC3D grid file into a .WRL file. SpaceRanger can do that for you. Rhino does not understand the
concept of volume mesh. Spaceranger will translate the outer surface of the FLAC3D model into a
collection of quadrilaterals and triangles in the VRML 2.0 format (.WRL) which is readable in Rhino.

Translating the FLAC3D mode into a .WRL


There are 2 ways to do this: in FLAC3D, by right-clicking on the object and exporting as VRML or using
the SpaceRanger utility included in your KUBRIX Geo installation. The SpaceRanger operation is
described below.

144. Run Spaceranger in the folder containing the starting FLAC3D grid file, model9.flac3d. Enter -1
to Translate your model into a .WRL file, followed by <RETURN>.
145. Enter 1 to read a FLAC3D model grid, followed by <RETURN>, and enter model9.flac3d,
followed by <RETURN>. Spaceranger creates 3 files: output.flac3d, output.wrl and output.nas.
Rename output.flac3d as model9.wrl.
146. In Rhino, select File|Import to import model9.wrl (Figure 229).

KUBRIX Geo/Rhino Users Manual Page 150


Figure 229: The surfaces and the outer surface of the FLAC3D model

Please note that the surfaces and the upper surface of the FLAC3D model overlap everywhere over the
topography except in places where the surface is inside the FLAC3D model (the dam). You now must
identify the zones of the FLAC3D model that are intersected by the surfaces. The draped surfaces, in
their present form, interact with every zone near the upper surface of the FLAC3D model. You must
trim the surfaces and keep only the part that is inside the dam.

Retrieving the shape of the dam from the flac3d model


You must recover the basic shape of the dam from the FLAC3D model in order to perform create its
intersection with the draped surface. To recover the dam, you will build the two planar surfaces
representing the upstream and downstream faces of the dam.

147. In Rhino, hide the surfaces A and B. Select Curve|Line|Single line and build a horizontal line
lying somewhere along the upper part of the downstream face of the dam. Since the grid lines of
the FLAC3D model are horizontal on this face of the dam you can follow the gridlines. Draw an
additional line along the grid lines somewhere below the previous line (Figure 230, Left). Draw two
additional lines along the upstream face (Figure 230).

Figure 230: Two lines along the downstream face of the dam (Left) & 2 additional lines added along the
upstream face (Right)

KUBRIX Geo/Rhino Users Manual Page 151


148. Select Edit|Select Objects|Curves to select all the lines and hide everything but the lines. Select
the 2 lines on the upstream face and select the Surface|Loft menu item to open the Loft Options
dialog box. In the Style section select Straight sections from the dropdown menu. In the Cross-
section curve options check Do not simplify and click on OK. Repeat this operation on the
downstream face of the dam (Figure 231).

Figure 231: Recovered upstream and downstream and downstream surfaces of the dam

The 2 surfaces you have created are too small. They need to be enlarged so that their intersections with
surfaces A and B can be computed properly

149. Select the upstream face and select the Transform|Scale|Scale3D menu item. For the Origin,
click on the middle of the higher of the two line segments used to create the upstream face (Figure
232, Left). Enter 5 for the Scale factor and hit <RETURN>.

Figure 232: The middle of the higher of the two upstream lines is used as the origin of the scaling (Left)
and the resulting surface upstream (Right)

150. Similarly, select the downstream face and use Scale3D and the middle of the higher of the two
downstream lines to scale up the downstream face.

KUBRIX Geo/Rhino Users Manual Page 152


151. Select the two surfaces you have just created and select the Mesh|From NURBS Control
Polygon menu item to turn them into simple meshes. While the meshes are highlighted, hide them
and delete both surfaces and all 4 lines segments.
152. Unhide everything by right-clicking the icon marked Show objects and hide the FLAC3D model
to only show 4 meshes: the upstream and downstream surfaces (meshes) and surfaces A and B
(Figure 233).

Figure 233: Surfaces A and B, and the recovered upstream and downstream faces

Trimming the surfaces with the dam


153. Select the recovered upstream and downstream surface meshes along with Surface mesh A, and
left-click the icon marked Mesh Intersect. Rhino responds with "Found 3 intersections" (Figure
234).

Figure 234: Intersections of surface A with the recovered upstream and downstream faces of the dam:
perspective view (Left) and top view (Right).

KUBRIX Geo/Rhino Users Manual Page 153


154. Hide everything but the intersection curves, and delete the isolated intersection curve located
to the left of Figure 234 Right (Figure 235, Left). While in the top view, Select Curve|Line|Single line
and draw a line connecting the top of the two remaining intersection curves (Figure 235, Middle).
155. Unhide surface A, select it and select SplitMeshWithCurve in the Rhino Command window.
While in the Top view, split the surface A mesh with the curve, select the part of the mesh outside
the curve and delete it leaving only a trimmed Surface A (Figure 235, Right).

Figure 235: The 2 relevant intersection curves (Left), connected by a line into one curve (Middle), and the remaining portion
of surface A after splitting

If you experience difficulties obtaining a single curve for use in SplitMeshWithCurve, Explode all curves,
unselect everything, and use Edit|Select Objects|Duplicate Objects to detect and delete all duplicate
line segments, then join everything into a single curve.

156. Select the trimmed surface A and select and export it as an ASCII STL file called
surface9ATrimmed.stl.
157. Now select the recovered upstream and downstream surface meshes along with Surface mesh
B, and left-click the icon marked Mesh Intersect. Rhino responds with "Found 3 intersections"
(Figure 236).

KUBRIX Geo/Rhino Users Manual Page 154


Figure 236: Intersections of surface B with the recovered upstream and downstream faces of the dam:
perspective view (Left) and top view (Right).

158. Hide everything but the intersection curves, and delete the isolated intersection curve located at
the bottom of Figure 236, Right (Figure 235, Left represents a Top view with the isolated
intersection removed). While in the top view, Select Curve|Line|Single line and draw a line
connecting the top ends of the two remaining intersection curves (Figure 235, Middle).
159. Unhide surface B, select it and select SplitMeshWithCurve in the Rhino Command window.
While in the Top view, split the surface B mesh with the curve. After the intersection is completed,
select the part of the mesh outside the curve and delete it leaving only a trimmed Surface B (Figure
235, Right).

Figure 237: The 2 relevant intersection curves (Left), connected by a line into one curve (Middle), and the remaining portion
of surface A after splitting

160. Select the trimmed surface B and export it as an ASCII STL file called surface9BTrimmed.stl.

Avoiding surface overlaps


161. Unhide surfaces A and B, use surface shading (left-click on Shaded Viewport Icon), and note the
marbled areas (Figure 238).

KUBRIX Geo/Rhino Users Manual Page 155


Figure 238: Marbled areas indicate overlap between the 2 surfaces

The marbled areas indicate overlap. In those areas only one surface should remain, let's say surface A.
You should trim Surface B to limit it to areas of no overlap.

162. While only Surface A and B are visible, select both and left-click on the icon marked Mesh
Intersect. The highlighted intersection curves clearly indicate the extent of the overlap regions
(Figure 239).

Figure 239: Intersections of surfaces A and B

163. Hide surface A, zoom in close, click on the button marked Osnap at the bottom of the Rhino
window in order to deactivate object snapping, select the Line|Polyline|Polyline menu item and
create a Polyline delineating the areas of surface B that are clearly outside the overlap zone. Make
sure that you close the Polyline by choosing its starting point as its last point.

KUBRIX Geo/Rhino Users Manual Page 156


164. Select the Polyline you have just created, select the Mesh|Mesh Edit Tools|Mesh Trim menu
item and click on the surface outside the Polyline to trim the unwanted region (Figure 240).

Figure 240: Drawing a Polyline delineating the non-overlapping areas of surface B. The Polyline is shown right before closure
(Left) completed (Middle). The Right view represents the trimmed Surface B

165. Delete the trimming curve and select the trimmed surface and export it as an ASCII STL file
called surface9BTrimmed.stl; overwriting the previous surface9BTrimmed.stl file.

You are now going to use SpaceRanger to identify the zones in model9.flac3d that come to within 2 m
of surface9ATrimmed or surface9BTrimmed .

Identifying the zones that intersect the surfaces with SpaceRanger


SpaceRanger is a program that reads a .flac3d grid file, identifies the zones that intersect or come close
to surfaces A or B, and outputs a .flac3d grid file where all the identified zones belong to a group called
X.

166. Create a text file called spaceranger.dat, and on the first line of this file write
surface9ATrimmed.stl and on the second line surface9BTrimmed.stl.
167. Run Spaceranger in the folder containing the starting FLAC3D grid file, model9.flac3d. Enter 4 so
that Everything intersecting surfaces becomes one group, followed by <RETURN>.
168. Enter 1 to read a FLAC3D model grid, followed by <RETURN>, and enter model9.flac3d, followed
by <RETURN>.
169. For the buffer distance enter 2 followed by <RETURN>. Spaceranger creates 3 files:
output.flac3d, output.wrl and output.nas. Rename output.flac3d as
model9SurfaceIntersection2.flac3d and output.wrl as model9SurfaceIntersection2.wrl.
170. In Rhino, select the File|Import menu item to open the Import dialog box. At the bottom of the
box, for File of type select VRML and for the File name select model9SurfaceIntersection2.wrl and
click Open. Left-click the icon marked ColorizeAllObject to colorize each object in the model
separately (Figure 241, Left).

Figure 241, Left shows the zones of model9.flac3d that intersect with or come close to within 2 meters
of surface9ATrimmed or surface9BTrimmed.

KUBRIX Geo/Rhino Users Manual Page 157


171. Delete the mesh representing the non-intersecting zones (shown in purple) leaving the mesh
representing the intersecting zones (shown in yellow in Figure 241, Right). Select this mesh and use
File|Export Selected to save it as an ASCII STL file called core.stl. Exit Rhino.

Figure 241: model9SurfaceIntersection1.wrl depicted in Rhino. The complete model (Left) and the
affected zones only (Right)

You must now check to see if surfaces A or B intersect with the core

172. Select Surface B (by right clicking on Layer B in the Layers window and selecting Select Objects
in the dropdown menu). Select the core and left click on the icon marked Mesh Intersect. Rhino
reports that there are no intersections between surface B and the core.
173. Select surface A and the core, and left-click on the icon marked Mesh Intersect. Rhino finds a
number of intersections (Figure 242, Left). Keep the intersection curves highlighted but hide layers
B and core to see surface A with the highlighted intersection curves in the Top view (Figure 242,
Right).

Figure 242: Intersections found between surface A and the core

KUBRIX Geo/Rhino Users Manual Page 158


These intersections are due to the fact that the recovered upstream face of the dam does not perfectly
match the dam. You will need to trim off part of surface A so there are no intersection. In reality both
surfaces should intersect the surface but here, the surface intersections occur at very shallow angles
and to compute the intersections properly would require too much work (see Tutorial 8 for further
details on how to intersect surfaces). Here we prefer to stop short of the surface of the core to avoid
intersections.

174. While in the Top view with only surface A (layer A) and the intersection curves visible, select the
Curve|Polyline|Polyline menu item, deactivate Osnap and draw a Polyline that traverses the
surface from top to down and passes near the intersection curves (Figure 243, left).
175. Delete the intersection curves. While the Mesh is selected, select the Mesh|Mesh Edit
Tools|Mesh Split menu item and click on the curve. Select the part of the surface to the Right of
the curve and delete it (Figure 243, Middle). Click on the icon marked Delete Mesh Faces and delete
the faces of surface A near the small intersection curve at the bottom of surface A (Figure 243,
Right).

Figure 243: Trimming off surface A

176. Select the core mesh and export is as an ASCII STL file called outer.stl. Similarly Export the
meshes surface9ATrimmed and surface9BTrimmed, both, as one file called inner.stl.
177. left-click on the icon marked Kubrix (Kubrix version 12 or higher) to open the KubrixGui dialog
box. Select the Tetrahedral Meshing tab and click on the Default button. In the Input Surface
section, click on the Input File button and select the outer.stl file. In the Options section, in the
New keywords field enter -fault inner.stl. Click on Compute to launch the calculations (Figure 244).

KUBRIX Geo/Rhino Users Manual Page 159


Figure 244: The Kubrix dialog box

Please note that the cut angle is 20 instead of the default 45. Using a small cut angle reduces the
chance for self-intersections in the remeshed surface because it forces the remeshed surface to stay
closer to the original. One of the disadvantages of using a low cut angle is an increase in the number of
zones (or blocks in 3DEC) and the risk that noise present in the input surfaces may end up in the final
Kubrix volume mesh.

What if Kubrix says there are self-intersections?


178. If Kubrix indicates the existence if self-intersections in the model, the coordinates of these
points will appear after the message in the following manner:

ISI032: Checking for surface self-intersection ...

6.512099726e+003,6.235797141e+004,9.777447081e+002

6.510874023e+003,6.235809956e+004,9.777234065e+002

6.511879086e+003,6.235528237e+004,9.775516903e+002

6.507350556e+003,6.235427734e+004,9.771623761e+002

6.512338711e+003,6.235427734e+004,9.775603322e+002

----------------------------------------------------------------------------

WA-ISW010: Input surface self-intersects ...

----------------------------------------------------------------------------

179. To correct these self-intersections, once the Kubrix calculation is complete, open the kubrix.log
file created in your working directory, copy the x, y, z coordinates highlighted in the above Kubrix
output. In Rhino, select the Curve|Polyline|Polyline menu item and paste the copied coordinates
into the Rhino command window.

KUBRIX Geo/Rhino Users Manual Page 160


180. A Polyline is created waiting for you to enter another point. Click somewhere in the
background of the graphic window followed by <RETURN> to complete the Polyline. This Polyline
points to the location of intersections (Figure 245).

Figure 245: Polyline pointing to the x,y,z locations of "problem" triangles

A successful run of Kubrix should include no error or warning messages about self-intersections.

181. Kubrix creates 3 files kubrix.log, kubrix_out.flac3d and kubrix_out.wrl. Rename


kubrix_out.flac3d, core.flac3d.

How does KUBRIX keep track of zone faces for FLAC3D?


The FLAC3D file core.flac3d produced by this version of Kubrix is a grid file that contains grid points,
tetrahedral zones, groups -in the present case just one group- but also face groups (following the
keyword fgroup). All the zone faces that match the STL file inner.stl belong to a face group called
Patch_1. Please note that Kubrix no longer separates the model at these face groups. This can now be
done in FLAC3D. In the present tutorial, Kubrix reads the file inner.stl using the -fault keyword and finds
that this surface represents just one patch so simply a face group called Patch_1 is created.

The core.FLAC3D file is organized as follows:

* FLAC3D input deck produced by KUBRIX version 12.0.5

* mesh built: Tue Jan 10 18:57:52 2012

* -app rhino -i "C:/Users/Itasca/geo/InterfaceExample/outer.stl" -aspect 1.3 -offset 1 -cut 45 -mode


tetra1 -ot flac3d -it stl -fault inner.stl

*GRIDPOINTS

G 1, 5.956671e+003, 6.325790e+004, 7.051194e+002

KUBRIX Geo/Rhino Users Manual Page 161


G 2, 5.956671e+003, 6.325790e+004, 7.201010e+002

G 3, 5.936544e+003, 6.325790e+004, 7.169359e+002

..................................................................

G 26140, 6.251273e+003, 6.299968e+004, 8.208032e+002

G 26141, 6.584813e+003, 6.351720e+004, 9.099938e+002

G 26142, 6.268453e+003, 6.298961e+004, 8.240765e+002

*ZONES

Z T4 1, 21401, 21402, 17174, 21403

Z T4 2, 17174, 21401, 6885, 21402

Z T4 3, 17174, 21403, 19978, 21401

..................................................................

Z T4 85783, 12828, 2796, 8126, 8128

Z T4 85784, 12183, 5203, 12181, 12178

Z T4 85785, 7641, 6749, 7187, 7189

*GROUPS

ZGROUP group1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

.......

85755 85756 85757 85758 85759 85760 85761 85762 85763 85764 85765 85766 85767 85768

85769 85770 85771 85772 85773 85774 85775 85776 85777 85778 85779 85780 85781 85782

85783 85784 85785

*FACES

F T3 1, 8354, 8384, 8410

KUBRIX Geo/Rhino Users Manual Page 162


F T3 2, 7903, 8167, 7960

F T3 3, 8561, 8631, 8604

......

F T3 7452, 24476, 24590, 25642

F T3 7453, 7416, 24859, 25116

F T3 7454, 7725, 7727, 25578

*Face groups

FGROUP Patch_1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

..................................................................

3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694

3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711

3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727

Combining hex and tet grids into a final hybrid grid


182. Launch FLAC3D, use File|Grid|Import to import model9SurfaceIntersection2.flac3d into
FLAC3D. Note that the model include 2 groups: Dam and X, Left). X is the group of all the zones that
intersect or are within 2m of the surface9DrapedTrimmed surface.
183. In the FLAC3D command window enter DEL ZONE RANGE GROUP X to delete of all the zones in
group X. Use File|Grid|Export to export what remains (Figure 246, Right) as model9Hex.flac3d.
Quit FLAC3D.

KUBRIX Geo/Rhino Users Manual Page 163


Figure 246: FLAC3D view of model9SurfaceIntersection2.flac3d before (Left) and after the removal of group X (Right).

184. Start FLAC3D. Use File|Grid|Import to import core.flac3d into FLAC3D (Figure 247, Left). Now,
use File|Grid|Import again to import model9Hex.flac3d (Figure 247, Right).

Figure 247: Tetrahedral mesh of the core alone (Left) and after the addition of nolde9Hex.flac3d (Right)

185. In FLAC3D, use EXPGRID hybrid.flac3d to export the content of the model as hybrid.flac3d.

Please note that by reading core.flac3d first you ensure that the faces mentioned in the face groups,
which use the grid point ID's invoked earlier in the core.flac3d file remain unchanged.

The figure below (Figure 248) shows the various components of this hybrid model. Please note that you
need FLAC3D version 4.1 or higher to utilize face groups. Also, when you export hybrid.flac3d, your
version of FLAC3D may not include the FACE and FACE GROUP information in the grid file. If this is the
case, please use a text editor to open core.flac3d, copy the FACE and FACE GROUP portions of the
model and paste it to the end of hybrid.flac3d file to obtain a valid grid file.

KUBRIX Geo/Rhino Users Manual Page 164


Figure 248: Perspective view of the hybrid model featuring a vertical cut plane through the model and highlighting the three
main components of this mesh: the outer hex mesh, the inner tetra mesh and the triangular face groups destined to become
an interface

Using SpaceRanger to create separate groups below and above the surface
NOTE: You no longer need to use the KUBRIX SpaceRanger utility to do this. This can be accomplished
entirely using the FLAC3D Geometry Range and Geometry Group commands.

186. Open the spaceranger.dat file created earlier and insert surface9.stl on the first line.
surface9.stl is a translation of the original surface9.dxf into an ASCII STL ile. Run SpaceRanger,
select option 0, enter 1 to read a FLAC3D grid file, enter hybrid.flac3d as the name of the grid file
you want process. SpaceRanger will produce, among other files a file called output.flac3d.
187. Rename output.flac3d, hybridRanged.flac3d. Launch FLAC3D an use File|Grid|Import to
import hybridRanged.flac3d (Figure 249).

KUBRIX Geo/Rhino Users Manual Page 165


Figure 249: hybridRanged.flac3d processed by SpaceRanger

Please note that SpaceRanger does not yet transfer FACE and FACE GROUP information. Please make
sure to manually cut and past the FACE and FACE GROUP section of core.flac3d to the end of
hybridRanged.flac3d prior to use in FLAC3D.

END OF TUTORIAL 9

KUBRIX Geo/Rhino Users Manual Page 166


Tutorial 10: Open pit with intermittent faults

Reading a DXF file containing pit contours, topography and faults


188. Start Rhino and select the Large Object: Meters template. Enter SetWrokingDirectory and
when the browser opens navigate to the folder in which you will be working and click OK.
189. File|Import Tutorial10.dxf. Use Model units: Meters, Layout units: millimeters and Mesh
Precision: Double Precision.

190. _Layer to open the Layers Panel. Select all layers and click on one lit light bulb (in the Layers
Panel) to hide all layers. Select the Toe and Crest layers, click on the light bulb (in the Layers Panel)
to turn these 2 layers on.

Building a mesh representing the pit


191. Double-click the Perspective label to maximize the Perspective view. <CTRL> A to select all the
visible contour lines. Curve|Point Object|Divide Curve by|Length of Segments, followed by
<ENTER>, and set the length of segments to 5.

KUBRIX Geo/Rhino Users Manual Page 167


192. Hit <ENTER> to complete the creation of points every 5 meters on the selected curves.

193. Edit|Select Objects|Points to select all point, followed by _MeshPatch. Hit <RETURN> to
accept the default options, and hit <ENTER> ,again, to obtain a triangular mesh resulting from the
points. Edit|Select Objects|Points, followed by <DELETE> to get rid of the points which are no
longer needed. Hide the Crest and Toe layers by turning their layer light bulbs off.
194. _Shade and, in the command options, select Display Mode Shaded.

KUBRIX Geo/Rhino Users Manual Page 168


195. Sometimes the shading smoothing can make the benches difficult to see. To avoid smoothing
turn flat shading on. First, make sure that Panel|Display is checked. In the Display Panel, check Flat
Shading to see the image shown above
196. Click on the Shaded Viewport icon to see the mesh with the grid lines.

197. Again, if Flat Shading it not on, turn it on to better see the details of the mesh. Zoom in to see
the image below

KUBRIX Geo/Rhino Users Manual Page 169


198. Select the mesh, then _ChangeLayer which opens the Layer for Objects dialog box.

199. Click New which opens the New Layer dialog box. Enter PitMesh for the name of the new layer
and click OK. Click OK to close the Layer for Objects dialog box. In the Layer Panel, hide PitMesh by
turning off its light bulb.

Building a mesh representing the initial topography


200. In the Layers Panel, turn off all layers except Topo. Click Zoom Extents.

KUBRIX Geo/Rhino Users Manual Page 170


201. Select all the curves belonging to the Topo layer. Curve|Point Object|Divide Curve by|Length
of Segments, followed by <ENTER>. Set the length of segments to 5 and hit <ENTER>. This results
in the creation of points, 5 m apart, on the selected curves.
202. Edit|Select Objects|Points, followed by _MeshPatch. <RETURN> to accept the command
defaults, followed by another <RETURN> to build a mesh representing the topography. Edit|Select
Objects|Points, followed by <DELETE> to get rid of the point. Hide Topo in the Layers Panel.
_Shade icon and select Display Mode=Shaded.

203. Select the mesh, then _ChangeLayer which opens the Layer for Objects dialog box.
204. Click on New which opens the New Layer dialog box. Enter TopoMesh for the name of the new
layer and click OK. Click OK to close the Layer for Objects dialog box. In the Layer Panel, hide
TopoMesh.

Combining the pit and the topography mesh


205. Hide all layers. In the Layers Panel, turn on the PitMesh layer. Select the mesh and,
Curve|Curve from Objects|Duplicate Border. This is the boundary of the pit.

KUBRIX Geo/Rhino Users Manual Page 171


206. Hide PitMesh in the Layers panel, leaving only the boundary curve visible. Turn on the
TopoMesh layer and select the Top view. Edit|Select Objects|Curves to highlight the boundary
curve.

207. Mesh|Mesh Edit Tools|Mesh Trim and click inside the curve to trim off the portion of the mesh
that is inside the curve. Don't forget <ENTER> to complete the Trim operation. Edit|Select
Objects|Curves followed by <DELETE> to get rid of the boundary curve.

KUBRIX Geo/Rhino Users Manual Page 172


208. Unhide the PitMesh layer so both meshes are visible. Select both meshes and _ColorizeObjects.
Click Shade to see the view below.

Building a single surface extending over the pit and the topography
209. In Top view, select Surface|Drape. Click somewhere at the top, left of the mesh, then drag the
mouse towards lower left corner of the window drawing a rectangle as large as possible while still
contained within the mesh.

KUBRIX Geo/Rhino Users Manual Page 173


210. Release the mouse button to complete the Drape. Hide PitMesh and TopoMesh in the Layers
Panel, select the Perspective View and click on the Shaded Viewport icon. If you notice the surface
dipping below realistic heights at certain points, this may be due spilling through the gap between
PitMesh and TopoMesh. Try draping again.

Trimming of the topography and adding of vertical walls


211. Go back to Top View. Curve|Rectangle|Corner to Corner. Enter -120,1310 for the first and
2100,3750 for the second corner. Note, no blanks. Edit|Select Objects|Curves to highlight the
rectangle. Edit|Trim and click on the surface outside of the rectangle (don't forget <ENTER> to
finish Trim), then delete the rectangle itself.

KUBRIX Geo/Rhino Users Manual Page 174


212. Select the Perspective view. Select the surface, then Curve|Curve from Objects|Duplicate
Border. You can also right-click in the command area and find it there, in your recent history.
213. While the border curve is selected, zoom away to give yourself more room, then
Surface|Extrude Curve|Straight (Option Both sides=No) and drag the curve down as much as
possible, then click the left mouse button to stop the extrusion right there. You have created the
vertical walls of the model.

KUBRIX Geo/Rhino Users Manual Page 175


Building a closed volume
214. Delete the TopoMesh boundary curve. Select the Front View, and click on the Zoom Extents.
Curve|Line|Single Line, enter -400,-500 for the first point of the line. Then, hold down <SHIFT>,
and click somewhere far right of the window to create a perfectly horizontal line.

KUBRIX Geo/Rhino Users Manual Page 176


215. Select the horizontal line, Edit|Trim and click below the line to trim away the lower part of the
vertical walls. <ENTER> to finish trimming, then <DELETE> the horizontal line.
216. The vertical walls are now cut horizontally at z = -500 m. Select the top (topography) surface
and the vertical walls, then Edit|Join to create a single Polysurface open at the bottom. Select the
Polysurface, then Solid|Cap Planar Holes to create a closed Polysurface also called a Solid.

Saving your model


217. File|Save As, and save your model as tut10a.3dm.

Creating a triangular mesh and building models


218. Select the solid, then _ChangeLayer. In Layer for objects click on New. In New Layer, type in
Solid, then click OK. Click OK to close Layer for objects box.
219. Select the solid and _Mesh. If the Polygon Mesh Options dialog box opens, click on Detailed
Controls to open the Polygon Mesh Detailed Options dialog box. Select the parameters depicted
below.

KUBRIX Geo/Rhino Users Manual Page 177


220. Click Preview to verify, then OK to complete the mesh. Note that the mesh is placed in the Solid
layer as well. Select the mesh, click Check Objects to verify that this mesh has no problems.

KUBRIX Geo/Rhino Users Manual Page 178


221. Select the Solid, select it and click Hide Objects. This leaves the mesh. Select the mesh,
File|Export Selected, File name: tut10, Save as type, STL. If the STL Export Options dialog box opens,
Check File type Ascii, Export open objects, Always use these settings, then OK.

Build a FLAC3D model


222. Click the Run the KUBRIX Automesher icon. Select t the Tet/Hex Meshing tab, click on Input
file, select tut10.stl. If you don't see tut10.stl in the list, it may be because you have not
SetWorkingDirectory and Rhino/Kubrix don't know where to start looking for the file.
223. Click on the Default button at the bottom of the KubrixGui dialog box to get the configuration
shown below.

224. Click Compute.

225. KUBRIX creates a file called kubrix_out.flac3d. Start FLAC3D, File|Grid|import kubrix_out.flac3d.

KUBRIX Geo/Rhino Users Manual Page 179


226. Use the following data file to run this model in FLAC3D 5.01.

set fish safe off

set deterministic off

his unbal

gen separate face group "F1.stl" range group F1

gen separate face group "F2.stl" range group F2

interface F1 face range group F1

interface F2 face range group F2

interface F1 prop kn 1e10 ks 1e10 cohesion 1.e1 tension 0.0 friction 30

interface F2 prop kn 1e10 ks 1e10 cohesion 1.e1 tension 0.0 friction 35

model elastic

prop bulk 37e9 shear 22e9 dens 2700. ;e.g., granite

SET grav (0,0,-9.81)

fix x range x -120 tol 0.01

fix x range x 2100 tol 0.01

KUBRIX Geo/Rhino Users Manual Page 180


fix y range y 1310 tol 0.01

fix y range y 3750 tol 0.01

fix z range z -500 tol 0.01

hist unbal

SOLVE ratio 1e-5

SAVE Tut_elas.sav

RET

Build a 3DEC model


227. Click on Run the KUBRIX Automesher. This time select the Convex Blocking tab, click on Input
file, select tut10.stl and click on the Default button at the bottom of the KubrixGui dialog box.

228. Click Compute.

KUBRIX Geo/Rhino Users Manual Page 181


229. KUBRIX creates a 3DEC POLY file called kubrix_out.3dec. Start 3DEC, File|Open Item, check Call
on the right panel.

230. Click Open to start reading. Once the reading is complete, click on Blocks in the Control Panel
under the List tab to see the model. Type "i" in the graphic window to see an axonometric
perspective. In the Block Attribute, select Color by Region.

KUBRIX Geo/Rhino Users Manual Page 182


Adding Faults to the mix
231. Delete the mesh. Turn off Solid in the Layers Panel and turn Layer F1 on. Double-click the label
of the Perspective view to return to a 4-view mode to see two straight lines used to define fault F1.

232. Surface|Loft. In any of the views click on one curve, then the next, followed by <ENTER>. This
opens the Loft Options.

KUBRIX Geo/Rhino Users Manual Page 183


233. Select Straight Section for the Style and Do not simplify for Cross-section curve options, then
click OK. Edit|Select Objects|Curves, then <DELETE> the two lines. Select the Surface, then
_ChangeLayer and place the selected surface in F1.

234. Turn off F1 and turn F2 on

KUBRIX Geo/Rhino Users Manual Page 184


235. Surface|Loft. In any of the views click on one curve, then the next, followed by <ENTER>. This
opens the Loft Options.
236. Select Straight Section for the Style and Do not simplify for Cross-section curve options, then
click OK. Edit|Select Objects|Curves, then <DELETE> the two lines. Select the Surface,
_ChangeLayer and place the selected surface in F2.

Assembling the faults and the solid into one non-manifold Polysurface
237. Turn Solid, F1 and F2 on in the Layers Panel. Double-click the label of the Perspective view to
maximize it.

KUBRIX Geo/Rhino Users Manual Page 185


238. Select the 2 surfaces representing the faults and the solid and _NonManifoldMerge. This
creates a single non-manifold Polysurface that may not be valid depending on how components
intersect each other. _Check to verify.
239. Select the non-manifold Solid or Polysurface and _testExtendSlits in the command line. This
will yield a valid non-manifold Polysurface. _Check to verify that it is indeed valid.

240. _ExtractSrf, (option Copy = No), and click on any portions of the faults sticking outside the
computational domain, followed by <ENTER> to complete the surface extraction.

KUBRIX Geo/Rhino Users Manual Page 186


241. <DELETE> the selected (extracted) surfaces to obtain a single non-manifold Polysurface
describing the entire computational domain and the faults.

Saving your model


242. File|Save As, and save your model as tut10B.3dm.

Creating a triangular mesh and building models


243. Select the Polysurface and _ChangeLayer. In Layer for objects click on Solid to place it in the
Solid layer.
244. Select the solid and _Mesh. If the Polygon Mesh Options dialog box opens, click on Detailed
Controls to open the Polygon Mesh Detailed Options dialog box. Select the parameters depicted
below.

KUBRIX Geo/Rhino Users Manual Page 187


245. Click Preview to verify, then OK to complete the mesh. Note that the mesh is placed in the Solid
layer as well. Select the mesh, click Check Objects to verify that this mesh has no problems.

246. Note that _Check returns information on a number of naked and non-manifold edges.
247. Click Close to close the box. Select the mesh and _ChangeLayer, New, to move the mesh to a
layer called SolidMesh. In the Layers Panel, turn off Solid so that only SolidMesh is visible.

KUBRIX Geo/Rhino Users Manual Page 188


248.

Separating the faults form the outer surface


249. Turn the model over so the floor is visible.

250. Enter _ExtractConnectedMeshFaces. This opens the Extract Connected Mesh Faces dialog box
The Angle between affects the spread of the yellow patch of faces connected to the seed face
through a dihedral angle less or equal to te selected angle. Click on any mesh face (triangle or quad)
at the bottom of the model, and set the Angle between to 1.

KUBRIX Geo/Rhino Users Manual Page 189


251. Note that only part of the bottom is highlighted. Click on Edit Selection and click on any other
non-highlighted mesh face at the bottom of the model

252. Click OK to complete the extraction, then _Hide to hide the extracted (and still highlighted)
portion of the mesh. Now the interior of the model and the two intersecting faults are clearly
visible. Zoom in closer.

253. _ExtractConnectedMeshFaces again, and open the Extract Connected Mesh Faces dialog box.
Click on any mesh face on one of the faults, and set the Angle between to 3.

KUBRIX Geo/Rhino Users Manual Page 190


254. Note that increasing Angle between does not affect the extend of the highlighted patch. Click
OK, then _Hide to hide the selected mesh portion. Turn the model around in order to have a better
view of the remaining fault.

255. Again, _ExtractConnectedMeshFaces, which opens the Extract Connected Mesh Faces dialog
box. Click on any mesh face on the remaining fault, and set the Angle between to 3.

KUBRIX Geo/Rhino Users Manual Page 191


256. Click OK, then _Hide to hide the extracted 2d fault.

257. The initial mesh is now split into 4 meshes: the bottom and the 2 faults that are hidden, and the
remaining mesh representing the walls and the topography. Unhide all the meshes, select all
meshes and _ColorizeObjects.

KUBRIX Geo/Rhino Users Manual Page 192


Saving your model
258. File|Save As, and save your model as tut10C.3dm.

Exporting the outer and fault meshes


259. Select the2 visible meshes: the mesh representing the wall + the topography, and the mesh
representing the bottom. Edit|Join, then File|Export Selected, File name: outer, Save as type, STL.
If the STL Export Options dialog box opens, Check File type Ascii, Export open objects, Always use
these settings, then OK.
260. Hide the 2 visible meshes using _Hide.

261. Select one fault, then File|Export Selected, File name: F1, Save as type, STL. If the STL Export
Options dialog box opens, Check File type Ascii, Export open objects, Always use these settings, then
OK.
262. Select the other fault, then File|Export Selected, File name: F2, Save as type, STL. If the STL
Export Options dialog box opens, Check File type Ascii, Export open objects, Always use these
settings, then OK.

KUBRIX Geo/Rhino Users Manual Page 193


263. You have now saved the outer walls, the topography and the floor of the model as a single STL
file called outer.STL, and the faults, individually as F1.STL and F2.STL.

Build a FLAC3D model


264. Click Run the KUBRIX Automesher. Select the Tet/Hex Meshing tab, click on Input file, select
outer.stl. If you don't see outer.stl in the list, it may be because you have not SetWorkingDirectory
and Rhino/Kubrix doesn't know where to start looking for this file.
265. Click on the Default button at the bottom of the KubrixGui dialog box, and enter -fault F1.stl -
fault F2.stl in the New keyword field.

266. Click Compute the create the mesh.

267. KUBRIX creates a file called kubrix_out.flac3d. Start FLAC3D, File|Grid|import kubrix_out.flac3d.

KUBRIX Geo/Rhino Users Manual Page 194


268. Hide the Zone plot item, and in the List tab, under Zones, double-click Face Group. Note that
there a 3 face groups, one called Box representing all the boundary zone faces and 2 groups
containing the zones faces coinciding with the 2 faults, F1 and F2.
269.

Using a FLAC3D grid containing face groups


270. Run FLAC3D 5.01 and run the following command file

NEW

set fish safe off


set deterministic off
his unbal

impgrid kubrix_out.flac3d
gen separate face group "new1" range group "F1.stl"
gen separate face group "new2" range group "F2.stl"
interface 1 face range group "new1"
interface 2 face range group "new2"
interface 1 prop kn 1e10 ks 1e10 cohesion 1.e1 tension 0.0 friction 30

KUBRIX Geo/Rhino Users Manual Page 195


interface 2 prop kn 1e10 ks 1e10 cohesion 1.e1 tension 0.0 friction 35

model elastic
prop bulk 37e9 shear 22e9 dens 2700. ;e.g., granite

SET grav (0,0,-9.81)


fix x range x -120 tol 0.01
fix x range x 2100 tol 0.01
fix y range y 1310 tol 0.01
fix y range y 3750 tol 0.01
fix z range z -500 tol 0.01

hist unbal
SOLVE ratio 1e-5

SAVE Tut_elas.sav
RET
271. Show Zone|Displacements|Displacement Magnitudes.

Build a 3DEC model


272. Click Run the KUBRIX Automesher. Select the Convex Blocking tab, click on Input file, select
outer.stl. If you don't see outer.stl in the list, it may be because you have not SetWorkingDirectory
and Rhino/Kubrix doesn't know where to start looking for this file.

KUBRIX Geo/Rhino Users Manual Page 196


273. Click on the Default button at the bottom of the KubrixGui dialog box, and enter -fault F1.stl -
fault F2.stl in the New keyword field.

274. Click Compute the create the mesh.

275. KUBRIX creates a 3DEC POLY file called kubrix_out.3dec. Start 3DEC, File|Open Item, check Call
on the right panel.

KUBRIX Geo/Rhino Users Manual Page 197


276. Click Open to start reading. Once the reading is complete, click on Blocks in the Control Panel
under the List tab to see the model. Type "i" in the graphic window to see an axonometric
perspective. In the Block Attribute, select Color by Region.

277. Render the Blocks 99% transparent, then in the List tab, double-click on Joint.

278. Click on the Joint Range icon and in Elements double-click Join ID.

KUBRIX Geo/Rhino Users Manual Page 198


279. Click on Not and enter 1 in front of Add

280. Click OK to see a view of the transparent Blocks overlaid with the two joints now appearing as
joints 3 and 4.

End of Tutorial 10

Exercise 1A: Interactive Meshing of a Salt Cavern (BR)


In this exercise, you will learn to build, interactively, a high-quality hexahedral mesh of a salt cavern
(Figure 251).

KUBRIX Geo/Rhino Users Manual Page 199


Figure 250: A solid model (left) and a 3DEC model (right) of a salt cavern

Interior of the cavern


281. Start Rhino, Large Objects, meters. SetWorkingDirectory to the folder where you want the hex
mesh to be placed (if not set, file will be created in your Documents folder). File|Import
Exercise1.dxf in Rhino.
282. Select all curves. Select Surface|Loft and click on the word Automatic. Hit <RETRN>. In the
Loft Options dialog box, select Style|Loose. Cross-section curve options, check Rebuild with 10
control points. click OK then <Delete> the highlighted curves.

283. Select the Top View, click on the Show Edges icon, check All Edges and note the seam (in pink).
You will split this surface in 3 pieces. This is how you can do that.

KUBRIX Geo/Rhino Users Manual Page 200


284. Select the surface, Edit|Split, click on the word isocurve in the command window. Click
successively on the two isocurves shown below (left and right) to split the surface in 3 pieces. Hit
<Enter> when done. If the isocurves are in the wrong direction, click on the word Toggle in the
command window.

285. Perspective view, select all 3 surfaces, click on the ColorizeObjects icon. Note that there are 3
surfaces.

KUBRIX Geo/Rhino Users Manual Page 201


286. Select all 3 surfaces, <Ctrl> J to Join. Solid|Cap Planar Holes to get a Solid (Below). This solid
has the topology of a prism and will be acceptable by BR. Select the Solid and click on the BR icon.

287. Hit <Return> to accept the default values. Start FLAC3D, File|Grid|Import block_ranger.flac3d.
If FLAC3D responds with bad zone geometry messages, move your seams around or increase
MinEdgeResolution or reduce MaxEdgeLength in BR.

Outside the cavern


288. Perspective View, right-click on Extract Surfaces and make sure that the Command-line says
Copy=Yes. Click on the 3 lateral surface of the cavern, then <Enter>. While the extracted (copied)
surface are selected, ColorizeObjects. Hide the Solid.

KUBRIX Geo/Rhino Users Manual Page 202


289. Solid|Box|Corner to Corner: -400,-400,0 to 400,400,437. Explode the box and delete its top and
bottom faces. Select everything and ColorizeObjects.

290. Select the two highlighted faces (below, left), DupBorder, Loft, delete the border and Join the
lateral surface and the two end surfaces to create a Solid (below, right).

KUBRIX Geo/Rhino Users Manual Page 203


291. Build a second solid as shown (below, left) and a 3rd as shown below, right.

292. To build the last Solid, Extract Faces from the two existing Solids (below, left), and Join them
with the remaining unused face, then Solid|Cap Planar Holes to build a solid. Unhide everything to
bring in the solid representing the cavern itself (below, right).

KUBRIX Geo/Rhino Users Manual Page 204


293. Select the center Solid, left-click on the Edit Layers icon and hold the button down. Select the
second item(Change object layer) in the mini toolbar that opens. Click New in the Layer for Objects
dialog, enter Cavern, OK to place the center Solid in a layer called Cavern. Select all outside Solids
and place them in a layer called Outside.

294. Select all solids and left-click on the BR icon. Run FLAC3D and read the grid in.

KUBRIX Geo/Rhino Users Manual Page 205


295. In the plot item, colorize by Slot 1. Note that Layers in Rhino become groups in Slot 1.

KUBRIX Geo/Rhino Users Manual Page 206


END OF EXERCISE 1A

KUBRIX Geo/Rhino Users Manual Page 207


Exercise 1B: Using Loft with contour lines (Geo/Hex)
In this exercise, you will learn to construct a volume based on a number of stacked closed curves
obtained from the sonar survey of an underground cavern formed by the dissolution of a salt dome
(Figure 251).

Figure 251: A solid model (left) and a 3DEC model (right) of a salt cavern

Creating a solid model & meshing


296. Read Exercise1.dxf into Rhino
297. Select all curves. Select Surface|Loft and click on Automatic. Hit <RETRN>.
298. In the resulting dialog box, check Closed Loft and click OK.
299. Mesh the surface, then create a box surrounding the surface using Mesh|Polygon Mesh
Primitives|Box
300. Save your model, then export is as an STL file
301. Run Kubrix to create grids.

KUBRIX Geo/Rhino Users Manual Page 208


Exercise 2: Using Mesh from Points (Geo/Hex)
In this exercise, you will learn to construct a model of an open pit starting from a set of topographic
contour lines (Figure 252).

Figure 252: Clockwise from top left: Contour lines, boundary-fitted all-hex model, Octree model model, and 3DEC model

Creating a solid model & meshing


302. Read Exercise2.dxf into Rhino
303. Select all curves. Select Curves|Curves from Objects|Extract Points to extract all the points.
Select Edit|Select Objects|Curves to select all curves, and delete them
304. Select all the points and select Mesh|Mesh from Points.
305. Click on SampleDensityPlusNoise and set it to 100, and hit <RETURN>.
306. While the points are still selected, delete them. Adopt a Top view
307. Use Mesh|Mesh Repair Tools|Fill Hole to manually fill all holes.
308. If needed, use Mesh|Single Face Mesh to locally create quad meshes.
309. Clean up the geometry by smoothing, collapsing small edges, extracting connected faces and
checking the mesh
310. In the Top view, trim the mesh with a square whose corners are at -6000,-6000,0 and
5000,5000,0.
311. Extract the mesh boundary, extrude it in the z direction.
312. In the Front view trim the extrusion surface and cap it.

KUBRIX Geo/Rhino Users Manual Page 209


313. Mesh the surface
314. Use edge matching to connect the two meshes together and obtain one watertight mesh.
315. Save your model, then export is as an STL file
316. Run Kubrix to create grids.

KUBRIX Geo/Rhino Users Manual Page 210


Exercise 3: Building Complex Hex Meshes Using BR
In the following exercises you will learn to build quality block-structured hexahedral mesh from CAD
models described by a DXF files, the reference model. To create a mesh using KUBRIX BR, you must
create an assembly of 6, 5 or 4-sided Rhino solids that conforms to the reference model. Below, the
reference model is shown on the left. The corresponding final hexahedral mesh is shown to its right.

Preparation
317. Start Rhino and select Large Objects, Meters as your template. If Rhino does not ask you for a
template, File|New and select Large Objects, Meters.
318. If you have not already done so during an earlier work session, drag the content of Rhino5 Stuff
onto your Rhino5 window to install the plug-ins, menu items and icons contained in that folder in
Rhino5. Another installation option is to double-click the BlockRanger.rhi installer file to install the
plug-in and the associated tools. The installation is permanent and you will not need to do this for
later sessions.
319. in Rhino, type SetWorkingDirectory and navigate to the your current working directory. In this
fashion Rhino knows where to read, import from and save files.

Pillar

KUBRIX Geo/Rhino Users Manual Page 211


Bridge

Reservoir

KUBRIX Geo/Rhino Users Manual Page 212


Nuclear Deposit

Tunnel45

KUBRIX Geo/Rhino Users Manual Page 213


Ore Pass

Salt Cavern

KUBRIX Geo/Rhino Users Manual Page 214


Rail Tunnels

Civil Tunnel

KUBRIX Geo/Rhino Users Manual Page 215


T-Junction

KUBRIX Geo/Rhino Users Manual Page 216


Using BubblePack to automatically build clumps for PFC3D

Summary
BubblePack is a program for the automatic generation of clumps for PFC3D. This program which has
been added to the Kubrix suite of applications uses Delaunay tetrahedralization to create a clump
representation of any shape.

BubblePack approximates the mid surface of any closed surface. The resulting point, radius pairs
represents a clump approximating the given shape.

To use BubblePack one specifies a shape, an input as a triangulated surface represented as a formatted
STL file, and two parameters describing the degree of approximation. The program outputs a ball file
which can be read directly into PFC3D.

Medial axis/Mid-surface and bubble packing


The medial axis (Blum, 1973) or skeleton of a two-dimensional curve S is the locus of the centers of
circles that are tangent to curve S in two or more points, where all such circles are contained in S (Figure
253).

Figure 253: A 2D planar curve and its medial axis representation shown with thin lines. The medial axis or skeleton is the
locus of the centers all the internal circles (in blue) tangent to at least two points of the curve

By extension, the mid-surface of a three-dimensional surface S is the locus of the centers of spheres that
are tangent to the surface S in three or more points, where all such spheres are contained in S. Figure
255 illustrates a 3D example in which the mid surface is shown in pink.

KUBRIX Geo/Rhino Users Manual Page 217


Figure 255: 3D object outlined in black. The its mid surface is represented in purple, and a few of the included are shown

Clearly, the definition of mid-surface and the problem of finding clumps approximating a surface are
germane. A mid-surface and the radius of all the spheres it hosts define an infinite collection of balls
perfectly matching a surface. In practice, we are limited to a small number of balls

Using BubblePack

Examples

Input Surface
Input file
Name of the ASCII STL file defining a closed surface in which the clump will be created. Please make
sure the STL grid size is uniform and at most 1/10 of the size of the smallest ball

Meshing Parameters
Min/Max Ball Size Ratio
The size ratio of the smallest to the largest ball. This parameters determines how small details are
resolved

KUBRIX Geo/Rhino Users Manual Page 218


Ball intersection angle
The largest angle at which balls are allowed to intersect. The greater this value the smoother is the
surface of the clump. In this fashion you can control the roughness of the clump surface. This
parameters limits the number of balls by limiting ball overlap.

Figure 256: Clump representing a Hershey kiss with 8 balls. The two parameters determining the clump are Min/Max Ball
size ration = RMIN/ RMAX = 0.4 and Amax, the maximum ball-to-ball intersection angle A < 90

Options/New Keywords
This field is reserved for additional command-line keywords

Compute
Launches the mesh generation computation

Reset
Restores the initial set of parameters when KUBRIX was first started. These parameters are read from
the kubrix.log file located in the working folder.

Default
Restores the default KUBRIX parameters for the type of meshing requested.

Cancel
Closes the KUBRIX dialog box

Help
Opens this document

KUBRIX Geo/Rhino Users Manual Page 219


CAD Representation of surfaces and volumes
Data transfer between different CAD tools is achieved through files. Files may differ by the entities they
contain and by their format. For instance, an AutoCAD DXF and a VRML file may both describe a mesh
of triangles. Both need to be converted to an ASCII STL file before KUBRIX can generate a volume mesh.
If a CAD file contains only points or lines, it must be read into a CAD tool such as Rhino 4.0 before closed
surfaces are created and a volume mesh is generated with KUBRIX. In summary, two files may contain
the same entities but in different formats or two files of the same format may contain different
geometrical entities

General Guidelines
CAD data is generally either a surface/solid/line (geometrical) model or facetized (discretized polygons).
Solid/Surface/line models are mathematically exact definitions of the geometries they describe whereas
facetized data represent solid/surface models that have been discretized into a collection of points and
polygons.

Surfaces/Solids must be imported as IGES or STEP files into Rhino, triangulated, cleaned-up and
exported as ASCII STL files for processing with KUBRIX.

Facetized (triangulated) data may be imported in the STL, VRML, DXF or 3DS formats into Rhino for
further processing. In Rhino, facetized data will be represented as a mesh. The mesh must be first
cleaned-up, that is checked for quality (no free edges, degenerate or duplicated faces) and defeatured
(see Removal of artifacts due to triangulation noise: de-featuring. Section 0 in Tutorial 3) before being
exported as an ASCII STL file for processing with KUBRIX

Solids & Surfaces


Solids and surfaces may be imported in the IGES, STEP or ACIS formats into Rhino. In Rhino the data will
be represented as polysurfaces which should be checked for naked edges and other anomalies. The
polysurfaces should then be triangulated, cleaned-up and exported as an STL file for processing with
KUBRIX

Manifold and non-manifold Surfaces


Solids are assemblies of surfaces, called Polysurfaces in Rhino, that have a clearly-defined interior and
exterior. Surfaces defining solids are called manifold surfaces. In this context, manifold means that a
surface edge is shared at most by two surfaces. In contrast, consider a solid cut in half. The resulting
solid has now one interior surface. It is closed but doesnt have a clear interior. To be exact, it has two
interiors. Such surfaces are called non-manifold surfaces.

Wireframes
Wireframes may be imported as IGES, STEP, VRML 2.0, DXF or DWG files into Rhino. In Rhino, the data
will appear as lines. Lines should be used as a guide to create closed polysurfaces. It is a good practice
not to curves directly but to retrace them by creating Polylines (using points on the curves). Often,
curves produced by AutoCAD contains many degenerate line segments which, if used directly in the
construction of a surface, may result in invalid surfaces. Use the retraced Polylines or curves to create

KUBRIX Geo/Rhino Users Manual Page 220


surfaces. The resulting closed polysurfaces should be triangulated and cleaned-up before being
exported as an STL file for processing with KUBRIX

Points
In Rhino, the points should be used as a guide to create lines and closed polysurfaces. The closed
polysurfaces should be triangulated, cleaned-up and exported as an STL file for processing with KUBRIX

Facetized surfaces: polygonal surfaces


Polygonal surface may be imported as IGES, STEP, VRML 2.0, 3DS, STL, DXF or DWG files into Rhino. In
Rhino, polygons should be split into triangular meshes. Meshes should be closed and checked for
anomalies (degenerate or duplicate elements) and defeatured (see KUBRIX-Rhino users' manual).
Triangular meshes should be exported as STL files for processing with KUBRIX

Facetized surfaces: triangular surfaces


Triangular surfaces may be imported as IGES, STEP, VRML 2.0, 3DS, STL, DXF or DWG files into Rhino. In
Rhino, meshes should be closed and checked for anomalies (degenerate or duplicate elements) and
defeatured. Triangular meshes should be exported as STL files for processing with KUBRIX.

KUBRIX Geo/Rhino Users Manual Page 221


SpaceRanger: A surface-based range Function
SpaceRanger is a generalized range function that uses surfaces to identify & modify groups of zones,
blocks & balls in FLAC3D, 3DEC or PFC3D models. Many of the functionalities of SpaceRanger are now
available as standard features in the latest version of FLAC3D, 3DEC and PFC3D under GEOMETRY
RANGE and GEOMETRY GROUP functions.

Modeling problems addressed by SpaceRanger


320. You want to give different properties to certain zones of a zoned 3DEC model based on their
location with respect to several surfaces defined as DXF file.
321. You want to carve a group of balls out of a packed group of PFC3D balls
322. You want to assign different group numbers to zones that will be excavated each year given a
stair step pit model and several DXF's representing excavation surfaces
323. You want to assign ubiquitous joint properties to zones that come within 10m of a set of faults
324. You want to change the properties of all the balls that come within 3 mm of a surface
325. You want to refine a FLAC3D model before carving out a group of zones with SpaceRanger
326. You want to turn tetrahedral zones into hexahedral zones in the vicinity of a detail

How does SpaceRanger work?

Partitioning by interiority
SpaceRanger tests whether the center of a zone, block or ball is inside (or below, if the surfaces are not
closed) one or several surfaces. The surfaces must be specified and listed in a specific order in a file
called spaceranger.dat. SpaceRanger checks each zone center, block center or ball center and
determines whether it is inside (or below) any of the surfaces and tags that zone, block or ball as being
inside the last surface (in the list) it is inside. For instance, if a zone center is inside the surfaces named
on lines 3, 19, and 14 and outside all the other surfaces in the list, that zone will be tagged as being
inside the surface named on line 19.

Partitioning by proximity to surfaces


SpaceRanger can test whether a zone, block or ball is near a surface.

Local zone refinement based on interiority and proximity


Based on whether an entity (zone, ball or block) is inside or near a surface SpaceRanger can identify that
entity and subdivide it into smaller entities: tetras into 4 hexes and hexes into 8 hexes.

SpaceRanger can directly process FLAC3D grid files. For other Itasca products, you can use FISH to
export the x, y, z coordinates, and material or color of entities in a model into a text file. SpaceRanger
sorts through the file and create a new file with updated entity groups, regions or colors which can be
read back into the model using FISH. A number of such FISH functions are provided in the manual
example files.

KUBRIX Geo/Rhino Users Manual Page 222


Examples

SpaceRanging FLAC3D zones


Run FLAC3D and read in (File|Grid|Import) test5.flac3d, if you are using FLAC3D version 5, or
test4.flac3d if you are using FLAC3D version 4 (Figure 257). This is the starting model and has 3 groups
dummy 1, 2 and 3.

Figure 257: Starting model

We will use 3 surfaces to partition this model in multiple groups. These 3 surfaces are stored in 3
separate ASCII STL files called Y0.stl, Y1.stl and Y9.stl. You can think of these surfaces as 3 excavation
surfaces in an open pit mine representing Year0, Year1 and Year2. Figure 258 shows the surfaces in one
Rhino document and in the FLAC3D model where the 3 surfaces have been read as one DXF file
containing each surface in a separate layer.

Figure 258: 3 surfaces used for SpaceRanging the model: Left, in Rhino, Right, imported as DXF in FLAC3D

KUBRIX Geo/Rhino Users Manual Page 223


Using SpaceRanger
First, create a file called spaceranger.dat and in there write:

sphereY0.stl

sphereY1.stl

sphereY2.stl

Next, run SpaceRanger:

_______________ SpaceRanger version 9.0 _______________

Copyright (C) 2012 Itasca Consulting Group, Inc.

In spaceranger.dat surface priorities increase with line number

Reads & refines hexes & tets, translates into 3dec

Using key 14388162-VQQUXV2E3G4HWR6SNV2E3GXHPRQS

Enter a number, followed by <RETURN>:

-1 Translate into a .WRL & .3DEC file.

0 Ignore existing groups. Build new ones based on surfaces.

1 Partition existing groups based on surfaces. (May produce many groups).

2 Everything inside surfaces becomes separate groups; outside is unchanged.

3 Everything outside surfaces becomes separate groups; inside is unchanged.

4 Everything intersecting surfaces becomes one group.

5 Split large zones inside surfaces:H->8H, T->4H

6 Split large zones intersecting surfaces:H->8H, T->4H

SpaceRanger option 0: Ignore existing groups. Build new ones based on surfaces
Enter 0, followed by 1 and the name of the flac3d grid file you want to process (which is test5.flac3d).
SpaceRanger reads spaceranger.dat, processes all zones and produces 2 files: output.flac3d and
output.wrl. Read output.fla3d into FLAC3D (Figure 259). Please note that all the existing groups are
now combined as one and called OLD, and 3 new groups are created: New_1, New_2 and New_3.

KUBRIX Geo/Rhino Users Manual Page 224


Figure 259: SpaceRanger Option 0 calls everything OLD, then partitions the model based on the 3 surfaces.

To understand why the zone located at A (Figure 259) is named New_2 note that location A is below (or
inside) the surface named on line 1 of spaceranger.dat (i.e. Y0.stl), below the surface named on line 2
(Y1.stl) but outside or above the surface named on line 3. Since interiority to surfaces named on higher
line numbers override those on lower ones, (as explained earlier) the zone at location A will be declared
as being inside the surface named on line 2, thus the group name New_2.

The zone located at B is declared as belonging to group OLD because it is not inside or below any of the
surfaces ( note that B is located outside the vertical shadow of all the surfaces).

SpaceRanger option 1: Partition existing groups based on surfaces. (May produce many groups).
Run SpaceRanger and enter 1, followed by 1 and test5.flac3d. Read output.fla3d into FLAC3D (Figure
260).

Figure 260: SpaceRanger Option 1.

Zones outside or above the surfaces maintain their old group number. Zones that are inside or below
any of the surfaces are partitioned into new groups along all the surfaces.

KUBRIX Geo/Rhino Users Manual Page 225


SpaceRanger option 2: inside surfaces becomes separate groups; outside is unchanged
Run SpaceRanger and enter 2, followed by 1 and test5.flac3d. Read output.fla3d into FLAC3D (Figure
261).

Figure 261: SpaceRanger Option 2

Everything inside or below the surfaces are partitioned according to the priority rule described earlier.
Everything outside or above maintains its original group number.

SpaceRanger option 3: Everything outside surfaces becomes separate groups; inside is unchanged
Run SpaceRanger and enter 3, followed by 1 and test5.flac3d. Read output.fla3d into FLAC3D (Figure
262).

Figure 262: SpaceRanger Option 3

Note that zones at location A are considered outside (group New_1) since location A is outside the
vertical shadow of the surfaces.

SpaceRanger option 4: Everything intersecting surfaces becomes one group


Run SpaceRanger and enter 4, followed by 1 and test5.flac3d, followed 80 for the buffer size which
represents the thickness of a buffer volume extending at either side of the surfaces, and in which zones
will be counted as intersecting the surfaces . Read output.fla3d into FLAC3D (Figure 263).

KUBRIX Geo/Rhino Users Manual Page 226


Figure 263: SpaceRanger Option 4

Please note that if a zone intersects multiple surfaces, it will be tagged as intersecting the surface
appearing at the highest line number in the spaceranger.dat. For instance, if a zone is found to intersect
the surfaces on line 1, line 37, and line 6 of the spaceranger.dat, it will belong to group New_37.

SpaceRanger option 5: Split large zones inside surfaces:H->8H, T->4H


Run SpaceRanger and enter 5, followed by 1 and test5.flac3d, followed 0 for the size of the smallest
zone you want to split. This means that you want every zone that is inside of below the surfaces to be
split. By selecting a larger size of the smallest zone, you can control below which zone size zones will not
be split.

If there are multiple surfaces in spaceranger.dat, inside or below the surfaces means inside or below any
of the surfaces . Read output.fla3d into FLAC3D (Figure 264).

Figure 264: SpaceRanger Option 5

SpaceRanger option 6: Split large zones intersecting surfaces:H->8H, T->4H


Run SpaceRanger and enter 6, followed by 1 and test5.flac3d, followed by 40 for the buffer size and
followed 0 for the size of the smallest zone you want to split (Figure 265).

KUBRIX Geo/Rhino Users Manual Page 227


Figure 265: SpaceRanger Option 6

SpaceRanging 3DEC zone material IDs


In the FISH file WriteZoneCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav
with the name of the save file representing the model you want to modify.

Start 3DEC and run WriteZoneCentersAndMaterialIds.dat

The FISH function WriteZoneCentersAndMaterialIds writes out the x, y, z coordinates of each zone
center and its current property ID into a file called ZoneCentersAndProperties.dat .

Run SpaceRanger.exe (after launch, enter 1, then 0, then ZoneCentersAndProperties.dat)

The program SpaceRanger.exe reads the ZoneCentersAndProperties.dat file and produces a file called
CalculatedCentersAndProperties.dat in which block property IDs have been updated based on the ray
shooting logic described earlier. The file CalculatedCentersAndProperties.dat can readily be read into
an existing model using the FISH function ReadZoneCentersAndMaterialIds. This will give the model its
new zone prop IDs.

In the FISH file ReadZoneCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav


with the name of the save file representing the model you want to modify.

Start 3DEC and run ReadZoneCentersAndMaterialIds.dat

SpaceRanging 3DEC block material IDs


In the FISH file WriteBlockCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav
with the name of the save file representing the model you want to modify.

Start 3DEC and run WriteBlockCentersAndMaterialIds.dat

The FISH function WriteBlockCentersAndMaterialIds writes out the x, y, z coordinates of each block
center and its current property ID into a file called BlockCentersAndProperties.dat .

Run SpaceRanger.exe (after launch, enter 1, then 0, then BlockCentersAndProperties.dat)

KUBRIX Geo/Rhino Users Manual Page 228


The program SpaceRanger.exe reads the BlockCentersAndProperties.dat file and produces a file called
CalculatedCentersAndProperties.dat in which block property IDs have been updated based on the ray
shooting logic described earlier. The file CalculatedCentersAndProperties.dat can readily be read into
an existing model using the FISH function ReadBlockCentersAndMaterialIds. This will give the model its
new block prop IDs.

In the FISH file ReadBlockCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav


with the name of the save file representing the model you want to modify.

Start 3DEC and run ReadBlockCentersAndMaterialIds.dat

If you check your model, you will see that the block property IDs have now been updated.

To use SpaceRanger in C++, you need to name the various surfaces, input0.stl, input1.stl, input2.stl,

Other examples:

Figure 266: Examples of SpaceRanger use: left, pit excavation sequence in 3DEC. Right: geology in
FLAC3D

SpaceRanger version 9 options:


8 SpaceRanger options are available to you:

-1 Translate into a .WRL & .3DEC file.

0 Ignore existing groups. Build new ones based on surfaces.

1 Partition existing groups based on surfaces. (May produce many groups).

2 Everything inside surfaces becomes separate groups; outside is unchanged.

3 Everything outside surfaces becomes separate groups; inside is unchanged.

4 Everything intersecting surfaces becomes one group.

KUBRIX Geo/Rhino Users Manual Page 229


5 Split large zones inside surfaces:H->8H, T->4H

6 Split large zones intersecting surfaces:H->8H, T->4H

KUBRIX Geo/Rhino Users Manual Page 230


Tips and tricks of the trade

3DEC tolerances (ATOL) when reading a model generated by Kubrix


In 3DEC, ATOL governs several internal tolerances used in cutting, zoning etc. When a model is
generated by Kubrix, ATOL is computed by Kubrix to be equal to 20% of the smallest block edge in the
model and is communicated to 3DEC through a SET ATOL command appearing near the end of the .3dec
file generated by Kubrix. When 3DEC calls this file, the model is read into 3DEC and ATOL is set.

Why sometimes Kubrix license files disappear in Windows7?


When you place a Kubrix license in C:\Program Files (x86)\Simulation Works\Kubrix , Windows Vista and
Windows 7 keep a "ghost" copy of this file in C:\Users\<your
name>\AppData\Local\VirtualStore\Program Files (x86)\Simulation Works\Kubrix

This is a security "feature" of Windows. Occasionally, when you replace the license (upgrade or
extension of your license) in C:\Program Files (x86)\Simulation Works\Kubrix, Kubrix continues to use
the ghost copy and your new license won't work. To resolve this problem, delete the copy of
kubrix_lock located in C:\Users\<your name>\AppData\Local\VirtualStore\Program Files
(x86)\Simulation Works\Kubrix and the curse simply evaporates...

The SetWorkingDirectory in Rhino 4 and 5


When you start Rhino by double-clicking a file located in a folder, generally Rhino considers that folder
to be the working directory, so when you click on the Kubrix icon in Rhino Kubrix will search for the
input in that folder and will place the result in there also. In certain cases though Rhino may not know
where the working directory is and the Kubrix results get somehow lost! In Rhino, the command
SetWorkingDirectory may be used to tell Rhino (thus Kubrix) where to read and write its files...

Shimmering triangles and off-center models


Have you noticed that in certain situations, as you examine a Rhino (or FLAC3D or 3DEC, for that matter)
model, as you slowly rotate/zoom towards a minute detail, at certain angles a "shimmering" or
"sparkling" effect makes it nearly impossible to see which surface covers which one? You basically can't
visually inspect the intersection of two triangles especially when they make a shallow intersection.
Clearly, this is critical while figuring out whether triangles intersect properly.
This is a graphic effect due to truncation errors in calculating triangles normals and the corresponding
lighting effects.
In my personal experience, this is often due to the model being excessively off-center with respect to
the origin of the coordinates system. If you move the entire model by large vector so as to further
center it around the origin, this annoying graphic effect disappears and often the resulting intersection
calculation (Booleans, split, trim etc.) are more accurate.
Please to share your experience in the use of Kubrix-Rhino with Itasca products.

KUBRIX Geo/Rhino Users Manual Page 231


Shrinking Very Large Surface Meshes into a More Manageable Size
In Rhino5 Beta, the _ReduceMesh function (which was pretty much useless in verion 4) works like a
dream!. Select your ginormous triangular mesh, click on the icon or type ReduceMesh, choose a
reduction % and hit OK.
Play around with the parameters to get a feel for the usage envelope. Let me know what you think.

Surface Meshes from Contours


Ever got tons of contour lines from your client wishing they'd sent you the actual triangulated mesh the
contours came from? Rhino 5 Beta is the ticket!

In Rhino 5 Beta, the MeshPatch command which builds a Delaunay triangulation out of curves or point
clouds runs way, way faster!

To control how fine the resulting surface mesh will be I suggest not feeding the curves directly to
MeshPatch. Instead, select your contours, then Curve|Point Object|Divide Curve by|Length of
Segments. Specify a segment length that half the vertical distance between consecutive contour lines
(this, to prevent aliasing in the resulting triangulation). Now, select all the points, followed by
MeshPatch and <RETURN>, <RETURN>, et voila!

If the surface mesh is too noisy, just Surface|Drape it in a Top view. To get a nice looking mesh from a
draped surface try Mesh|From NURBS Control Polygon; IMHO way sexier than what "from NURBS
Objets" hands you...

Speed Tip when building Octree Meshes


If you have ever run Octree meshes where the input surface has many triangles you may have noticed
that after vertex sorting reaches 99% Kubrix hangs and stays there for quite some time before
completing the computation and outputting a mesh.

This is caused by the "Joint" radio button not being checked in the Octree Meshing tab of Kubrix. If you
check "Joint", you will avoid this delay and Kubrix will immediately proceed to outputting the mesh after
vertex sorting is complete.

The default settings of Kubrix will be revised in the next release of Kubrix in order to avoid this problem.

Surface quality diagnostics in Rhino and Kubrix


There are 4 levels of surface quality check in Rhino & Kubrix that ensure a good quality output

1- In Rhino:
+Check objects. A Clean bill of health from the mesh doctor is a necesary condition for a successful run
with Kubrix.
+ExtractMeshFacesByAspectRatio with an aspect ratio of 10,000 or more often points to tolerance
mismatches on the surface. Deleting these faces and using MatchMeshEdges or other means often saves

KUBRIX Geo/Rhino Users Manual Page 232


you a lot of trouble in Kubrix

2- In Kubrix:
+Self-intersection checks before surface remeshing point to the true x,y,z coordinates of trouble spots
+Self-intersection after surface remeshing brings to light situations where two choppy and close surfaces
defining a thin volume (orebody) nearly escape self-intersection but self-intersect after surface
remsehing. To avoid this, reduce the cut angle and/or the offset value. Sometimes, simplifying these thin
volumes is the only way to ensure non-self-intersecting remeshed surfaces even with large cut angles.
This is key to producing 3DEC models with low block counts.
+Coordinates of trouble spots during the mesh generation process
+In Kubrix 12, the coordinates of the center of the 10 worst zoners or blocks are listed which point you
to trouble spots (surfaes that come too close, exceedingly sharp boundary angles, etc...)

In Kubrix 12, the coordinates of the trouble spots are outputted in such a way that they can be copied as
a block and pasted into the Rhino Curve|Polyline|Polyline command to create a polyline pointing to all
the troublespots at once.

Tolerances and off-center models


Tolerances can be the cause of problems especially when dealing with intersection and boolean
operations on meshes and geometric entities.

This is particularly critical when the model center is far from the origin or when the model is very large.
In all cases, make sure that your model is not too far away from the origin and in case it is move it closer
to the origin. Moving the object closer to the origin also helps with the graphics both in Rhino and in
your engineering analysis software.

When starting a new project, use the initial Rhino template to specify whether the model will be a
"Large object in "meters", "small" object in "feet", etc.., then import DXF, STL or even existing 3dm files
into the new project. In this fashion you control the tolerance and not the default tolerance specified in
the DXF. By default, Option|Document Properties|Units should say an absolute tolerance of 0.01, a
relative tolerance of 1.0. and an angle tolerance of 1.

When preparing a solid, in general you have to join multiple surfaces. Too small a tolerance prevents
successful joining so the default "Large object in meters" is often good for obtaining a single joined
polysurface. However, when intersecting or doing a Boolean operation on polysurfaces or meshes, a
smaller tolerance such as 0.0001 absolute, 0.01 relative and 0.01 in angles may be more appropriate.

Simplifying Complex & Thin Geological Structures for Use with Kubrix?

PROBLEM:
You have a complex geological structure that has a thickness but spans across a wide area. It
really should be modeled as an interface in FLAC3D or a joint in 3DEC but you need to

KUBRIX Geo/Rhino Users Manual Page 233


somehow reduce it down to a single, smooth, low-triangle-count, good quality, average median
triangular surface.

SOLUTION:
Select the mesh structure, then ExtractPt to extract all its vertices as a cloud of points. While the
points are selected, use MeshPatch to triangulate these points. The result is a triangular mesh that
is extremely choppy (like a waffle), and this is because the triangulation tends to join points
across the thickness of the geological structure connecting points on the foot wall an hanging
wall sides of the structure....But no worries.

Now, select the choppy mesh and Transform|Smooth, check smoothX, Y and Z and Fix
Boundaries. Set the Factor to 1 and OK. repeat several times. As you do this the mesh converges
towards a smooth surface that is an average of the foot wall and the hanging wall. Select the
resulting mesh and use ReduceMesh with 90% reduction to reduce it to a low-count mesh and
you are done!

Rhino5 is the right tool for that because both MeshPatch and ReduceMesh actually work in
there.

KUBRIX Geo/Rhino Users Manual Page 234


Troubleshooting
Where are my files?
In Rhino, I clicked on the Kubrix icon and ran it but the resulting files are not in the folder they are
supposed to be.

Some time Rhino's working folder is different from the folder containing the input STL file. Reading a file
from this folder often suffices to let Rhino know where the working directory is. You can explicitly set
the working folder with the Rhino SetWorkingDirectory command.

Why the Polygon Meshing Option?


I have created a model in Rhino. I have meshed its surface and I want to save it, but Rhino displays the
Polygon Meshing Options. I thought I did that already when I triangulated the surface!

You are probably saving both your mesh and the original Rhino model. Select the mesh and use Export
or delete the model, then use save to create the STL file.

Naked/free edges in the input.


I run Kubrix and it says that there are free edges. I read the STL file into Rhino and use Check objects.
Rhino reports that there are indeed naked edges. Why?

Kubrix does not accept naked edges. It is good practice to check the surface mesh created by Rhino
using Check objects before saving it as an STL file. There could be a number of reasons causing this
problem:

327. You forgot to use Edit|Join (for a manifold solid) or NonManifoldMerge (for a non-manifold
solid) prior to creating the surface mesh. As a result, each surface is independently meshed with no
guaranty that naked edges on adjacent surfaces match. Make sure that you use Join (for manifold
surfaces) or NonManifoldMerge (for non-manifold surfaces) before surface meshing.

In the non-manifold polysurfaces resulting from the NonManifoldMerge operation, due to tolerance
issues, after surface meshing, a few naked edges may survive. Highlight naked edges using
Analyze|Edge Tools|Show Edges and manually delete and rebuild the triangles around them to create
proper non-manifold edges.

328. Using MatchMeshEdge takes care of manifold edges but cannot resolve naked edges that
should be non-manifold edges (more than two surfaces meeting at an edge). To remove any
remaining naked edges, get close to a naked edge and use the command AlignMeshVertices|Select
vertices to merge vertices that are close. The first vertex you click on will be the vertex on which
the second vertex you click will collapse.

Kubrix reports surface self intersection


If this occurs after surface remeshing (i.e. the remeshed model self-intersects but not the original
model), this is likely due to a cut angle that is too large. By default, in both tetrahedral meshing and

KUBRIX Geo/Rhino Users Manual Page 235


convex blocking, the cut angle is 45. As a result, if your surface is very noisy, with surface features of
the order of, say, 30, the Kubrix surface preconditioner will remesh the surface and create self-
intersecting surfaces because it cannot properly resolve the complexities. By reducing the cut angle to
30, 20 or less, you force the remesher to better resolve features and avoid creating a self-intersecting
surface. However, you should know that too small a cut angle forces Kubrix to resolve and mesh all
surface noises which generally results in too many blocks or zones.

If this occurs before surface remeshing, it is an indication of true surface self-intersection and it has to
be corrected or else Kubrix wont understand the intended topology. You should inspect the x, y, z
locations reported on the Kubrix terminal output. Copy any reported x, y, z coordinates, go back to the
Rhino model of the STL file you used. Click on the Top View Label to activate it. Select the
Curve|Line|Single Line menu item and for the Start of line coordinates paste the x,y,z coordinates that
you just copied them. For the End of line coordinates, while still in Top View, click somewhere in the
background and away from the model. You have just built an indicator line that points to the location of
trouble in your model.

Double-click the Perspective view label to maximize that view, click on the button marked Shaded View
port, select the indicator line you just created, and use the mouse and the wheel to zoom in to the area
of trouble. By having highlighted the indicator line, you always see its ends as you zoom in.

Poke, hide or delete the various triangles around the problem area to see what is going on. If your
model is too large, you can hide most of the model and focus on the area of interest by clicking on the
icon marked Extract Mesh Toolbar |Face to selected large groups of triangles away from the area of
interest and hid them.

Tetra blocking fails!


I launch Kubrix|Convex Blocking or Tetra meshing. I use all default values for parameters. Kubrix
reads the STL file and the surface is remeshed but Kubrix reports intersecting triangles after remeshing
or hangs and fails with the message: Tetra blocking failed

The default offset value you are using is probably too large and the resulting blocks are possibly too
coarse. This happens if your model is small with large features. Reduce the offset by a factor 10, and
rerun.

You may also have to reduce the cut angle. If two highly curved and noisy triangular surfaces come
very close to each other, after remeshing, self-intersecting triangles may be produced. To avoid this
reduce the cut angle to 20 or even 10 or less. This will ensure that Kubrix will remesh the surfaces while
respecting slight dihedral angles on the surfaces thereby preventing self-intersection in the resulting
triangulated surface used for volume meshing.

Blocking not progressive enough.


I use Kubrix|Convex Blocking to create a 3DEC model. I use a small Offset, small Cut angle and a Mesh
Gradation close to 1 but I find that blocks fan out too abruptly. I would like to see a more progressive
increase in block size around details.

KUBRIX Geo/Rhino Users Manual Page 236


The STL file you use as input to Kubrix is too coarse. To be on the safe side create an STL file that is fine
enough.

License error.
I obtained a Kubrix license but I get an error message saying that the license is not valid

Please go through the following license troubleshooting checklist and send the result to
kubrix@itascacg.com:

In all that follows, replace Program Files with Program File (x86) if you have installed Kubrix on a 64 bit
operating system)

Make sure that you are running Kubrix on the machine it was licensed to. Kubrix is node-locked to the
machine for which it is licensed.

Verify that the file kubrix.exe is located in

C:\Program Files\Itasca\Kubrix

Verify that the file kubrix_lock (or kubrix_lock.txt, the Kubrix license character string key
can be in a file with either name) is located in:

C:\Program Files\itasca\Kubrix

Make sure that kubrix_lock (or kubrix_lock.txt) contains the encrypted Kubrix license key
which was sent to you by email. The encrypted key should look something like:

5D8IK1K-5L7O9IA-8ZT1J5T-78Z

sometimes terminated by a -. This character string is the only thing that should be in the kubrix_lock
file, and it should appear on the first line; not the entire content of the license Email.

Open a Command Prompt.

To go to the

C:\Program Files\itasca\Kubrix

folder, in the Command Prompt, and enter:

cd C:\Program Files\itasca\Kubrix.

To run kubrix, type .\kubrix followed by <RETURN>

If you receive the error message ER-ISE028 saying that a Nastran file was not found, it means that the
installation is fine and it is simply looking for a default input file called kubrix_in.nas.

If you receive a different error message proceed as follows:

KUBRIX Geo/Rhino Users Manual Page 237


While still in the command window and in the

C:\Program Files\itasca\Kubrix

folder, type the following command: .\kubrix license

Cut and paste the screen output in an email and send it back to us.

In the same command window, please type the command: ipconfig /all

Cut and paste the screen output in an email and send it back to kubrix@itascacg.com.

KUBRIX Geo/Rhino Users Manual Page 238


index
3DEC, 19, 21, 30, 32, 33, 36, 38, 42, 43, 44, 48, Edge analysis, 56, 57, 119, 134
60, 61, 62, 63, 76, 77, 82, 83, 84, 85, 89, 109, Edit|Select Objects|Surfaces, 72, 73
134, 139, 140, 146, 200, 208, 209, 222, 228, Edit|SelectObjects|Polysurfaces, 73
229, 236 Edit|Split, 28, 44, 82
3DEC POLY file, 83 Explode, 44, 75, 122, 154
Align mesh vertices, 9, 136 Extending, 109, 121
AlignMeshVertices, 9, 235 Extract mesh, 50, 53
Angle between, 52 ExtractHangingFacesOnly, 50
Aspect Ratio, 132 Extraction of connected mesh faces, 52
backface, 119 ExtractNonManifoldMeshEdges, 50, 133
BlockRanger, 4, 5, 13, 90, 105, 211 Extrude Curve, 33, 72, 116, 124
Boolean, 21, 35, 36, 82 Facetized surfaces, 221
Boolean Split, 35 faults, 109, 110, 114, 121, 127, 134, 136, 137,
Bounding Box, 111 141, 146, 222
cavern, 208 Fill all holes, 51
centroid, 112 Fill mesh hole, 56, 118
Check objects, 232, 235 free edges, 235
CheckMesh, 235 gaps, 31, 53, 55, 113, 114
cleanup, 109, 146 Geometry Fix, 22, 26, 37
clumps, 217 Ghosted, 45, 68, 69, 117, 131
collapse ratio, 132, 139 Hexahedral meshing, 22, 27, 30, 38
COLLECTION, 164 Hexahedral meshing tab, 22
ColoriseAllObjects, 44 Incremental Save, 71, 73, 76, 120, 134
ColorizeAllObjects, 8, 44, 67, 75, 86, 87 interfaces, 109, 139, 146
Connected, 52, 53 intermittent, 109, 146
contour, 63, 64, 65, 66, 67, 73, 208, 209 intersections, 31, 57, 109, 120, 131, 132, 156,
Convex Blocking, 30, 38, 60, 76, 77, 236 158
Cull degenerate mesh faces, 50, 133 Invert Selection and Hide Objects, 44, 45, 64,
Curve|Circle|Center, Radius, 33 75, 126, 127, 129
Curve|Curve From Objects|Duplicate Edge, 45 Layers, 109, 110, 114, 119, 120, 121, 125, 126,
Curve|Line|Line segment, 27 127, 128, 129, 130, 131, 132
Curve|Line|Single Line, 44, 115, 117, 124, 132, Loft, 112, 152, 200, 208
236 Loft Options, 112, 152
Curve|Polyline|Polyline, 58, 64, 67, 132, 135, manifold surfaces, 25, 220
138, 140 Match mesh edges, 50, 53, 55, 114, 119, 134
Curves|Curves from Objects|Duplicate border, MatchMeshEdges, 50
68 Medial axis/Mid-surface, 217
defeaturing, 51, 220 MergeBreps, 25, 46, 235
Defeaturing, 51 Mesh from Points, 209
degenerate faces, 26, 50, 51, 133, 134 Mesh Intersect, 120, 126, 128, 130, 131, 153,
Degenerate faces, 49 154, 158
Delete mesh faces, 57 Mesh|From NURBS objects, 16, 21, 36
diagnostics, 57 Mesh|Mesh edit Tools|Weld, 83
drag, 9, 74, 136 Mesh|Polygon mesh primitives|Box, 58
Drape, 147 MeshPatch, 73, 74, 148
Duplicate faces, 49, 50 Naked edges, 22, 49, 56, 113

KUBRIX Geo/Rhino Users Manual Page 239


Nb. Of surface smoothing iterations, 59 SplitMeshEdge, 9
Non-manifold, 49 SplitMeshWithCurve, 126, 127, 128, 129, 130,
Non-manifold edges, 49 131, 154, 155
non-manifold surfaces, 25, 220 Straight sections, 112, 152
NonManifoldMerge, 8, 46, 235 Structure of the mesh, 47
Octree meshes, 31 Surface|Extrude Curve|Along Curve, 72, 116,
Octree Meshing, 31, 42, 43, 78, 79, 80 124
origin, 16, 33, 34, 36, 48, 49, 74, 86, 121, 127, Surface|Extrude Curve|Straight, 33
152 Surface|Planar Curves, 25, 45, 46, 65, 67
Ortho, 8, 10, 115, 124 Template, 146
overlap, 151, 219 Tetra blocking failed, 236
Pit, 110, 114, 116, 119, 128, 129, 130, 131, 132, Tetrahedral meshing, 41, 58, 59, 61
136 The Command area, 7
Polygon mesh detailed options, 16 the Kubrix icon, 17
quality, 58, 109, 132, 134, 139, 140, 146, 220 Tolerances, 9
remeshing, 61, 132, 137, 235, 236 Toolbars, 7
repair, 51, 57, 58, 113 topography, 109, 110, 118, 151
Rotating and panning views, 8 Transform|Array, 84
SampleDensityPlusNoise, 209 Transform|Move, 20, 49, 83
self-intersection, 132, 134, 137, 236 Transform|Rotate, 34, 83, 86
sequential excavation, 44 Transform|Scale 2D, 34
SetWorkingDirectory, 9, 13, 90, 104, 200, 211, transparent, 45, 68, 117, 119
231, 235 Triangulate Mesh, 22, 47, 58
Shaded Viewport, 20, 35, 68, 110, 114, 117 Trim, 69, 70, 71, 75, 82, 114, 115, 117
Simple control, 16 Troubleshooting, 235
slivers, 52 tunnels, 33, 34, 35, 36, 44, 45, 46, 58, 60
snap, 9, 10, 33, 64 Unify, 51, 119
Solid|Box|Diagonal, 19, 36, 74 Unify mesh normals, 51
Solid|Difference, 21, 36 Units, 146
Solid|Solid edit tools|Wire cut, 82 Volume Centroid, 112
Solid|Union, 35 VRML 2.0, 77, 82, 83, 88, 150, 220, 221
Solids, 25, 220 VTPT, 82, 83
SpaceRanger, 146, 150, 157, 165, 166, 222, 228, Wire cut, 87, 88
229 Zoom Extents All Viewports, 33, 74, 115, 117,
Split disjoint mesh, 50, 54 127

KUBRIX Geo/Rhino Users Manual Page 240

You might also like