Top Banner
Kubrix/Rhino Users’ Manual REV012012 Page 1 1 Kubrix® is a registered trademark of Simulation Works, Inc. Kubrix/Rhino 1 Users’ Manual Complex Grid Generation for Mining& Petroleum Geomechanics
181

Ku Brix Rhino Manual

Nov 07, 2014

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual REV012012 Page 1

1

Kubrix® is a registered trademark of Simulation Works, Inc.

Kubrix/Rhino1 Users’ Manual Complex Grid Generation for Mining& Petroleum Geomechanics

Page 2: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 2

Rhino® is a registered trademark of Robert McNeel & Associates

Page 3: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 3

Contents SETTING UP YOUR RHINO®/KUBRIX® WORK ENVIRONMENT ...................................... 9

Installing Kubrix and Rhino ....................................................................................................... 9

Displaying the most useful Rhino Toolbars and the Kubrix-specific buttons ............................ 9

The Rhino command area ........................................................................................................... 9

Icon/button names ..................................................................................................................... 10

Rotating and panning views ...................................................................................................... 10

Colorizing all objects in the model ........................................................................................... 10

Useful shortcuts ........................................................................................................................ 10

The following shortcuts may be added to Rhino help in speeding up the mesh cleanup process: ................................................................................................................................. 10

AlignMeshVertices: ............................................................................................................... 10

Tolerances ................................................................................................................................. 11

Avoiding accidental object drag ............................................................................................... 11

Object snap options ................................................................................................................... 11

READING CAD DATA ............................................................................................................... 13

General Guidelines ................................................................................................................... 13

Solids & Surfaces ...................................................................................................................... 13

Wireframes ................................................................................................................................ 13

Points ........................................................................................................................................ 13

Facetized surfaces: polygonal surfaces ..................................................................................... 14

Facetized surfaces: triangular surfaces ..................................................................................... 14

SPACERANGER .......................................................................................................................... 15

Modeling problems addressed by SpaceRanger ....................................................................... 15

How SpaceRanger Helps .......................................................................................................... 15

New in 8.2 ................................................................................................................................. 15

How does SpaceRanger work? ................................................................................................. 15

Examples ................................................................................................................................... 16

Sorting 3DEC zone material ID’s ............................................................................................. 16

Sorting 3DEC block material ID’s ........................................................................................... 17

Other examples: ........................................................................................................................ 18

SpaceRanger version 8 options: ................................................................................................ 18

TUTORIAL 1- INTERNAL WALLS AND MULTIPLE MATERIALS .................................... 19

Page 4: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 4

Creating a single-material model ............................................................................................. 19

END OF TUTORIAL 1 ............................................................................................................ 21

TUTORIAL 2 – VERTICAL SHAFT IN A STRATIFIED SOIL ............................................... 22

Startup and excavation of the shaft ........................................................................................... 22

Creating a triangular surface mesh of the model ...................................................................... 24

Creating an all-hexahedral mesh for FLAC3D using Kubrix ................................................... 25

Creating a model of both the inside and outside of the excavated shaft ................................... 28

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

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

Creating Octree mesh of the capped model, with stratified soil ............................................... 37

END OF TUTORIAL 2 ............................................................................................................ 39

TUTORIAL 3 — 20° BIFURCATING CIRCULAR TUNNELS ................................................ 40

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

Creating the bifurcation and the box surrounding it ................................................................. 41

Creating a Triangular Surface Mesh of the Model ................................................................... 43

Creating a convex blocking for 3DEC ...................................................................................... 45

Creating an all-hexahedral grid for FLAC3D Using KUBRIX ................................................ 45

Creating a tetrahedral grid for FLAC3D Using KUBRIX ........................................................ 48

Creating octree grids for FLAC3D or blocks for 3DEC ........................................................... 49

Creating a FLAC3D or a 3DEC model for sequential excavation ........................................... 51

END OF TUTORIAL 3 ............................................................................................................ 55

TUTORIAL 4: GEOMETRY CLEANUP GIVEN AN EXISTING TRIANGULATED SURFACE..................................................................................................................................... 56

Startup and reading, joining and centering the model around the origin .................................. 56

Automatic sewing of neighboring free edges ........................................................................... 57

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

Automatic closure of all nearly planar open holes ................................................................... 59

Removal of artifacts due to triangulation noise: “defeaturing”. ............................................... 60

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

Using the Kubrix surface diagnostics to identify and repair mesh self- intersections. ............. 66

Creating a box representing the computational volume ........................................................... 67

Reading the STL file into KUBRIX and automatic hexahedral meshing ................................. 67

END OF TUTORIAL 4 ............................................................................................................ 70

Page 5: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 5

TUTORIAL 5 — OPEN PIT: CREATING A MODEL FROM CONTOUR LINES .................. 71

Startup and approximation of contour lines .............................................................................. 71

Creating the benches ................................................................................................................. 75

Creating the bench faces ........................................................................................................... 79

An alternative method of creating the benches and the bench faces ........................................ 80

Creating an outer box ................................................................................................................ 81

Creating a surface mesh ............................................................................................................ 83

Creating a 3DEC model ............................................................................................................ 84

Creating a FLAC3D model ....................................................................................................... 85

Creating an Octree model ......................................................................................................... 85

A better Octree model ............................................................................................................... 86

END OF TUTORIAL 5 ............................................................................................................ 88

TUTORIAL 6: BUILDING 3DEC MODELS IN RHINO WITHOUT USING KUBRIX.......... 89

Fundamentals ............................................................................................................................ 89

Only certain Rhino operations result in solids .......................................................................... 89

Exporting solids as VRML 2.0 files ......................................................................................... 89

Exporting meshes (instead of solid) as VRML 2.0 files ........................................................... 89

Translating VRML 2.0 files into 3DEC POLY file .................................................................. 90

Example 1: Dynamic analysis of a Flemish bond brick wall ................................................... 90

Export the support ................................................................................................................ 91

Export the wall ...................................................................................................................... 91

Running 3DEC ........................................................................................................................ 91

Example 2: borehole in a block ................................................................................................ 93

END OF TUTORIAL 6 ............................................................................................................ 96

TUTORIAL 7: WORKING WITH MESHES: ADDING AN INTERNAL WALL TO AN EXISTING MESH. ....................................................................................................................... 97

Partitioning a mesh of faces into a few manageable pieces ...................................................... 97

Defining a Polyline that cuts the tunnel along its length .......................................................... 99

Partitioning meshes ................................................................................................................. 101

Building an internal wall ......................................................................................................... 102

Putting it all together ............................................................................................................... 105

Editing remaining naked edges ............................................................................................... 106

END OF TUTORIAL 7 .......................................................................................................... 108

Page 6: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 6

TUTORIAL 8: IMPORTING INTERMITTENT FAULTS IN FLAC3D & 3DEC WITH KUBRX....................................................................................................................................... 109

Importing meshes and extending the pit beyond its boundary ............................................... 109

Extension of the pit ............................................................................................................. 110

Specifying the computational domain .................................................................................... 114

Computing intersections ......................................................................................................... 120

Calculating intersection 1 ................................................................................................... 121

Extending Fault2 for a clean intersection with Fault1 ........................................................ 122

Back to intersection 1 (now with a clean intersection curve) ............................................. 126

Calculating intersection 2 ................................................................................................... 128

Calculating intersection 2 ................................................................................................... 128

Calculating intersection 3 ................................................................................................... 129

Calculating intersection 3 ................................................................................................... 130

Calculating intersection 4 ................................................................................................... 131

Surface quality check .............................................................................................................. 132

Quality check with Rhino ................................................................................................... 133

Quality check & grid generation with Kubrix .................................................................... 134

How does KUBRIX keep track of interfaces for FLAC3D? .................................................. 140

Running the model with FLAC3D .......................................................................................... 141

END OF TUTORIAL 8 .......................................................................................................... 142

TUTORIAL 9: IMPORTING INTERFACES INTO LEGACY MODELS ............................... 143

Initial Rhino tolerance setup and model import ...................................................................... 143

Simplifying the internal surface .............................................................................................. 143

Translating the FLAC3D mode into a .WRL file using SpaceRanger ................................... 144

Retrieving the shape of the dam from the flac3d model ......................................................... 145

Trimming the draped surface with the dam ............................................................................ 147

Identifying the zones that intersect the trimmed surface ........................................................ 148

Preparing the surfaces for Kubrix ........................................................................................... 149

How does KUBRIX keep track of interfaces for FLAC3D? .................................................. 150

Combining hex and tet grids into a final hybrid grid .............................................................. 152

Using SpaceRanger to create separate groups below and above the surface .......................... 154

Running a FLAC3D grid containing face collections ............................................................ 155

Running the model with FLAC3D .......................................................................................... 155

Page 7: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 7

END OF TUTORIAL 9 .......................................................................................................... 156

EXERCISE 1 – SALT CAVERN: USING RHINO’S LOFT TO CREATE A MODEL FROM CONTOUR LINES ..................................................................................................................... 157

Creating a solid model & meshing ......................................................................................... 157

EXERCISE 2 – OPEN PIT: USING RHINO’S MESH FROM POINTS FOR FAST MODEL CREATION ................................................................................................................................ 158

Creating a solid model & meshing ......................................................................................... 158

EXERCISE 3-MODELS DEFINED BY HORIZONS & TOPOGRAPHY: BOOLEAN OPERATIONS ON SURFACES AND MESHES ..................................................................... 160

IMPORTING CAD DATA INTO PFC3D ................................................................................. 163

Summary ................................................................................................................................. 163

Introduction ............................................................................................................................. 163

Brief overview of Computer-Aided Design (CAD) ............................................................... 163

Preparing a model for import into PFC3D .............................................................................. 165

Model simplification ........................................................................................................... 165

Model triangulation ............................................................................................................. 166

Checking normal orientation ............................................................................................... 167

Example applications .............................................................................................................. 168

Stirred Tank Reactor ........................................................................................................... 168

Additional Examples ............................................................................................................... 170

Ball Mill .............................................................................................................................. 170

Blade Mill ........................................................................................................................... 170

Bulldozer ............................................................................................................................. 171

USING CAD TO AUTOMATICALLY GENERATE OF CLUMPS FOR PFC3D: BUBBLEPACK .......................................................................................................................... 172

Summary ................................................................................................................................. 172

Medial axis/Mid-surface and bubble packing ......................................................................... 172

Using BubblePack ................................................................................................................... 173

Examples ............................................................................................................................. 173

Input Surface ....................................................................................................................... 173

Meshing Parameters ............................................................................................................ 173

TROUBLESHOOTING .............................................................................................................. 175

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. ............................................................................... 175

Page 8: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 8

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! .......................................................................... 175

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 CheckMesh. Rhino reports that there are indeed naked edges. Why? ....................................................................................................................................... 175

Kubrix reports surface self intersection .................................................................................. 176

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” ....................................................................................................................... 176

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. ................................................................................................................................................ 177

License error. I obtained a Kubrix license but I get an error message saying that the license is not valid .................................................................................................................................. 177

INDEX ........................................................................................................................................ 179

Page 9: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 9

Setting up your Rhino®2/Kubrix®3

Installing Kubrix and Rhino

work environment

1. Install Rhino from your Rhino disc, or download an evaluation version of Rhino from www.Rhino3d.com. An evaluation version of Rhino allows you to save or export 25 files.

2. Install the latest version of Kubrix from www.kubrix.com or www.itascacg.com/kubrix.

Displaying the most useful Rhino Toolbars and the Kubrix-specific buttons 3. Start Rhino and right-click in the Toolbar area located around the edges of the graphic window.

When the list of toolbars opens, make sure that all toolbars are checked off. 4. Open the C:\Program Files\Simulation Works\Kubrix\Rhino Stuff folder. Select all files in that

folder and drag them over the Rhino window. These files contain the scripts and toolbars related to Kubrix that are most frequently used in Rhino. You can later on modify these tools if you so desire.

The Rhino command area The command area is the area (generally on top) where Rhino displays text information. The location of the command area can be moved by dragging. Figure 1 shows the Rhino window after the Rhino Stuff content has been installed.

Figure 1: The Rhino window after the kubrix toolbar and scripts have been added.

2 Rhinoceros is a Registered Trademark of Robert McNeel and Associates, Seattle, USA. 3 KUBRIX is a Registered Trademark of Simulation Works, Inc., Saint Paul, USA.

Page 10: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 10

Icon/button names Throughout this tutorial we refer to the name of icons. The name of an icon is displayed when you place the mouse over it. Often, an icon has two related functions depending on whether you click the left or right mouse button. After you click an icon, the corresponding Rhino command-line appears in the command line area.

Rotating and panning views You can rotate a view by holding down <SHIFT> & <CTRL> while right-clicking the mouse and moving it around. You can pan a view using <SHIFT> and the right mouse button.

Colorizing all objects in the model Often, newly-created objects in Rhino appear in gray. To distinguish objects from each other, click on the icon marked ColorizeAllObjects to give a different color to each entity in your current model (Figure 2).

Figure 2: The ColorizeAllObjects icon in the Kubrix toolbar

Useful shortcuts The following shortcuts are pre-programmed into Rhino:

F3 Properties

F8 Ortho

F9 Snap

The following shortcuts may be added to Rhino help in speeding up the mesh cleanup process:

AlignMeshVertices:

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

• left-clicking on the command • setting the 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

Page 11: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 11

• hitting <RETURN>

You can set a shortcut, F4, that does all this. Let-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

CheckMesh:

Similarly, using Option|Rhino Options|Keyboard you can set F5 to _CheckMesh

SplitMeshEdge:

Similarly, set F6 to _SplitMeshEdge

Tolerances Tolerances can be the cause of problems especially when dealing with intersection and boolean operations on meshes, geometric entities. This is particularly critical when the model center is far from the origin or when the model is very large.

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. Please note that 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°. If the center of the model is far from the 0,0,0 coordinates, you may want to use a smaller tolerance such as 0.0001 absolute, 0.01 relative and 0.01° in angles.

Avoiding accidental object drag It may happen that you inadvertently drag a highlighted object by dragging it 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 translation to occur.

Object snap options In Rhino two snapping concepts are available: Snap and Object Snap. Snap is similar to Snap to Grid in PowerPoint. Objet Snap (Osnap) is the Rhino equivalent of PowerPoint's Snap to Objects. To be able to snap lines, polylines, corners of objects, etc. to exiting 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 by placing a check mark next to any of the worda: End, Near, Point, Mid, etc...appearing at the bottom the graphic window.

Orthogonal restriction of the mouse

You can restrict the movements of the mouse to any of the three principal directions by clicking on the word Ortho appearing at the bottom of the graphic window or by hitting <F8>.

Page 12: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 12

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.

Page 13: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 13

Reading CAD data 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: “defeaturing”. 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

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 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

Page 14: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 14

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

Page 15: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 15

SpaceRanger SpaceRanger is a generalized range function that uses complex surfaces to identify & modify groups of zones, blocks & balls in FLAC3D, 3DEC or PFC3D models.

Modeling problems addressed by SpaceRanger • 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. • You want to carve a group of balls out of a packed group of PFC3D balls • 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 • You want to assign ubiquitous joint properties to zones that come within 10m of a set of faults • You want to change the properties of all the balls that come within 3 mm of a surface • You want to refine it locally refine a FLAC3D model before carving out a group of zones with

SpaceRanger

How SpaceRanger Helps SpaceRanger tests whether the centroid of a zone, block or ball is inside or outside a surface based on the parity of the number of intersections with the surface of an upward-shooting ray originating from the centroid. Surfaces need not be closed. SpaceRanger also tests whether a zone, block or ball is near a surface. SpaceRanger can also use the inside/outside status of a zone or block or its proximity to a surface to subdivide it into smaller units.

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 the zones, blocks or balls of a model into a file. SpaceRanger sorts through the file and create a new one with the same ID's and updated groups, regions or colors. using FISH, this file may be read back into the model to update it.

New in 8.2 • A single spaceranger.dat containing the names of the files replaces input0, input1,... • When N surfaces are present, SpaceRanger takes the order of surfaces in spaceranger.dat as a hint

and produces a no more than N+1 groups

How does SpaceRanger work? A point is inside a closed surface if a ray shooting away from it crosses the surface an odd number of times. An odd number of intersections means that the point is inside the surface. For multiple surfaces, we create a binary number with as many digits as there are surfaces. The interiority of a point with respect to a surface is reflected in the value of the bit corresponding to the surface: 1 is in, 0 is out. For instance, if we have 6 surfaces, 010111 means that the point x, y, z is located inside surface 0, inside surface1, inside surface2, outside surface 3, inside surface 4 and outside surfaces 5. This approach works also with non-closed surfaces as long as a ray direction is supplied. By default, the ray direction is in the positive z direction.

Page 16: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 16

SpaceRanger creates a FLAC3D (if processing a FLAC3D gird file) or a file called CalculatedCentersAndProperties.dat(if processing a file containing centers an properties) and a VRML file. Read the VRML file into Rhino to have a quick view of the result. Load the grid into FLAC3D to see the new groups.

Figure 4: Material property ID (or color) resulting from interiority bit assignment

Examples SpaceRanger may be directly used with FLAC3D

Just run SpaceRanger.exe, choose an option, type 1 to indicate that you want to use a FLAC3D grid file. SpaceRanger will create a new grid file called output.flac3d which you can import into your model with the USEGIVENIDS option, if you want to replace an existing model.

Sorting 3DEC zone material ID’s 1. 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.

2. 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 .

Figure 3: Sorting of zones

Page 17: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 17

3. 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 ID’s 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 ID’s.

4. 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.

5. Start 3DEC and run ReadZoneCentersAndMaterialIds.dat

Sorting 3DEC block material ID’s 1. 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.

2. 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 .

3. Run SpaceRanger.exe (after launch, enter 1, then 0, then BlockCentersAndProperties.dat)

The program SpaceRanger.exe reads the BlockCentersAndProperties.dat file and produces a file called CalculatedCentersAndProperties.dat in which block property ID’s 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 ID’s.

4. 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.

5. Start 3DEC and run ReadBlockCentersAndMaterialIds.dat

If you check your model, you will see that the block property ID’s have now been updated.

To use SpaceRanger in C++, you need to name the various surfaces, input0.stl, input1.stl, input2.stl,…

Page 18: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 18

Other examples:

Figure 5: Examples of SpaceRanger use: left, pit excavation sequence in 3DEC. Right: geology in FLAC3D

SpaceRanger version 8 options: 4 space partitioning options are available to you:

0 Ignore existing groups. Build new ones based on surfaces.

1 Partitions existing groups based on surfaces.

2 Everything inside surface becomes one group; outside is unchanged.

3 Everything outside surface becomes one group; inside is unchanged.

4 Everything intersecting surfaces becomes one group.

5 Split large zones inside surface.

6 Split large zones intersecting surfaces.

Page 19: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 19

TUTORIAL 1- Internal walls and multiple materials In this tutorial, you will become familiar with the use of internal walls to create multiple FLAC3D groups or 3DEC regions.

Creating a single-material model 1. Start Rhino and when the Template dialog box opens, 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 6).

Figure 6: Solid representing a cylinder

You have created a cylindrical solid. A solid is essentially 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.

Page 20: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 20

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 7).

Figure 7: 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 7), 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 8).

Figure 8: The Kubrix icon in Rhino

Page 21: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 21

9. Run the Kubrix program by clicking on the Kubrix icon and select the Hexahedral meshing 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 allowable element 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. 12. You can also run FLAC3D and use File|Grid|Import to read kubrix_out.flac3d and display it

(Figure 9).

Figure 9: Mesh of cylinder read into FLAC3D

END OF TUTORIAL 1

Page 22: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 22

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 10).

Figure 10: 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 11).

Figure 11: Four-view of a box

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

Page 23: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 23

Figure 12: 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 13).

Figure 13: 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 14).

Page 24: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 24

Figure 14: 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 15).

Figure 15: 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 t1_0 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t1_0.3dm is created in your current folder.

Page 25: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 25

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.

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 16).

Figure 16: 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 mesh objects for error located in the

Geometry Fix toolbar. Rhino responds with the CheckMesh message box providing 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. Their presence indicates that the mesh 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 t1_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 Hexahedral meshing tab

(Figure 17). Click on the Input file button and select t1_0.stl.

Page 26: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 26

Figure 17: Kubrix hexahedral meshing default values

2. Click on the Default button to resort 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. Click Compute to launch the computation. The screen output is shown blow.

............................................................................ Welcome to KUBRIX version 10.4.2 Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved. ............................................................................ PLI001: The input surface file name is: C:\Users\Sina\Itasca\tutorials\Manuals\Tutorial1\t1_0.stl ... PLI007: REQUEST: STL input surface (-it stl) ... PLI002: The output mesh file name is: C:\Users\Sina\Itasca\tutorials\Manuals\Tutorial1\t1_0.flac3d ... PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ... PLI003: The minimum mesh block resolution is 1 ... PLI033: REQUEST: 1000 surface smoothing iterations (-m) ... PLI031: The max. allowed element edge length is infinity ... 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 400 triangles and 202 nodes. MGI066: Feature refinement: final triangles count 1372 ... MGI068: Fuzzy-logic block decomposition ... MGI037: Done. 1/1 iters beta 0.000100, sp 11, st 7.09e+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 ... 5.92e+000 u between nodes 7, 14

Page 27: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 27

MGI057: Max. non-dim offset 0.2101 between nodes 7, 14 MGI018: Final check ........ all Jacobians are positive. MGI021: Max. edge length ... 2.00e+002 u between nodes 1, 10 MGI052: Min. edge length ... 2.81e+001 u between nodes 7, 8 MGI020: Max. aspect ratio .. 7.11e+000 at element 1 ............................................................................ MGI031: Writing a VRML file ... MGI067: Writing a FLAC3D file ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MGI999: Successful termination of KUBRIX in 0.5 seconds! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

3. KUBRIX generates a file called kubrix_out.flac3d. Run FLAC3D and use File|Import grid to read kubrix_out.flac3d.

4. Select Plot|1 Base/0|Show to open the FLAC3D graphic window. Click somewhere in the background of this window to activate it, and select Plotitem|Add|Plot|Group to open the Block group dialog box. Click OK to display the grid in FLAC3D.

5. Hit <z> 3 times followed by <x>, 3 times to rotate the object the object 3 times around the z and x axes. Hit <SHIFT><M> twice to zoom out and properly see the grid in FLAC3D (Figure 18).

Figure 18: 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.

6. Go back to the Kubrix application. In the Mesh parameters section of the dialog box, check the square marked Max. allowable element 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 mesh generation.

7. In FLAC3D, click on the Command Window to activate it. Select File|New to remove the existing model, followed by File|Import Grid. Read t1_0.flac3d into FLAC3D and display it (Figure 19).

Page 28: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 28

Figure 19: A finer FLAC3D grid containing 9,888 zones and 11,450 vertices

8. To create a fully structured grid ( a structured grid is one where all elements can be addressed by three integers: I, J and K), go back to the Kubrix application, and in the Mesh parameters section, select 3 for the Structure of the mesh, and click Compute. In FLAC3D, delete the old model and read and display the newly-created t1_0.flac3d (Figure 20).

Figure 20: A structured FLAC3D grid containing 13,284 zones and 15,250 vertices

Creating a model of both the inside and outside of the excavated shaft 9. In your current folder, double-click the file t1_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.

10. Select the menu item Surface|Planar Curves and click on the circle representing the rim of the shaft opening (Figure 21). Hit <ENTER> to complete the command and create a planar surface the cap of the shaft.

Page 29: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 29

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

So far you have been dealing with solids. Solids are closed surfaces that have an unambiguously defined interior and exterior. The surfaces defining such solids are called manifold surfaces. 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 doesn’t have a clear interior. To be exact, it has two interiors. Such surfaces are called non-manifold surfaces.

So far our model was a perfect solid. Its surface was a manifold surface. The addition of the cap to the shaft 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 surfaces. Joining surfaces into a non-manifold surface in Rhino requires a special command. This command joins several manifold or non-manifold surfaces into one non-manifold surface. You can join multiple surfaces into a single non-manifold surface with the MergeBreps icon

1. Select all the surfaces you want to join and click on the MergeBreps 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.

2. 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 t1_1 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t1_1.3dm is created in your current working folder.

3. 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.

4. Move the slider to the middle of the scale and click OK to create the surface mesh (Figure 22).

Page 30: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 30

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

5. While the solid model is still selected hit the <DELETE> button to just keep the mesh. 6. Check the mesh by left-clicking on the icon marked Check mesh objects for error 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 intended because the solid model itself was non-manifold so as to allow the representation of both the inside and outside volumes.

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, select the File|Export selected menu item, and when the Export dialog box opens, enter t1_1 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 operation

10. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral meshing tab and make sure that the input file is t1_1.stl.

Page 31: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 31

11. 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. allowable element 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.

12. The resulting grid is composed of two groups. All the zones located outside the shaft belong to Group 1. The rest belongs to Group2.

13. Run FLAC3D and visualize the mesh (Figure 23).

Figure 23: FLAC3D grid of the capped model containing 10,368 zones and 11,825 vertices. In this Figure, a first plot item representing the geometry is overlayed by a block group plot item representating the interior of he shaft.

Creating an all-hexahedral mesh of the capped model, with stratified soil 1. In your current folder, double-click the file t1_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 24).

Page 32: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 32

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

4. Select the menu item Edit|Split. Click on the box and hit <ENTER>. Click on the horizontal line and hit <ENTER>. Delete the horizontal line and note that the model is now split into 2 parts.

Please note that the Split operation splits the surface of the solid into 2 surfaces (that are not closed). To split a solid into two solid you must use Wire cut. This function will be discussed in a later section.

5. Select the top part and left-click on the icon marked Hide Objects. Double-click the title of the viewport to return to a 4-viewport view and double-click the Perspective view port to maximize it (Figure 25).

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

6. Select the Curve|Curve From Object|Duplicate Border menu item. Click on the box then on the cylindrical part of the model followed by <ENTER>. This operation extracted a square and a circular curve from the model. Hide the box and the cylinder to only see the two extracted curves shown in Figure 26.

Page 33: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 33

Figure 26: The highlighted square and circular curves represent the Naked Edges of the selected Polysurfaces.

You are now going to create 2 horizontal walls based on these curves: one inside the cylinder and the other outside. These walls will act as a partition between the top and bottom of the model.

7. Select the Surface|Planar Curves menu item and click on the square curve to fill its interior with a square surface. Double-click the Title of the Perspective Viewport to return to 4-viewport. Double-click the title of the Top view port to maximize it (Figure 27).

Figure 27: Top view of the square surface patch

8. Select the menu item Edit|Split and click on the surface of square, then hit <ENTER>. Click on the curve representing the circle and press <ENTER> to split the square into two parts. Figure 28 shows the two surfaces with the outer surface highlighted.

Page 34: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 34

Figure 28: The two surfaces resulting from the split with the outer surface highlighted

9. While in the Top view, select the circular and square curves and delete them. 10. Right-click on the button marked Show Objects to unhide all the surfaces, select a Perspective

view of the model and resize it by left-clicking the Zoom Extents button. 11. Select the Edit|Select Objects|All Object menu item and note that Rhino responds with the

message “3 polysurfaces, 2 surfaces added to selection.” on the command-line.

You must now join all the surfaces and polysurfaces into one non-manifold surface.

12. Select all the surfaces and click on the MergeBreps icon to create one single non-manifold polysurface.

13. 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 t1_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 t1_2.3dm is created in your current folder.

14. 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.

15. 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).

Page 35: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 35

Figure 29: Surface mesh of capped shaft in stratified soil

16. 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.

17. Select the model, select the File|Export Selected menu item and when the Export dialog box opens, enter t1_2 for the File name and select stereolythography (*.stl) for the Save as type.

18. 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

19. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral meshing tab. Make sure that the input file is t1_2.stl

20. 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. allowable element 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 4 groups. Group2 and Group4 represent the shaft interior; Group1 and Group3 represent the exterior of the shaft (Figure 30).

Page 36: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 36

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 t1_2.stl. 2. Click on Default, enter 1 for the Relative Offset and click on Compute. The resulting file is

t1_2.3dec. 3. Run 3DEC 4.0, call t1_2.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 (relative offset 1.)

The resulting 3DEC model is made up of a number of 1,166 tetrahedral blocks. The large number of bloc for such a relatively simple geometry is due to 2 factors:

• We are creating tetrahedral blocks. Manually, we would have created hexahedral blocks and as a result there would have been about 6 times fewer blocks.

Page 37: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 37

• The shaft is discretized too finely. Indeed, a relative offset of 1 means that the absolute offset is 1/1000 times the longest dimension of the bounding box containing the model, which is 200 feet. As a result, the absolute offset is 0.2 feet for a shaft diameter of 40 feet.

To obtain a coarser model do as follows:

1. Run the Kubrix program by clicking on the Kubrix icon. Select the Convex Blocking tab. Make sure that the input file is t1_2.stl.

2. Click on Default , and enter 100 for the Relative Offset and click on Compute. The resulting file is t1_2.3dec.

3. Run 3DEC 4.0 call t1_2.3dec and in the Plot Item Menu select color by Region (Figure 32).

Figure 32: 3DEC model of the capped shaft in stratified soil (relative offset 100.)

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 33 & Figure 34). 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.

Page 38: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 38

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

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

4. Run Kubrix by clicking on the Kubrix icon. Select the Octree Meshing tab (Figure 35).

Figure 35: Octree meshing dialog box

5. 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.

Page 39: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 39

6. Run FLAC3D, import t1_2.flac3d and display it (Figure 36).

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

END OF TUTORIAL 2

Page 40: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 40

TUTORIAL 3 — 20° 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 cubic block. To create this shape, you will first model the tunnels, and then subtract them from a cube (Figure 37).

Figure 37: A FLAC3D tetra model (left) and octree model (middle), and a 3DEC model (right) of the bifurcating tunnels

Startup and creation of a horizontal tunnel of diameter 10 and length 200 1. Start Rhino and click on the label of the Right view to activate it. Click on the word 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. Click once on the label of the Perspective view to activate it. 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. Clicking on any option appearing on the command line lets you modify it. Direction should be, by default, already be set to 1,0,0 since the circle was built in the Right viewport’s Construction Plane. Set the remaining options as follows: BothSides=Yes, Cap=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. Select Zoom Extents All Viewports4

Figure 38 to get a full view of the

model so far ( ).

4 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.

Page 41: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 41

Figure 38: 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, click on the button marked Hide Objects to hide it. 2. Select the remaining visible cylinder and select Transform|Scale 2D, and in the Right viewport,

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. Click on the origin of the coordinate system in the Top view. 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 39).

Figure 39: Two intersecting tunnels

We need to split the smaller cylinder, using the larger one, into 3 sections and delete a portion of the smaller cylinder to complete the bifurcation.

Page 42: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 42

4. Hit the <ESC> button to unselect everything. Select the Solid|Boolean Split menu item. For the Polysurface to split, 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 40: 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 40) and delete them. This leaves only one section (upper right) of the smaller cylinder. Select the two remaining polysurfaces; that is the larger cylinder and the remaining upper-right section of the smaller cylinder, 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 41).

Figure 41: 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.

Page 43: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 43

6. 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.

7. 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 42).

Figure 42: 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 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 43). Click OK to create the surface mesh.

Page 44: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 44

Figure 43: 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 44).

Figure 44: Preview of the surface mesh

5. Select the mesh and left-click on the icon marked Check mesh objects for error located in the Geometry Fix toolbar. The Check Mesh 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.

The present mesh is closed. It contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an all-triangular surface mesh to proceed.

6. To triangulate the non-triangular elements, select the mesh and left click on the icon marked Triangulate Mesh (located in the Mesh toolbar).

7. Select the model, 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.

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

Page 45: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 45

Creating a convex blocking for 3DEC 1. Start Rhino. Open t2_0.stl. Run Kubrix by left-clicking on the Kubrix icon. Select the Convex

Blocking tab. Click on Default and set the Relative offset to 10 (Figure 45). Make sure that the input file is t2_0.stl.

Figure 45: 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 4.0 and use File|Call to read kubrix_out.3dec and display it (Figure 46).

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

Creating an all-hexahedral grid for FLAC3D Using KUBRIX 1. Start Rhino. Open t2_0.stl. Click on the Kubrix icon and select the Hexahedral meshing tab

(Figure 47). Make sure that the input file is t2_0.stl.

Page 46: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 46

Figure 47: Kubrix hexahedral meshing default values

2. Click on the Default button to resort 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. Click Compute to launch the computation. The screen output is shown below.

---------------------------------------------------------------------------- ............................................................................ Welcome to KUBRIX version 10.4.4 Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved. ............................................................................ PLI001: The input surface file name is: C:\Users\Sina\Itasca\tutorials\RhinoFlac3d3decPfc3dTutorials\Tutori l2\t2_0.stl ... PLI007: REQUEST: STL input surface (-it stl) ... PLI002: The output mesh file name is: C:\Users\Sina\Itasca\tutorials\RhinoFlac3d3decPfc3dTutorials\Tutori l2\t2_0.flac3d ... PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ... PLI003: The minimum mesh block resolution is 1 ... PLI033: REQUEST: 1000 surface smoothing iterations (-m) ... PLI031: The max. allowed element edge length is infinity ... 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 6398 triangles and 3197 nodes. ISI014: Sharpest wedge 160 deg @ (4.786e+001,9.988e+000,-3.488e-001) MGI066: Feature refinement: final triangles count 6524 ... MGI068: Fuzzy-logic block decomposition ... MGI037: Done. 34/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 ........ 2 elems (5%) need Jacob. correction MGI018: Final check ........ all Jacobians are positive.

Page 47: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 47

MGI082: Block reduction complete (33)... MGI012: Output mesh contains 33 hex elements ... MGI012: Output mesh contains 84 vertices ... MGI012: Output mesh contains 1 material ... MGI054: Max. edge offset ... 7.16e+000 u between nodes 36, 47 MGI057: Max. non-dim offset 0.4995 between nodes 36, 47 MGI018: Final check ........ all Jacobians are positive. MGI021: Max. edge length ... 1.20e+002 u between nodes 1, 29 MGI052: Min. edge length ... 6.35e-001 u between nodes 35, 38 MGI020: Max. aspect ratio .. 1.32e+002 at element 11 ............................................................................ MGI031: Writing a VRML file ... MGI067: Writing a FLAC3D file ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MGI999: Successful termination of KUBRIX in 2.6 seconds! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

3. KUBRIX generates two files: kubrix_out.flac3d and kubrix_out.wrl. You have two options for inspecting the resulting mesh. You can open a new instance of Rhino and use File|Import to import kubrix_out.wrl.

4. For a more in-depth inspection of the grid launch FLAC3D and use File|Import grid to read kubrix_out.flac3d. Select Plot|1 Base/0|Show to open the FLAC3D graphic window. Click somewhere in the background of this window to activate it, and select Plot item|Add|Plot|Group to open the Block group dialog box. Click OK to display the grid in FLAC3D (Figure 48).

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

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

5. Launch Kubrix, and in the Mesh parameters section of the dialog box, check the square marked Max. allowable element edge length, and enter 20 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 click Compute to launch the hexahedral mesh generation.

Page 48: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 48

6. In the 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 49: Flac3D grid containing 6875 zones and 8464 vertices

Creating a tetrahedral grid for FLAC3D Using KUBRIX 1. Start Rhino. Open t2_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

2. Click on the button marked Default, then on Compute to create a tetrahedral grid (Figure 51).

Page 49: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 49

Figure 51: An all tetrahedral grid

Creating octree grids for FLAC3D or blocks for 3DEC Octree meshes are based on an increasingly finer decomposition of space into hexahedral blocks (Figure 52 & Figure 53). One of the main attractions of this approach is that the input surface doesn't have to 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 presented in this document where a perfectly watertight input surface is required in which all surface intersections are accounted for.

Figure 52: Octree blocking: left, mesh featuring 5 levels of refinement, right, a balanced octree where a maximum of 1-to-2 refinement is enforced on adjacent cells

Page 50: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 50

Figure 53: Octree meshing: left: boundaries are detected in dark blue, right; various regions are identified and colorized

1. Start Rhino. Open t2_0.stl. Run the Kubrix program by clicking on the Kubrix icon. Select the Octree Meshing tab (Figure 35).

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.

Figure 54: 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 55).

Page 51: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 51

Figure 55: 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 56).

