Performing action...

When Bad things Happen to Good CAD Users

Stephen Wolfe, P.E.
Publisher, Computer Aided Design Report

Computers are supposed to rational, predictable systems. Once programmed, we expect them to perform tasks in the same way again and again. But CAD software can exhibit behavior that, at times, appears to be random or chaotic. Consider these real-life examples:

These three examples, taken from the files of Doug Cheney of International TechneGroup Incorporated (ITI) are not unusual. Any engineer who has been around solid-modeling systems for a few years can recount similar war stories. Translators fail for no apparent reason, finite-element mesh programs stall, stereolithography models (in the faceted STL format) develop holes even though the CAD model from which they are taken looks fine. One maker of aircraft engines estimates that it spends $24 million per year identifying and resolving problems with CAD models.

The problems are likely to worsen as companies employ CAD data for more sophisticated purposes. Speaking at the spring 1998 meeting of the CATIA Operator's Exchange, Scott Pierce of the Boeing Commercial Airplane Group talked of how Boeing plans to use CATIA solid models more extensively for structural analysis and numerically controlled tool programming. Yet these sophisticated applications are even more sensitive to subtle defects in CAD models than the more common applications of virtual mockup design and automated drawing production.

The apparently irrational behavior of CAD/CAM and engineering applications is frequently caused by subtle defects -- many too small to see -- in the geometric representations of CAD models. In some cases, these defects are caused by programming errors in the CAD software or failure of the CAD system to check for and eliminate geometry that makes no sense. In other cases, the mistakes are caused by operator error -- a situation aggravated by the use of so-called "hybrid modelers" that combine surface- and solid-modeling techniques.

It's also worth noting that errors of this sort are not confined to a few brands of CAD systems. ITI technicians have found errors in solid models from the top four vendors: Parametric Technology, Dassault Syst�mes, SDRC, and Unigraphics. And ITI has found similar defects in model geometry of the ACIS and DesignBase solid models employed in some lower-priced Windows-based solid-modeling systems.

If CAD/CAM and engineering systems are to achieve their full potential, CAD users and managers must understand the nature of CAD model defects, the kinds of problems they can cause, and how to identify and fix such problems.

Before discussing what can go wrong with CAD models, it's helpful to review some of the fundamentals of solid-modeling software.

Feature-based Basics

In the days before dimension-driven solids became popular, three-D CAD systems employed lines and curves in space, analytic surfaces, such as planes and cylinders, and free-form surfaces, such as B-spline surfaces (NURBS). Creating models was a tedious process because users had to keep track of both the outer and inner surfaces of the model. Cutting a hole in a model with a curved surface involved drawing a curve in space, projecting it onto the surface, and then manually trimming the surface back to the curve.

Solids-based systems, such as Pro/Engineer and the systems that followed it, employ geometry for curves and surfaces that's conceptually similar to their wire-frame and surface predecessors. But they have automated the production of complete three-D models by keeping track of more information. Solid systems keep track of not only surfaces but edges of intersecting surfaces. Solid CAD systems also keep track of which side of a surface faces out of a part and which faces inside.

CAD operators are unaware of these details because solid-modeling programs let them create models using sophisticated features. To cut a hole, for example, a designer might sketch the hole profile and then cut it through the model. The CAD system automatically projects new edges onto the surface being cut, trims the opening back to the hole edges, and then creates new surfaces to line the insides of the hole. It's no wonder that this automation requires a lot of number-crunching power.

What many CAD users don't realize is that in many cases the edge curves of solid models only approximate the actual intersection of two surfaces. According to a paper from Sandia National Laboratories, the precise intersection of two NURBS surfaces must be described by a 54th-order polynomial. To reduce the computation to more manageable levels, most CAD systems settle for approximating the intersection by a cubic (third-order) polynomial. The edge curve so defined usually lies close to, but not precisely on, the two surfaces it bounds. Because of these approximations there are gaps between the edges and faces of boundary-representation solids. These gaps are the source of much mischief.

Tolerance Strategies

If the gaps between edges and faces become too large, solid-modeling programs can become confused about the boundaries of the model. The system can no longer distinguish the inside of a part from the universe around it. In such cases, the user might receive a message that the model is "corrupted." Consequently, all systems employ a strategy for computing the maximum allowable gap, or "tolerance zone," between an edge and the two faces it bounds. Unfortunately, different systems employ different strategies for computing this tolerance.

