Tick Talk on EsoxRepublic.com

New SolidWorks Where-Used Tool

Posted in Esox Software by Administrator on the August 7th, 2008

EsoxRepublic.com has released a new where-used tool for SolidWorks. This new stand-alone application was created to fill in a gap caused by the undependability and inflexibility of the Windows Indexer-driven SW Explorer where-used search.

Annotated screen shot of Esox Republic's Where-Used tool
Annotated screen shot of main interface of Esox Republic’s newly-released Where-Used application. (Click image to enlarge.)

Succeeds where SW Explorer fails

As with most of Esox Republic’s freeware, this one was born from necessity. In many cases, SW Explorer was not finding all where-used references when performing rename, replace, and Pack-and-Go.

The main reason for SW Explorer’s failure in where-used searches is that SW Explorer relies on Windows Indexing for its searches. Windows Indexing provides a list of files and references to SW Explorer. More often than not, that list is incomplete. This is especially true for netwotk folders.

Also, SW Explorer does not allow one to tailor the where-used search. One can not add or remove folders from the search area, nor can one specify reference types or file types searched. Esox Republic’s Where-Used tool can do these things.

Esox Republic’s Where-Used application is driven by SW API’s Document Manager object. The SWDM performs a “hard-target, house-to-house” search of all files for its where-used searches. The result is the most current where-used results possible.

The downside is that it is a bit slow. Checking files takes much more time. Still, if accuracy and flexibility are more important, here’s your tool. The program is available only as an .exe, due to SWDM licensing requirements.

Search results
Search results

Other news…

Birth announcement

There’s a new member of Tick’s clan. Falco William Henry was born July 15, 7 lb. 6 oz., 3rd of 3 boys.

Thanks Matt & Matt

Thanks to Matt Lombard and Matt Lorono (SolidWorks Legion) for including links to my blog into theirs. Naturally, I will be returning the favor.

SW Coordinate Systems Are Nearly Useless

Posted in Uncategorized by Administrator on the July 30th, 2008

Coordinate Systems in SolidWorks have been a disappointment from the beginning. Like a freshman congressman, they have little purpose but to wait around, be present and hope for greater possibilities as they gain seniority. Unlike said congressman, coordinate systems are just not gaining any power.

SW Help’s own description of coordinate systems’ limited utility is embarassingly anemic:

You can define a coordinate system for a part or assembly. Use this coordinate system with the Measure and Mass Properties tools, and for exporting SolidWorks documents to IGES, STL, ACIS, STEP, Parasolid, VRML, and VDA.

That’s missing a whole universe of potential usefulness, especially compared to what UG, Pro/E, and even AutoCAD(!) can do with their coordinate systems (”CSYS”).

Back in my Pro/E days, I would create a user-defined CSYS to use as the main anchor for locating part geometry. That way, I could move and rotate an entire part w.r.t. the universal CSYS simply by redefining one feature. This was very useful when making models for customers that required “in-place” designs (”in-place” = line up origins of parts to locate in master assembly).

That’s what I miss the most. But, there’s plenty more. Here’s a partial wish list of what SW can’t do w/ coordinate systems that other programs can:

  • Define and update view orientations
  • Mates: SW CSYS’s are truly impotent, for they can not mate.
  • Define datum planes and axes. (Add to this that SW has no control over which side of a datum plane is the front.)
  • Sketch relations: Can not constrain sketch entities parallel/perpendicular/coincident to CSYS axes or origin. This would be especially handy in 3D sketches.
  • Move or copy geometry: it would be wonderful to be able to use a CSYS transform to define how geometry is moved or copied.

Painful Workarounds

Meanwhile, I have resorted to second-rate workarounds to get me by. Sometimes a 2D or 3D sketch can stand in for a CSYS. At least then I can make sketch references and create planes. Still, very inelegant. No workaround in sight for view orientation. A macro could do this, but I haven’t written one yet.

Speaking as the “High Priest of the Temple of Unused Potential”, I beg you, SolidWorks, please do something with this!

Early Binding Speeds API Programming

Posted in API by Administrator on the July 24th, 2008

One of the challenges when writing API code is keeping track of objects and their methods and properties. Early binding can help with that.

“Early binding” simply refers to the way that object variables are defined. Instead of defining an object variable with “Dim swApp as Object”, define it as the specific object type, i.e. “Dim swApp as SldWorks.SldWorks”.

Here is what SW gives you when you record a macro:

Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object

This is what the same code would look like adjusted for early binding:

Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim SelMgr As SelectionMgr
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As SldWorks.Feature

Ctrl+J and Intellisense

One of the handy features in the VBA editor (macro editor) is a list of available commands that pops up when typing, known as “intellisense”. Details can be found in the VBA help under “List Properties/Methods Command (Edit Menu)”. With intellisense, there is no need to commit an endless list of commands, objects, methods and properties to memory. It’s all right there.

Screenshot of Intellisense drop-down list
Screen shot of intellisense Pop-up drop-down menu. Menu pops up after typing “.” after a valid object name or “ctrl+J”

