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

    Is it possible...

    Scheduled Pinned Locked Moved SketchyPhysics
    13 Posts 3 Posters 717 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.
    • C Offline
      CPhillips
      last edited by

      In theory it should be possible. But it really doesnt have much to do with SP. You would build it using the Sketchup Ruby API. But I warn you that skinning inst very easy. And doing vertex level operations (skinning) in Sketchup is really slow.

      1 Reply Last reply Reply Quote 0
      • W Offline
        Wacov
        last edited by

        The cloth is effectively a 3x3 grid... so, 18 polys. Think that'll run at a reasonable rate? (And could you direct me to a basic API tutorial? πŸ˜„ )

        http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

        1 Reply Last reply Reply Quote 0
        • C Offline
          CPhillips
          last edited by

          I dont know of a Sketchup Ruby API tutorial. Mostly I just look at examples. Here is the API:

          http://download.sketchup.com/OnlineDoc/gsu6_ruby/Docs/ruby-classes.html

          You probably want to look at Entities, Face and Edge

          Here is how you add a face for example:

          
          Sketchup.active_model.entities.add_face([[0,0,0],[10,0,0],[10,10,0],[0,10,0]])
          
          1 Reply Last reply Reply Quote 0
          • P Offline
            Physicsguy1
            last edited by

            Woah!!! I never knew i could make a face during the simulation. is it possible to make a component out of the faces during the sim?

            1 Reply Last reply Reply Quote 0
            • C Offline
              CPhillips
              last edited by

              
              grp=Sketchup.active_model.entities.add_group
              grp.entities.add_face([[0,0,0],[10,0,0],[10,10,0],[0,10,0]])
              
              

              Here is how you can make a cube.

              
              grp=Sketchup.active_model.entities.add_group
              face=grp.entities.add_face([[0,0,0],[10,0,0],[10,10,0],[0,10,0]])
              face.pushpull(-10)
              
              
              1 Reply Last reply Reply Quote 0
              • P Offline
                Physicsguy1
                last edited by

                The only problem is that the objects created during the simulation are static until the next simulation.

                1 Reply Last reply Reply Quote 0
                • W Offline
                  Wacov
                  last edited by

                  I thought of that... it should be possible to make the geometry at the first frame, then move each point to the desired position every frame afterwards... but, well, I need to find out how πŸ˜„

                  (I don't really see the point of making a group, when you can just use emitters?)

                  http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

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

                    Wacov, I was able to create an endpoint editor. I was also wondering if there was a way to easily delete the extra faces created. Anybody have any suggestions?


                    node editing.skp

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      CPhillips
                      last edited by

                      face=Sketchup.active_model.entities.add_face([[slider('X')*10,slider('Y')*10,0],[10,0,0],[10,10,0]])
                      face.back_material=[255,45,90]
                      face.erase!
                      

                      Maybe instead only create the face once and then move the points rather than recreating the face.

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

                        I'm not sure how I would do that right now. Right now all I can do is set the desired position of the nodes and then press space to create the face.

                        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