Pro/Engineer employs a variable tolerance model. The maximum gap is a fraction of the total model size. So for large models, such as jet engines, Pro/E allows larger gaps, while for small models, such as watch parts, only small gaps are permitted. The relative tolerance model is a clever one, and it enables Pro/E to run fast. Unfortunately, no other major CAD firms have adopted this strategy.

Most systems, including CATIA version four, Computervision's CADDS, and Spatial Technology's ACIS (employed by AutoCAD, Ashlar Vellum, IronCAD, SolidDesigner, and TurboCAD), employ a fixed tolerance model. The size of all gaps in all models is limited to the same default value. Most systems enable users to change this default value but the vendors strongly discourage such changes with scary disclaimers of what might happen to the CAD program's behavior.

The Parasolid kernel employed by Unigraphics, SolidWorks, Solid Edge, and Microstation employs a concept called "tolerant modeling." The tolerance is fixed, but larger gaps may be permitted on a face-by-face basis.

The difference in tolerance strategies causes problems when translating geometry from one system to another. Models coming from Pro/Engineer or Unigraphics may have gaps that aren't acceptable to CATIA or SolidDesigner. The reverse is also true: Models from fixed tolerance systems may be unacceptable to Pro/E or UG if they contain gaps that are too large.

Geometry Defects

ITI's Cheney likes to group geometry defects into three broad classes: improper structure, low accuracy, and unrealistic features. Structural defects are violations of the rules of solid modeling. One example is an edge that is associated with only one face. In a manifold solid (i.e. one that can be physically manufactured), each edge must be associated with two, and only two, faces.

CAD system operators generally discover structural errors because they cause CAD applications to stop working properly. In most cases, a model will behave properly until a certain operation is initiated, such as the addition or deletion of a feature. Then the user will be unable to modify the model or a portion of it because the CAD program becomes confused about the proper topology.

Free edges are generally caused by errors in CAD modeling programs. During the steps a CAD program takes to add or remove a feature, the program frequently must open a model, leaving several edges free. If, because of a bug or system failure, the operation is not completed properly, the free edge can be left in the model to cause trouble. There is little that CAD users can do to prevent free edges, other than identifying the problem and reporting it to the CAD supplier. Reporting exactly which modeling operation introduced the free edge can help the CAD vendor locate the bug.

Another common structural error is the reversing of the normal vector of part faces. In a proper solid, the normal (the vector perpendicular to the face) should point toward the outside of the solid. In some solids, normal vectors become reversed and point into the part. The normal vector is used by a number of common CAD/CAM applications including shaded picture processors, STL translators, NC tool-path generators, and finite-element modeling programs. Inverted normals can frequently be spotted because the surface will not shade properly. The surface may appear black or transparent. Some users interpret this effect as a "hole" in their model, but actually the surface information is there.

Inverted normals are frequently caused by "hybrid" modeling operations that combine solids and surfaces. Surface modeling programs don't care which way normal vectors are pointed. When they create their surfaces, designers are often unaware of the orientation of normal vectors, and these vectors may be pointed in opposite directions on adjacent faces. If a surface of this type is brought into a solid-modeling system and incorporated into a solid, some normal vectors may point into the solid. CAD programs should check to see that normal vectors are pointed outward before sewing a surface into a solid, but not all of them do. Users can alleviate the problem by checking normal vector orientations before importing surfaces into solids.

Solids that intersect themselves are a third type of structural error that can cause trouble for CAD users. Self- intersecting solids may be created by thickening surfaces that aren't tangent to create thin-walled solids.

Low Accuracy

Designers creating CAD models do not generally notice gaps between adjacent faces or between faces and their associated edge curves that exceed the allowable tolerance of their CAD programs. But such gaps can cause translations to fail and can stall NC, rapid prototyping, and finite-element applications.

There are a couple of ways that large gaps can creep into models. Because of its relative-tolerance strategy, Pro/Engineer can leave large gaps between large faces. ITI found one instance -- in an aircraft engine housing -- where a gap exceeded one millimeter. Solid-modeling programs with fixed tolerances generally won't be able to sew up models with such large gaps. In these cases, translations simply fail, and it is up to the Pro/E user to tighten down the tolerance, regenerate the model, and try again.

Tolerant systems, such as those based on Parasolid, will sew models with large gaps. Large gaps also can be introduced into Parasolid models by importing surfaces. Surface-modeling programs -- such as Alias Studio or Pro/Designer, don't care about gaps between surfaces. Once incorporated into the solid, these large gaps can be passed through to STEP or IGES models or they can stall FEA, NC, and rapid prototyping programs. Or they can cause translations to programs such as AutoCAD or CATIA to fail.

Users of hybrid modeling systems can reduce accuracy errors by closing gaps between surfaces before importing them into solid-modeling programs. Most industrial designers don't have the patience for this type of work. Managers instead should hire cad-savvy technicians to check models before introducing them to engineering systems.

Unrealistic Geometry

The last class of defects includes geometry that can't be physically realized. These defects may be caused by CAD operator error, poor modeling practices, or limitations of the CAD system.

Realism defects caused by the idiosyncrasies of CAD software include faces that are collapsed, folded back on themselves, or twisted. Because of their high accuracy requirements, some solid- modeling programs will insert very narrow surfaces or surfaces with one or more very short edges in order to complete a blend or fillet. These small faces cause trouble when they are translated to CAD systems that permit looser tolerances. The looser system might assume that edges on opposite sizes of a narrow face intersect. This error will produce a structural defect in the receiving system.

Tiny faces also may cause trouble for NC, FEM, and rapid prototyping programs, although better brands of this type of software have learned to skip over collapsed faces. Faces that are twisted or folded back on themselves are more likely to stump NC or FEM programs. Cheney doesn't yet know enough about the root causes of these defects, but he suspects that faulty hybrid-model building may be the cause.

Other types of unrealistic geometry are caused primarily by operator error. Fillets may overshoot edges, creating thin fins that can't be manufactured. Misplaced holes or cuts can create unrealistically small or "pinched" volumes. Small cracks, pockets, or shafts can cause stress concentrations in analyses where none physically exist. Small edges, created when two faces should be co-planar, but aren't, will distress both FEA and NC programs that don't know the edge shouldn't exist.

Smooth shading models often mask these small flaws. Only later, when applications that use the CAD data fail to work, are the problems discovered.

Managing the Problems

If your company is using solid models only for design and drafting, you may not need to think too much about model quality. But if you're planning on using CAD models for engineering analysis or manufacturing, then it pays to assure that only high quality models are released for production.

The principles used to improve the quality of physical products can also be applied to CAD models. The first step is to identify the defects. Most CAD systems won't pinpoint the kinds of geometry flaws described above. However, programs such as ITI's CADIQ� (described in the April 1998 CAD Report) can find them. CAD model-checking software should ideally be run nightly, so defects can be found soon after they are created instead of immediately before completion deadlines.

Once you have found the flaws, it's important to understand why they occurred. Most companies don't bother, and they can look forward to seeing the same mistakes repeated. If the defect is structural, your CAD vendors should be notified. If the error is caused by less than ideal modeling practices, corrections should be made and a solution discussed at a weekly idea-sharing meeting.

Engineering managers should also realize that hybrid modeling can be an error prone process. For this reason, models should be made using solid-modeling operations whenever possible. Avoid creation of solid models by sewing or stitching together a set of trimmed surfaces. Employ such approaches only when solid-modeling programs can't do the job. If you must use hybrid models, make sure they're watertight before bringing them into solids-based systems.

Trouble with B-Reps

When most companies bought solid-modeling systems, they didn't expect to deal with the types of issues discussed above. They were promised that solids would be "easy to use," "intuitive," and "require little or no training." The truth has turned out to be quite different.

Solid-modeling systems require considerable training and experience to use well. Removing defects from models, assuring that constraints have been properly applied, and reporting bugs to makers of CAD software adds to the cost of using already expensive tools.

The fault lies in the nature of the boundary-representation method of solid modeling, which is used by virtually every CAD software maker. Like the piston engine, b-rep solids are inherently shaky. But with sufficient refinements, b-reps have proven to be remarkably capable. Further improvements, aided by more powerful computers, can make the technique more powerful and reliable.

It's possible that in the future another geometric modeling technique will be found that will be as capable as b-reps for engineering design, analysis, and manufacturing. But there are no signs that such a technique is being developed for engineering applications. For the next decade, at least, we are stuck with b-reps and must make them work.

For many products, the benefits of well-crafted solid models far exceed their costs. Good models can be used to assure that designs are correct. Drawing production from solids can be more highly automated than line-by-line drawing. Physical prototypes can be made from the models, and they can be used for a variety of analysis and manufacturing applications. Dimension-driven models also can be re-used to make variants of existing products.

CAD managers should press their suppliers to provide more internal tools to check the quality of CAD models as they are created. Just as modern word processing programs check spelling as workers type, modern CAD software could identify defects as models are created. Unfortunately, we have little confidence that CAD marketing people will actively develop such tools without pressure from their customers.

Only by understanding the nature of CAD model defects can CAD system owners ask intelligently for needed improvements. Products such as CADIQ can help engineers and software writers develop such understanding.