sketchucation logo sketchucation
    • Login
    1. Home
    2. penpendrum
    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!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 14
    • Groups 1

    penpendrum

    @penpendrum

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

    penpendrum Unfollow Follow
    registered-users

    Latest posts made by penpendrum

    • Tool Activation prevention

      I have a plugin that i was trying to make and I do not want it to start when I have not selected a group. I thought this solution would work but it does not.
      below is some part of my code . any tip would be greatly appreciated.

      class Testing
      
       
        def initialize
          @ip = nil
          @ip1 = nil
          @ip2 = nil
          @xdown = 0
          @ydown = 0
          @state = 0
        end
        
        def activate
           # I was expecting it not to activate when nothing is selected at first
           sel = Sketchup.active_model.selection
           break if sel.empty?
           
           # some codes
        end
      
        def onMouseMove(flags, x, y, view)
          # some codes
        end
      
      end
      
      posted in Plugins
      P
      penpendrum
    • Detecting/selecting a temporary Drawing

      I want to make a sketchup tool.. I wanted it to select a temporary drawing like it will change color when I select or hover my mouse on it ..
      can anyone give me a head start on how to do it

      I have done a lot of google search but i just cant seem to pin point what kind of term fits it

      what i need is :
      1.) to detect and change the color of the temporary drawing square in the "def draw" everytime i hover and select it
      2.) to detect and change the color of the temporary corner of the square in the "def draw " everytime i hover and select it

      please examine my code below

      class MyTool

      def initialize
        
      end
      
      
      def activate
      
          @mouse_ip = Sketchup::InputPoint.new
          @picked_first_ip = Sketchup::InputPoint.new
      
       
          
      end
      
      def draw(view)
        @mouse_ip.draw(view) if @mouse_ip.display?
        
        
        # Draw a square.
      

      points = [
      Geom::Point3d.new(0, 0, 0),
      Geom::Point3d.new(9, 0, 0),
      Geom::Point3d.new(9, 9, 0),
      Geom::Point3d.new(0, 9, 0)
      ]

      Fill

      view.drawing_color = Sketchup::Color.new(255, 128, 128)
      view.draw(GL_QUADS, points)

      Outline

      view.line_stipple = '' # Solid line
      view.drawing_color = Sketchup::Color.new(64, 0, 0)
      view.draw(GL_LINE_LOOP, points)

      end
      
      def onLButtonDown(flags,x,y,view)
        puts "yout tool has clicked"
         
      end
      
      def onLButtonUp(flags,x,y,view)
        puts "yout tool has clicked"
        puts  
          
      end
      
      def onMouseMove(flags, x, y, view)
      
          if picked_first_point?
            
            @mouse_ip.pick(view, x, y, @picked_first_ip)
            puts "point A"
          else
           
            
          @mouse_ip.pick(view, x, y)
            
          end
         
          if @mouse_ip.valid?
          view.tooltip = @mouse_ip.tooltip 
          
          
          end
          
          starting_point = Geom::Point3d.new(9, 0, 0)
          ip2 = Sketchup::InputPoint.new(starting_point)
         view.inputPoint(x,y,ip2)
          
          view.invalidate
      end
      
      def picked_first_point?
          @picked_first_ip.valid?
        end
      
      def getBoundingBox(corner)
        model= Sketchup.active_model
        selection = model.selection
        
        return selection[0].bounds.corner(corner)
      end
      
      def resume(view)
        view.refresh
      end
      

      end

      my_tool = MyTool.new

      Sketchup.active_model.select_tool(my_tool)

      posted in Developers' Forum
      P
      penpendrum
    • RE: Small Green Box in scale tool

      I found the solution. .

      the file won't give a readable code . . when downloaded via Google chrome . .it should be downloaded through extension warehouse . .

      Going back to the small green cube in the scale tool. .
      ( i already know how to make colors for the cube )

      can anyone help me how make sketchup recognize the temporary drawing green cube when I hover the mouse over it?

      posted in Developers' Forum
      P
      penpendrum
    • RE: Small Green Box in scale tool

      hello slbaumgartner

      it is an RBZ file. how can I unzip it ?im running windows 64x . .

      posted in Developers' Forum
      P
      penpendrum
    • RE: Small Green Box in scale tool

      Thankyou for your help..

      I tried to open in notepad the Bezier Curve Tool ruby script..

      this is what happens . ..

      PK   ;p—B*¡9Ü' ø su_bezier.rb­U]Ú:}ϯÁ/4ûÑÕUµÒVJ!۵Ć( ýxZ™dÖ%v®í@é¯ïØaùh+Ý{¥F’Ì™ãã™ñaÕîµX­-Ü^ß¼C¡E³Ü $|+VÜ
      %a&a±
      ‚!kaÀ¨Úî¸F ûV«­¨°n€KÀo¼i)[ÕÐ!W×Y·ÜƒuÍK$« ÿm¹^´¡cMQ7·…:ƒc(IÖU‰š~¹¬ Æj±ì,鹊Zi .÷ÐvºU=~'ìZujôBר‘d¬4'!Õø$Ü®¹õ2ùRmºòX©¬()жÈ5í øfã×]<±òùcñ9Êb û4›bÓx ƒ(§çDÉ>³âi¾(èþ+Ä_Ò,Îs˜g”ΞÓ#0egQR°8K&³Å”%ÇǼ{fET°yBÝyŠ_Óˆà”óGx޳É=FØŒ_ýڏ¬HÜzó "H£¬“Å,Ê ]dé<ÃøæO^$*á ÂầÏü.PäÓ[„B© ܄ׄ›¢)µhý„9\D½§ @©‘S—‰¥K¤záeÌbsžj¾{óþœßj¢¨Á߬G;T\ {!‚0 ÃWx¦1Ç
      –î U4§Æmãür›r˵í!nÀÝÌ”Ÿѷ!IJúOзDŒ¥¢‰¥/«©>-¤B…Ö
      ‰ÆSX.W(Ë=ôûÙá2NåoÖ¹ !qu¡o¸±ÿkµß¯ä@(+×Kׯ³µÞ]Ýþuu{}}çɾ½ˆ¹øÓShü§ä#ã}¥kC½ÞÒ¾Q:1þ}@¾Ò‘Kåðý}îm˼úq ÒÙâ#Kà njwà'ýdú¿R†ÁÒ£_\qŽœñ1.q£Ã ºÍÆ$³{é³®ú/ëÄVg‡ãá˜mzsíCPkÕœ|´TÍõé³atÒ‘»ˆú#F¾ù ƒW†ÁEü聄ø·?†+M†+2hyQïÂÇšgF³V;ôHŽêЩƚÜY’Õ¶\â& òc¬/'Æ“Ê1XÝaÐ Â.[wñî×>ÿ PK
      ïc—B
      su_bezier/PK   Jp—Bn}l; 6  su_bezier/bezier.rb½[{oIÿŸOсÓ-dñÄguò­³Æ6Iü’Á›[Ef˜ó03;c¼Éw¿ª~NÏãMtÖn ý¨®ª®þÕ£Û-rF›Ø[,SÒßïtÉ$öV3Ÿ’+ûÁ[Ø©äÂ[y)u™,½„$á<]Û1%ð9ŠÃÏ¥.±b„>Ú«f‡s’%^° é’’Ûl¶!^Òxn;¨¤!ßÓÔYÞER½¡ñÊK\ º²„v‰luÉ*t½9ü¶—¸^’ÆÞ,K)Ís1cDìC¢,ŽÂ„²ñk/]†YJæ”1º¤16±
      Œ¸]Íxº´SƦ= ;Gi$SρŽ(¢v Û÷±Û£ ã{òq4&ãë÷“OƒÛ!Ï7·×¿Î‡ç¤9Ã÷&\“O£ÉÇë» |þƒ ÿss;Éõ-L]Þ\Œ0̾\MFÃq—Œ®Î.îÎGWºjÞÅèr4LF×W°;‡rÐÉõ{r9¼=û_§£‹Ñä¶öûÑä ×{}Käfp;Ý] nÉÍÝíÍõxh5Z{?ò˜º²W”ˆŸ#øÿ”>y4&gYü@É$ }Ò³öaÜ9MœØ‹˜…á¸ì=t‚81µa—ÅD'‚¾[ä’¥t%(ŸÇözï]ž~£ÎBØàÇ”ÆQC×K &Ì]b/hŽÇ1õ©“’C…§ Š‘ÿÁ!=‹ŒS;Nù4p´G,Žî[d¸; = ÂÔ ÁbáŸ4°iHJ\šâÑhÂH¤v° ³!Üb ÄÄO‚\V¬sh‘+Ô (Ø·“ôE«U¯„ƒhàâ^â~åÖú×›þ/oúûû‡xH6‘ч&𣭮Ó?3°à§„áJYñì'<¢{“V4H9žÁ†¶Õh Îd€Zc1ùèhÌ,9:â‘ÒðÁö3”Ó6fã^Ø$²c0{PŸÅ@Rì6âŽKç Q— €vÛdÀKs9S‘"1n@Bæq¸"û¸o=‰ÀðßÌN€
      "&nu–÷gFa9<U3è¸jž

      œãɺ‰m Ìöɇ @¯KÓ%ŠGÒDæ>ÐØö]òÞŽ½À&à|ü²ßh û$¡þÜ¢ ~;J“.I;n¦K1ë1V˧Á"]’=àû¼¹ìþU´àOLÓ,Hàù¬ m³ÒPd )k _‘ò&ö5˜:˰}êa#çà‘/þyÿ‹õH^ ֺѭÝú¤[Ÿt+_ ˆ‡úêY–ÅÙV, .ð×ëTµÌè/¯Û|öž÷s¯óÆÓDAÖ£U7ŠÑ~$?ø×È¢ât4R¦öƲ) AÛOƐ§ÜT¶R[Œ‰Ä†r®aU¥¿Mõ€RåSõ€'¾Æ®ŽŽnЮ\+ ëöc—€êp­3¤EÀÊ—¡KвŒ¦Ð’Ÿ­ [Íà4À¡á…ywaJ8T´¢{L[-ïãv tàwGï;[š@œÏ_¸I ‹#oÄh.N‹ñ¨x гÇqݰ£}ËÓT]6ÃÕ6$W‡‚Îò+9¡Á¶w“8‚åel¥ÕÀº”º@1çÀúÐ ÑÏB¬x SÖ.ØH((*Š5ʲ]“±˜÷™†  ÃÚfÞó6+u_µQÀbn£Z2$0õMÝãI²aÙ®;å¢Jòçxs²š9MDYeãÇÇCçÌp˜Æ Çï›0[aBa\ðF|odÞ’m¤€¶ï=ѶBÞ®¤ՐC/oÞV ¤£,ïnd­h‚!Ð,|$ÍK ¼ÊV°Á·ôšj¬&-ÄOò„ßAÖ°…²ýX Ü߯"Ýß7¬œÜõùõùDI!<x%ÖgöÌêþ7Kx¸®aŒ{‚™ƒ‹šT cˆ|{ÃðBéZƒ‹éA—T² ÃßÀî€Å鬄8ÍØ¡7Ü•˜&”ŸéINà ¤(MG0|Š}Y2eajóÌ÷œ{f‰Ž/›b_!Âå¾ÃO¨^”? /µ…¹ ÁT(‹0L8[‰²TâKpÖ”ÜS Ý ܃ÒÄÔ/êá¾ øI]x«†öåPZÛªqŠdeû|d+‚XEðP ¶D°;ÕDß"Qp,3
      6Êi«•sœÛ»^ }šÓßaÌÁcwóö¹1L2&…«(Œíx“ŒŸÐà‚ÂîNbhOX˜ÈEž[ƒ¶6ü-¶}ÎNT³KƧÓßÏN§ƒÓáÅ3“,¨9¿.î†Úö]*­¿ýàÑ5Çüdy¸OÏÅcá'?;ù}”a§Ø²Ü×óë¡ùõ­øªXƒËÔx‚£™ûö\o4C‹À ö}½¤Àî€Ú ͽ¬c!msbM+BP@zœ¶êcà ýLÔßÈ?ÿÉ6ìÕ1R#±”ÛÂjÆ+üht¦úäaüö
      üŠÓ¼Ã]¶úNl÷Ël÷kØFŒýÜÃx‰
      ’–ûrÑú Z@a’Ã

      Eß/êAYÔƒ]D=øQ¥›m•”‹{lˆ+çn¶¿“°‡ea· +Ý“B~‡Ð–¥Èä
      â…KÜË%¨ïÈÁwŸ¼·eQßn•!ƒ’ôíß“Tþfã0¶Lv#“ò¡âY#§§Úmóˆè˜Ü\Ü}]ñ|±Ú•ÁY Î
      VV|{¾/R®
      ØÔsAF£žø|­ ²‚Y;¤àf‡²;ÕTÜÏפ©í,Yr—ª
      p˜ ä°ÒË+¸²ºÂ·ÙLµ0Q«i©ëØUs,tNzÕfr3k:ñCº‰Ð¯‰ô¦ù’© Uøt’Oó‡ÎØÚœ«Í¹Ÿ‹Ó,MÃà<\uHÆÐw‰H=Ö¡8îi®dÜ– p ¡ÇеªMqšŸ°‹ýd ŠfCL¦(‹£"ž¯/ 5 TTÁËW$VcÛ+/½EWªÝiù\í‹U}žv
      •w3÷TÅó=“‰“B½HmZéˆi·Z滿•oµvÿåâð½í7Mú–ÂGƒ$z¹_õç
      nÕ(ƵƳ/u@·›tŠìß•²õ§õ­Y •¹tfõÙÙÉšíadéÂÙŠ'ÀIÙ1Ÿ<BÂǰ3À µ<–€³¥Ò_lÄA<º÷Éç×:eV#µVǏ×î;5µ#ÓxšÏÚg6žWyul^R0H?|L©„àÙ æ%ÁÓ0 \ˆ'OÃG•NäØ<>6Äe€ƒym9j6ÐJßl‰üÿ·²ÏfX(ª6He/yýÈ ±å Ù,—–€™ˆ„D˜Àx®¥“ŠA¥ôrg¦Y³¦¯ATÒ8£f·……“u!57õÜ3ô̪HðÛÇr•²X^þ¶ú³#ƒfâ„~OqÚ ´1&æÁbÇÌ$ùp1½]
      §ãÉíè†;킉ª“4f“yÆ·)«±XgH6g¾íÜ7KUXûˆJ$~z»p¯Š•<©ÔÂß,r–ÖÒµ
      1äuAmåX¹b‘º
      q©}É—xž÷•ýr¹uÓ:å u^·+Ó•šiÆ, Hk¾€|ϲöò”kýîYn–ëW R£°>SØáK¦3³!·ª@?L¸NeÄY $ LøEM¹ ý¬’S¼¤¬+’ã f±P®ª£U…ØBI•·ÿ«æê>Q:—¼
      Yâ [¸^Ú÷ ŒYLÕãþœ¯EjóF†“§\ß'…LKvNMœÂTí”ü²qA#(L™Ö$Ÿú²µ|ÔWœ Iˆ(bó¥­Å¶Æäçuž(~çL3"™Wø@c|¯#$‘ß´8f?{e;dì>{ò×ׇ¯äAEßøus¦'n½w) ~g!³X‹„ 4[å)ÔÝÎ5e“vÝ.挡ïN ³Ï6 ZB#c‘Q[R?+W)œq¢%$<—Žž¸#W#;f§;~5BA.BöÞ‚ß>ðQ,r®¢,G (&4I TD0òPÀOËèÆV¬"äůF)ˆq #ö4»…Ë|L>3x÷4Ò{_Ì, ÷ÏOE|l ~§Â²®dª˜å¶ŠÓ1J+EÒÂK ®>ãäo¡r8)ä—íqr5fÊ¡ëzeš×K«âůárm㍪QÇ…}V¦Ë/™Kg GÙô½²–Y¼‹êÏàø2tÔQw•O"ÝE®¼ãdÈl_’Á›áÊo”UcÑ&úÌQ w€ƒ l©½È=ƒ´]öÀ o‡ÁâU³º÷Š|ƒ£Ô¼(=ÛkÊÔ¦¤œcµpS§JMB¾-›þ20¦®®&jåž¼¬¢·íÉÁK.‘ªb>›€¹^Pç>˜ýiRÔ¡Œ?Ä‘ f¡«˜4b–ZÞÛç…àëÑ5Èÿî¸úcŒ€]µ§¨U8ºü\I䘎#ݶèuØ4ˆª{Σ(7b…ó9Øá+$X1bkN9QZ ¨ ¨>É?Ì©» @µaý™Ì«|½A›™$¸!Ç„é‘$Äw¬º“Ãëjkn×áx>–!Êоnîe¼?±C^JWíæyÐf‡üµS¤úíï–ºŠ•¤š ×Öù¶Âséài >ß9Ó¨(wLµÈa]ÒÛ‡ÿý 1›â‘•«×›v*ËÔ³Ï-´âyœ™Å–²×b¦ø£_ ·Èû,àø…ž˜&,þPwfi±Î'ÛSÛ Ð“—2F|¶Ì 3É%;œ Ï3ÁV1ÚaG Ã,õί"›L’º§}– 5úq®Dê$±¼„“úM½•Ã{‰ÅÊS5Óp”uWzáü·\"4„öFñ:.wW¦T×W‘¶‹wsãzŽS'Yxak÷gè_?z†Q·¤uº–Ùp1q/¦Ã îó¸c°Î%XØ(<à4- ~/EyïùEÍÅôŽ\xàâU ")q–!þ©Œñ¬qfTlßÚ¨œðæ©Ú.u9#ˆÃ Å—ïƒ1A°n"6ùê¶rÿ®Å%ßdÌÈ9uÄŸ†0Ž—vàúüÂÓ‡¹ 3VjžE±8{Zʧ3æ¦rº’¯ØðÕˆf*,¤Ñ(ÿ£ä®îæB–£a%¨¶Qò­ö‰€©ô
      |ö/ þPK  5³žB™C‹UQ X  su_bezier/extension_info.txtÁ;€ ÐÝ»4¡-•2°áÀ¢‰&®†O{ÿ#ø^«E‡h¦° dbˆä
      y& ÙiŒŽ$¶½Çý´ëüZ-D’"¯n;BDTè.=©%7ã)¼ýPK    ;p—B*¡9Ü' ø $  ! su_bezier.rb
        ÐÔŸf]@Îи·•P@Îи·•P@ÎPK
      ïc—B
      $  Q su_bezier/
        ÀSÅP@ÎÀSÅP@Ο>ÅP@ÎPK    Jp—Bn}l; *6  $  ! y su_bezier/bezier.rb   Oþu]@Î@¼¯‰P@Î@¼¯‰P@ÎPK   5³žB™C‹UQ X  å su_bezier/extension_info.txtPK   i p

      is this encrypted??

      how can I read this

      posted in Developers' Forum
      P
      penpendrum
    • RE: Small Green Box in scale tool

      I sorry if posted in a wrong forum
      can we just continue?
      i tried your advice but the codes written by the sketchup team. the thing is, The ruby scripts are incrypted written by sketchup team. I found this Eneroth scale tool which its ruby script shoulb be helpfull but its just incrypted .

      posted in Developers' Forum
      P
      penpendrum
    • Small Green Box in scale tool

      Hello everyone.

      I'm new in Sketchup Ruby . . Programming
      
      can anyone give me a head start on how to make those green boxes appear temporarily when I click the scale to to an entity?( in ruby script )
      
      and also I noticed when I hover the mouse on the green boxes , it changes its color . . .
      
      your tip would be of big help . .
      
      posted in Developers' Forum
      P
      penpendrum
    • Delete key observer

      Is there a method to notify the user whenever he/she enters a delete key???even if he she is using any tool in sketchup .

      if there is non ,is there a method that will not deactivate the Tool (that is being programed) if the user selects other tools?

      thankyou youre answers will be of great help.

      posted in SketchUp Discussions sketchup
      P
      penpendrum
    • Manipulating a polyline like the freehand tool

      good day everyone. I want to know what is the ruby script for making a poly line . I've seen this done with sketchup 2d plugin. But I haven't seen any codes on how to do it in sketchupruby API site. I have notice that this kind of line can be drawn with a lot of vertices but when you click just one element it selects all. . Please let me know if I'm missing something. .thanks

      posted in Developers' Forum
      P
      penpendrum
    • RE: How to attach text to a line

      I'm sorry I have tried that .. but that is not what is in my mind.. I just want the text to follow the line even if I move one point only . . doing this manually is possible.. but not for ruby scripts I think..

      posted in Developers' Forum
      P
      penpendrum