13 Replies Latest reply on Jun 18, 2009 2:54 AM by 1-HH5PKI

# Closed Spline resizing

Ok, so I work in the eyewear industry as a designer for eyeglasses and sunglasses. I'm having trouble resizing a closed spline (in SWx) in the same manner that I do it in Adobe Illustrator.

So, our 2d workflow is based in Adobe Illustrator and I've grown accustomed to drawing eyeshapes (the shape of the lens) in AI. The eyeshape is always a spline (no lines, no arcs) drawn with the pen tool. Once we draw a shape we like, we size that spline to the proper size.

In the eyewear industry the side-to-side width of the eyeshape is called the 'A' dimension (or just the 'A') and the top-to-bottom height is referred to as the 'B' dimension (or just the 'B'). The A absolutely must be an integer. The B must be sized to the nearest 1/10th of a millimeter (i.e. it can be 35.7 or 35.8 but not 35.77) Pretty straight forward.

Ok, so once I have that shape, I can very easily go to the transform palette (and activate the chain link to proportionally scale the shape) and enter the A dimension for the lens. I'll check what that corresponding B dimension results and then turn off the chain link and type in a value that is rounded to nearest 1/10th of a millimeter. Boom, I'm finished. (this is what's illustrated in the attached AI and PDF)

How on earth do I replicate this in SWx? I was hoping that blocks could get me there, and while they get me closer than any other strategy (I only have two up to this point), it's still not quite right.

To illustrate verbally ... let's just say that I'm starting out in SWx from scratch and I will create the eyeshape there.

(1) I open a new sketch
(2) I draw a construction rectangle centered about the origin (using a diagonal centerline) that is roughly the dimensions I want the eyeshape to be, say 55mm (A dim) by 40mm (B dim)
(3) I draw any random eyeshape that "looks right" (again, very subjective) and for this purpose make it nearly tangent to the rectangle I've already drawn.
(4) I add 4 tangent constraints

Everything is usually ok at this point. But heaven forbid I to to try to proportionally scale that rectangle up to a 58mm ... You can forget it. I'm nearly guaranteed that SWx will spit out something UGLY or the spline will turn red or yellow and fail.

After trying this a few times, I realized that (duuuuuuuh) SWx is treating that spline differently than AI b/c AI treats is as an object when it comes to dimensions/size. Essentially it just scales everything that defines that closed spline according to the dimension I entered. SWx doesn't know that it needs to change all the magnitudes and angles on the handles ... it simple makes the rectangle bigger.

This is when I started looking into blocks b/c I was hoping to be able to edit at one "level", then sort of lock that level and change the size at a second level. This is conceptually how I think about how AI is doing things.

So, then I try to draw any random shape once again in a new sketch. I turn that closed spline into a block and then drop a construction rectangle on top of it and add the 4 tangent relations. I pull out dimensions (driven, of course) to evaluate it's size. I then have to use the block scale field to change the driven dimension. I keep nudging up or down the value until either the A is an integer or the B is a 1/10th of a millimeter. This works, but only for one of the dimensions. I want to be able to control both the A and the B.

I'm essentially at a loss and my only recourse is to work back and forth between AI and SWx, which is completely liveable, but I feel like there must be a better way to control a spline in SWx.
• ###### Closed Spline resizing
How to attach files:

Evin - while waiting to see the example file I tried to sketch a closed spline quickly that would scale with a simple dimension change. What I did was to constrain the spline points to the rectangle and instead of using tangent constraints I used coincident (along with a couple construction circles). The ht dim is tied to the width with a formula. That way all I change is the width and it all scales properly. A few more mm's and they'll look like pair I wore in the 70's.
• ###### Closed Spline resizing
Harold, thanks for the link, however, it appears to be broken. Hours later, I'm still having trouble attaching files to my posts ... I get an error message that says, "Sorry, the type of file you tried to upload is not permitted."

I've tried .AI, .PDF and .SLDPRT files to no avail. My VAR has no solution and I can't find any links on the forums anywhere that tells me what might be the issue. Anybody have any ideas? Sorry to have to have a conversation about attachments to posts in this thread, but obviously it's quite relevant.

Thanks,
Gamal
• ###### Closed Spline resizing
Zip the files into a zip archive and post the zip file.

Cheers,
• ###### Closed Spline resizing
Matt, Harold, Dwight, Jeff, Kevin, Robert -

Thanks to everyone! So, what's working most similarly to how AI does it is to use the proportional checkbox in the Property Manager as Matt suggested. The trick is to know when to use it. The other key how I'm placing the spline and the construction box in the sketch. If I put the top-left corner of the construction box on the origin of the sketch, this more effectively helps me see the effects of the spline resizing.

I didn't really think about this b/c when I began this exercise b/c I had a pair of imported surfaces representing the lens' front and back faces centered at the origin b/c the eyeshape is typically cut from the center of lens (but not always). However, we tend to draw the left-wearing eyeshape (this is of course the one on the right of the front view of a pair of eyewear) and by the time we need to be resizing things, we use top-left square of the Reference Point thingy in the Control Palette so that things scale/resize in the proper direction (i.e. to the right and downward).

Thanks again, I really thought this was going to be a brainbuster, but you guys have managed to diffuse the situation in a matter of hours. Clearly, I'll have to work harder to come up with a stumper, eh? Looking forward to it ...

Oh, I'll post the files if I ever get that part of the equation figured out.

Cheers,
Gamal
• ###### Closed Spline resizing
Didn't read your whole missive. Did you try using the "Proportional" check box in the Spline Prop Mgr?

• ###### Closed Spline resizing
Create a fully dimensioned sketch including the spline handle length and orientation. Then create equations for the dimensions referencing the overall height and width of the part with scaling factors. It is tedious but does work. I hope this helps.

Rob Stupplebeen
• ###### Closed Spline resizing
Matt I just tried your method and when I tried to drag the box defining the overall dimensions it required the box to keep the same aspect ratio. Am I missing something? Thanks.

Rob
• ###### Closed Spline resizing
It's so much simpler if you just draw the spline, click on Proportional, then scale it by dragging a point.

You could also use the Scale tool in the sketch or even the Modify Sketch tool.

If you use sketch relations, you have to be careful not to assume symmetry on a 4 pt closed spline. Even if you have relations on the spline handles.

If you really have to use dimensions, you might want to also use the Sketch Setting, Override dims on drag.

If you add sketch relations and dimensions and equations to a spline, I'm not sure it has any choice but to overdefine and give you something ugly when you try to change it. Keep it clean and simple.
• ###### Closed Spline resizing
Like Evin, I often need to define a spline by its orthogonal tangents. The only way I've found to do that is to draw the lines and set tangencies. If there's another way to go about that, I'd be interested to know it. As it is, the splines often blow up, just as Erin describes.
• ###### Closed Spline resizing
Proportional works really nice (keeps the intended shape true without so much work). Thanks Matt. There will need to be at least some dimensioning to adhere to the design standard Evin is working from though.
• ###### Closed Spline resizing
Ok, try out this attached file. It's a zipped movie that shows how I would do it.

The thing about the control points being at the horizontal tangents... that's an artificial condition. You probably don't really care about it, and it actually makes things tough on SW. It's probably not doing what you think it is anyway. You can add them if it makes you feel better, but it's better to confront reality than go on in the illusion that you are controlling something exactly.

• ###### Closed Spline resizing
You could separate your rectangular guide-line box from your spline sketch. Quickly change the dimension(s) of your box and then update your spline sketch with the Proportional option, as Matt suggested. Scale to match your box in the sketch below.

• ###### Closed Spline resizing
Ok obvious question number 1.....why not continue to draw the curves in Illustrator and import into Solidworks? If you have a base sketch you can copy in any new curve and re-reference that for downstream modelling work.