Boosting Design Accuracy with Geometric Constraints in CAD

Geometric Constraints in CAD

CAD drawings and 3D models generally comprise geometric elements like lines, arcs, points, circles, and splines and/or topological elements like faces, edges, and vertices. However, 3D models are fundamentally built upon 2D sketches. It is during this foundational stage that designers apply geometric constraints. Such constraints enable the designers to control the shape, size, and form of the sketches based on predefined requirements, specifications, and, in some cases, CAD standards. This control improves design accuracy by keeping the sketch aligned with intended specifications. Of course, there’s more to the role of geometric constraints in CAD, which is why this article explores this role more deeply.   

What Are Geometric Constraints in CAD?

Geometric constraints are restrictions that control the relationships of geometric objects relative to each other. They enable the designer to control the form, shape, and size of the various objects in a sketch, 3D model, or assembly. This results in a design that is easier to build and better aligned with the designer’s intent. 

One of the ways geometric constraints provide control is by preventing certain changes. Once you apply a geometric constraint, you cannot change the geometry in a way that violates the constraint. This limitation ensures that you can make changes that do not affect the design’s specifications and requirements.

The importance of geometric constraints in CAD is underscored by many software products supporting it, from Inventor, ArchiCAD, Fusion, FreeCAD, and AutoCAD to SolidWorks, CATIA, BricsCAD, Creo, Onshape, and DraftSight.

But you may observe that some software applications have a different name for geometric constraints. For instance, while SolidWorks allows you to apply geometric constraints in CAD drawings, they are officially known as sketch relations

That said, some CAD software products do not use a constraint-based system. Two popular examples of such software applications are SketchUp and Revit. For its part, SketchUp uses edge-based polygon mesh modeling to define the surface of models. This technique defines surfaces using a network of connected faces, edges, and vertices.

Common Types of Geometric Constraints

You have the option to choose from among the following types of geometric constraints in CAD software:

  • Coincident: It causes geometric objects (lines, curves, or points) to lie on top of each other, thus constraining the objects to other existing objects
  • Concentric: It constrains geometric objects in such a way that they have the same center; this type of geometric constraint in CAD does not impact their dimensions
  • Collinear: This constraint causes points or lines to lie on the same straight line
  • Parallel: It causes two lines or entities to be equidistant from one another and positions them in such a way that they will not intersect any point
  • Perpendicular: It causes two lines to intersect at right angles
  • Tangent: It makes a geometric object or entity to be tangential to another object
  • Smooth: It creates a continuous transition or curvature whenever a spline is to be connected to another line, arc, or spline; this constraint is known as Curvature in Fusion and Onshape
  • Symmetric: It makes two entities or points on entities to be positioned symmetrically relative to a line of symmetry
  • Equal: It causes lines to have the same length or circles and arcs to have the same radius
  • Horizontal: It causes lines to be parallel to the x-axis
  • Vertical: It causes lines to be parallel to the y-axis
  • Fix: It constrains entities and points on entities such that they maintain fixed positions.
  • Coradial: This SolidWorks constraint causes two or more arcs to share the same center points and radius.
  • Midpoint: This constraint causes a line or a point to remain at the midpoint of a line; it is available in SolidWorks and Fusion
  • Intersection: This SolidWorks constraint makes a point to remain at the intersection of two lines
  • Pierce: In Onshape, the pierce constraint causes an entity to be coincident with another entity outside the active sketch plane

Applying Constraints in CAD Software

AutoCAD and AutoCAD LT

AutoCAD and AutoCAD LT let you apply and delete geometric constraints in CAD drawings. To apply geometric constraints in AutoCAD, follow this procedure:

  1. Type the GEOMCONSTRAINT command and choose the type of constraint by typing the corresponding letter or letters.
  2. Select the object to which you want AutoCAD to apply the constraint.

Alternatively, you can:

  1. Click the Parametric ribbon tab
  2. Select the type of geometric constraint from the Geometric ribbon panel
  3. Select the object to which you want to apply the constraint

AutoCAD also supports commands for each of the main types of geometric constraints in CAD. These commands include GCCOINCIDENT, GCCOLLINEAR, GCCONCENTRIC, GCEQUAL, GCFIX, GCHORIZONTAL, GCPARALLEL, GCPERPENDICULAR, GCSMOOTH, GCVERTICAL, GCTANGENT, and GCSYMMETRIC.

You can also enable the Infer Constraints mode to prompt the software to apply constraints automatically. But this mode is limited because it cannot infer some constraints, including fix, smooth, collinear, equal, concentric, and symmetric.

BricsCAD

Image of the  Parametric Menu in BricsCAD

Parametric Menu in BricsCAD

BricsCAD uses geometric and dimensional constraints to support parametric modeling. It also supports 2D constraints. This means the software lets you control the positions of both 2D and 3D entities and objects with respect to one another. 

By default, the constraint bars are hidden whenever a drawing is closed. To display it, execute the CONSTAINTBAR command or access it via the Geometric Constraint toolbar, the Parametric ribbon tab, or the Show/Hide 2D Constraints menu within the Parametric menu. 

To apply the geometric constraints in CAD software BricsCAD, follow this procedure:

  1. Select the type of constraint you want to apply by clicking on its icon from the toolbar or constraints menu
  2. Move the cursor to the entity to which you want BricsCAD to apply the constraint and select it
  3. BricsCAD will apply the constraint to that selected entity

Fusion

Fusion lets you apply geometric constraints to CAD sketches. But first, you must enter Fusion’s sketch environment, which enables you to access the Sketch contextual tab. To do this, you can create a sketch using the Create Sketch tool or right-click an existing sketch. Next, follow this procedure to apply geometric constraints in CAD software Fusion:

  1. Click the Sketch contextual tab
  2. Next, click Constraints and select the type of geometric constraint you wish to apply
  3. Select the sketch geometry you want to constrain in the canvas or graphical area.

Inventor

Inventor applies geometric constraints to both 2D and 3D sketches. It automatically infers and applies geometric constraints as you work on your 2D sketch. However, you can temporarily disable this option by holding the Ctrl key. When working with 3D sketches, you must enable the Infer Constraints in the status bar to prompt Inventor to apply the constraints automatically. 

To apply geometric constraints in CAD software Inventor, follow this procedure:

  1. Ensure you are in an active sketch environment
  2. Click the Sketch tab and, within the Constrain panel, choose the type of constraint you want to apply
  3. Click the point or line you want to constrain
  4. Press the right mouse button and, from the menu, choose Done. Alternatively, press Esc or select another command or tool.

DraftSight

Here’s the procedure to use to apply geometric constraints to one or multiple geometric objects in DraftSight:

  1. Type GeometricConstraint
  2. Select the type of geometric constraint you want to apply
  3. Follow the command prompts that DraftSight displays

DraftSight also lets you delete geometric constraints. To do this, simply click Constraints and either click Delete Constraints or type DeleteConstraints. You will then specify the objects with constraints and press Enter. You can also define geometric constraint settings.

ArchiCAD

ArchiCAD supports two types of constraints: the parallel and perpendicular constraints. These geometric constraints in CAD can be accessed from the Drafting Aids toolbar or the Control Box.

SolidWorks

SolidWorks can automatically add relations or geometric constraints. Alternatively, you can manually apply these constraints using the Add Relation tool. You can also edit existing relations.

Onshape

Onshape supports constraints on iOS, Android, or desktop. But you must first ensure you are working on a sketch (either creating a new sketch or editing an existing sketch). Here, the software can add the geometric constraints automatically using inference. Alternatively, you can manually add the geometric constraints in CAD sketches from the options in the toolbar.

To apply a geometric constraint in Onshape:

  1. Select the type of constraint you want to apply from the constraints menu
  2. Select the sketch entity to which you want Onshape to apply the constraint

It is worth pointing out that Onshape is not restrictive. You can follow the above procedure in reverse, starting with step 2 and then performing the task in step 1.