Figure 56: 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 for sequential excavation The Kubrix/Rhino logic may be used to create models featuring sequential excavation. Whereas in traditional model building for FLAC3D or 3DEC the range command based on geometrical criteria is used to excavate material, in the CAD-based mesh generation logic embodied by Kubrix/Rhino, the zones destined to be “nulled” must, in advance, belong to separate groups (or regions) so they can be identified. You can create groups of zones (FLAC3D) or regions of blocks (3DEC) by adding internal walls representing the location of the excavation fronts at various stages of the excavation. For all practical purposes, Kubrix will assume that the added walls represent boundaries between different materials. For the user, these groups represent essentially the same material.

Page 52: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 52

The most straight-forward way to add internal walls is to add them to the CAD definition before triangulation. A closed surface with internal walls is a non-manifold surface.

It is also possible to add walls to a surface mesh after is has been triangulated. In all cases, the resulting STL file should not have any naked or free edges. Once used with Kubrix, the STL file will produce a number of additional groups which can then be individually turned on or off (nulled) in a data file to represent sequential excavation during a simulation.

1. Start Rhino and open t2_0.3dm which represents the CAD definition of the model so far. 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 57, 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 57, right).

Figure 57: 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 58, left).

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 58, right). Note the line used to cut the main tunnel in two.

Page 53: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 53

Figure 58: 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 59, Left). Select the edge and select Surface|Planar Curves to create the circular surface bounded by the circle (Figure 59, 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 59, Right).

Figure 59: 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 close the tunnels at their three openings. This will result in two groups in the tunnels and one group outside

1. 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 60, Left).

Page 54: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 54

2. 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 60, Center). Hit <ENTER> to indicate that you have finished extracting the three curves.

3. While the 3 curves are still selected select Surface|Planar Curves to create three circular surfaces spanning each selected curve (Figure 60, Right).

Figure 60: Extracting the curves representing tunnel openings (Left and Center) and creating the additional surfaces that cap

the tunnels (Right).

4. Select Edit|Select Objects|All Objects to select all the surfaces constituting the model. Click on the icon marked MergeBreps 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 doesn’t matter since the MergeBreps command operates only on surfaces and polysurfaces.

5. 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.

6. 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.

7. 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 61).

Page 55: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 55

8. Select the mesh. Select File|Export Selected and save the mesh as an ASCII STL file called t2_1.stl.

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

9. 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. allowable element 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.

10. 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 62: 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

Page 56: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 56

Tutorial 4: Geometry cleanup given an existing triangulated surface In this tutorial, you will learn to clean up an existing triangular definition of a complex mine available as a DXF file (Figure 63) and create a FLAC3D and a 3DEC model for analysis.

Figure 63: 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 64) 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.

Page 57: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 57

Figure 64: Top view of the model

3. Select the mesh and select Transform|Move in the menu bar. Enter 10400,90800,0 for the coordinates of the Point to move from, followed by <ENTER>. Enter 0 for the coordinates of the Point to move to. The mesh is now nearly centered on the origin.

4. 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 mesh objects for errors 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. Importants thing 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. 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 duplicate faces. Mesh does not have any disjoint pieces. Mesh does not have any unused vertices. ID: 71c20c1b-c1d2-43ed-9474-9ce49f9dcdaa (4) Layer name: LAYER_05 Render Material: source = from layer index = -1 Attribute UserData: UserData ID: B0EE2168-8EC6-42ed-A962-26DEB8CC8F9A Plug-in: Rhino Render

Page 58: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 58

description: Rhino Renderable Object UserData saved in file: no copy count: 2 Geometry: Valid mesh. Open polygon mesh: 6156 vertices, 2052 polygons with normals bounding box: (-445.88,234.523,219.694) to (-306.1,299.273,237.892)

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.

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 mesh objects for errors icon located in the Geometry fix toolbar.

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. 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 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.

The number of naked edges has dropped from 89 to 17.

Page 59: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 59

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:

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. 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.

Page 60: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 60

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 65).

Figure 65: corrected mesh

Removal of artifacts due to triangulation noise: “defeaturing”. “Defeaturing” consists in removing surface features caused by bad 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 Extraction of 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 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.

Page 61: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 61

4. Enter 170° for the angle and note that almost the totality of the mesh is highlighted (Figure 66).

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

5. Click OK, select the mesh and click on the icon marked Hide object. This hides all the triangles connected to each other with angles less than 170°. Left-click on Zoom Extents to see the two small slivers remaining in the mesh (Figure 67). These triangles were connected to the rest of the mesh through angles greater than 170° and clearly represent pathological cases.

Figure 67: 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 Hide objects to unhide everything.

7. Select the mesh and use the Check mesh objects for errors 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.

Page 62: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 62

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 mesh objects for errors 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 68.

Figure 68: 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 69. Delete the triangles that are left.

Page 63: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 63

Figure 69: 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 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 mesh objects for errors 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 70). 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.

Page 64: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 64

Figure 70: 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:

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 71).

Figure 71: Highlighted naked edges

Page 65: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 65

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 72).

Figure 72: 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 73, 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.

25. Left-click on the icon marked Delete mesh faces and click on the 3 triangles adjacent to the hole (Figure 73, top, right). Hit <RETURN> to delete the selected triangles (Figure 73 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 73, bottom, right).

Page 66: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 66

Figure 73: 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.

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

3. 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.

4. 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

Page 67: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 67

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.

5. 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 74).

Figure 74: 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.

Reading the STL file into KUBRIX and automatic hexahedral meshing 6. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral Meshing tab and

make sure that the input file is set to tutorial4.stl. 7. To create a FLAC3D model, click on Default, set the Max allowable element edge length to 5, the

Resolution to 2 and the Nb. Of surface smoothing iterations to 500 (Figure 75), and click on Compute by launch mesh generation.

Page 68: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 68

Figure 75: 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) ... 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

Page 69: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 69

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 75).

Figure 76: FLAC3D mesh generated by KUBRIX

8. To create a 3DEC block model, launch Kubrix, select the Convex Blocking tab and click on Default.

9. Enter 3dec in the Output type field (Figure 77).

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

Page 70: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 70

10. 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.

Figure 78: 3DEC blocking

END OF TUTORIAL 4

Page 71: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 71

TUTORIAL 5 — Open Pit: Creating a model from contour lines 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 79)

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

Startup and approximation of contour lines 1. Start Rhino and select File|Import to read in Tutorial5.dxf. 2. In the Top view, zoom in, in order to see and highlight the contour line representing the floor of

the pit (Figure 80).

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

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

Page 72: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 72

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

4. 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 82). This ensures that while tracing over contour lines, Polylines can snap to existing points.

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

5. 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 83).

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

6. 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 84).

Page 73: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 73

Figure 84: 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)

7. Delete the original contour line (that was in the dxf file), select the Polyline you just created and select Surface|Planar Curves to create a surface spanning across the Polyline. Delete the Polyline (Figure 85).

Figure 85: Planar surface representing the floor of the pit

8. 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 86).

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

Page 74: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 74

9. 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 87).

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

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

Figure 88: Closure of the second contour

11. 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.

12. 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 89).

Page 75: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 75

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

13. 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 90). Save the model as Tutorial4.3dm. 3dm is the native Rhino file format.

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

Creating the 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 91).

Page 76: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 76

Figure 91: 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 92). A ghosted view renders the surfaces semi transparent making the surfaces beneath visible.

Figure 92: 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 93).

Page 77: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 77

Figure 93: 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 94. The top bench will have to be later on connected to a flat surface representing the ground.

Figure 94: 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 95, right).

Figure 95: 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 95, right), select Edit|Trim and click somewhere slightly to the left of the

Page 78: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 78

highlighted curve to trim off the part of the top surface that is inside the curve (Figure 96). Trimming reveals the surface below which is green.

Figure 96: 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)

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 95, right).

Figure 97: 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 97, 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 98). Trimming reveals the surface below which is brown.

Figure 98: 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)

Page 79: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 79

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 doesn’t need any trimming (Figure 99). Select File|Incremental Save to save the current model as Tutorial4 001.3dm. Each incremental save increments the last 3 digits concatenated to the root name, Tutorial4.

Figure 99: 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 11. 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 100, left).

12. 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.

13. 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 100, 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.

Page 80: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 80

Figure 100: 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)

14. 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 doesn’t need to be extruded. Select the Polysurface resulting from the extrusion of the outer curve of the topmost bench and delete it (Figure 101).

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

15. 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 102). Select File|Incremental Save to save the current model as Tutorial4 002.3dm.

Figure 102: 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

Page 81: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 81

the contours as you did in section 1, Startup and approximation of contour lines, page 71. 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 103).

Figure 103: 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 Tutorial4 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 104).

Page 82: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 82

Figure 104: 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 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 105).

Figure 105: 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 106). Only the pit and the top surface of the box remain visible.

Figure 106: 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 107, 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 107, center). Select the curve and select Edit|Trim. Click inside the curve to trim off the interior of the curve (Figure 107, right).

Page 83: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 83

Figure 107: 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 108). Select File|Incremental Save to save the current model as Tutorial4 003.3dm.

Figure 108: 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.

Page 84: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 84

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 Tutorial4.stl, and then click on Open. Click on Compute the launch the 3DEC block generation (Figure 109,).

Figure 109: 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 110.

Figure 110: 3DEC model produced by Kubrix

Page 85: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 85

Creating a FLAC3D model 3. 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 Tutorial4.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 111, top and bottom).

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

Creating an Octree model 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.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 112).

Page 86: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 86

Figure 112: The Octree Meshing dialog box.

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

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

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

Page 87: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 87

intermediate saved models called Tutorial4 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 114).

Figure 114: 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 115).

Page 88: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 88

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

END OF TUTORIAL 5

Page 89: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 89

Tutorial 6: Building 3DEC models in Rhino without using KUBRIX 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 1. 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.

2. Instead of Split or Trim, use Solid|Solid edit tools|Wire cut which always results in two solids. 3. 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 116).

Figure 116: 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

Page 90: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 90

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 117) to create a POLY file called a.3dec.

Figure 117: 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 to 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 118).

Figure 118: Creating a Flemish bond wall module

3. 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 118) wide enough for the bricks to fall onto.

Page 91: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 91

Figure 119: 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 3DEC to create a file called a.3dec. Rename the file to wall.3dec.

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

Page 92: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 92

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

Type New in the 3DEC command window and call the following 3DEC data file (Figure 121) 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 122).

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

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

Page 93: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 93

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 click on the Wire cut icon (Figure 123).

Figure 123: Wire cut icon

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 124).

Page 94: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 94

Figure 124: 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 (Figure 123). 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 125).

Figure 125: 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 126).

Page 95: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 95

Figure 126: The model after cutting with the second line

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

Figure 127: 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 Build 3DEC model from VRML (Figure 117) to create a POLY file called a.3dec. Start 3DEC 4.0, call the file a.3dec and double-click the block menu item to see your model (Figure 128).

Page 96: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 96

Figure 128: The bore model in 3DEC 4.0

END OF TUTORIAL 6

Page 97: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 97

TUTORIAL 7: Working with meshes: adding an internal wall to an existing mesh. Whenever a CAD definition is available, Rhino’s solid modeling tools such as Trim and Boolean operations may be used to modify geometry, i.e. add a wall, etc. When a mesh (of triangular or quadrilateral) faces is all you have, a number of specialized operations are available for extracting and partitioning a mesh into smaller manageable parts. By breaking the mesh into smaller manageable parts, you can focus on locally modifying the mesh. In this tutorial, you will practice using these tools by adding an internal wall to an existing triangular mesh

Partitioning a mesh of faces into a few manageable pieces 1. Start Rhino and read in the Tutorial7.stl, the model file in which you would like to add an internal

wall (Figure 129).

Figure 129: Starting mesh of faces

2. Select Mesh|Mesh edit tools|Extract|Connected faces. Click on any face on any curved surface of the mesh. The face will be highlighted and the Extract Connected Mesh Faces dialog box will open (Figure 130). 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 the surface is curved, none of triangles adjacent to the selected triangle is coplanar with it, so 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 (Figure 130).

Page 98: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 98

Figure 130: Expanding patch of connected faces as "Angle between" in the "Extract connected faces" dialog box increases

4. Stop increasing the angle when the patch reaches its maximum size. Click OK, and the set of highlighted faces are extracted as a single mesh. Click on the icon marked ColorizeAllObjects to differentiate the two meshes (Figure 131).

Figure 131: The model with the connected faces extracted

Page 99: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 99

