STL Mirror

664 views
Skip to first unread message

WMc

unread,
Mar 28, 2013, 7:56:01 AM3/28/13
to make...@googlegroups.com
Hi All,
Does anyone know the function which takes place when mirroring an STL file? I.e. I am examining the STL file before and after mirroring an STL file in ReplicatorG.  I notice that the middle number, which I believe to be the Y value is changing.  I can't quickly tell the transformation.  Does anyone know the algorithm behind this function?
Thanks in advance.  

An STL file follows this recurring structure:

solid Default
  facet normal -6.465880e-01 6.891725e-01 3.270554e-01
    outer loop
      vertex -2.258813e+01 1.447189e+02 1.132466e+02
      vertex -2.532888e+01 1.424226e+02 1.126670e+02
      vertex -2.392147e+01 1.436819e+02 1.127959e+02
    endloop
  endfacet
facet normal -6.36......
...............................

 


Message has been deleted

Jordan Miller

unread,
Mar 28, 2013, 8:13:11 AM3/28/13
to make...@googlegroups.com
if you can get at the motherboard easy with the power off, flip either the x OR the y axis motor. Then you can print the mirror image with no change in software.
Like so:

On Mar 28, 2013, at 8:07 AM, Jetguy <barry...@hotmail.com> wrote:

SO easy you will kick yourself. In rep-g in scaling, scale by -1.
Save obviously as a new file name.
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to makerbot+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Message has been deleted
Message has been deleted

WMc

unread,
Mar 28, 2013, 9:57:23 AM3/28/13
to make...@googlegroups.com
Thanks for all your replies. 
I can see the Y value at the facet normal has been multiplied by -1 but the vertex points don't appear to follow the same convention.  Below is the top few sections of text info before and after mirroring in RepG.  How is the Vertex points translating?  It's not -1 is it?

before Mirror:
___________________________________________________
solid Default
  facet normal -6.465880e-01 -6.891725e-01 3.270554e-01
    outer loop
      vertex -2.258813e+01 -9.128111e+01 1.132466e+02
      vertex -2.532888e+01 -8.898482e+01 1.126670e+02
      vertex -2.392147e+01 -9.024408e+01 1.127959e+02
    endloop
  endfacet
  facet normal -6.369108e-01 -6.593222e-01 3.995483e-01
    outer loop
      vertex -2.258813e+01 -9.128111e+01 1.132466e+02
      vertex -2.258813e+01 -8.928111e+01 1.165470e+02
      vertex -2.532888e+01 -8.898482e+01 1.126670e+02
    endloop

After Mirror in Y
______________________________________________________
solid Default
  facet normal -6.465880e-01 6.891725e-01 3.270554e-01
    outer loop
      vertex -2.258813e+01 1.447189e+02 1.132466e+02
      vertex -2.532888e+01 1.424226e+02 1.126670e+02
      vertex -2.392147e+01 1.436819e+02 1.127959e+02
    endloop
  endfacet
  facet normal -6.369108e-01 6.593222e-01 3.995483e-01
    outer loop
      vertex -2.258813e+01 1.447189e+02 1.132466e+02
      vertex -2.258813e+01 1.427189e+02 1.165470e+02
      vertex -2.532888e+01 1.424226e+02 1.126670e+02
    endloop



Message has been deleted
Message has been deleted

WMc

unread,
Mar 28, 2013, 10:22:36 AM3/28/13
to make...@googlegroups.com
Hi Jetguy,
Point taken on RepG being a bad idea for file manipulation.  So what I have is an STL file which is created from a 3D scanner.  It is a mirror image of what I want due to hardware limitations.  I was trying to understand the text code which underlies the STL format so that I could write a simple piece of computer code (maybe in Labview) to open the STL file and mirror the points.  I need to take the file into Solidworks so it is important that the file is rebundled in the correct manner (maybe not how RepG does it?).  Once this is nutted I can potentially ask the Scanner programmers to include this process into their STL file creation to remove the added step for me.

Cheers for the help.






Message has been deleted
Message has been deleted

WMc

unread,
Mar 28, 2013, 12:02:15 PM3/28/13
to make...@googlegroups.com
Just a regular structured light scanner but I'm using one mirror to change the optical angle for a custom project, hence why the image is mirrored.  The scanner still works fine but the image (scan) is back to front.  I know I can probably use Solidworks or RepG or other programs to mirror the STL file, but what I was hoping for is an understanding of the STL file so I could automate the process outside of using a Cad package.  As you say, I guess I need to talk to the code developers.  That's for your links and idea,
Cheers,


Message has been deleted

Joseph Chiu

unread,
Mar 28, 2013, 1:36:45 PM3/28/13
to make...@googlegroups.com
Well, if all you want is to mirror the object, then you already have the answer - it's just a transformation with a sign change on one of the axis's.   If you look at yourself in the mirror, up/down is still up/down relative to you.  Left/right is still left/right relative to you.  But, foward/backward is reversed.

I take it that you've already tried slicing the STL's of your scans to confirm that they're usable?   If you have too many poly's, your slicer could choke.



On Thu, Mar 28, 2013 at 9:02 AM, WMc <wesley...@gmail.com> wrote:
Just a regular structured light scanner but I'm using one mirror to change the optical angle for a custom project, hence why the image is mirrored.  The scanner still works fine but the image (scan) is back to front.  I know I can probably use Solidworks or RepG or other programs to mirror the STL file, but what I was hoping for is an understanding of the STL file so I could automate the process outside of using a Cad package.  As you say, I guess I need to talk to the code developers.  That's for your links and idea,
Cheers,


WMc

unread,
Mar 28, 2013, 11:34:55 PM3/28/13
to make...@googlegroups.com
Hi JetGuy,
It's a cheap off the shelf Chinese white light scanner so the scanning software is not adjustable without manufacturer support.  Not out of the question but I'd prefer to go to them with solutions rather than just my problem.  I.e. can you change the STL file by doing this.... or flip the image etc etc.

We are trying to package it into something that looks more professional and fixes the Depth of Field parameters so it's less subjective for the Scanner user.  The scanner has a depth of field of 400mm.  We are also using a Plexiglass surface for placing the scanned object on.  Hence the optical mirror which we are using.  The photo shows just the main component of the Scanbox.  Top surface has the plexiglass on it.  The mirror changes the direction of the scanned item.  The Scanner is then setup 400mm away from the front face with it's depth of field and focus tuned and fixed on the mirror projected area.  Now when the user places something on the plexiglass, he is guaranteed perfect scan parameters, only the image is mirrored which sucks.  Also you can enclose the entire thing to keep scattered light out, including a black cover for the scanned item so scanning conditions are perfect.

As I say this is only a basic picture of the main component, it doesn't show the scanner position, the main exterior box or anything like that.  Just an idea in development!


  

  
Scanbox.jpg
Reply all
Reply to author
Forward
0 new messages