Tick Talk on EsoxRepublic.com


Esox “Copy Custom Info” revived and updated guts

Posted in API, Esox Software, Software by Administrator on the May 1st, 2010

You just never know how popular some things are until they break.  This apparently is true for my “Copy Custom Info” macro.  The macro seems to have stopped working for many SW 2010 users.

The macro is ancient, by API standards.  It is one of my first published macros, and was written in SW2003.  Judging by the code, I wrote it before I was aware of early binding.  Also, SW’s API has come a long way and there were many ways to streamline the code.

I was able to do away with much embarrassing sophomoric hacksmanship. Glad to get that behind me.  Most notable improvement is that the program no longer needs to make duplicates of the files it is copying from (do not judge, I had my reasons!).  Assemblies and drawings selected for copying will open much faster.

The interface is about the same.  The only visible improvement will be in the preview windows.  There will be some indication that this is the SW2009 version.

The program will be posted on EsoxRepublic.com in the coming week.  Notices to be placed in popular forums that your less-popular author frequents.

SW BOM to Excel Macro

Posted in API, Esox Software by Administrator on the September 11th, 2008

…not quite, but a fast way from here to there.

I just released a macro I have been using for a few months. “Copy BOM to Clipboard” macro does exactly what it says: it copies a table-style BOM from a SW drawing to the clipboard in a format that can readily be pasted into MS Excel. Download here.

Just run the macro with a SW drawing open. If successful, there will be a message like that shown below. Then go to an Excel worksheet, select a cell, and paste (”ctrl-v”).

BOM to Clipboard message window
Message box indicating successful acquisition of BOM.

Developer’s notes

It’s been a while, but I am trying to remember some of the specific challenges of writing this. It took about two hours of fumbling until the error-to-trial ratio dropped below 1.0.

Application writing is often mostly about validation. Checking to see if there is an active document, is it a drawing, does it have a BOM (or more than one). That took most of the time.

There was a hook to getting ahold of the table data. I put the BOM data first into a SldWorks.BomTableAnnotation object, then moved it to a SldWorks.TableAnnotation object which could then be parsed into an array. The final array is then written to a tab-delimited string which pastes so nicely into Excel.

It could have been more elegant, but it “works fine, lasts long time”.

Thought for the day

Speak softly and carry a big stick. Some folks out there can take a punch much better than they can take an insult.

Ghosts of Configurations Past

Posted in Software by Administrator on the August 20th, 2008

Sometimes I’m more entymologist than engineer. I’m always discovering new bugs.

I’m working with a layout sketch (SW 2007 SP 4) that functions as a schematic for a lift mechanism. There are multiple configurations for different phases of the lift.

There was one dimension for a line length that changed between configurations, with both driven/driving states and length changing at different phases of the lift sequence. Recently, we changed this dimension to be a single driving value for all configurations.

We also deleted some old configs and added some new ones. That’s when the fun started. The dimension was set to 6.670 for all configs. Every time a new config is created, the dimension reverts to its old value (6.668) and becomes config-specific for the new config. Seems the “All configurations” setting for the value isn’t sticking when new configs are created, and SW is somehow remembering what the old value was and applying that to the new config!

Upcoming topics

  • Adding “Save” and “Open” dialogs to SW macros
  • Intro to SW object events
  • How to swap and copy components as they load
  • Sketch-based 4-bar linkage design
  • Photos of wind farm construction near Fond du Lac, WI

Vacation and Hingham Carp Derby

I took a week off. Couldn’t afford to go anywhere, w/ gas prices and expenses from recent family addition. I did manage to golf 9 holes per day and introduced myself and my fly rod to a multitude of smallouth bass in the Sheboygan River.

Aug.2 was the Hingham Pond Carp Derby, and annual event in my adopted hometown. I worked as a volunteer, shuttling for ice and setting up tables. I did take the time to take a picture.

Falco w/ carp derby runner-up
Falco, age 2 weeks, poses with carp derby runner-up.

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.

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.

Synchronous Technology First Blush

Posted in UG/NX, Uncategorized by Administrator on the May 23rd, 2008

Plenty of buzz about Siemens/UGS new synchronous technology. All I can say for the moment is that it will be interesting to watch.

I love UG. It’s where I cut my 3D teeth. Later, I was baptized in fire at Apple, modelling transluscent blue shells for demanding and temperamental industrial designers. For that, UG was the right tool for the job. I also learned Pro/E there, and was a dual-user for a while. Pro/E lets you play doctor, UG lets you play god.

At that time, UG already had a lot of great tools for dealing with unfeatured data. We could (and often did) abandon the feature tree and model exclusively with these tools. UG could also already assimilate “unfeatured” data into its feature tree. For instance, raw “curves in space” could be swept or extruded, then those curves could be brought into a sketch and constrained/parameterized accordingly. Neat stuff.

I could go on. I’ve carved a nice career from SW, but UG still has a siren song.

What it is; how it works

For those who haven’t seen, here are a couple links explaining UG/NX6’s new “synchronous technology”. The video is an attention getter. The PDF white paper provides a more detailed explanation.
Propaganda video
White paper

The video does a great job of showing how synchronous technology should work. Looks slick. I would hope so. That’s what video editor folks are supposed to do. The white paper provides a reasonable explanation of what is happening. Very intriguing. Apparently, the synchronous technology evaluates the model to determine what feature edits it must do in order to change geometry in a certain way. Neat!

We can see how it works. What will prove more interesting is how it doesn’t work. Models and model trees come in all degrees of complexity. Some are complex by necessity. Some are complex due to poor training or bad hiring decisions. In either case, I’m sure it won’t take long before folks are finding the limits of this budding technology.

Bad example, before Bad example, before
What kind of model tree goes from this… …to this???

Here is a good specimen of a bad example. This is an .avi of a really extreme example of poor model tree management. Pure hack-slashery. The video is a series of screen shots as the part feature tree is rolled back and then forward. I would love to see how UG/NX6 handles something like this.

I would also like to see how UG/NX6 handles well-constructed surface modelling. I can’t imagine that synchronous techology has evolved to a point where it could handle a fully-featured model of something complex like an iMac shell or an auto interior console. I do hope it can, but I doubt it.

Your jobs are safe

The CAD users of today are not going to be instantaneously supplanted by an invading army of synchronous-using replacements I also don’t foresee a great improvement in the CAD-user populace. The aces will still be aces. The putzes will still be putzes. There will be a market shift, but there will be no mass-divestment in current parametric modelling technology.

Spline endpoints zero curvature on creation

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

There’s a yawner of a title for ya! Probably of little interest to most. I would wager that there are more who should be interested, if they knew what was good for them. Especially GearTrax users.

Curvature of a spline is the inverse of the radius of the spline at a given point. A curvature of zero equals infinite radius = straight. Certain geometry is sensitive to curvature. Curvature continuity is important for airfoils and cams. Involute curves used to define gear teeth are also curvature-sensitive.

Curvature of SolidWorks Splines

One tool for evaluating the curvature of a spline is the curvature comb. The curvature comb shows a relative indication of a spline’s curvature. Where the comb’s “teeth” are long, the curvature is high. The comb tooth length decreases as curvature approaches zero. Inflection points are indicated where the comb switches sides.

An important phenomenon of SolidWorks splines is that they have zero curvature at their endpoints when they are initially created. The curvature will stay zero until the spline endpoints are altered somehow. Spline endpoints could be altered by moving, trimming, adding constrains, or manipulating control handles.

spline with curvature comb
Spline with curvature comb. When open splines are first drawn in SolidWorks, they have zero curvature at their endpoints.

Involutes and Curvature

One case where curvature is important is when drawing an involute. An involute is the curve needed for gear teeth. It is graphically derived by unwrapping a string from a circle. There is also a mathematical formula.

One common method of drawing an involute is to draw a spline through a series of points, derived either mathematically or graphically. However, if one were to simply draw a spline through a set of points and walk away without further editing, that spline would have noticeable error. The endpoints of the spline would be straight (zero curvature).

At no point in an involute is there zero curvature! In fact, an involute has infinite curvature at its root. Forcing a spline to zero curvature at the involute root would immediately introduce error to the rest of the spline as it interpolates its path between defining point. The spline would wander inside and outside of the ideal involute path as it attempts to meet all of the defining points after starting with zero curvature. Additional error is also introduced by the zero-curvature end condition.

…and GearTrax

After all these years, I finally took a look at GearTrax. This after seeing a post about gear design and having a moment of idleness and curiosity.

Of course, I downloaded some samples. I set about inspect the gear profile curvature. I was curious to see how the models were constructed, and what the involute looked like. I honestly expected that GearTrax would have dealt with this issue somehow. However…

to be continued…