Intellisense pops up immediately when one types a period following the name of an existing object. But, there’s a catch: if the object is defined with a Dim statement using “As Object” instead of as a specific type, it is not available.

Also, intellisense is available to add commands and objects by pressing ctrl+J.

The other advantage to early binding comes when a program is run. Early binding decreases the time it takes to set an object. Not a big deal for small macros, but it could add up for larger program.

Quick-access notepad, calculator & paint for “scratchpad”

Posted in Uncategorized by Administrator on the July 22nd, 2008

When I was in the navy, one was considered out-of-uniform if one did not have a pen and notepad on his person. On my workstation, I have a few tools to use for “jotting things down” when simple copy-and-paste is not quite enough.

Quick access shortcuts

I like to use MS Notepad as an on-screen scratchpad. I find it is handy for storing quick notes and lists of numbers that I may need elsewhere during the course of my CAD modelling. To make Notepad readily available, I add a shortcut key to the Windows menu. That way, I can have my scratchpad ready with a quick “Ctrl + Alt +N”.

To add a shortcut key, go to the Windows menu and find the application of interest (i.e. MS Notepad). Instead of left-clicking to start, right-click and select “Properties”. You will see a line for the shortcut key. Here, you can enter a “Ctrl + Alt + {letter}” or “Ctrl + Shift + {letter}” for a shortcut key. Once set, the application will start when the shortcut key combination is pressed.

Quick shortcuts for screenshots

I have a key shortcut for MS Paint, which I use for editing screenshots. Use “Shift + Printscreen” to capture the screen, open MS Paint, and paste (Ctrl + v). MS Paint will allow you to select a portion of the screenshot to crop or copy. The copied protion can be pasted into email, PowerPoint, MS Word, etc.

Other handy tools

Two other tools I like to keep on “hot standby” are the Windows Calculator and the Character Map. Character Map is handy for those odd symbols, Greek letters, etc. Calculator is good for, well, calculating. BTW, if you haven’t discovered it yet, Calculator does have a scientific mode w/ trig & log functions, etc.

Offsets and Conics

Posted in Geometry by Administrator on the June 26th, 2008

Offset entities in a sketch is a very handy sketch tool. It comes in handy in so many ways: shelling parts, creating slots, scaling geometry, making sheet-like profiles. Not much more need be said.

Offsetting sketch entities creates a set of entities that are a constant distance from the original selected entities. For the simplest geometry, arcs and lines, the resulting entities are the same type: an offset of a line is a parallel line, an offset of an arc is a concentric arc. Splines, well, are still splines, no surprise there.

Offsets of conics are not conics

The surprise for some is the result of offsetting conics, eliipses and parbolae. The obvious assumption from experience is that the offset of an ellipse is an ellipse, and the offset of a parabola is a parabola. This assumption would be a mistake.

The offset of an ellipse is not an ellipse. The result looks like an ellipse, and is certainly oval-shaped, but is not a true ellipse.

Pictured below is the result of a quick experiment. Sketch A (green) is an ellipse. Sketch B (black) is an offset of the ellipse. Sketch C (red) is an ellipse with the same major and minor diameters as the offset. They do not match.

Offset of ellipse vs. larger ellipse
Offset of ellipse vs. ellipse of same major & minor diameter. Green = original 1 x 3 ellipse; black = 0.25 offset; red = ellipse w/ same major/minor diameters as offset. Click image for larger version.

Try the same experiment with a parabola and see what happens.

The Implications

I first started this article simply as a brief academic discussions of the results of offsets. While googling arond to see what else is out there, I found this subject does have some relevance beyond curiosity, especially for toolpaths in CNC programming.

For CNC programmers the important fact is that the toolpath to create a 2D ellipse is not a true ellipse. Creating a toolpath by scaling an ellipse or by creating a second ellipse with major/minor diameters increased by half a tool diameter will yield erroneous results. An offset must be used, and the offset is not an ellipse.

Learning COSMOS

Posted in Software by Administrator on the June 13th, 2008

This past couple weeks I have been learning COSMOSMotion and COSMOSWorks. My current contract assignment had these sitting in a drawer for years waiting for someone to use. Now I have.

This job is at a place that designs and manufactures hospital beds. Lots of cool 4-bar gadgets. Definitely a great environment for C-Motion. Initial results are promising and management is enthused.

Now starting on COSMOSWorks, hammering through tutorials. I’ve done FEA on MSC NASTRAN before, so it’s mostly learning button-pushes and discovering functionality. I am definitely impressed by ease-of-use. Makes for a good product.

Against my grain

Those who know me well know that I like to get inside of things. I like to know why things work, and then why the things that make things work work. That’s why I like SW API; that’s what I liked about NASTRAN. I like having access to the inner workings.

I wouldn’t call me a control freak. I do like having control of some things, tough. I am suspicious of defaults, and I am usually certain there are better ways toward better results. With NASTRAN, I liked the meshing functions that allowed me to define mesh shapes in critical areas. Also better element choices: P-elements and quad meshes. Lots off good stuff.

I like the results I am getting from COSMOS, but I am out-of-place without a window to peer deep inside.

