sketchucation logo sketchucation
    • Login
    1. Home
    2. winagain
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    W
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 1

    winagain

    @winagain

    10
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    winagain Unfollow Follow
    registered-users

    Latest posts made by winagain

    • RE: Followme - hang

      Hi , Dan

      unfortunately , i've removed all the ".mm" in your code , if the diamter of the circle is 50 mm ,
      this will hang , but it's fine if the diameter is 20mm , this is the reason why i said it seem to be related to the diameter of the circle instead of decimal place or array type.

      posted in Developers' Forum
      W
      winagain
    • RE: Followme - hang

      Hi , TIG & Dan

      thank you for you reply , to confirm this is not the problem of decimal place , i've removed all the decimal place from the array, but it still hang. I found the major problem is the diameter of cicle , if i change it to 50mm it will hang. (but if you run "followme" manually , it won't hang even you set the diameter to 100mm)

      #======================================================
      def draw_all_object_0001
      model = Sketchup.active_model
      entities = model.active_entities
      pts = []
      pts[0] = [393 , 512 , 0]
      pts[1] = [383 , 490 , 0]
      pts[2] = [385 , 482 , 0]
      pts[3] = [323 , 369 , 0]
      pts[4] = [331 , 365 , 0]
      pts[5] = [322 , 350 , 0]
      pts[6] = [235 , 398 , 0]
      pts[7] = [304 , 522 , 0]
      pts[8] = [340 , 502 , 0]
      pts[9] = [356 , 531 , 0]

      p2vector = [0,1,0]

      ptvertex = pts[0]
      vectorX = Geom::Vector3d.new p2vector
      vectorX2 = vectorX.normalize!
      edgesX = entities.add_circle ptvertex, vectorX2, 20.mm , 8 # change to 50.mm will hang
      faceX = entities.add_face edgesX

      curve = entities.add_curve pts
      begin
      status = faceX.followme curve #sketchup hang here
      rescue
      UI.messagebox $!.message
      end
      end

      UI.menu("PlugIns").add_item("Draw -- myshape") {
      draw_all_object_0001
      view = Sketchup.active_model.active_view
      new_view = view.zoom_extents
      }

      #=========================================================

      posted in Developers' Forum
      W
      winagain
    • RE: Followme - hang

      Hi , Dan

      thank you very much , your script is work , but unfortunately , all the value i'm using is "inch" instead of "mm"

      once i change your script to "inch" , it still hangs , but it's fine if i run "followme" manually.

      posted in Developers' Forum
      W
      winagain
    • Followme - hang

      Hi , Everyone ,

      everytime i run the following script , my computer was hang (same in a few computers) , if i remove pts[5] to pts[9] , it can run properly , i found the problems is "followme" causing the issue.

      I'm thinking this is the problem of Sketchup , is there anyone have the same problem ?

      =================
      def draw_all_object_0001
      model = Sketchup.active_model
      entities = model.active_entities
      pts = []
      pts[0] = [3932.75984252 , 5122.173228346 , 0]
      pts[1] = [3833.940944882 , 4902.881889764 , 0]
      pts[2] = [3857.169291339 , 4822.566929134 , 0]
      pts[3] = [3234.334645669 , 3693.433070866 , 0]
      pts[4] = [3310.318897638 , 3651.307086614 , 0]
      pts[5] = [3227.641732283 , 3501.307086614 , 0]
      pts[6] = [2355.594488189 , 3982.409448819 , 0]
      pts[7] = [3048.114173228 , 5221.385826772 , 0]
      pts[8] = [3405.988188976 , 5023.748031496 , 0]
      pts[9] = [3566.618110236 , 5314.692913386 , 0]

      	p2vector = [0,1,0]
      	
      	ptvertex = pts[0]
      	vectorX = Geom::Vector3d.new p2vector
      	vectorX2 = vectorX.normalize!				
      	edgesX = entities.add_circle ptvertex, vectorX2, 19.68503937 
      	faceX = entities.add_face edgesX
      								
      					
      	curve = entities.add_curve pts
      	begin
      	   status = faceX.followme curve  #sketchup hang here 
      	 rescue
      	   UI.messagebox $!.message
      	 end								
      end	
      
      UI.menu("PlugIns").add_item("Draw -- myshape") {
      	draw_all_object_0001
      	 view = Sketchup.active_model.active_view
      	 new_view = view.zoom_extents    	    	
      }      	
      

      ========================

      posted in Developers' Forum
      W
      winagain