Tuesday, 28 August 2012


What are SolidWorks Sketch Relations?

SolidWorks Training by www.video-tutorials.net
If you are reading this article, you are one of many people who are wondering and have asked me, “what exactly are sketch relations in SolidWorks?” For some reason, many SolidWorks students have some difficulty grasping this essential building block of parametric modeling, at first! As soon as you get it under your belt, you will be free to model, model, model!!  The only reason I can think of regarding why this question remains so persistent is that while there may be a ton of books that explain SolidWorks sketch relations, but perhaps not in a way that is easy to understand or remember for people new to SolidWorks or for that matter to 3D parametric modellers. 

 By the way, I often use the term geometric entity in this article.  That basically means a piece of geometry, something you draw—like a line, a circle, a point, etc.
 
First of all, what are relations and what are they for? Why does SolidWorks need relations?
First of all, what are relations and what are they for? Why does SolidWorks need relations? In graphics-editing software, you layout your material, text and images on a screen representation of the paper you’ll be printing them on, for example. You can use a grid, like an onscreen ruler, to line up the images you import, the text you place, etc. 


 Three-dimensional object design, like with SolidWorks, CATIA, or AutoDesk Inventor, requires more precision than does graphic design. That’s because even if something looks, to your naked eye, like it’s in the exact right place, unless you mathematically position it there, you could end up with a production problem.  In fact, the biggest cause of errors in 3D modeling is sloppy sketches that don’t make proper use of dimensions and relations.

 How you draw in SolidWorks is different than in a graphics program…

How you draw in Solidworks is different than in a graphics program, like Photoshop, or Illustrator.  In SolidWorks, you don’t need to position your geometry while you’re actually drawing it.  First you drop your geometry onto your workspace—a line, some circles, a spline, what have you.  Then you organize it mathematically using what are called relations. That is, you apply relationships. (In AutoDesk Inventor, relations are called constraints). Let’s say you need the center of your circle to be the starting point for your line.  To make that happen, you apply what’s called a coincident relation between those two points.  And you need another line to be parallel to that first line.  Instead of trying to draw a line that seems parallel, you just activate the parallel relation command, and then select both entities.  You have just applied a parallel relation.

 But it looks straight, right?
While you might think it’s easy to draw a horizontal line, or a vertical line—“it looks straight, right?”—that’s actually not precise enough for 3D modeling. If you want a line to be vertical, that is, parallel to the Y axis, you need to apply a vertical relation. If you want a line to be horizontal—parallel to the X axis—you need to apply horizontal relation.


Relations first then dimensions…

Generally you’ll apply relations first, and then the dimensions.  The relations organize the geometry in appropriate locations, and the dimensions determine the size of the geometry. For example, you define a line or radius length; the area of a rectangle, the distance between two points, etc.

 This is the essence of parametric modeling!!
What’s seriously cool about using relations to position your geometry is that you can change the size later on without having to reposition or re-dimension the geometric entities later on. Let’s say your line’s starting point is coincident with your circle’s center point.  If you change the size of the circle, the line’s starting point will move accordingly, to maintain that coincident relation.  This is the essence of parametric modeling; this functionality is what makes it a heck of a lot easier to do 3d modeling with parametric computer software than on paper or with a 2d CAD program.  (A 2D CAD program works like an infinite piece of paper—although many 2D programs are offering some 3D and parametric capability to remain competitive.)  Basically, with parametric modeling—when you create parameters like relations and dimensions to determine how to position your geometry--it’s WAY easier to edit later on!!

 
What are the sketch relations in SolidWorks?
Here’s a list of the relations in SolidWorks, and what they mean:


Coincident
– applying this relation makes two points occupy the same coordinates, or the same place.  Coincident relations are available for point-to-line relations and point-to-arc relations.  The mathematical term coincident is different than how we use this word normally to mean similar “his version of the story was coincident with the police report.”  The mathematical term coincident obviously shares the same Latin root as the word coincidence, which is very commonly used and means something quite different as the occurrence of events that happen at the same time seemingly by accident but that have some connection.  The Latin root is your clue here: coincider means “exact correspondence.”

Colinear – applying this relation makes two or more points lie on the same “virtual line.”  You’ll also see this word with two L’s (collinear).
 
Concentric – applying this relation makes two arcs or circles share the same centerpoint, no matter their size.

Coradial – applying this relation positions two arcs on the same “virtual circle.”  This means the arcs have the same radius length and centerpoint.


Equal – applying this relation makes two entities, for example, two lines, the same length. You can apply an equal relation between the sides of your rectangle to create a square. If you, for example, increase the length of one side, the other sides will increase accordingly to maintain that equal relation.

 Fix – applying this relation to an entity, like a point, line, circle, etc, means that this entity won’t change when you are moving and changing other entities.  This will completely define an entity, and it will appear in black line.  Sometimes you might not be able to figure out why your geometry remains under defined.  In this case, you might just need to apply what’s called a fix relation. This locks a point or vertex in place, whether the center of your circle, or a corner of your rectangle. However, sometimes this can get you into trouble later on when you need to move that geometry.

Horizontal – applying this relation makes your line parallel to the horizontal axis, usually known as the X axis.

Midpoint – the midpoint refers to a point which lies on the exact middle of a line or arc.  Arcs also have midpoints.  You’ll often use this relation to position the starting point of another geometric entity.  entity (ie on the midpoint of the line).

 Parallel – applying this relation makes two lines or, for example, two sides of a rectangle, parallel.  Two lines are parallel when every point on the line is equidistant, or an equal distance apart at every point on the line.
 
Perpendicular – applying this relation makes two lines meet at a 90 degree angle.

 Tangent – this means touching at a single point without intersecting. It comes from the Latin tangere, to touch.  You can apply a tangent relation between lines and arcs, or between arcs & arcs (by arc, I also mean circle; after all, a circle is an arc of 360 degrees.
 

Vertical – applying this relation makes your line parallel to the vertical axis, usually known as the Y axis.
  

Which type of relation goes where?

In AutoDesk Inventor, you choose which constraints to apply to which entities. All the relations are available at all times on the sketch toolbar.  In SolidWorks, the relations property manager appears on the left side of your screen as you create geometric entities.  Certain relations are only available to certain entities. I’ve grouped them below:
 

Single line relations:

  • Horizontal
  • Vertical

 Point-to-Line relations

  • Coincident
  • Midpoint

Point-to-Arc relations

  • Coincident
  • Concentric
  • Midpoint

Line-to-Line relations:

  • Equal
  • Collinear
  • Parallel
  • Perpendicular

 Line-to-Arc relations:

  • Tangent

Arc-to-Arc relations:

  • Concentric
  • Coradial
  • Equal
  • Tangent

How do I know my sketch has the relations it needs?
This largely depends on what you’ll be using the sketch for when you’re creating a feature from it.  As your skill level improves, you will figure out which relations cause fewer errors later in the modeling process, or which relations work better with certain features. 

 When a sketch has enough relations and dimensions for SolidWorks to create a model without confusion, it is called fully defined.  So how do you know your sketch is fully defined? This is easier to determine.  In the status bar (that’s at the bottom of your interface, under the graphic area), you’ll see a messages letting you know whether the sketch is under defined, how many dimensions are left to define, and when it’s fully defined.  When your sketch is fully defined, your sketch will change from blue line to heavy black line. 

 
What does it mean if my sketch is over defined?

The status bar will let you know if a sketch has been over defined also.  When a sketch is over defined, this means it has too many relations and dimensions; SolidWorks won’t know which parameter to use to compute your model.  For example, let’s say you’ve applied a length dimension to all three sides of a right triangle. Since the length of the hypotenuse is based upon the length of the other two sides of the triangle, you don’t need this third dimension. 
 

You can display it as a what’s called a driven dimension – this means it is not used to calculate any geometry, but rather, is calculated by the associated geometry.  If you try to leave this dimension as a driving dimension (and SolidWorks will let you choose), you will over define your sketch and get an error symbol next to this sketch in the feature manager design tree. SolidWorks provides you diagnostic tools to solve this problem; fear not!

 I hope this short article about sketch relations and basic dimension concepts in SolidWorks was helpful.

 
Thanks,
Nik Grey, www.video-tutorials.net

 
Hi! We've decided to create a blog to help answer some of the questions that we receive, and to provide some additional CAD training and tutorials. For many video tutorials, we invite you to visit our YouTube channel, videotutorials2 and our website.

http://www.youtube.com/videotutorials2

http://www.video-tutorials.net

Our tutorials are also available on Amazon and eBay:

Video-Tutorials.Net's eBay store

Video-Tutorials.Net's Amazon store