Please note that the reason the patch stopped expanding is that it is surrounded by sharp edges; in particular two lateral thin ridges running along the side of the tunnel (Figure 132).

Figure 132: Thin ridge causing a sharp edge whcih limits the expansion of the "connected faces" patch

5. Reuse the Mesh|Mesh edit tools|Extract|Connected faces on different areas of the mesh to extract other parts of the mesh, then use ColorizeAllObjects (Figure 133).

Figure 133: The mesh, after all connected faces have been extracted

Defining a Polyline that cuts the tunnel along its length Rhino provides a number of tools such as Mesh|Mesh edit tools|Mesh split and Mesh|Boolean operations that can cut meshes but in working with triangles or quads (i.e. meshes instead of CAD data) we want to avoid creating additional small triangles that normally result from repeated cut operations. We prefer deleting and sometimes manually adding individual faces.

1. Select the tunnel floor, left-click on the icon marked Hide objects, hold the button down and select the icon marked Invert selection and hide objects to hide every mesh except the floor of the tunnel (Figure 134).

Page 100: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 100

Figure 134: The floor of the tunnel

2. Select the Top view and zoom in near the top. Select Curves|Polyline|Polyline and start by picking along the grid line that best represents the centerline of the mesh (Figure 135).

Figure 135: Starting to build the cutting Polyline

3. Continue picking along the centerline grid points until you the Polyline completely subdivides the tunnel floor into two parts (Figure 135).

Page 101: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 101

Figure 136: The Polyline passes through all the grid points located along the midpoint of the mesh

Partitioning meshes 1. Left-click on the Shade viewport Icon and select Mesh|Mesh edit tools|Extract|Faces. Start by

clicking on triangles that are on the same side of the Polyline. You can also use left-click and drag to select several triangles at a time. Near the Polyline, click on single faces to select them more accurately. If you want to unselect a face, hold <CTRL> down and select it. Figure 137 shows how all triangles to the right of the Polyline have been selected.

Figure 137: All the triangles to the right of the Polyline have been selected

2. Hit <Enter> when all the faces to the right of the Polyline have been selected. Click on the icon marked ColorizeAllObjects to get a view of the split floor (Figure 138).

Page 102: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 102

Figure 138: The floor of the tunnel has been further split into two meshes by manually extracting faces

Use Mesh|Mesh edit tools|Extract|Faces to further split any remaining meshes that straddles the Polyline, and delete the two end caps of the main tunnel as they will be rebuilt later (Figure 139).

Figure 139: The tunnel mesh has been partitioned into 16 separate meshes

Building an internal wall 1. Adopt a Perspective view and hide every mesh is on the “access tunnel” side of the model.

Note that a lateral wall is composed of several pieces and you are unable to select its parts individually.

2. Select the lateral wall (appearing in green in Figure 139) and select Mesh|Mesh repair tools|Split disjoint mesh to separate it. Now you can hide everything except the left side (Figure 140).

Page 103: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 103

Figure 140: Left: The lateral wall appears in two pieces: Use "Split disjoint Mesh" to separate them so you can hide the part you want to hide. Right: only half of the mesh is now visible

3. Join all visible meshes into a single mesh by selecting them and using <CTRL> J. Select Mesh|Mesh edit tools|Extract|Hole boundary to extract the Polyline representing the boundary edges of the mesh (appearing as a yellow line in Figure 141).

Figure 141: joined half tunnel with its boundary curve extracted

4. Hide the mesh and use Edit|Explode to break down the boundary curve into its constituent segments. Delete the curved segments that follow the two ends of the curves and keep only the segments that will border the internal wall you are planning to build (Figure 142).

Figure 142: Portion of the boundary curve that will border the future internal wall

Page 104: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 104

5. A closer look at the Polyline near the intersection of the two tunnels shows that the Polyline folds on itself (Figure 143).

Figure 143: Folding near the intersection of the two tunnels

6. Delete the individual segments responsible for the fold and reconnect the ends (Figure 144).

Figure 144: Removing the segments responsible for the fold and reconnection of the curves into a single closed curve

7. Add two line segments to both ends of the curves and join all the segments into one single closed Polyline (Figure 145).

Figure 145: Closed curve bordering the future internal wall

8. Use Mesh|Mesh from closed Polyline to create the mesh spanning the curve (Figure 146).

Page 105: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 105

Figure 146: Creating a closed Polyline and the mesh that spans across it. This mesh represents the wall

Putting it all together 1. Unhide everything by right clicking the icon marked Show objects and hide the outer box (Figure

147). Note that, by construction, the vertices and triangles of the internal wall perfectly match those of the rest of the model.

Figure 147: The internal wall visible inside the tunnel

2. Use Polyline|Polyline followed by Mesh|From closed Polyline to pick the nodes over one half of the tunnel opening, creating a Polyline and a mesh capping ½ of the tunnel opening (Figure 148).

Figure 148: Capping on half

Page 106: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 106

3. Use the same method to cap other opening.

Editing remaining naked edges It is possible that the mesh contains a number of naked edges. These are edges attached to only one triangle. The presence of naked edges is an indication of ill-defined volumes. They will cause the failure of the Kubrix automatic meshing process.

1. Select the tunnel and select Surface|Edge tools|Show edges to open the Edge analysis dialog box.

2. Check the button marked Naked edges and click on Zoom to zoom in on the area where there are a few naked edges (Figure 149).

Figure 149: A few remaining naked edges appearing in purple

The naked edges are the result of deleting folding edges while building the Polyline across which the inner wall is spanned. To eliminate them, we are going to collapse a number of edges.

Figure 150 shows an annotated view of the 3 vertices involved. We are going to collapse vertex B onto vertex C.

3. Zoom in and select Mesh|Mesh repair tools|Align mesh vertices. Click on the word Distance to adjust, and enter 10,000. Click on the word Select vertices and click on vertex C followed by vertex B, and hit <RETURN>, twice. This will result in the collapse of the segment BC onto vertex C (Figure 150).

Page 107: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 107

Figure 150: Using AlignMeshVertices to eliminate naked edges

Edge analysis shows a few remaining Naked edges (Figure 151).

Page 108: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 108

Figure 151: Remaining Naked edges

4. Use AlignMeshVertices, again to collapse two neighboring vertices. This will eliminate the last Naked edge.

Select the tunnel and click on the icon marked Check mesh objects for errors. If there are any duplicate faces, select the mesh and use Mesh|Mesh edit tools|Extract|Duplicate to eliminate them. In the end, Check mesh objects for errors should only report a number of non-manifold edges which are due to 3 surfaces meeting along the lines where the inner wall meets the outer walls.

END OF TUTORIAL 7

Page 109: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 109

TUTORIAL 8: Importing intermittent faults in FLAC3D & 3DEC with KUBRX 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:

• Extending a topography to a wider area • Trimming a topography and building a computational box • Mesh cleanup • Extending faults to create clean intersections • Intersecting meshes, methodically • Generating FLAC3D and 3DEC models with intermittent faults • Using Rhino and KUBRIX quality feedback info to correct the geometry • Assessing grid quality • Running a KUBRIX-generated model containing faults in FLAC3D • Running a KUBRIX-generated model containing faults in 3DEC

Importing meshes and extending the pit beyond its boundary 1. 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 152).

Figure 152: Shaded view of the pit and faults

Page 110: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 110

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

2. In the Layers window, right-click on the Pit layer and selet 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.

3. 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 153).

Figure 153: 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.

1. 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 154).

Page 111: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 111

Figure 154: 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 154 is also visible. This shows the existence of an internal free edge in the pit model.

2. 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 155).

Figure 155: 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.

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

Page 112: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 112

Figure 156: Bounding box containing the outer curve

4. Select the bounding box and select the Analyze|Mass Properties|Volume Centroid menu item. Delete the bounding box while it is still highlighted.

5. 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 157).

Figure 157: The pit boundary and its scaled copy

6. 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.

7. 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 158).

Figure 158: Extension of the pit

Page 113: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 113

8. 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.

9. 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 159).

Figure 159: Surface and mesh

10. 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.

11. 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 160).

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

Page 114: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 114

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.

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

13. 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.

14. 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 1. 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 161).

Figure 161: The pit and the faults

2. 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.

3. 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

4. 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 162).

Page 115: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 115

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

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.

5. 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.

6. 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 163).

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

7. 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 164).

Figure 164: Extracting the boundary of the pit

8. 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

Page 116: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 116

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.

9. 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 164). This specifies the starting point of the line (Figure 165).

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

10. 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.

11. 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 166).

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.

Page 117: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 117

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

12. 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 the way to the right, click on OK and delete the extruded surface which has remained highlighted (Figure 167).

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

13. 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.

14. 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 168).

Page 118: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 118

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

15. 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.

16. 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 169).

Figure 169: 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.

17. 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 170).

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.

Page 119: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 119

Figure 170: Closure of the bottom of the model

18. 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 171). Note the free edges at the connection of the vertical walls and the topography that remain to be closed.

Figure 171: Remaining naked edges

19. 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.

20. 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

Page 120: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 120

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.

21. 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 172, 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 172, Right).

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

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

Computing intersections 1. 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.

2. 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.

3. 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 173).

Page 121: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 121

Figure 173: 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 174)

1. 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.

2. Select the curves highlighted in Figure 174, 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 174, Right).

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

3. 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 175).

Page 122: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 122

Figure 175: 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.

1. 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 176).

Figure 176: 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 176 ) is incomplete. You will extend Fault2 so it will make a clean cut with Fault1.

2. Delete the intersection curve (in black in Figure 176). Select the border, and select Edit|Explode. Rhino explodes the border into 17 separate segments.

3. 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 177).

Page 123: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 123

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

4. 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 178).

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

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:

• Extract the border. • While the border is selected explode it into many segments. • While the segments are selected, with <CTRL> down, de-select two segments that bracket the

curve of interest. • 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 • Delete the unwanted curve and the two segments you had de-selected earlier, and you are left

with the curve you wanted.

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

Page 124: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 124

Figure 179: Everything, including the extension curve

6. 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 180).

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

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.

7. 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 181)...

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

Page 125: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 125

8. For the second point, click on the other end of the edge; which is the end adjacent to the extrusion curve (Figure 182). 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 182: Specifying the line segment (highlighted in yellow) along which the extension curve will be extruded

9. 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 183).

Figure 183: Extrusion of the extension curve

10. 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 184).

Figure 184: Fault2 and its extension

Page 126: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 126

11. 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 185).

Figure 185: 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

Back to intersection 1 (now with a clean intersection curve) 1. 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 186).

Figure 186: Fault1 and extended fault2 prior to intersection calculation

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

Page 127: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 127

Figure 187: The new intersection curve

3. 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.

4. Select Fault2 and split it with the curve, then Delete the unwanted part (appearing behind fault1 in Figure 188). Remember that Fault2 is meant to stop right at Fault1 and any excesses should be discarded.

Figure 188: Fault1 and Fault2 split with the intersection curve

5. Delete the intersection curve.

Comparing Figure 187 and Figure 188, 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.

Page 128: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 128

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 1. 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 189).

Figure 189: Remaining intersection after intersection 1 is complete

Calculating intersection 2 1. Select the smaller intersection curve in Figure 189, and use Invert Selection and Hide Objects to

isolate it (Figure 190).

Figure 190: Intersection 2

2. 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 191).

Figure 191: The Pit, Fault2 and their intersection

Page 129: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 129

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

Figure 192: Recomputed intersection curve

4. 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.

5. 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 193). Note the trace of Fault2 on the pit.

Figure 193: 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 1. 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 194). Select the curve on the right as intersection 1.

2. Select intersection1 and use the Hide objects|Invert Selection and Hide Objects icon to isolate it.

Page 130: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 130

Figure 194: Intersection 3

Calculating intersection 3 3. 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 195Figure 191).

Figure 195: Pit, Fault1 and their intersection curve

4. 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 196).

Page 131: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 131

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

Calculating intersection 4 1. 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 194). Select the remaining intersection curve (Figure 197).

Figure 197: Intersection curve #4

2. 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 198)

Figure 198: Ghosted view of the pit and Fault1

3. 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

Page 132: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 132

(intersection 3) was already dealt with (we are interested in the bottom-left intersection curve in Figure 199).

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

4. 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 200).

Figure 200: Computed intersection 4

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:

• First, Rhino feedback reported by o Check Mesh Objects for Errors (naked edges, degenerate or multiple faces) o Extract Mesh Toolbar|By Aspect Ratio, By Area, By Length...

• Next, Kubrix feedback reported as coordinates of "problem" locations: o Self-intersections before surface remeshing, distorted

Page 133: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 133

o Self-intersections after surface remeshing (often due to the cut angle being too large)

o Additional self-intersection occurring during tetrahedral meshing (often due to highly distorted surface or small inter-surface clearnces)

o 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 1. In the Layers window, turn the Fault1 and Fault2 light bulbs off but leave the Pit on. Select the

Pit and check it with Check mesh objects for errors. 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: 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.

2. Left-click the icon marked Cull degenerate mesh faces to delete degenerate (null area) faces. A new click on Check mesh objects for errors will reveal a substantially greater number of naked

Page 134: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 134

edges due to the fact that a number of triangles have been removed. You will deal with naked edges later on.

3. 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.

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

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

5. 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 with the Check mesh objects for Errors confirms that the pit mesh is good.

6. Turn Fault1 and Fault2 on in the Layer window and check their quality using Check mesh objects for errors. Look for duplicate or degenerate faces. Both Fault1 and Fault2 should have naked edges because they are not supposed to be closed.

7. 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 1. 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.

2. 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.

Page 135: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 135

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 -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 ... ----------------------------------------------------------------------------

3. 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 202). For the last point of the Polyline, click somewhere in the background away from the model.

Figure 202: Polyline passing through all the "problem" points. The last point of the Polyline is an arbitrary point somewhere

away from the model

4. 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 203).

Page 136: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 136

Figure 203: 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.

5. 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.

6. 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 204: 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.

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

Page 137: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 137

8. 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.

9. Click on Kubrix and click on Compute since all the parameters must have remained unchanged since the last use of Kubrix.

10. 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 ... ----------------------------------------------------------------------------

11. 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 205). For the last point of the Polyline, click somewhere in the background away from the model.

Figure 205: 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 205, 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.

Page 138: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 138

12. Click on the Kubrix Icon, in the Tetrahedral Meshing tab, enter 30 for the Cut angle and click on Compute.

13. 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 -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! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

14. 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 206), 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(𝑒)

Page 139: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 139

Figure 206: 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 207).

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

The resulting FLAC3D model is shown in Figure 208.

Page 140: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 140

Figure 208: FLAC3D model

How does KUBRIX keep track of interfaces 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 collections. All zone faces that match the STL file t8_faults.stl belong to a face collection or group called INTERFACE. In fact, Kubrix separates the model at those faces and for each surface patch creates two face collections: INTERFACE_MAST_i and INTERFACE_SLAV_i -i being the order number of the patch- that you can turn into interface elements using the FLAC3D INTERFACE command in your data file. In the present case, Kubrix reads the file t8_faults.stl using the -fault keyword and finds that this surface represents two patches so 4 face collections INTERFACE_MAST_1, INTERFACE_SLAV_1, INTERFACE_MAST_2 and INTERFACE_SLAV_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 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

Page 141: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 141

*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 collections FCOL INTERFACE_MAST_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 FCOL INTERFACE_MAST_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 FCOL INTERFACE_SLAV_1 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 .................................................................. 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 FCOL INTERFACE_SLAV_2 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 .................................................................. 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108

Running the model with FLAC3D Use the following data file to run this model in FLAC3D 4.10.76 Stage 4

NEW ;read geometry; impgrid tutorial8.flac3d set fish safe off set deterministic off his unbal attach face tolerance 1e-5 ;detach faces that are destined to become interfaces: masters from slaves & slavrs from master def _delete_attaches root_MAST = 'INTERFACE_MAST_' root_SLAV = 'INTERFACE_SLAV_' loop _h(1,2) FaceCollectionName_MAST = root_MAST + string ( _h ) FaceCollectionName_SLAV = root_SLAV + string ( _h ) command attach delete range collection FaceCollectionName_MAST attach delete range collection FaceCollectionName_SLAV endcommand endloop end _delete_attaches

Page 142: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 142

;define interfaces def _interface_props root = 'INTERFACE_MAST_' loop _h(1,2) FaceCollectionName = root + string ( _h ) command interface _h face range collection FaceCollectionName 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 ;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

Page 143: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 143

TUTORIAL 9: Importing interfaces into legacy models 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 the internal surface surface9.dxf, are identified, removed and replaced with a boundary-fitted tetrahedral grid that faithfully represents the internal surface 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 15. 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.

16. 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.

Simplifying the internal surface 17. In Rhino, select File|Import and import surface9.dxf. Note that surface is in 8 pieces. 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

Page 144: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 144

18. 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

209, Left). 19. 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 209, Right).

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

20. Select the mesh you have just created and using File|Export selected export it as surface9Draped.stl.

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 file using SpaceRanger 21. 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>. 22. 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.

23. In Rhino, while surface9Draped is still on, select File|Import to import model9.wrl. Left-click the icon marked ColorizeAllObject to assign differing colors to the draped surface and model9 (Figure

210).

Page 145: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 145

Figure 210: The draped surface and the outer surface of the FLAC3D model

Please note that the draped surface 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 want to indentify the zones of the FLAC3D model that interfere with the surface. The draped surface, in its present form, interacts with every zone on the surface of the FLAC3D model. You must trim the draped surface 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.

24. In Rhino, hide the draped surface. Select Curve|Line|Single line and build a horizontal line lying somewhere along the upper part of the upstream 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 211, Left). Draw two additional lines along the downstream face (Figure 211).

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

Page 146: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 146

25. 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 212).

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

26. 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 213, Left). Enter 5 for the Scale factor and hit <RETURN>.

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

27. 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.

28. 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.

29. Unhide everything by right-clicking the icon marked Show objects and hide the FLAC3D model to only show 3 meshes: the upstream and downstream surfaces (meshes) and the draped surface mesh (Figure 214).

Page 147: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 147

Figure 214: The draped surface and the recovered upstream and downstream faces

Trimming the draped surface with the dam 30. Select all 3 meshes and left-click the icon marked Mesh Intersect to create the 5 curves resulting

from the intersection of these meshes (Figure 215).

Figure 215: Intersections of the draped surface with the recovered upstream and downstream faces of the dam: perspective view (Left) and top view (Middle).

31. While in the top view, Select Curve|Line|Single line to draw a line from 6600,65000 to 6600,62000. Draw another line from 5000,64600 to 7000,64600, and an additional line from 5000,62500 to 7000,62500 (Figure 216, Left).

32. Hide the draped surface and trim the intersection curve with the 3 trimming lines leaving only the curves and the trimming lines (Figure 216, Middle). Delete the trimming lines and use Curve|Line|Single Line to close the remaining intersection curves into a single closed curve.

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

Page 148: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 148

33. Unhide the Draped surface and trim it with the closed curve (Figure 216, Right).

Figure 216: Intersection curves, draped surface & trimming lines (Left), trimmed intersection curves & trimming lines (Middle) and trimmed draped surface (Right)

34. Select the trimmed draped surface and select and export it as an ASCII STL file called surface9DrapedTrimmed.stl.

You are now going to use SpaceRanger to identify the zones in model9.flac3d that come to within 1 m of surface9DrapedTrimmed.

Identifying the zones that intersect the trimmed surface 35. Create a text file called spaceranger.dat, and on the first line of this file write

surface9DrapedTrimmed.stl. 36. 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>. 37. Enter 1 to read a FLAC3D model grid, followed by <RETURN>, and enter model9.flac3d, followed

by <RETURN>. 38. 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.

39. 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 model9SurfaceIntersection1.wrl and click Open. Left-click the icon marked ColorizeAllObject to colorize each object in the model separately (Figure 217, Left).

Page 149: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 149

Figure 217, Left shows the zones of model9.flac3d that intersect with or come close to surface9DrapedTrimmed. You are now going to compute the intersection of these zones with the surface9DrapedTrimmed surface.

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

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

Preparing the surfaces for Kubrix 41. Start Rhino and use the Large Objects - MetersA4R2A2 template defined earlier in this Tutorial.

Use File|Import to import core.stl. Similarly import surface9DrapedTrimmed.stl into the model (Figure 218).

Figure 218: imported core.stl and surface9DrapedTrimmed.stl

42. Select the two meshes and left-click on the icon marked Mesh Intersect. Rhino responds by indicating that there are no intersections.

Page 150: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 150

This makes sense since with SpaceRanger you chose all the zones that intersect or are closer than 2m from the surface.

43. Select the mesh representing the core and export is as an ASCII STL file called outer.stl. Similarly Export the mesh representing surface9DrapedTrimmed as inner.stl.

44. 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 219).

Figure 219: The Kubrix dialog box

45. 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 interfaces 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 collections. All the zone faces that match the STL file inner.stl belong to a face collection or group called INTERFACE. In fact, Kubrix separates the model at those faces and for each surface patch creates two face collections: INTERFACE_MAST_i and INTERFACE_SLAV_i -i being the order number of the patch- that you can turn into interface elements using the FLAC3D INTERFACE command in your data file. In the present case, Kubrix reads the file inner.stl using the -fault keyword and finds that this surface represents just one patch so simply INTERFACE_MAST_1 and INTERFACE_SLAV_1 are 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 *

Page 151: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 151

*GRIDPOINTS G 1, 5.956671e+003, 6.325790e+004, 7.051194e+002 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 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 collections FCOL INTERFACE_MAST_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 FCOL INTERFACE_SLAV_1 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 .................................................................. 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454

Page 152: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 152

Combining hex and tet grids into a final hybrid grid Launch FLAC3D, use File|Grid|Import to import model9SurfaceIntersection2.flac3d into FLAC3D. Note

that the model include 2 groups: Dam and X (

46. Figure 220, Left). X is the group of all the zones that intersect or are within 2m of the surface9DrapedTrimmed surface.

47. In the FLAC3D command window enter DEL RANGE GROUP X to delete of all the zones in group X. Use File|Grid|Export to export what remains (Figure 220, Right) as model9Hex.flac3d. Quit FLAC3D.

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

Page 153: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 153

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

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

49. 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 collections, which use the grid point ID's invoked earlier in the core.flac3d file remain unchanged.

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

Page 154: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 154

Figure 222: 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 collections destined to

become an interface

Using SpaceRanger to create separate groups below and above the surface 50. 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.

51. Rename output.flac3d, hybridRanged.flac3d. Launch FLAC3D an use File|Grid|Import to import hybridRanged.flac3d (Figure 223).

Figure 223: hybridRanged.flac3d processed by SpaceRanger

Page 155: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 155

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

Running a FLAC3D grid containing face collections 52. Run FLAC3D, import hybridRanged.flac3d

Running the model with FLAC3D Use the following data file to run this model in FLAC3D 4.10.76 Stage 4

NEW ;read geometry; impgrid hybridRanged.flac3d.flac3d set fish safe off set deterministic off his unbal attach face tolerance 1e-5 ;detach faces that are destined to become interfaces: masters from slaves & slavrs from master def _delete_attaches root_MAST = 'INTERFACE_MAST_' root_SLAV = 'INTERFACE_SLAV_' loop _h(1,1) FaceCollectionName_MAST = root_MAST + string ( _h ) FaceCollectionName_SLAV = root_SLAV + string ( _h ) command attach delete range collection FaceCollectionName_MAST attach delete range collection FaceCollectionName_SLAV endcommand endloop end _delete_attaches ;define interfaces def _interface_props root = 'INTERFACE_MAST_' loop _h(1,1) FaceCollectionName = root + string ( _h ) command interface _h face range collection FaceCollectionName 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 ;load assignments.... SET grav (0,0,-9.81) fix x range x 5373 tol 0.01 fix x range x 6963 tol 0.01 fix y range y 62334 tol 0.01 fix y range y 64704 tol 0.01

Page 156: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 156

fix z range z 600 tol 0.01 hist unbal SOLVE ratio 1e-5 SAVE hybridRanged _elas.sav RET

END OF TUTORIAL 9

Page 157: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 157

EXERCISE 1 – Salt Cavern: Using Rhino’s Loft to create a model from contour lines 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 224).

Figure 224: A solid model (left) and a 3DEC model (right) of a salt cavern

Creating a solid model & meshing 1. Read Exercise1.dxf into Rhino 2. Select all curves. Select Surface|Loft and click on Automatic. Hit <RETRN>. 3. In the resulting dialog box, check Closed Loft and click OK. 4. Mesh the surface, then create a box surrounding the surface using Mesh|Polygon Mesh

