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

    Rate of Adding Faces

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 741 Views 3 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.
    • J Offline
      Jim
      last edited by

      Nothing surprising here, I would guess. It shows as the amount of geometry increases, the slower new geometry is added.

      290.png

      The method.

      I used a .stl file of 3,112 triangles. The triangles were first read into an Array of Arrays:

      [ [v1, v2, v3], [v1, v2, v3], ... ]

      I used a repeating timer to add the faces 50 at a time (partition size) to a new Group.

      ` UI.start_timer(0.001, true) do
      entities.add_faces(verts[i])

      increment counter variables, etc

      end`

      and ccalculated the time and rate for each partition. I did not use start_operation/commit_operation transactions.

      This graph shows the time increase for each partition of 50 faces added. You can see the first 50 took almost no time, but by the end each partition was taking more and more time. πŸ‘Ž

      291.png

      I am prototyping a way to prevent SketchUp from entering the "Not Responding" state when adding significant amounts of geometry. Looks good so far. I am able to keep SketchUp responsive, but at the cost of even longer import times. Although this makes possible the ability to watch the progress of adding geometry, as well as being able to abort the operation.

      Hi

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

        This is how it works. I set the response window 0.07 seconds, so there is almost no lag. Probably a setting of 5 seconds would provide frequent enough updates to allow an abort, and still be nearly as fast as possible.

        You can see it locks up near the end. Most likely because I don't have the computer memory (512 MB!)

        aa.gif

        Hi

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

          Yea - I noticed this as well. I found building a mesh to be fastest. http://forums.sketchucation.com/viewtopic.php?f=180&t=25305&p=217249&hilit=mesh#p217180

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

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

            That is very interesting Jim. It is building the object while you're off doing other stuff? What heppeneds if you start adding lines and faces to that statue while it is being built?

            Chris

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

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

              You can do other stuff while it's working. You can open the Group and make changes as it's working, but no guarantees if you do it.

              I found using fill_from_mesh is very, very fast compared to add_faces, so this might be a purely academic pursuit.

              I wonder if a plugin such as TIG's center of Gravity would benefit - it "white-screens" my SketchUp almost every time I try it. The calc would take longer, but would allow me to keep modeling while the CofG is calculated - that would be an acceptable trade-off for me.

              Hi

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

                Could plugins lock the component they are adding faces to so that the user can not edit them and mess things up as easily?

                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

                  @jim said:

                  This is how it works. I set the response window 0.07 seconds, so there is almost no lag. Probably a setting of 5 seconds would provide frequent enough updates to allow an abort, and still be nearly as fast as possible.

                  You're using a timer of some sort?

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

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

                  Advertisement