Screenshot showing the tools for applying geometric constraints in CAD software Onshape

Tools for Applying Geometric Constraints in Onshape (source)

NX

NX no longer lets you create geometric constraints. Instead, the Sketch Solver does it automatically. The tool finds geometric constraints for you whenever you select any geometry and presents those options, allowing you to use them at your discretion. 

Siemens introduced the Sketch Solver to reduce sketching time and help designers produce more efficient and accurate sketches. The company credits the tool’s ability to suggest the right constraint for the latter outcome. 

Creo

Creo automatically applies constraints during sketch creation. You then have the option to accept the constraint (by pressing the left mouse button), lock the constraint (right-click), disable the offered constraint and continue sketching (two right clicks), and enable the offered constraint and continue sketching (three right-clicks), or disable the constraint offered (press and hold down Shift).

FreeCAD

FreeCAD lets you work with geometric constraints in the CAD software’s Sketcher environment. To apply the constraint:

  1. Click the entity to which you want FreeCAD to apply the constraint
  2. Select the type of constraint from the toolbar
Screenshot showing the types of geometric constraints in CAD software FreeCAD

Geometric Constraints Toolbar in FreeCAD

Best Practices for Working with Geometric Constraints

Embrace Simplicity

Keeping things simple is a mantra that can guide adding or modifying geometric constraints in CAD. But this simplicity does not particularly apply to the constraints themselves. Instead, it is applicable to the sketches. Complex sketches make applying geometric constraints in CAD harder and more complicated and increase the likelihood of making mistakes. You will rarely face such issues when you keep the sketches simple.

Use Auto-Constrain Tools

CAD software like NX, Creo, SolidWorks, Inventor, AutoCAD, and Onshape can automatically apply constraints. Siemens found that using the auto-constrain tool in NX’s Sketch Solver reduces the sketching time by 30%. It also boosts efficiency and design accuracy. These are some of the benefits you get to enjoy when you use auto-constrain tools.

Constrain Sketches Fully

Defining the constraints fully lets you control the form, size, and shape of the 3D elements you create from the sketches. This is because once you apply the constraint, the software does not accept changes to the geometry that will violate the defined constraint.

Advanced Use of Geometric Constraints

Assembly Constraints

Did you know you can apply constraints to assemblies? In Inventor, you can do this and more. This CAD software lets you create assembly constraints between the geometries of two or more components in an assembly.

Parametric Modeling

Sketches are foundational to 3D objects. This is because you first have to create sketch profiles representing the faces of the objects. The profiles then define the overall shapes of the parametric solids, surfaces, and bodies. And as we have detailed earlier, geometric constraints in CAD play a crucial part in defining the geometry of such sketches.

Since parametric modeling involves using parameters to create relations between various components, it is easy to see how constraints can parametrize components. So, one of the advanced uses of geometric constraints is in enabling parametric modeling.

Conclusion

CAD software products increasingly support automated methods of adding geometric constraints. Some, such as Creo and NX, no longer support manual application of these constraints. Instead, NX does it for you, while Creo lets you accept or decline the suggested constraint. One of the reasons Siemens gave for eliminating manual methods is the efficiency auto-constrain tools offer. For perspective, Siemens claims that the Sketch Solver tool in NX reduces sketching time by 30% by automatically applying constraints. It also promotes design accuracy.

With many CAD software now capable of applying constraints automatically, the benefits of their respective tools may not be far off what Siemens announced. Generally, however, geometric constraints do offer plenty of other benefits even when applied manually. They give designers greater control over the geometric objects, ensuring their sketches and 3D models do not depart from the design requirements and specifications. In essence, geometric constraints enhance design accuracy.

scan2cad advert for free trial

Scan2CAD

  1. Professional-grade conversion software for Windows & MacOS

Account

  1. Account Login

From the blog

    Scan2CAD is copyright and a registered trademark of Avia Systems.

    Head quartered in Worcester, United Kingdom. Registered in England & Wales, company no. 7557200.

    More information: Legal Security Minimum Requirements