“Classic” Vince Adams

I met Vince Adams in 1996, when I just completed MSC NASTRAN training. Vince joined our end-of-training golf outing. He was starting a new company, and with it, a new venture.

The venture was the “MESH” conferences. MESH was a regional (WI-IL area) “ecumenical” conference of FEA users. It had nothing to do with a particular software. It focused on broader FEA issues: problem solving, testing, material properties, etc. Software comes and goes and always changes, but the fundamentals behind successful FEA are the same for everyone.

I was privileged to attend a couple of MESH conferences. Circumstances forced a sad end to them (2002-ish?). Vince and MESH had a profound effect on my approach to FEA and also engineering in general.

It would be wonderful if SW could let “classic” Vince out among us again.

SW2009 to introduce disappointing version of equation-driven curves

Posted in Geometry, Software, Splines by Administrator on the June 5th, 2008

Solidworks briefly published then pulled a PDF showing what was new in SWX 2009. Among the items listed was equation-driven curves.

This is a feature that is long overdue. SW’s current connect-the-dots-with-a-rusty-crayon curve-thru-points is not an acceptable substitute. I was excited to see they had finally introduced an equation-driven curve feature. That is, until I read the descriptioin…

According to that “what’s new” document, the equation-driven curve feature only allows a user to create 2D curves with functions y=f(x). An improvement, but hardly close to where they need to go. Only works in two dimensions. Does not allow for higher degrees of “x”, as one would find in conics or common forms like wave washers or gear teeth.

SW needs to introduce parameterized curves: x=f(i), y=g(i), z=h(i) for i=0 to 1, like the rest of the grownups in math-land.

List of things y=f(x) curves can’t do:

  • involutes (gear teeth)
  • cardioids
  • spirals around a path
  • wave-washer outlines

Disappointing. Keep trying, SW. In another five years, you could catch up to where Pro/E was ten years ago.

2007 sp5.0 = big trouble

Posted in Software by Administrator on the June 2nd, 2008

Yes, still on SW 2007 at client site. Installed SW 2007 on new computer and updated to SP 5.0. Opened a top-level assembly with lots of width and symmetry mates. Most of them failed.

Uninstall. Update to only SP 4.0. All better.

Spline Curvature and Geartrax

Posted in GearTrax, Splines by Administrator on the May 28th, 2008

As promised, more [yawn] detail about spline curvature, involutes, and Geartrax. Part 1 of this subject is here.

As I wrote before, there are some errors in the involute spline generated by Geartrax. While the spline passes through all of the defining points, it meanders between these points, introducing minute error as it goes. This is due to the fact that the spline is only defined by its points, with no attention paid to tangency or curvature at any point.

screenshot of Geartrax sample part screenshot of Geartrax curvature comb
Screen shot of spur gear sample from Geartrax’ web site. Curvature comb of Geartrax tooth profile. (Click image to view full size)

Curvature of an involute

The curvature profile of an involute with respect to its length is asymptotic. It is infinite (zero radius) at the root and approaches (but never reaches) zero as the length increases. The formula is c=1/sqrt(s), where c is curvature and s is length from the root. For details, see 2dcurves.com.

The problem with the Geartrax “involute” is that it does not follow this curvature profile. The curvature is zero at each end. Also, there are inflecctions in the curvature comb. The curvature should always get smaller as the length from the root increases. The Geartrax spline has regions where the curvature increases with distance. the image below shows the Geartrax spline with curvature comb along with a curve showing what the idealized curvature comb should look like.

Geartrax curvature comb vs. ideal
Curvature comb of Geartrax tooth profile (purple) vs. ideal (red line)
A: Ideal curvature is infinite at root, Geartrax spline curvature abruptly reverts to zero
B: Geartrax spline curvature has region where curvature increases as distance from root increases
C: Geartrax spline curvature is zero at endpoint. Ideal curvature approaches but never reaches zero
(Click image to view full size)

Is this a problem?

Probably not. It depends on how much detail you need in your involutes. If you are cutting gear teeth right from CAD data, you are copying the errors. If you are cutting gear teeth with hobs, the error would not be carried through. For most common uses, performance will not be noticeably affected in either case.

I did have one application where this could have been an issue. I was tasked to model a very large gear for a very large press. The gear was to be wire EDM cut right from CAD geometry. The gear was large enough that CAD geometry errors could possibly be detected. Being a former submariner, I appreciate large, quiet, smooth gears.

Still, I am disappointed. Involutes are nothing new, and the mathematics behind them are clear and well-established. Geartrax’ results are a bit ham-fisted when placed next to an ideal involute’s simple elegance.

What you can learn

The big lesson is that there is more to drawing splines than connecting the dots. Many spline control problems are only made worse by adding more points. Controlling tangency and curvature at key points will go a long way toward creating a spline that suits your needs.

A Simple Way to Thank Our Vets

Posted in Uncategorized by Administrator on the May 27th, 2008

Try to live a life that shows you aspire to be worthy of the blood that was shed for you.

« Previous PageNext Page »