CAD Clean-up
Often the most time consuming step in the unstructured grid generation process is geometry clean-up. A lot of times, the geometry to be modeled was originally built in another CAD system and read into SolidMesh from an IGES file. Usually, when the geometry was not constructed in SolidMesh (and sometimes when it is if care was not taken during construction), CAD clean-up is required before a grid can be generated. This tutorial is intended to illustrate a few techniques used to clean up a CAD file. It should be noted that any geometry problem could be fixed any number of ways depending on the situation. Also, since CAD clean-up changes the geometry, some techniques may not be appropriate where retaining the original geometry is crucial. The end result is to obtain a topologically valid (water tight) model free of any holes, overlaps, surface mismatches, ... Geometry problems covered in this tutorial include: nonintersecting surfaces, overlapping surfaces, badly parameterized surfaces, and surfaces that don't meet at a single point. Selecting and adjusting the glue tolerance is included as well. Also, techniques using group activation and deactivation when dealing with surfaces will also be illustrated. Start by downloading the IGES file: flying_minnow.igs.gz. REMINDER: This tutorial is rather long. It is a good idea to save periodically. Also, if you do have to stop and later read in an intermediate model, when you restart, read the file in with no gluing (-ng).
| 1. Read flying_minnow.igs.gz
into SolidMesh (shown with surfaces shaded) with trimming and gluing
enabled (see |
![]() |
| 2. To start, hit |
![]() |
| 3. The first clean-up step is
to decide if the glue tolerance can be raised
to allow gluing of more of the curves. Determination of the glue
tolerance is an ongoing process. Basically, you want to keep it as
small as reasonably possible. Find the smallest feature to be retained
and/or try to estimate what the smallest spacing applied to the surface
grid will be and make sure the tolerance doesn't go above about an order
of magnitude smaller. For this case, the propeller will probably
require the tightest spacings. To estimate the spacing that will
be required, select the points shown and NOTE: The point spacing required is dependent on the geometry and coming up with good estimates of point spacing and/or glue tolerance comes with practice/experience. |
![]() |
| 4. Hit "esc" to clear the pick list and Max Internal dist = 2.98372e-05
Since this is much smaller than the ballpark max from step 3, the glue
tolerance can be raised to include gluing these curves. A good new
tolerance would be one slightly larger than the Max Internal dist above.
Set the RULE OF THUMB: If you manually glue two curves and the Max Vertex dist is relatively large (not 0 or close given the model scale), you may not have selected the intended curves, or there may exist a more significant problem. |
![]() |
| 5. |
![]() |
| 6. Hit "esc" to clear the pick list. Like step 3, select
the curves shown (again, you will have to pick twice in the same place
to get both curves) and Max Internal dist = 5.25802e-05
Since the Max Internal dist is still much smaller than the estimated
max, increase the glue tolerance to 8e-4. |
![]() |
| 7. Most of the other problems will require trimming or CAD work,
so start with the Mouth. Select every group but Mouth and |
![]() |
| 8. Starting with the top cross shaped curves, select the
point shown and |
![]() |
| 9. Zooming, you can see two of the surfaces overlap and two have a
large gap that can't simply be glued. To repair the surfaces, the
original geometry will be changed slightly. Care must be taken to
make the impact as small as possible. Select the four surfaces affected
and turn them |
![]() |
10. Inspection of the surface wireframe reveals some questionable surface
parameterization, identified by the skewed wireframe. Since the surfaces
in question are mostly planar with little to no internal curvature, a single
carpeted surface can be created to close the gap and eliminate the overlap.
Select all four surfaces and
to increase the display resolution for a better projection.
NOTE: Carpeting is not the only way to fix this problem. You could try splitting the surfaces up, getting rid of the extra, and unioning them back together, but this will not solve the parameterization problem. Experimentation is the best way to learn clean-up techniques. |
![]() |
| 11. Select the two curves shown and |
![]() |
| 12. Zoom on the lower, outside corner of one of the rectangular surfaces. You can see another gap here. A decision must now be made about which curve to keep. The curve which best represents the shape of the geometry should be kept. This requires a judgment call. For this example, the straight curve will be discarded. |
![]() |
| 13. A curve like the one created in step 11 needs to be created between
the rectangular surfaces and the triangular surfaces. Because of
the overlap seen in step 9, the curves can not simply be unioned as in
step 11. For now, select the two triangular surfaces and turn them
off. Zoom in on the same area as in step 9. Select the curve
and point shown and |
![]() |
| 14. Hit "r" to change the Pick Limit to Parametric
and select the small curve between the two points.
You may have difficulty picking while zoomed in real tight. You may
have to adjust the clipping plane using the "page-down" and "page-up" buttons
to move it back or forward.
|
![]() |
| 15. Keeping the Pick Limit set to Parametric,
select the remaining portion
of the curve split in step 13. Hit "c" and select the bounding curve
of the other surfaces as shown. The curves should meet at the point
used to split in step 13. Click |
![]() |
| 16. Select the curves shown using the pick limit set to "physical" while picking the long curves and "curve" while picking the short sides. |
![]() |
| 17. Select the surfaces so the new carpet will be projected onto
the old surfaces. Change the Long Res
field to 35 and the Short Res field
to 21 and |
![]() |
| 18. Select the old surfaces and the curves created in steps 13
and 15 (the physical curves) and
|
![]() |
| 19. Zooming on the corner of the rectangular surface where it
meets the triangular surface, you can see there is still a gap between
the new surface and the triangular surfaces. In cases like this,
it is helpful to know how the surfaces to be repaired were generated to
know if there is internal curvature in the surface that needs to be retained.
In this case, the triangular surfaces were created using |
![]() |
| 20. Select the three curves and point shown. Be careful
when selecting the curve between the two surfaces not to select one of
the shorter curves that runs only halfway across the bottom of the rectangular
surface. The curve across from the selected point is the bounding curve
from the new surface created in step 17. Click |
![]() |
| 21. Select the green surfaces and
|
![]() |
| 22. If you remember, the edge shown picked meets two surfaces
(that are turned off). The rectangular surface will have to be trimmed
so select it and |
![]() |
| 23. Click |
![]() |
| 24. Select the rectangular surface and |
![]() |
| 25. Click |
![]() |
| 26. Select the surfaces opposite those repaired. These
surfaces are simply a mirror of the ones just repaired, so there is no
need to repeat steps 9 through 26.
|
![]() |
27. Select the cleaned-up surfaces shown.
Define the plane to be mirrored about by changing the values in the VX, VY, and VZ fields to
.
No point needs to be selected since the mirror is about the origin (the
default). Click |
![]() |
| 28. Select the Body and RightWing groups and |
![]() |
| 29. We now need to trim the Body surface to remove the portion
inside the RightWing and make it connect properly to its neighbors.
Select the Body surface shown above and just the RightWing surfaces that
intersect the Body surface. The surfaces should be picked in that
order (Body surface first, then RightWing surfaces) so that the intersection
is done properly. Click |
![]() |
| 30. Select the surface shown (the one you just did the intersection
with) and click |
![]() |
| 31. Re-select the surface and |
![]() |
| 32. Select the point shown and |
![]() |
| 33. Select the curve shown (opposite the one just split) and |
![]() |
| 34. Select the point shown, |
![]() |
| 35. Select the surface and |
![]() |
| 36. Click |
![]() |
| 37. |
![]() |
| 38. Select the point shown, |
![]() |
| 39. Using "Param", select the curve shown and |
![]() |
| 40. Select the point shown, |
![]() |
| 41. Click |
![]() |
| 42. Hit "r" and select the curve shown. Be sure to position
the cursor over the curve to the right of the point shown picked.
This will ensure the correct curve is picked. You can know the parametric
being picked is the one extracted in the previous step because no others
lie under the selected curve (if you have been following along, keeping
your geometry clean). There should have been no other green curves
to the right of the selected point before you extracted those from the
surface in step 41. Keeping a clean geometry is key to knowing what
you have picked.
Select the point shown and NOTE: The last two surfaces were trimmed so that their boundaries will meet their neighbors' boundaries properly and be adjacent when glued. |
![]() |
| 43. Moving to the wings, click the Prop, Mouth, and Body groups
and |
![]() |
| 44. Select the curve (using Parametric) and point shown and |
![]() |
| 45. Select the parametrics shown (using Parametric) and
Repeat the procedure in steps 43 through 45 for the other surfaces. This finishes the work on the RightWing surfaces. |
![]() |
| 46. |
![]() |
| 47. To finish the Prop area, click the Mouth, LeftWing,
and RightWing groups and |
![]() |
| 48. Hit "e" to change the pick type to "Everything," and pick
all curves. Click |
![]() |
| 49. Select the two surfaces and |
![]() |
| 50. Select the point shown (indicated by the upper arrow) and |
![]() |
| 51. |
![]() |
| 52. Select the parametric shown and |
![]() |
| 53. Select the 2 points shown and |
![]() |
| 54. NOTE: The two surfaces to the right were trimmed to create the proper connectivity between them and their neighboring surfaces. For either surface, splitting the parametrics at its boundaries has created a 1 to 1 relationship between the segments at its boundaries and the corresponding segments at its neighbor's boundaries. |
![]() |
| 55. The only other problems with the prop were around the base
of the prop blades. This is because the surfaces below the blades
need trimming. In this case, the necessary parametrics have already
been provided. Select the surfaces shown (the easiest way is to hit
"p", position the cursor at the nose of the hub, behind the blades,
and right click. You should get 5 surfaces, one below each blade) and |
![]() |
| 56. Close inspection of the wing tip reveals that one of the surfaces on the leading edge has a sliver of a surface that makes up the last piece. The surrounding surfaces could be trimmed to connect to these small surfaces, but depending on the spacing this could cause problems in the surface grid. It would be better if this was one surface. The best way to fix this problem would be to union the two surfaces. If this doesn't work a carpet could be created like before. |
![]() |
| 57. Select the two surfaces shown and |
![]() |
| 58. Looking at the underside of the wing, you can see another problem. This could be fixed in a number of ways. Again, the surfaces could be trimmed to create proper connectivity but this could cause problems in the surface grid. You could union the respective surfaces (or carpet if necessary). If the surfaces were intended to be split at this location, one of the two groups can be split and unioned so that all four surfaces meet at one corner. |
![]() |
| 59. Select the surface and point shown. It shouldn't matter
which surface and point is selected, but to select the ones shown in the figure,
orient the model so that the top curve leads to the Leading Edge, and the lower
curves leads to the Trailing Edge of the wing. Click |
![]() |
| 60. Select the surfaces shown and |
![]() |
| 61. Select the point and surface shown (the point selected is
at the leading edge of the wing) and |
![]() |
| 62. Move to the end of the curve created by splitting the surface
in the previous step. Select the point and surface shown and |
![]() |
| 63. The last problem with the LeftWing surfaces is that they don't lie on or intersect the body. (The picture at the right is looking at the Leading Edge of the wing close to the body) To correct this the wing surfaces can be extended so that they intersect the Body at every point along the wing. |
![]() |
| 64. Select the surface and its bounding curve shown. (Leading
Edge, upper surface) Change the value in the NOTE: Extending surfaces can slightly change the interior of the surface depending on how much a given surface is extended. Also, extending can potentially introduce problems with the surface parameterization. This problem could be fixed a number of different ways; extending is just the quickest. Again, the method of repair should be chosen after considering the overall impact on the geometry of each possible method. |
![]() |
| 65. Select the old surfaces and
|
![]() |
| 66. Select the surfaces shown and increase the display
resolution to 41x41. Select the body surface then all of the
intersecting surfaces (again the order picked is important to obtain the
proper intersection) and |
![]() |
| 67. The surfaces need only to be trimmed. The same procedure
as in steps 43 - 46 could be used but another technique is used for illustration.
Select the surfaces shown, |
![]() |
| 68. Hit "r" to set the pick limit to "Param." Position
the cursor over the curve shown selected. Pick twice to get both
parametrics (one from each surface). Pick the point shown and |
![]() |
| 69. Remove the curves shown. Again, there are two curves below the split point, one from each surface. (there should be no green (parametric) curves left where red is shown). |
![]() |
| 70. Select the surfaces and |
![]() |
| 71. To clear up the final problems, select the surface shown. |
![]() |
| 72. Select the parametric curve shown and |
![]() |
| 73. Select the point (remember to set the pick limit to "Point"
when picking points) shown |
![]() |
| 74. Select the parametric shown and |
![]() |
| 75. Select the two points shown |
![]() |
| 76. Click Integrity check passed!
The CAD cleanup is done! Save your work for the next tutorial. |
![]() |
The model is now ready to have point spacings applied. The next tutorial covers splitting surfaces (like the prop and wing surfaces) to use points efficiently .