sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Followme on multiple line

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 348 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.
    • N Offline
      nics
      last edited by

      hi guys, here's the followme example

      point1 = Geom;;Point3d.new (0,0,0) 
       point2 = Geom;;Point3d.new (0,0,100) 
       depth = 100 
       width = 100 
       model = Sketchup.active_model 
       entities = model.active_entities 
       pts = [] 
       pts[0] = [0, 0, 0] 
       pts[1] = [width, 0, 0] 
       pts[2] = [width, depth, 0] 
       pts[3] = [0, depth, 0] 
       
       # Add the face to the entities in the model 
       face = entities.add_face pts 
       line = entities.add_line point1, point2 
       begin 
         status = face.followme line 
       rescue 
         UI.messagebox $!.message 
       end
      

      but I wanna continu the followme with another line connected to the first .. how do I follow on the lines (for example, one going up and then another one going right ?

      something like the attached picture

      I did something like this but sketchup told me that the face was deleted .. normal πŸ˜„

      	   endPoint = startingPoint.offset [0, 0, porte.espaceBas + porte.hauteur + porte.espaceHaut+'1/4'.to_l]
      	   lineToFollow = entities.add_line startingPoint, endPoint	   
                 base.followme lineToFollow
      	   endPoint2 = endPoint.offset ["1/2".to_l + porte.espaceCote*2 + porte.largeur, 0, 0]
      	   lineToFollow = entities.add_line endPoint, endPoint2
                 base.followme lineToFollow            
      
      

      thanks !


      result.jpg

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

        http://code.google.com/apis/sketchup/docs/ourdoc/face.html#followme

        @unknownuser said:

        The followme method is used creating a shape by making the face follow along an array of edges.

        While the Arguments just says "An Edge object to follow." the description seem to indicate you can feed the method an array of edges.

        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

          As the 'face' is lost after any FollowMe then make an array of all of the edges to follow and do it once using them πŸ’­

          TIG

          1 Reply Last reply Reply Quote 0
          • N Offline
            nics
            last edited by

            haha yeah I was looking at the argument !

            Arguments:
            edge1 An Edge object to follow.

            I like java for having api doc clearer πŸ˜„ Ill read the description too in the future.

            thanks !

            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