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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      BTW, I'm really happy to see this script finally up and working. Even if it is a little buggy at this point. I know you've put a TON of time into it, so I'm glad you haven't hit any show stopper problems with the API or anything. Good work, keep it up!

      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

        I'd say the bugsplat is a show-stopper... 😞

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

        1 Reply Last reply Reply Quote 0
        • B Offline
          BillW
          last edited by

          Thom

          I have had a component hole cutting tool for a while - it doesnt use observers as the original code is ancient.
          Perhaps you might want to reuse.

          A component placed on a face must have a set of linked edges which define the shape of the cutout which reside on the cutting plane of the component. This means that the geometry of say a window doesn't have to span the component cutting plane inorder to perform cut. Try it in the example file. Select all components and run "Component punch". Notice the circular window which shows the edges of the window outline seperate from the geometry.

          If there is no back face (in the same mesh) parallel to the front face containing the component then the front face is cut only which allows the user to reuse for say running an intersection.

          Punch hole in place of component

          Example file

          Regards

          BillW

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

            Thanks Bill for looking at this. I had a look at your plugin. The thing is that I want to make the holes editable, avoiding having to edit the holes separately. It's that process that takes time when I need to do revisions to model which I want to avoid.

            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

              great plugin, Thom! this is one of the things that should have been a part of SketchUp all along. and now you did it! 😍

              of course its still alpha, but its such an important script. I felt like crying with joy when I first hit the double-cut command and all the component copies cut through the walls...

              after playing a bit I found something interesting: the double-cut component only cuts through the second face of the wall, if it contains an edge in this second plane (example on the right). so if the component goes right through the wall and doesn't provide the edge in the second wall-face's plane, it doesn't work as a double-cut.
              that means that you can only use a component for a wall with exactly the right thickness...
              (did this last paragraph make any sense? quite difficult to describe... πŸ˜• )

              double_cut01.jpg

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

                Try making sure you have edges where it intersects with the wall, then extrude further out once more. It doesn't detect faces intersecting the opposite face, but only edges.

                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

                  Here's an example file. πŸ˜‰


                  0.1.0a

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

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    Gjenio
                    last edited by

                    IΒ΄m not a ruby expert therefore I cannot give you any suggestions, unfortunately.
                    But let me express my congratulation for your effort to develope such a plugin that will become one of the most useful sketchup plugins. Thanx!
                    Go ahead, please!

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Sir
                      last edited by

                      this will indeed be an incredibly useful plugin! when doublecutting, will it make a permenant cut, or will it just make the intersecting faces hidden?

                      because this would then allow you to move the windows about, and as you moved them the wall would hide before them and then heal behind...

                      this will be so useful fo old skool windows where they didnt know what symmetry was πŸ‘

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

                        @thomthom said:

                        Try making sure you have edges where it intersects with the wall, then extrude further out once more.

                        thats what I did with the example on the right hand side. so that means you always have to design Double-Cut-Components (DCCs as opposed to DCs (Dynamic Components) πŸ˜„ ) for a specific wall thickness.

                        now that I come to think of it, this may even be a positive thing - thus you will always see, if a wall is not exactly the right thickness πŸ˜‰

                        1 Reply Last reply Reply Quote 0
                        • 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
                                            • 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