sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [prototype] Doublecut (0.1.0a) - Need help debugging

    Scheduled Pinned Locked Moved Developers' Forum
    39 Posts 12 Posters 26.0k Views 12 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.
    • thomthomT Offline
      thomthom
      last edited by

      Mind you, if you make a DCC for a wall 200mm thick, and then try to place it on a wall 400mm thick; it won't cut initially. But if you scale the instance 2x in the components Z-axis so that it intersects it will make the cut.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        I changed the script so all observers events where I added/removed/edited anything to the model where qued up in an command array. That array where then read by the onTransactionCommit. At first it appeared to work, but then I got the bugsplats again. (I might not have done the actions to trigger it initially.)

        I've been trying to find the cause of the bugsplat, but all I've found so far is that it happens if I add/remove DDC after they have been made into DCC components. If I just move, rotate or scale them there is no bugsplat.

        What I find very odd is that the bugsplat occurs when I open the second scene.

        
        Make DCC
        Add/Remove DCC (this will trigger the splat later)
        File->New (New model opens, no bug splat.)
        File->New (Blugsplat! Why so late?)
        
        

        I'm wondering if it might be due to some entity references, but I reset all arrays/hashes containing references when a new model is opened.

        The only thing I haven't tried is keep track of all observers and removing them. But I'm not sure if I'm able to remove them all...


        Version 0.2.0a

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • plot-parisP Offline
          plot-paris
          last edited by

          hi Thom,

          I had a lot of problems with SketchUp the past week; lots of 'bug splats' when using the drape tool. and I got an error message every time I closed the program (and in fact, when I opened the task manager, I discovered that SU hadn't closed at all, but was still running in the background. so after opening and closing several models I had five SU versions running in the background at full speed, bringing down my computer entirely).

          after checking, which plugin was responsible for these errors, I found that it is the DCC-plugin. no idea, why that is. but I thought you might be interested in that. πŸ˜‰

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            You might check the first post again Jakob, I think Thom's aware of the splatters πŸ˜„ If I remember correctly this plugin release was more of a developer preview than a full featured stable release.

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Yes, it's written in large bold red letters at the very top of the original thread... πŸ˜’
              And in the comment to the download link.

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • plot-parisP Offline
                plot-paris
                last edited by

                I know. but I just thought it was interesting to know that the plugin disturbs all the workings of SketchUp - even when not being used. so the crashes appear when you use completely different tools... (that does make sense of course, because the plugin has to monitor the model at all times).

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  Yea - I've had to disable it. Only have it enabled when I try to debug it.
                  This plugin has really been bugging me. I just wish there was any data to get from SU when it crashed... 😞

                  I have thought of an alternative method to do this. One that doesn't keep direct references to entities. Hopefully that'll sort it out. But it require a heavy re-write. So it's set aside for later when I have better time

                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

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

                    I had a look earlier this week, but I was getting an error indicating you were calling .entities on an Instance. Will look again today.

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @jim said:

                      I had a look earlier this week, but I was getting an error indicating you were calling .entities on an Instance. Will look again today.

                      hm.. that's an error I haven't gotten... care to paste it here next time you get it?

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

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

                        This happened after I downloaded your hole example, turned-off double cutting, then tried to turn it back on.

                        
                        Error; #<NoMethodError; undefined method `entities' for #<Sketchup;;ComponentInstance;0x6113c84>>
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;356;in `intersect_edges'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;349;in `each'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;349;in `intersect_edges'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;174;in `place_cutout'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;149;in `make_cutouts'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;139;in `each'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;139;in `make_cutouts'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;138;in `each'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;138;in `make_cutouts'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;1068
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;356;in `call'
                        C;/Program Files/Google/Google SketchUp 7/Plugins/other/tt_double_cut.rb;356
                        
                        

                        Hi

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          Was that with the original 0.1.0 or with the 0.2.0 which I posted later in the thread?

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

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

                            0.2.0a

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • thomthomT Offline
                              thomthom
                              last edited by

                              Strange error. Though I never tried that much to toggle it on/off.

                              I get a different error though (maybe I changed it after 0.2.0)

                              Error; #<NoMethodError; undefined method `name=' for nil;NilClass>
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;201;in `place_cutout'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;149;in `make_cutouts'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;139;in `each'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;139;in `make_cutouts'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;138;in `each'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;138;in `make_cutouts'
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;1068
                              C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/tt_double_cut.rb;1068;in `call'
                              

                              When I got this Europan competition finished and I've sorted out the last webdialog for Street Generator I'll give this plugin another go witha different approach.

                              Thomas Thomassen β€” SketchUp Monkey & Coding addict
                              List of my plugins and link to the CookieWare fund

                              1 Reply Last reply Reply Quote 0
                              • utilerU Offline
                                utiler
                                last edited by

                                Hey Thomas, Just downloaded the Drill plugin and couldn't help but notice how easily it cuts through the opposite face. Maybe there is something in it that may help solve this one...
                                http://forums.sketchucation.com/viewtopic.php?f=180&t=19556&p=165720#p165720

                                Keep up the great work, mate. Blokes like you are taking SU to new heights!!!!

                                purpose/expression/purpose/....

                                1 Reply Last reply Reply Quote 0
                                • thomthomT Offline
                                  thomthom
                                  last edited by

                                  Thanks.
                                  I'm afraid that the problem it's making the holes. It's keeping track of them. πŸ˜•

                                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                  List of my plugins and link to the CookieWare fund

                                  1 Reply Last reply Reply Quote 0
                                  • I Offline
                                    icepam
                                    last edited by

                                    Thom,

                                    maybe this is a very old project you gave up on, but i have an idea for you - or anyone else willing to develop a double cut plugin. it's a technique i use manually and it relies on pure and tested core sketchup tools, so no need to really keep track of the holes. (unless i missed anything,) your plugin creates an actual hole and removes part of the back face.

                                    what i suggest, is to have the plugin automatically create a copy of the front component but mirrored -1 along its blue axis and stuck onto the back wall. This would cut the whole in any thickness of wall, and as long as the "depth" of the component is half or more the thickness of the wall, the model will be "closed".

                                    obviously it means the component trim will look similar on both sides of the wall, but you may be able to circumvent this if you create a component copy with everything above the reference plane of the component removed.

                                    the idea in the end is to create double components, not to try to cookie cut the wall and then try to keep up with it, which is what you say is causing the bugsplats.

                                    if i scale/edit/etc the original component, its back mirrored version will follow and the cut will follow. if i need to move the actual component all i have to do is select both and move them together.

                                    if i got it wrong, please forgive my naivetΓ©.

                                    1 Reply Last reply Reply Quote 0
                                    • thomthomT Offline
                                      thomthom
                                      last edited by

                                      That is exactly what this plugin tried to do. In fact, it worked very well to create the appropriate cut-out component on the opposite face.
                                      The problem was keeping everything in sync when the user moved any of them around.

                                      Maybe I should just release the part that creates the opposite component. Relax on the attempt of catching all updates and leave a Manual Refresh command. Even that would make things easier.

                                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                      List of my plugins and link to the CookieWare fund

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

                                        My 'HolePunch' script [do a search in plugins] does what you seek ?
                                        It punches cutting components through walls. The inner reveal and window [say] are then inexorably linked and move together unless you 'unlink' or 'undo-punch'. Currently it's one shortcoming is that if you copy a punched component on an elevation etc it does not cut/punch the face - the work-around is to un-punch it and the copy/matrix, then re-punch all of the copies again...

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • thomthomT Offline
                                          thomthom
                                          last edited by

                                          ? It does not modify the geometry? It uses cutout components? How did you link it?

                                          I had the whole automatic back-side-hole creating working when copying and such working, but the observers would occasionally make SU bugsplat. grumble

                                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                          List of my plugins and link to the CookieWare fund

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

                                            @thomthom said:

                                            ? It does not modify the geometry? It uses cutout components? How did you link it?
                                            I had the whole automatic back-side-hole creating working when copying and such working, but the observers would occasionally make SU bugsplat. grumble

                                            It adds geometry to form the reveals and linking attribute ids to the cutting instance, A selection-observer watches for any instances with common ids and adds those to the selection so you always selected everything together even if you pick only one part. Therefore they move, erase etc together. The complication arises when you copy as the ids get duplicated - I have got as far as undoing the punch for copied instances and re-gluing them to the face they are on BUT the re-punching without a Bugsplat is not [yet] there. I think I need to suspended the selection-observer for the duration ?

                                            EDIT: I thought of that as I was typing and it worked!!! I'll post an update asap... πŸ˜„

                                            TIG

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement