# “Impossible” Modeling Challenges Part 2: Dynamic Straightening of a Bent Wire in CAD

This is the second installment of our articles covering the SOLIDWORKS Power User Challenges (SWPUC). If you have not read the first articlein the series, you can find it here.

## The Challenge

Currently SOLIDWORKS does not have built-in functionality for flattening (unbending, straightening) wires and tubes. This type of functionality is a must for professional users who need to support quotations and CAM for tube laser cutting and bending. Such users most likely use a SOLIDWORKS Solution Partner like TubeWorks.

For the rest of us, who are using the native functionality inside SOLIDWORKS, several intriguing questions remain when considering a wire or a tube imported from a different CAD software. Examples of such challenges (from simple to complex) include:

1. How to calculate the length of the wire
2. How to add a configuration representing the straight wire
3. How to ensure that the length of the straight wire body is parametrically linked to the length of the bent wire
4. How to provide instant visual feedback for the numerical value of the wire length
5. How to perform a dynamic bending and unbending of the wire in SOLIDWORKS

What better place to ask these questions and turn them into challenges than the SOLIDWORKS Forum? There were 118 replies to “The 5thWeekly Power-User Challenge”on the forum, with multiple solutions for all above challenges.

Among a large number of original and smart solutions, one stood out in particular. It was the only one that solved the most complex challenge: dynamically bending and unbending the wire.

We were so excited about this technique that we bestowed upon its author, Rob Edwards, the title of SOLIDWORKS Demigod. Rob’s solution will be the main focus of this article. Read it and let us know if you agree that Rob deserves the recognition of the SOLIDWORKS Community.

## 1)  Solution for determining length of wire based on measurements

Before demonstrating Rob’s method, let’s start with the simplest solution for determining the length of the wire. This solution was submitted by Michael Fernando.

Consider an ideal bending condition, where the neutral fiber of the wire follows the center of each intermediary profile. The simplest way to calculate the length of this neutral fiber is to divide the volume of the solid body to the area of the wire’s section.

This can be done quite easily using the Measure and Mass Properties Tools.

What about using a SOLIDWORKS equation to calculate the length? Unfortunately, the face area cannot be included in an equation directly. If the face is circular, you can use the measured diameter of the face.

Note, that, when called from inside the Equation Manager, the Measure Tool is limited to adding Smart Reference Dimensions. You cannot add the measured area of a face in an equation.

For an in-depth demonstration of how to use measurements and custom properties in SOLIDWORKS Equations, please click on Figure 8 to access the related video.

## 2)  Solution for generating the neutral fiber

If the imported geometry follows a path composed of lines and arcs, there are simpler techniques available, using lines and arcs through the center of the round edges.

For complex shapes, like the one in our example, the “fabric” of the main face could be used to determine the neutral fiber. The first participant who submitted a solution based on this technique was Dan Pihlaja, a winner of multiple SWPUCs.

Imagine each face of a SOLIDWORKS model as a piece of fabric, weaved from threads going in directions normal to each other. And yes, I weaved the model shown in Figure 9 myself, and I am very proud of it.

In SOLIDWORKS, the curves representing the “threads” can be extracted for any point of the face, using the Face Curves tool. We call these “threads” iso-parametric UV curves.

Once we have two sets of curves anchored on quadrants of the end face, we can build two mid-surfaces, and use their intersection to determine the neutral fiber.

a) Open a sketch on one of the end faces and draw two lines from the quadrant of the circle as shown in Figure 10. Add a midpoint relation between the mid-point of one line and the other line, to fully define the sketch.

b) Start a new 3D Sketch, if you want to keep all four face curves neatly inside one sketch.

c) Activate the Face Curves tool. If you do not see it on your toolbar, just use the Search Commands tool to find it and access it or drag it onto your toolbar.

d) Make the selections shown in Figure 11

1. Select the main face of the wire
2. Use the Position option
3. Select on of the endpoints of the lines created at step s) (located much further down in this article)
4. Deselect the round UV curve (pink in Figure 11) and preserve only the long curve.

e) Repeat step d) until all 4 curves are generated

f) Hide the solid body. A quick way to achieve that is to hover with the mouse over a face of the body and press the TAB Key.

g) Build two Surface-Lofts features connecting opposite curves. Note that you will have to use the Selection Manager to select sketch entities located in the same sketch

h) Use the Intersection Curve tool to generate the neutral fiber

j) Delete the solid body

1. For an in-depth demonstration of how to create the neutral fiber and how to use it in equations, please click on Figure 17 to access the related video.

## 3)  Solution for Dynamic Bending and Unbending of the Wire

Thank you for reading so far. This is the solution that consecrated Rob Edwards as a SOLIDWORKS Demigod!

The demonstration continues from the step shown in Figure 17

k) Open a new 2D Sketch on any plane. Its role is to contain a line and its length dimension. We will use this dimension, in an equation, for driving the unbent portion of the wire

l) In order to delimitate the straight portion of the wire from the bent one, let’s place a reference point on the spline representing the neutral fiber

1. The reference point can be driven by a distance measured along the spline.

m) Add an equation linking the distance locating the point with the length of the line from step k)

n) In order to separate the bent portion from the unbent one, let’s create a plane passing through the reference point and normal to the neutral fiber

o) We cannot use the plane to cut the solid body, because it could intersect it in multiple places. In order to localize the effect of the cut, we will build a planar surface, slightly larger than the wire’s section.

p) For that, create a sketch on the new plane and draw a circle with the center coincident to the reference point from step l).

q) Make the diameter of the circle slightly larger than the profile of the wire.

r) Use this sketch for creating a planar surface

s) Perform a Surface-Cut using the Planar Surface created at step r). At this point you can use the Delete Body feature to remove the surface body.

t) On the cut face, create a sketch. Convert the end face in a sketch entity and use it for a Blind Extrude-Boss feature. This will represent the straight portion of the wire.

u) Make the length of the extrusion equal to the length of the line from step k)

1. At this point, by adjusting the length of that line, you directly affect the position of the cutting surface and, at the same time, the length of the unbent portion of the wire.

Note that you can use the Instant3D tool, as shown in this video,to dynamically manipulate the shape of the wire.

This is just the most spectacular solution to this problem. Other original and very clever solutions were submitted by Paul Salvador, Kevin Pymm, and Dennis Bacon.

## A few words about the winners of this Power User Challenge, Dan and Rob

Dan got into CAD and design because he broke his right arm in 9th grade. The teacher from his welding class was also teaching AutoCAD, so he placed Dan in front of an AutoCAD tube when he couldn’t weld because of his arm. He fell in love with CAD.

He worked with I-DEAS and CATIA before switching to SOLIDWORKS in 2009. Currently he is a fixture designer.

Dan stated that, since he started his activity on the SOLIDWORKS Forum, he has learned more in the last two years on the forums than since he started working with SOLIDWORKS.

Rob has lived in The Peak District in England since he was three years old. He briefly left to study computer science in the early 90s, but spent the next decade never owning or even looking at a computer. In his 30s he became a joiner, specialising in 16th Century Oakwork. In 2006 he and a friend, set up on their own. Rob discovered SOLIDWORKS in 2013 and, after watching a million YouTube videos he convinced his friend, now ‘the boss’, that it would be a good idea to invest. He now spends most of his time sitting at a desk rather than standing at a bench, but still loves to get hands on whenever he can.

## Call for action

I will leave you with one call for action. If you want to have the functionality for unbending wires and tube native to SOLIDWORKS, please vote and ask all you colleagues to vote on:

SPR 533472: Ability to bend and unbend or flatten rod, wire, tubing, and other such objects.

As an Elite AE and Process Improvement Consultant, working for Javelin Technologies, Alin Vargatu is a Problem Hunter and Solver, and an avid contributor to the SOLIDWORKS Community. He has presented 22 times at SOLIDWORKS World and tens of times at SWUG meetings organized by four different user groups in Canada and one in the United States. Alin is also very active on SOLIDWORKS forums, especially on the Surfacing, Mold Design, Sheet Metal, Assembly Modeling and Weldments sub-fora. His blog and YouTube channel are well known in the SOLIDWORKS Community.