To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9045
9044  |  9046
Subject: 
Proposed solution for mirrored parts and studs
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 3 Jul 2003 21:01:25 GMT
Viewed: 
1278 times
  
It's obvious that there is a lot of interest in the problem of mirrored studs,
based on the volume of traffic in the ongoing thread.  I have a proposed
solution to the problem.

My proposal is the creation of a small tool that automatically fixes a part (or
model) that includes a mirror matrix.  I'll even volunteer to write the tool,
but won't make any guarantees about a completion date.  The tool would work
something like this:

1. You run the tool and pick a file that is known to include a mirror matrix.

2. The tool loads the file and determines which (if any) studs are mirrored.

3. If any mirrored studs are detected, the tool creates copies of the sub-files
that reference the mirrored studs (with new names), and replaces references to
studs in these files with a reference to a mirrored stud file (say
p/studmirr.dat).  (Handling arbitrary levels of sup-parts will take some work,
but you get the general idea.)

The p/studmirr.dat file I mentioned would simply be a reference to the standard
p/stud.dat file, but with mirroring along the X axis (change the 1 to a -1 in
the matrix).

If written correctly, the above could actually be run on your final model file,
and it would correct mirroring of entire sub-assemblies in addition to mirroring
of parts.  Since it would have to be made smart enough to deal with sub-parts in
mirrored parts, I don't think that any extra code would even be required to
handle whole models.  In addition, if done properly, the only effect it would
have on the size of the final POV output is that any portion of the model that
showed up both mirrored and un-mirrored would be in there twice, and any
mirrored studs would be wrapped in the additional transformation matrix.

If anyone can think of a reason that the above wouldn't work, please respond.
Otherwise, I'll set about making a command line tool whose code should be
portable enough to compile in Windows, Linux, and Mac OS X (and presumably other
operating systems).

Assuming I can produce such a tool, does anyone see any reason why there should
be any concession to mirroring in the parts library itself?  Note that if people
want the stud logos to point in the right direction, that is another discussion;
I'm just talking about mirroring.  (I think the direction of mirroring chosen
when constructing a mirrored part could effect the final orientation of logos
after automatic un-mirroring, so it could perhaps be requested that mirror
matrices always use the same axis.)

--Travis Cobbs



Message has 2 Replies:
  Re: Proposed solution for mirrored parts and studs
 
(...) As you write below you can open ANY file. If no studs are mirrored, then no action takes place. (...) In stead of referencing studmirr.dat, why not simply use a mirrored reference to stud.dat? (...) No, same code. (...) Right. (...) If all (...) (21 years ago, 4-Jul-03, to lugnet.cad.dev)
  Re: Proposed solution *Test Here*
 
OK, I have created a command line program to un-mirror studs. It is called UnMirrorStuds, and version 0.1 is available from the following location: (URL) download it and give it a try, and let me know what you think. I'd like to have people process (...) (21 years ago, 9-Jul-03, to lugnet.cad.dev)

9 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR