sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Mirror

    Scheduled Pinned Locked Moved Plugins
    211 Posts 72 Posters 390.6k Views 72 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TIGT Offline
      TIG Moderator
      last edited by

      This is a known bug caused by SketchyPhysics rewriting the code of some of the API's own Group class, which is used by Mirror. I'm not sure what the issue is.
      Perhaps if you bring pressure to bear on the SketchyPhysics side they could fix their code to stop the problem!
      AS SketchyPhysics loads after Mirror could you try renaming 'Mirror.rb' as 'zMirror.rb' so it loads afterwards -perhaps what SP breaks will stay OK this way and hopefully SP will still work... ๐Ÿ˜•

      TIG

      1 Reply Last reply Reply Quote 0
      • P Offline
        paddyclown
        last edited by

        @tig said:

        This is a known bug caused by SketchyPhysics rewriting the code of some of the API's own Group class, which is used by Mirror. I'm not sure what the issue is.
        Perhaps if you bring pressure to bear on the SketchyPhysics side they could fix their code to stop the problem!
        AS SketchyPhysics loads after Mirror could you try renaming 'Mirror.rb' as 'zMirror.rb' so it loads afterwards -perhaps what SP breaks will stay OK this way and hopefully SP will still work... ๐Ÿ˜•

        Thanks for yr speedy reply... I tried the workaround, but alas to no avail ! I guess you're right, we have to ask the SP guys to fix there stuff ! Thanks anyway, & meantime their stuff is out & yours is in as totally indispensable (I don't understand why the gogol people haven't put in a mirror command as a basic standard tool like in any other cad program !).

        1 Reply Last reply Reply Quote 0
        • X Offline
          xinxin
          last edited by

          Thank you!I have downloaded it.

          1 Reply Last reply Reply Quote 0
          • F Offline
            Fletch
            last edited by

            Hi TIG,
            Thank you for sharing all of your wonderful talents. This + the imagetrimmer.rb ๐Ÿ˜ฒ are very nice.

            I haven't had time to read this whole thread, so sorry if this issue has been mentioned before:
            On my machine, when I have the toolbar for Mirror open, and I double-click a component or group to edit - it can take about 4-5 seconds to actually open the group or component. This was killing me until I tried just closing the mirror36.rb toolbar button. I downloaded the .rb file from this thread just tonight. I thought to close the toolbar and the problem went away. I would have no idea why. I have a shortcut assigned and don't need the toolbar anyway.

            Fletch
            Twilight Render Cross-platform Plugin for SketchUp on PC or Mac

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              @fletch said:

              Hi TIG,
              Thank you for sharing all of your wonderful talents. This + the imagetrimmer.rb ๐Ÿ˜ฒ are very nice.
              I haven't had time to read this whole thread, so sorry if this issue has been mentioned before:
              On my machine, when I have the toolbar for Mirror open, and I double-click a component or group to edit - it can take about 4-5 seconds to actually open the group or component. This was killing me until I tried just closing the mirror36.rb toolbar button. I downloaded the .rb file from this thread just tonight. I thought to close the toolbar and the problem went away. I would have no idea why. I have a shortcut assigned and don't need the toolbar anyway.

              Make sure you have v3.6 installed...
              It might be because there's a context-menu too ?
              To stop the toolbar being made at all you can simply move the button file 'MI.png' out of the ../Plugins/ folder and then there will be no toolbar as it only gets made IF the button's png is found.
              To stop the context-menu item appearing you can open the 'Mirror.rb' file in Notepad.exe or another equivalent plain text editor [NOT a wordprocessor] and near the end of the code around line #376 there's this block of text

              UI.add_context_menu_handler do |menu|### v3.5 TIG
                    #if Sketchup.active_model.selection
                      #menu.add_separator
                      menu.add_item("Mirror Selection"){Sketchup.active_model.select_tool(MirrorTool.new)}
                    #end#if
                 end#do menu###
              

              change it so the UI.add..., menu.add... and end#do... lines all start with a #, thus

              #UI.add_context_menu_handler do |menu|### v3.5 TIG
                    #if Sketchup.active_model.selection
                      #menu.add_separator
                      #menu.add_item("Mirror Selection"){Sketchup.active_model.select_tool(MirrorTool.new)}
                    #end#if
                 #end#do menu###
              
              • now there'll be no context-menu.
                Having done this you'll only have the main Plugins menu item 'Mirror' to shortcut to.

              Incidentally if you'd like the tool to appear in say the 'Tools' menu and be named 'Mirror' you can simply edit line #370

              UI.menu("Plugins").add_item("Mirror Selection"){Sketchup.active_model.select_tool(MirrorTool.new)}
              

              to read

              UI.menu("Tools").add_item("Mirror"){Sketchup.active_model.select_tool(MirrorTool.new)}
              

              TIG

              1 Reply Last reply Reply Quote 0
              • F Offline
                Fletch
                last edited by

                Thanks a lot TIG.
                I was in a (rather) large file, and perhaps it was just a glitch happening with the machine/RAM/etc.
                Everything seems fine today (with or without toolbar showing)... I do appreciate the info, however, as there are times I wish I could modify these things in some rubies. ๐Ÿค“

                Fletch
                Twilight Render Cross-platform Plugin for SketchUp on PC or Mac

                1 Reply Last reply Reply Quote 0
                • mariochaM Offline
                  mariocha
                  last edited by

                  I confirm that circles get exploded in some cases.
                  Not when they are free standing, but when they are part of a face, like on top of a cube, yes. ๐Ÿ˜ž
                  Pretty annoying.

                  %(#008000)[Mario C.
                  Every rule has exceptions, but some.]

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    Mario

                    I've tested what you say and can't get a circle or arc to 'explode' after mirroring ๐Ÿ˜•
                    Are you using the latest version?
                    Can you supply a skp where you do get this issue, so that I can test it...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      Your gif doesn't auto animate ??
                      A face with edges should copy and mirror OK, loose edges/arc == edges ?? ๐Ÿ˜•

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jorge2011
                        last edited by

                        "Your gif doesn't auto animate ??"
                        you click on the image


                        when the circle mirror with your face, does not exploit the circle
                        When mirror only the circle, the circle is exploited

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          @jorge2011 said:

                          "Your gif doesn't auto animate ??"
                          you click on the image...

                          I know BUT it looks just like any other image so why would I want to click on it at all ๐Ÿ˜’
                          A gif can auto-animate... so it's obvious what it is.
                          [<<<see my avatar ๐Ÿ˜• ]

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            jorge2011
                            last edited by

                            Sr TIG, see this exampler
                            see this example.
                            Mirrors edge face ( copy good)/ edge mirrors only (copy explode edge)


                            Untitled.gif

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              jorge2011
                              last edited by

                              sorry but I do not understand what you say.
                              Posted there again animated giff

                              http://forums.sketchucation.com/download/file.php?mode=view&id=71848

                              1 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                NOW it animates automatically... before it didn't!
                                You 'attached' the first one but the second one was 'placed-in-line as a linked-image' ๐Ÿ˜‰

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • TIGT Offline
                                  TIG Moderator
                                  last edited by

                                  It's the way that Sketchup itself works... ๐Ÿ˜•

                                  Try this manual test.

                                  Make a circle.
                                  Group it - including its face in the selection.
                                  Copy the group.
                                  Edit it, you find that the circle remains a circle.

                                  Now make another circle.
                                  Group it - this time excluding its face from the selection.
                                  Copy the group.
                                  Edit it, you find that the circle is now is pieces.

                                  Because Mirror has to make a group and copy it to do the scaling/mirroring then it will fail to keep the circle-ness of the circle if it has no face[s] selected with it in the group - exactly as occurs when you do it by hand ๐Ÿ˜’

                                  It's a shortcoming in Sketchup not Mirror... ๐Ÿ˜ฎ

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • mariochaM Offline
                                    mariocha
                                    last edited by

                                    @unknownuser said:

                                    Are you using the latest version?
                                    Can you supply a skp where you do get this issue, so that I can test it...

                                    Yep, 3.6, downloaded today.
                                    Skp attached; just a box with circle on top.
                                    Mac related issue ?
                                    update : tested it on my Doze 7 vm, same problem.
                                    update-2 : sorry, indeed mirroring the perimeter does explode it, mirroring the round face works fine. (I was working with hole in steel plates, so mirror before punch)


                                    mirror-explo.skp

                                    %(#008000)[Mario C.
                                    Every rule has exceptions, but some.]

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      paddyclown
                                      last edited by

                                      hi folks,
                                      I have been using mirror.rb v3.6 without problems for a while... until today where i'm using SU8 on a windows 7 machine as opposed to the normal vista i used b4... now mirror does nothing & the following gobbldy gook appears in ruby console:

                                      C;/Program Files (x86)/Google/Google SketchUp 8/Plugins/Mirror.rb;266;in `mirror'
                                      C;/Program Files (x86)/Google/Google SketchUp 8/Plugins/Mirror.rb;178;in `onLButtonDown'
                                      C;/Program Files (x86)/Google/Google SketchUp 8/Plugins/Mirror.rb;266
                                      

                                      anyone have an idea ?
                                      thanks

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        You haven't posted the important part of the error message - it's probably the first line - saying something about 'group' or 'explode' [Mirror groups what it mirrors and then explodes it]...

                                        This is suggestive of an unusual 'script clash'.

                                        There was a similar situation with my 2Dfillet tool yesterday - which turned out to be a clash with SketchyPhysics3. This link http://forums.sketchucation.com/viewtopic.php?p=345427#p345427 has a replacement file [zipped] to go ito the SP3 folder that redoes the ill-advised method changes that SP did to the existing base classes like Group etc, whilst still letting SP work OK. No clashes for ages then two come along at once!

                                        Hopefully this'll fix the error but if you don't use SP3, or the suggestion doesn't fix it, then it might be something else [although almost all clashing scripts have been sorted by their authors over the last year or two or at least 'blacklisted'...].
                                        To find another guilty file you can do the 'halving' method...
                                        Make a 'Disabled' folder and an 'OK' folder and move half of your .rb/.rbs files ['scripts'] from the 'Plugins' folder into 'Disabled' [but remember to leave 'Mirror.rb' in the 'Plugins' folder], restart Sketchup and if the error with Mirror has gone we know that the culprit script is in the 'Disabled' set - move the rest of the 'Plugins' temporarily out into 'OK' [except Mirror.rb] - move half of 'Disabled' back into 'Plugins' and restart/retry - again if it's working alright the culprit is still in 'Disabled' - move the last lot you moved over into 'OK'... keep moving halves back into 'Plugins' until it breaks [moving non-culprits into 'OK' just makes it easier to keep track of what's where]. When it does break we know the 'block' of files we just moved into [or have left in] 'Plugins' - you can move any files from 'Disabled' into 'OK' [we know these are not guilty] and move half of the suspect 'block' to 'Disabled'. Repeat the 'halving' until you have most files in 'OK' but you have a broken Mirror.rb and the Culprit.rb file in 'Plugins'.
                                        Now put Culprit.rb into 'Disabled' and all files in 'OK' back into 'Plugins'.
                                        'Mirror' should work correctly because the file that clashes in now in 'Disabled'.
                                        At this point let me know what the culprit file is and I'll have a look... Note that it might only be a 'loader' and the real culprit might be inside a subfolder - the file will tell us that... You can zip the guilty file and PM it to me it you like...

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          paddyclown
                                          last edited by

                                          TIG

                                          thanks for all that:
                                          I removed SP3 from plugin folder & the mirror3.6 worked fine... I just tried your Classextensions re-write; it didn't fix my conflict, but heh, never mind, I don't really use SP3 but mirror is too useful to miss, so I'm going with that & hope the SP guys will sort their thing out one day...

                                          all the best

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            RichardCherry
                                            last edited by

                                            TIG this tool is a life saver. As someone who is used to AutoCad I thank you ๐Ÿ˜„

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 10
                                            • 11
                                            • 5 / 11
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement