You are here: Menu Commands > Solids > Solids tools > Intersect solids
GEOVIA Surpac

Intersect solids

This function creates a new 3DM by intersecting two 3DMs and saving the triangles of the first 3DM which are inside the second 3DM and the triangles of the second 3DM which are inside the first 3DM.

This function could be used, for example, to determine the volume extracted from an ore body by a tunnel/drive.

To run this function: Choose Solids > Solids tools > Intersect solids, or...

  • In the Function Chooser, type TRISOLATION 3DM/3DM INTERSECT, and press ENTER.

If there is no actual region of intersection between the triangles of the two trisolations the function will store the appropriate combination of the two input trisolations as the result. See the Result section below for more information.

Graphics layer name

Enter the name of the graphics layer in which the resultant trisolation will be stored. This must be a new graphics layer, that is, it cannot be the same as any layer currently in the system.

Object number

Enter the object number for the resultant trisolations.

Complete the 3DM/3DM INTERSECT RESULTS STORAGE form and choose Apply to display the prompt:

Select first trisolation

Position the pointer and select the first trisolation. This will display the prompt:

Select second trisolation

For this function the order of selection is not important.

Processing

The triangles of each of the trisolations are intersected and subdivided to create a network of triangles which share common edges.

Triangles are then deleted from each of the modified trisolations. The triangles which are deleted are determined using the triangle retention criterion stated at the start of this section. Finally the remaining triangles are combined to give the resultant object.

While the triangle intersections are being performed, two triangles may be found that intersect to form a very small intersection segment (less than 0.001 units). If not corrected this could lead to numerical error in the calculations. To combat this the functions use CONSOLIDATION, a process where triangle vertices are moved fractionally (at most at a third decimal place level) to avoid a very small intersection segment. Once CONSOLIDATION has occurred the triangle intersection process restarts. The limit on the number of times CONSOLIDATION is allowed is 50. If this level is reached the function will terminate with an error message.

Messages

If CONSOLIDATION occurs during the triangle intersection process the following messages will appear and the triangle intersection process will be restarted:

Trisolation consolidation has occurred, first trisolation count = xxx, second trisolation count = yyy

Restarting triangle intersection process

Result

If there is an area of intersection between the triangles of the two trisolations the result of this operation is a series of N distinct 3DMs stored as trisolations 1 to N of the specified object number. If there is no area of intersection between the triangles of the two trisolations and one trisolation is wholly contained within the other trisolation then the result will be the inner trisolation. The neighbour list of each of the trisolations is set automatically and the direction of each of the trisolations is set to SOLID by default. The two source trisolations are erased from the screen and are replaced by the resultant trisolations. The original source trisolations are not altered or deleted and can easily be redisplayed.

The newly created object is not saved to a file automatically. To do so you must save using Save File.

The debug files "consolidation_triangles1.str" and "bad_triangle1.str"

To act as a guide to help you resolve any problems that might occur to prevent the intersection function completing, Surpac outputs the vertices of any problem triangles encountered in the two debug string files consolidation_triangles1.str and bad_triangle1.str.

If CONSOLIDATION occurs during the triangle intersection process, Surpac attempts to fix the problem automatically by moving a triangle vertex by a small amount (at most at a third decimal place level). Once CONSOLIDATION has occurred the triangle intersection process restarts. In general CONSOLIDATION is caused by one of the following circumstances:

  • a vertex of a triangle in one of the trisolations is very close to a vertex of a triangle of the other trisolation;
  • a vertex of a triangle in one of the trisolations is very close to an edge of a triangle of the other trisolation;
  • a vertex of a triangle in one of the trisolations is very close to a face of a triangle of the other trisolation;
  • an edge of a triangle in one of the trisolations is very close to an edge of a triangle of the other trisolation.
  • an edge of a triangle in one of the trisolations is very close to a face of a triangle of the other trisolation.
Surpac copies the vertices of the triangle pairs that caused the consolidations to the string file consolidation_triangles1.str. Each pair is stored in a separate string in the file - the first segment stores the vertices of the triangle from the first selected trisolation, the second segment the vertices of the triangle from the second selected trisolation.

In general, Surpac can automatically resolve any CONSOLIDATION problems that occur. But sometimes the maximum number of CONSOLIDATIONS of 50 is reached and the intersection function exits, or some later problem occurs. In this case the file consolidation_triangles1.str can be very useful in helping you to resolve the problems manually.

If any CONSOLIDATIONS occur, Surpac creates and outputs the file consolidation_triangles1.str whether or not it has managed to automatically resolve the problems. If the intersection function exits with an error, you are informed about the file with an error message box, if the function completes correctly you are informed about the file with an information message.

Surpac can also create a second debug string file bad_triangle1.str. This file is generally created when Surpac has managed to automatically resolve all the CONSOLIDATION problems, but has found another triangle that is causing problems later on in the calculations. The vertices of this single triangle are written to the file bad_triangle1.str. The triangle may come from either of the two selected trisolations.

It is advised that you use the following steps to use the debug string files consolidation_triangles1.str and bad_triangle1.str to manually alter the input trisolations to correct problems in the intersection functions:

  1. If the file bad_triangle1.str has been created use this file first, otherwise use consolidation_triangles1.str
  2. Use the EXIT GRAPHICS function to clear the graphics screen of data
  3. Recall the debug string file into graphics (you will find you get better visualisation if you pull this file in first)
  4. Recall one of the original .dtm files into graphics (in general its better to choose the smaller, less complex of the two solids). Make sure you recall the .dtm file into a separate layer. You should now see the .dtm file and the debug string file both displayed. Type HIDE ON (to enhance the display) and rotate the image to get the best view. Note: In general you should only have to edit one of the trisolations in this way, however in certain situations you might find it easier to edit both of the trisolations to achieve the desired outcome.
  5. Use View->Layer->Properties to make sure that the .dtm layer is the active layer, and that the debug string file layer is 'not selectable'.
  6. By looking at how the triangles in the debug string file intersect with the triangles in the .dtm file you should be able to see how all the CONSOLIDATIONS occurred, and which of the vertices in the .dtm file must be manually moved to correct each problem. Try toggling EDGES ON/EDGES OFF and FACES ON/FACES OFF to get a better view of the triangles in the debug string file.
  7. What you now have to do is WINDOW IN on each of the particular problem areas and use the function POINT MOVE to move an appropriate vertex in the .dtm layer by a small amount to resolve the CONSOLIDATION problem (this will typically involve pulling one vertex in the .dtm layer slightly away from a vertex or an edge or a face in the debug string file layer). What is a correct 'small amount' will vary from case to case, but in general you should only need to move a vertex by 0.05 to 0.15 to resolve the problem (if accuracy is very important try 0.001 to 0.005, it should still work). If you have a choice, it is best pick a vertex which is as close as possible to the point that is causing the CONSOLIDATION. Keep going round the solid moving vertices for each CONSOLIDATION problem until you have dealt with them all. Note: you should usually only have to move one vertex to resolve each CONSOLIDATION problem. Hint: The more you use WINDOW IN to window in on an area, the more control you'll find you have over using POINT MOVE to move a vertex by a small amount. Hint: To change the point of rotation for viewing use View->Viewing options->Select camera target, you will find this extremely useful for improving the viewing rotation after you have done a WINDOW IN.
  8. When you've moved all the vertices, you will have to revalidate the solid (use function Solids->Validation->Validate trisolation), and set the direction (use Solids->Validation->Set trisolation to solid or void). Note: If the trisolation is a true DTM surface (ie it was created by the CREATE DTM function) then you do not have to revalidate it or set the direction, just ensure that you do not move the point so as to cause a self intersection or fold-back in the DTM. Save the solid to a .dtm file (either to a new file or overwrite the existing file, as you prefer). Then you can perform the intersection function again with the new data.
  9. Note: If Surpac created a bad_triangle1.str then you should only have to resolve the problems in this file. The fact that Surpac got this far means that it was probably able to automatically resolve the problems in consolidation_triangles1.str. This may not be the case however, and you might find you also have to resolve the problems in consolidation_triangles1.str too before the intersection will work.

Warning

There is no region of intersection between the two trisolations

Errors

The first group of error messages are associated with sanity checks on the input data:

This layer is currently in the system. A brand new layer must be chosen for the results
Same trisolation has been chosen twice

This prohibits double clicking on the same trisolation.

The neighbours of the first trisolation have not been set

The neighbours of the second trisolation have not been set

The first trisolation is not closed

The second trisolation is not closed

The direction of the first trisolation has not been set

The direction of the second trisolation has not been set

The neighbours and the directions for the two trisolations should be set using the Validate functions.

The next group of error messages are associated with errors which arise during the calculations:

The maximum number of consolidations has occurred

More than 50 CONSOLIDATION restarts have occurred. The recommended course of action is to use the debug string files consolidation_triangles1.str and bad_triangle1.str to manually correct the problems see here.

The line of intersection is not closed

It is a prerequisite of the Intersect Trisolations functions that the line of intersection between the two trisolations is closed.

Fatal retriangulation error
Fatal error in calculations module

The recommended course of action is to use the debug string files consolidation_triangles1.str and bad_triangle1.str to manually correct the problems see here.

Extent of data is too large to give accurate results with current settings

The spread of the data is too large to give accurate results with the current settings of the sensitivity parameters in the CONSOLIDATION module. To comply with the current settings (i.e. the minimum intersection segment length of 0.001 units), the spread of the data must not exceed 100000 units.

Note:If either of the input trisolations has validated=false, then the function will exit with an error message. If either of the input trisolations has not had the validated flag set yet then the WARNING: 3DM NOT YET FORMALLY VALIDATED form will be displayed.