Primitives|Box 5. Save your model, then export is as an STL file 6. Run Kubrix to create grids.

Page 158: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 158

EXERCISE 2 – Open Pit: Using Rhino’s Mesh from Points for fast model creation In this exercise, you will learn to construct a model of an open pit starting from a set of topographic contour lines (Figure 225).

Figure 225: Clockwise from top left: Contour lines, boundary-fitted all-hex model, Octree model model, and 3DEC model

Creating a solid model & meshing 1. Read Exercise2.dxf into Rhino 2. 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 3. Select all the points and select Mesh|Mesh from Points. 4. Click on SampleDensityPlusNoise and set it to 100, and hit <RETURN>. 5. While the points are still selected, delete them. Adopt a Top view 6. Use Mesh|Mesh Repair Tools|Fill Hole to manually fill all holes. 7. If needed, use Mesh|Single Face Mesh to locally create quad meshes. 8. Clean up the geometry by smoothing, collapsing small edges, extracting connected faces and

checking the mesh 9. In the Top view, trim the mesh with a square whose corners are at -6000,-6000,0 and

5000,5000,0. 10. Extract the mesh boundary, extrude it in the –z direction. 11. In the Front view trim the extrusion surface and cap it. 12. Mesh the surface

Page 159: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 159

13. Use edge matching to connect the two meshes together and obtain one watertight mesh. 14. Save your model, then export is as an STL file 15. Run Kubrix to create grids.

Page 160: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 160

EXERCISE 3-Models defined by Horizons & Topography: Boolean Operations on Surfaces and Meshes In this exercise, you will learn to construct a solid “sandwiched” between two arbitrary surfaces or meshes and split in two by an arbitrary surface or mesh.

1. Read in Sandwich.3dm. This model is composed of 3 surfaces and a rectangle representing the X-Y extent of the model (Figure 226).

Figure 226: The Sandwich model is composed of 3 surfaces and a rectangle

2. Select the rectangle, then Surface|Extrude Curve|Straight with the option Both sides, on, to extrude the rectangle into a vertical open surface (Figure 227). We want to represent the volume sandwiched between the lower and upper surfaces.

Figure 227: Model after the Straight Extrusion of the rectangle

3. Select Solid|Boolean two Objects. Select the extruded surface (Figure 228)…

Page 161: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 161

Figure 228: Boolean two objects after the first selection

…then the lower surface (Figure 229).

Figure 229: Boolean two Objects after the second selection

4. Click the left mouse button to select the configuration you want to keep. Click once more to select the configuration shown in Figure 230. Hit <ENTER> to accept it. We now have an open surface bound by the lower surface and the vertical walls bounding the computational domain.

Figure 230: The configuration to keep

5. Repeat the previous procedure by selecting Solid|Boolean two objects once more. Select, first, the surface you just created, then the upper surface. Click twice on the left mouse button to bring up the desired configuration. Hit <ENTER> to keep it. We now have a Solid bound by the topographies and the vertical walls (Figure 231).

Page 162: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 162

Figure 231: Solid sandwiched between the two surfaces

6. To split the solid with the third surface, select Solid|Boolean split. Select the Solid first, then the fault, followed by <ENTER> (Figure 232).

Figure 232: Solid split in two

Page 163: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 163

Importing CAD data into PFC3D

Figure 233: A Stirred tank reactor modeled with PFC3D

Summary This document describes how a complex geometry defined by Computer-Aided Design (CAD) may be imported into PFC3D as wall elements. It also includes a detailed example of a stirred-tank reactor used in process engineering, as well as data files and geometry definitions for several additional industrial applications.

Introduction PFC3D is valued for its ability to model complex physics. However, most engineering applications also feature complex geometries in the form of complex containers, screws, baffles, hoppers, etc. While PFC3D offers many options for defining all types of walls, creating complex walls within PFC3D may become tedious at times.

This document describes how a complex geometry defined by Computer-Aided Design (CAD) may be imported into PFC3D as wall elements. It also includes a detailed example of a stirred-tank reactor used in process engineering, as well as data files and geometry definitions for several additional industrial applications.

All the corresponding files are located in the folder “ImportCAD” that lives with this report and its subfolders. Some familiarity with PFC3D and FISH is necessary to take full advantage of this document. Some basic understanding of Computer-Aided Design concepts and tools, such as Rhino, AutoCAD or Pro-E is also helpful.

Brief overview of Computer-Aided Design (CAD) CAD is the process of creating curves, surfaces and volumes in space for use in computational analysis, computer-aided manufacturing or for simple visualization. CAD is sometimes called geometry modeling, surface modeling or solid modeling. There are two approaches to creating a CAD model: free-form and solid-based. In practice, most CAD designs follow a combination of those two approaches.

Page 164: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 164

In a free-form approach, points are created and linked together with curves. Curves are extruded along other curves to create surfaces. Surfaces may also be defined by closed curves. A collection of surfaces may be sewn together to form a shell or poly-surface, which can be either open or closed. Shells may be extruded along curves, or rotated around axes to create closed shells. Closed shells can also be obtained by sewing several shells together. Closed shells are sometimes called solid.

In a solid-based approach, ready-made closed shells called primitives (such as parallelepipeds, cylinders, spheres, cone sections, etc.) are used as a starting point. Union and intersection operations (also referred to as Boolean operations) are then used to subtract, combine or intersect primitives in order to create more complex solids.

A CAD model is a mathematical description of the objects it contains. For instance, a disc is described as plane passing through a specific point, having a specific normal and trimmed by a circle described by a specific radius and centered on a given point.

A triangulation consists of a number of computing points on the surfaces connected together as triangles creating a tiling the surface. Such a tiling is also referred to as a surface mesh. Triangulation, or facetization in general, amounts to discretizing the equation of a surface and replacing it with a table of x-, y- and z-values; some loss of information results from this.

CAD models exist in a variety of formats depending on whether they are facetized (Table 1).

CAD files Non-facetized (solid/surface models) Facetized (surface meshes)

Most common formats

IGES, STEP, PARASOLID, ACIS DXF, STL, VRML, 3DS

Table 1: Facetized and non-facetized CAD popular file formats

The STL (STereo-Lithography) file format is used in rapid prototyping and Computer-Aided Manufacturing. Because of its relative simplicity, is has become a de-facto standard for representing triangular surfaces. In the following, we will focus on importing CAD data in STL format (formatted ASCII files), using a FISH function. This approach can easily be extended to any other ASCII files readable using FISH.

The file hopper.stl, located in the folder ‘ImportCAD’, is provided as an example of such a STL ACSII file. It can be edited with your favorite text editor. The entire content of the STL file are bracketed between the keywords solid stl_ascii and endsolid stl_acsii. Within this bracket, each triangle is bracketed by a facet normal/endfacet pair containing the normal vector to each triangle and the coordinates of the triangles’ vertices.

This file represents the triangulated geometry shown in Error! Reference source not found.; the initial CAD geometry prior to triangulation is shown in Figure 235 Both figures were produced using Rhino.

Page 165: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 165

Preparing a model for import into PFC3D The user may import CAD models that have been triangulated and saved as a formatted STL file into PFC3D. A formatted STL file can be read using the ReadStlFile FISH function described below. This function can easily be modified to parse and read other types of facetized geometry files.

Prior to importing any external geometry into PFC3D, it is recommended that the following aspects of the model be examined:

• Are there any missing parts? Make sure that the geometry is complete • How is the model triangulated? Can it be simplified? How many triangles does it contain? The

same geometrical accuracy may be obtained using fewer triangles. Also, to reduce computational time, a simpler or coarser triangulation may be considered.

• Are the normal vectors properly oriented? Particles only interact with faces whose normal vectors are oriented toward them. Make sure that normal vectors are properly oriented at any location along the possible trajectories of the particles during the simulation.

The two last items of this listing are illustrated in the following.

The best way to examine a geometry so is to use a CAD software and check for missing or duplicate parts, weed out irrelevant details or parts that are not likely to come into contact with particles and check the orientation of the normals prior to saving the model as a formatted STL file. Recall here that particles may only interact with walls whose normals are pointing at them; if not, they will pass right through the walls.

Model simplification An imported model may be large and complex. Using it directly may require prohibitively large computational resources because of the sheer number of triangles involved. It is recommended that the model be simplified to remove details irrelevant to the PFC3D simulation.

For instance, Figure 234, left shows the model of a stirred tank reactor in which the tank wall has a certain thickness. In simulating the mixing of particles, the outer wall is irrelevant since it never interacts with particles. Figure 234, right shows the same model where only the inner wall of the tank has been kept.

Page 166: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 166

Figure 234: Original model with thick walls (left) and simplified model (right)

Model triangulation A solid model represents a mathematical description of the entities it contains. Surfaces must be triangulated before they can be read as wall elements into PFC3D. Most CAD systems allow you to choose how finely a surface is to be triangulated. The most common measure of how finely a surface is triangulated is called chord error or offset.

Figure 235 shows the CAD definition of a hopper prior to triangulation. Figure 236 is the result of triangulating the CAD definition with a chord error of 0.1. The resulting surface mesh contains 64 triangles.

Figure 237 represents the same object triangulated with a chord error of 0.001. The total number of triangles is now 4,680. Clearly, a slight degradation in geometrical accuracy can cause a substantial (almost 100-fold) decrease in the number of wall elements, and result in a significant speed-up of the simulation.

Figure 235: CAD model of hopper

Page 167: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 167

Figure 236: Triangulation with a chord error of 0.1 results in 64 triangles

Figure 237: Triangulation with a chord error of 0.001 results in 4680 triangles

The exact same geometrical accuracy may sometimes be obtained with fewer triangles, as illustrated in Figure 238. The triangulation on the right contains fewer triangles than the triangulation on the left, with no loss of geometrical information is lost in this simplification.

Figure 238: Simplified triangulation without loss of geometrical information

Checking normal orientation In PFC3D, the orientation of the walls determines the side with which particles interact. A particle will pass through a wall if the wall normal does not point toward it. Figure 239, left shows the original normal vectors of each triangle in the model (each normal is represented at the center of gravity of each triangle). As a consequence of the original orientation of the various lines used in the construction of the surface, certain surfaces may be oriented differently. Prior to saving the triangulated surface, all triangles must be oriented in a coherent fashion so that normals point towards the particles. Figure 239, right shows the results of such a modification.

Page 168: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 168

Figure 239: Normal orientations as displayed in the 3DShop solid modeler. Triangle normals are incorrectly oriented (left). All normals point towards the particles (right)

Example applications As mentioned above, we focus here on the importation of CAD data in the STL format, and illustrate this functionality with several example applications. Each example application uses specific STL files and FISH data files located in a corresponding subfolder of the folder ‘ImportCAD’, however, the FISH function readStlFile that implements the STL format import functionality, as well as other shared FISH functions, are implemented in the file CAD_ support.fis located directly in the folder ‘ImportCAD’.

The readStlFile FISH function parses and reads formatted STL files. Each call to this function, in turn, calls _iniWallColor, which assigns a different color to the part that is read so that, later on, color can be used as a range criterion to assign distinct attributes or kinematics to each wall, or simply to represent various parts with different levels of transparency or color.

In Section 4.1, we will illustrate and detail the use of the functions implemented in CAD_support.fis for the case of a stirred tank reactor application. The structures of the files used for the additional examples being the same, these examples won’t be discussed in detail.

Note that for illustration purpose, the number of balls generated in these examples is kept low. These data files should be modified according to the requirements of each problem.

Stirred Tank Reactor A stirred tank reactor (Figure 240) is an industrial-size beaker used in the chemical industry to produce compounds through mixing of several chemical reactants. The simplified reactor used in this example is made of two parts: a tank, which is fixed, and a rotating part (rotor) composed of four baffles.

The simulation is driven by the file STR.dat and the geometry of the stirred tank is defined in two STL files STRstator.stl and STRrotor.stl. These three files are provided with this note in the folder ‘ImportCAD/STR’. Figure 240 shows a snapshot of the system during the simulation. The original rotor design is shown in Figure 241, left. An additional STL file, STRrotor2.stl , representing a different design ( Figure 241, right), is also included , and can be substituted in place of STRrotor.stl.

The stirred-tank reactor is first simplified and triangulated in Rhino, which is the CAD tool used in this project. The normal orientations are checked, and the fixed and rotating components of the reactor are saved separately as two STL files: STRstator.stl and STRrotor.stl.

Page 169: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 169

STRstator.stl is read first, followed by STRrotor.stl. As each component is read into PFC3D, a unique color is assigned to it so that it can be identified using a color range later on. The kinematics of the rotor is prescribed through a call to _iniWallVel.

Figure 240: Simulation of a stirred tank reactor with PFC3D

The simulation is initialized by a call to the FISH function simini, defined in CAD_support.fis. All the situations shown here being fully dynamic, the local damping is set to zero, and viscous damping is used instead. An estimate of the maximum number of balls is specified to help optimize the PFC3D contact-detection algorithm, and gen_error is turned off to prevent any error to be thrown and stop the simulation if the number of balls generated does not exactly match the user’s input.

Balls are created with a call to makeAssembly. This procedure is specific to each situation shown here, thus is defined directly in STR.dat.

Finally, ball and wall properties are set and a rotation speed equal to ½ turn per second is imposed around the vertical axis.

The actual computation is done in simloop, defined in CAD_support.fis. Calculations are done in chunks of dt_sav seconds, followed by the output of a save file. the resulting save files will be post-processed with Iv. The parameter ratio 1.e-8 is issued to the SOLVE command to make sure that the computation does not stop prematurely.

Figure 241: Two baffle designs represented by STRrotor.stl (left) and STRrotor2.stl (right)

Page 170: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 170

Additional Examples The following examples are not detailed in this note. The data files used to run the simulations have the same structure than STR.dat describe above. The makeAssembly FISH function is specific to each case and thus defined in a specific data file. All examples make use of simini and simloop defined in the file CAD_support.fis.

Ball Mill A ball mill is used to grind particles. The following files are used in this application: BallMill.dat, BallMillBody.stl and BallMillCap.stl, located in the folder ‘ImportCAD/BallMill’.

BallMillBody.stl defines the geometry of the mill (see Figure 242, left). BallMillCap.stl is an end cap holding the particles inside the mill. The cap is rendered transparent to make the interior visible. BallMill.dat contains a function that colorizes balls according to the magnitude of velocity (Figure 242, right).

Figure 242: Ball mill: the geometry (left) in operation, with balls colorized according to the magnitude of their velocity (right).

Blade Mill A blade mill is also used to grind particles. The following files, located in ‘ImportCAD/BladeMill’, are used in this application: BladeMill.dat, BladeMillstator.stl and BladeMillrotor.stl.

Particles are created in two different colors in order to illustrate the mixing process. a snapshot of the system is shown in Figure 243

Figure 243: Snapshot of the Blade Mill simulation

Page 171: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 171

Bulldozer The following files are used in this application (Figure 244): bulldozer.dat, bulldozer.stl, and floor.stl.

Figure 244: Bulldozer blade

Page 172: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 172

Using CAD to automatically generate of clumps for PFC3D: BubblePack

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 tétrahédralisation 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 245).

Figure 245: 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 247 illustrates a 3D example in which the mid surface is shown in pink.

Page 173: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 173

Figure 247: 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

Page 174: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 174

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 248: 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

Page 175: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 175

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 defers 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.

To avoid this problem, first run Rhino, then read the STL file you want to make a mesh from into Rhino. This tells Rhino where the working directory is. Run Kubrix from inside Rhino by clicking on the Kubrix icon. Make sure that you have selected the right STL file in the Input File field of the dialog box.

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 CheckMesh. 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 CheckMesh before saving it as an STL file. There could be a number of reasons causing this problem:

1. You forgot to use Edit|Join (for a manifold solid) or MergeBreps (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 MergeBreps (for non-manifold surfaces) before surface meshing.

In the non-manifold polysurfaces resulting from the MergeBreps 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.

2. 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.

Page 176: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 176

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 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 won’t 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.

Page 177: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 177

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.

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.

SplitMeshWithCurve problems in Rhino

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 [email protected]:

In all that follows, replace Program Files with Program File (x86) if you have installed Kubrix on a 64 bit operating system)

1. 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.

2. Verify that the file kubrix.exe is located in

C:\Program Files\Simulation Works\Kubrix

3. 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\Simulation Works\Kubrix

4. 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.

5. Open a Command Prompt. 6. To go to the

C:\Program Files\Simulation Works\Kubrix

folder, in the Command Prompt, and enter:

Page 178: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 178

cd C:\Program Files\Simulation Works\Kubrix.

7. To run kubrix, type .\kubrix followed by <RETURN> 8. 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.

9. If you receive a different error message proceed as follows: 10. While still in the command window and in the

C:\Program Files\Simulation Works\Kubrix

folder, type the following command: .\kubrix license

11. Cut and paste the screen output in an email and send it back to us. 12. In the same command window, please type the command: ipconfig /all 13. Cut and paste the screen output in an email and send it back to [email protected].

Page 179: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 179

index 3DEC, 15, 16, 17, 18, 19, 22, 24, 36, 37, 38, 40,

43, 45, 49, 50, 51, 56, 69, 70, 71, 84, 89, 90, 91, 92, 95, 96, 109, 135, 138, 139, 143, 157, 158, 177

3DEC POLY file, 90 a manifold surface, 29 Align mesh vertices, 10, 106, 136 AlignMeshVertices, 10, 11, 107, 108, 175 Angle between, 60, 61, 97, 98 Aspect Ratio, 132 backface, 120 Ball Mill, 170 Blade Mill, 170 Boolean, 24, 42, 43, 89, 97, 99, 160, 161, 162,

164 Boolean Split, 42 Bounding Box, 111 Bulldozer, 171 CAD, 163 CAD model, 164 cavern, 157 centroid, 15, 112 Check mesh objects for error, 25, 30, 44 CheckMesh, 11, 25, 175 chord error, 166 cleanup, 10, 56, 109, 143 clumps, 172 collapse ratio, 133, 138 COLLECTION, 153, 155 ColoriseAllObjects, 52 ColorizeAllObjects, 10, 52, 75, 82, 93, 94, 98, 99,

101 Connected, 60, 61, 62, 97, 99 contour, 71, 72, 73, 74, 75, 81, 157, 158 Convex Blocking, 36, 37, 45, 69, 84, 176, 177 Cull degenerate mesh faces, 59, 133 Curve|Circle|Center, Radius, 40 Curve|Curve From Object|Duplicate Border, 32 Curve|Curve From Objects|Duplicate Edge, 53 Curve|Line|Line segment, 31 Curve|Line|Single Line, 52, 116, 117, 124, 133,

147, 176 Curve|Polyline|Polyline, 66, 72, 74, 133, 135,

137, 139 Curves|Curves from Objects|Duplicate border,

75

defeaturing, 13, 60 Defeaturing, 60 degenerate faces, 30, 57, 58, 59, 133, 134 Degenerate faces, 58 Delete mesh faces, 65 diagnostics, 66 drag, 9, 11, 81, 101, 136 Drape, 144 Duplicate faces, 58, 59 Edge analysis, 64, 65, 66, 106, 107, 119, 134 Edit|Select Objects|Surfaces, 79, 80 Edit|SelectObjects|Polysurfaces, 80 Edit|Split, 32, 33, 52, 89 Explode, 52, 82, 103, 122, 147 Extending, 109, 122 Extract Connected Mesh Faces, 97 Extract mesh, 59, 62 ExtractHangingFacesOnly, 59 Extraction of connected mesh faces, 60 ExtractNonManifoldMeshEdges, 59, 134 Extrude Curve, 40, 79, 116, 125, 160 Facetized surfaces, 14 faults, 15, 109, 110, 114, 122, 127, 134, 135,

136, 137, 140, 143 Fill all holes, 59 Fill mesh hole, 65, 118 free edges, 175 free-form, 164 gaps, 37, 49, 62, 64, 114 Geometry Fix, 25, 30, 44 Ghosted, 53, 76, 117, 131 Hexahedral meshing, 21, 25, 30, 35, 45 Hexahedral meshing tab, 25 Hole boundary, 103 Incremental Save, 79, 80, 83, 120, 134 Installing Kubrix and Rhino, 9 interfaces, 109, 138, 140, 141, 142, 143, 150,

155 intermittent, 109, 143 intersections, 15, 37, 49, 66, 109, 120, 132, 133,

149 Invert Selection and Hide Objects, 52, 71, 72,

82, 126, 128, 129 Layers, 109, 110, 114, 120, 121, 126, 127, 128,

129, 130, 131, 133 Loft, 112, 146, 157

Page 180: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual Page 180

Loft Options, 112, 146 manifold surfaces, 29 Match mesh edges, 58, 62, 63, 114, 119, 134 MatchMeshEdges, 58 Medial axis/Mid-surface, 172 MergeBreps, 29, 34, 54, 175 MergeBreps icon, 29 Mesh from Points, 158 Mesh Intersect, 120, 126, 129, 130, 131, 147,

149 Mesh split, 99 Mesh|From NURBS objects, 19, 25, 43 Mesh|Mesh edit tools|Extract|Duplicate, 108 Mesh|Mesh edit tools|Extract|Faces, 101, 102 Mesh|Mesh edit Tools|Weld, 90 Mesh|Polygon mesh primitives|Box, 67 MeshPatch, 80, 81 Model simplification, 165 Model triangulation, 166 Naked edges, 25, 58, 64, 106, 107, 108, 113 Nb. Of surface smoothing iterations, 67 Non-manifold, 58 Non-manifold edges, 58 non-manifold surfaces, 29 normal orientation, 167 Octree meshes, 37, 49 Octree Meshing, 38, 50, 51, 85, 86, 87 origin, 11, 19, 40, 41, 43, 56, 57, 81, 93, 121,

127, 146 Ortho, 10, 11, 116, 125 overlap, 145, 174 PFC3D, 163 Pit, 71, 110, 114, 116, 120, 128, 129, 130, 131,

132, 133, 136, 158 Polygon mesh detailed options, 19 quality, 13, 67, 109, 132, 133, 134, 138, 139,

143 ReadStlFile FISH function, 165 Relative Offset, 36, 37 remeshing, 70, 132, 133, 137, 176 repair, 59, 66, 67, 102, 106, 114 Rhino Stuff folder, 9 Rotating and panning views, 10 SampleDensityPlusNoise, 158 self-intersection, 133, 135, 137, 176 sequential excavation, 51, 52 Shaded Viewport, 23, 42, 76, 110, 114, 117 Simple control, 19

slivers, 61 snap, 11, 40, 72 Solid|Box|Diagonal, 22, 43, 81 Solid|Difference, 24, 43 Solid|Solid edit tools|Wire cut, 89 Solid|Union, 42 solid-based, 164 Solids, 29 SpaceRanger, 15, 16, 17, 18, 143, 144, 148, 150,

154, 155 Split disjoint mesh, 59, 62, 102 SplitMeshEdge, 11 SplitMeshWithCurve, 127, 129, 130, 132, 177 Stirred Tank Reactor, 168 Straight sections, 112, 146 Structure of the mesh, 28, 47, 55 structured grid, 28 Surface|Extrude Curve|Along Curve, 79, 116,

125 Surface|Extrude Curve|Straight, 40, 160 Surface|Planar Curves, 28, 33, 53, 54, 73, 74 Template, 19, 143 Tetra blocking failed, 176 Tetrahedral meshing, 48, 66, 68, 69 The Command area, 9 the Kubrix icon, 21 Tolerances, 11 Toolbars, 9 topography, 109, 110, 119, 145 Transform|Array, 90 Transform|Move, 23, 57, 90 Transform|Rotate, 41, 90, 93 Transform|Scale 2D, 41 transparent, 53, 76, 117, 120, 170 Triangulate Mesh, 25, 30, 35, 44, 54, 67 triangulation, 164 Trim, 76, 77, 78, 82, 89, 97, 114, 115, 118 Troubleshooting, 175 tunnels, 40, 41, 42, 43, 52, 53, 54, 67, 69, 104 Unify, 59, 120 Unify mesh normals, 59 Units, 11, 143 Volume Centroid, 112 VRML 2.0, 13, 14, 84, 89, 90, 95, 144 VTPT, 89, 90 Wire cut, 32, 93, 94, 95 Zoom Extents All Viewports, 40, 82, 116, 117,

128

Page 181: Ku Brix Rhino Manual

Kubrix/Rhino Users’ Manual REV012012 Page 181