sketchucation logo sketchucation
    • Login
    1. Home
    2. c.plassais
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    C
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 71
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: [Plugin] ChrisP_ColorEdge

      Good evening,
      for the width lines it's not possible.
      I will soon publish a new version, including a Spanish version translated by Diego Rodriguez. The new version adds faces to the lines drawn.
      Can work on inner edges are groups and components.
      It is possible to include a German version. Here are the lines to translate

      
             $aa_01 = "Length "
        	$aa_02 = "TAB to modify parameters "
        	$aa_03 = "Select the end of the edge == TAB to modify colors "
        	$aa_04 = "Color on axis X "
        	$aa_05 = "Color on axis Y "
        	$aa_06 = "Color on axis Z "
        	$aa_07 = "Color 45 degree "
        	$aa_08 = "Color other axix "	
        	$aa_09 = "Color single "
        	$aa_10 = "Color "
        	$aa_11 = "Select the start of the edge == TAB to modify colors "
        	$aa_12 = "No color "
        	$aa_13 = "No RGB" 
        	$aa_14 = "RGB "
        	$aa_15 = "TAB to modify colors "
        	$aa_16 = "By Layer "
        	$aa_17 = "No selection, do you want apply\nthe operation to all entities? "
        	$aa_18 = "Stippling "
        	$aa_19 = "% or cm "
        	$aa_20 = "Adapt length "
        	$aa_21 = "Color 1 "
        	$aa_22 = "Color 2 "
        	$aa_23 = "There are several instances\nDo make unique instance?\nOtherwise the definition will be modified... "
        	$aa_24 = "Angle length "
        	$aa_25 = "Angle color "
        	$aa_26 = "Edge color "
        	$aa_27 = "ColorEdge "
        	$aa_28 = "Draw Color Edge "
        	$aa_29 = "Draw edge by color by vector "
        	$aa_30 = "Edge single color on select "
        	$aa_31 = "Edge color by axis on select "
        	$aa_32 = "Modify select in dotted line "
      	$aa_33 = "Color Edge by click "
      	$aa_34 = "Dotted line by click "
      	$aa_35 = "Colored angle by click "
      	$aa_36 = "Colors blend "
      	$aa_37 = "Color select "
      	$aa_38 = "Colored angle "
      	$aa_39 = "Dotted line"
      	$aa_40 = "By default"
      	$aa_41 = "Active layer"
      	$aa_42 = "All"
      	$aa_43 = "Delete"
      	$aa_44 = "Color layer"
      	$aa_45 = "Keep"
      	$aa_46 = "Whithout"
      	$aa_47 = "Invisible"
      	$aa_48 = "Yes"
      	$aa_49 = "No"
      	$aa_50 = "Selection of colors to use"
      	$aa_51 = "Valid and save"
      	$aa_52 = "Valid"
      	$aa_53 = "Uncheck all"
      	$aa_54 = "Chech all"
      	$aa_55 = "Cancel"
      	$aa_56 = "Color choice "
      	$aa_57 = "Add face "
      	$aa_58 = "Inputbox setup "	
      	$aa_59 = "Inputbox setup..........................................You must before colors selected "	
      	$aa_60 = "Language choice "
      	$aa_61 = "List chosen colors "
      	$aa_62 = "Parameters "
      	$aa_63 = "Yes|No"
      

      ChrisP

      posted in Plugins
      C
      c.plassais
    • RE: Disable OnLButtonUp when onLButtonDoubleClick

      In the script, it's just the time allowed to detect the double click

      posted in Developers' Forum
      C
      c.plassais
    • RE: Disable OnLButtonUp when onLButtonDoubleClick

      It works, you can use onLButtonDoubleClick without calling onLButtonDown & onLButtonUp
      The delay time is 0.2 it works well for me but it is possible that changes depending on the computer

      For SU8

      class TestTool
      
          def onLButtonDown(flags, x, y, view)
              puts "-" *25
              puts ;onLButtonDown
              @ip = UI.start_timer(0.2,false){call_method(flags, x, y, view)}   
          end
          def onLButtonUp(flags, x, y, view)
              puts ;onLButtonUp
          end
      
          def onLButtonDoubleClick(flags, x, y, view)
              UI.stop_timer @ip
              puts ;onLButtonDoubleClick
              puts "Call method for onLButtonDoubleClick"
              puts "-" *25
      
          end     
          def call_method(flags, x, y, view)
                  puts "Call method for onLButtonDown"
                  puts "Call method for onLButtonUp"
              puts "-" *25
          end
      end
      
      Sketchup.active_model.select_tool TestTool.new
      

      For SU6 & SU7

      class TestTool
          def onLButtonDown(flags, x, y, view)
              puts ;onLButtonDown 							# for test      
              call_method(flags, x, y, view)
          end
          def onLButtonUp flags, x, y, view
              puts ;onLButtonUp							# for test
          end
          def onLButtonDoubleClick(flags, x, y, view)
              UI.stop_timer @id
              puts ;onLButtonDoubleClick						# for test
              puts "Call method onLButtonDoubleClick"					# for test
              puts "-" * 25 								# for test       
          end     
          def call_method(flags, x, y, view)
                  start_time = Time.now
                  elapsed_time = 0
                	loop do
                         elapsed_time = Time.now - start_time                         # for test
                         puts elapsed_time     
                        	if elapsed_time >= 0.20   				###### delay time ######
                                      @id = UI.start_timer(0,false){
              			puts "Call similar method for onLButtonDown"
                          		puts "Call similar method for onLButtonUp"
                          		puts "-" * 25					# for test
                          		}                  
                          	break
                        	end
                	end    
          end
      end
      
      Sketchup.active_model.select_tool TestTool.new
      
      
      

      ChrisP

      posted in Developers' Forum
      C
      c.plassais
    • RE: Disable OnLButtonUp when onLButtonDoubleClick

      Thanks Jim

      What do you think about this

      class TestTool
          def onLButtonDown flags, x, y, view
              puts "-" *25
              puts ;onLButtonDown
              @id = UI.start_timer(1,false){call_method(flags ="single", x, y, view)}  
          end
          def onLButtonUp flags, x, y, view
              puts ;onLButtonUp
          end
      
          def onLButtonDoubleClick flags, x, y, view
              UI.stop_timer @id
              puts ;onLButtonDoubleClick
             call_method(flags ="double", x, y, view)
          end     
          def call_method(flags, x, y, view)
              if flags == "single"
                  UI.stop_timer @id            
                  puts "Call method for onLButtonDown"
                  puts "Call method for onLButtonUp"
              else
                  puts "Call method for onLButtonDoubleClick"
              end
              puts "-" *25
          end
      end
      
      Sketchup.active_model.select_tool TestTool.new
      

      should be able to reduce the UI.start_timerto less than 1 second....

      posted in Developers' Forum
      C
      c.plassais
    • RE: Disable OnLButtonUp when onLButtonDoubleClick

      Dan is to prohibit the use of onKeyDown ()and onkeyup ()when a user double clicks the Left Mouse Button.

      As Jim says, the solution is perhaps to calculate the delay between two onKeyUp (), if the delay is small consider that a double click to invoke a method equivalent onLButtonDoubleClick. if not call the method onKeyUp () and / or onKeyDown ()

      posted in Developers' Forum
      C
      c.plassais
    • Disable OnLButtonUp when onLButtonDoubleClick

      Hi,

      In class Tool, Is it possible to disable the method OnLButtonUp or OnLButtonDown when you call the method onLButtonDoubleClick

      Thank you in advance for your answers

      ChrisP

      posted in Developers' Forum
      C
      c.plassais
    • RE: Detect if an extenbsion is loaded?

      in reality, I do not know
      but
      puts $LOADED_FEATURESreturn nil
      puts $" return that

      1.png

      By cons no return for files rbs 😞

      http://www.zenspider.com/Languages/Ruby/QuickRef.html#19

      ChrisP

      posted in Developers' Forum
      C
      c.plassais
    • RE: Detect if an extenbsion is loaded?

      $" This pre-defined variable, an array contains the module names loaded by require.

      @+

      posted in Developers' Forum
      C
      c.plassais
    • RE: Forum en français Sketchup - artlantis

      @pafpro said:

      Je me suis inscrit, mais malheureusement j'ai très rarement reçu des réponses à mes problèmes.
      Suppositions : soit il n'y a pas encore de personnes assez calées, soit les gens viennent que pour leurs problèmes et se désintéressent de ceux des autres. Je suis peut être un peu dur, mais le but d'un forum est de trouver des solutions pour soit ou pour les autres, pas juste poser des problèmes, sinon je n'y vois pas d'intérêt. Ou alors les sujets que j'ai ouvert sont sans intérêt!!! 😄
      Bref, le forum est bien fait, l'idée est vraiment sympa, on y trouve des choses intéressantes, il est très complet, en français, il ne manque plus qu'un peu plus d'échanges.

      Salut pafpro

      Je viens de regarder sur Bibliod... Tu as en fin de compte la réponse dans ta question... 😉
      Tu as ouvert 9 posts, pour 2 il n'y a pas eu de réponses... Pour les 9 posts il y a eu 57 réponses.
      Tu as posté 33 fois JAMAIS EN DEHORS de tes propres sujets... ca veut dire que tu n'as jamais répondu à l'interrogation d'un autre membre.
      Il me semble que dans ces conditions il est difficile d'exiger plus "d'échange" si tout le monde adopte le même principe.
      Ce n'est pas tout à fait l'idée que l'on peut se faire d'un fonctionnement communautaire.
      Ceci dit sur le forum, on essayes toujours de répondre dans la mesure du possible, en fonction du temps et des compétences de chacun, alors si il y a eu un loupé et cela peut arriver, nous en sommes désolé.

      La meilleur façon de recevoir c'est de donner...

      @+
      Christophe

      posted in Français
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      [flash=800,600:3blf0ado]http://content.screencast.com/users/c.plassais/folders/Jing/media/b2d1840e-dcf4-4c4f-a71b-8de7ea7e272c/blend.swf[/flash:3blf0ado]

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      Hi,
      This tool allows to colorize the edges on a same plane by a mixture of two basic colors depending on the angle and possibly a second plane and a third color

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      Thanks Juan 👍

      posted in Plugins
      C
      c.plassais
    • RE: Forum en français Sketchup - artlantis

      salut à Tous, salut Jack

      Je poste aussi rarement sur ce forum et d'ailleurs pas plus sur les autres, j'ai opté depuis longtemps pour biblio3d.
      Je poste donc pour soutenir activement ce forum et corriger le tir quand je lis qu'il n'existe pas de site Français traitant le sujet.
      biblio3d est un site communautaire sur lequel on trouve toujours de l'écoute,des compétences, des gens humbles et de la bonne humeur.
      J'ai également écris une dizaine de plugins, qui sont disponibles uniquement sur biblio3d dont Eclate_deplace ecrit en collaboration avec Pilou (ChrisP_RadialMove pour la version revue et corrigée par Fredo) et ChrisP_ColorEdge disposible sur SCF.

      A titre personnel et sans vouloir faire ombrage à toutes autres iniatiatives, je vois ne pas trop l'intéret de me disperser.

      Encore merci Jack 👍 et bon courage aux porteurs de nouveaux projets ☀

      @+

      posted in Français
      C
      c.plassais
    • RE: [Plugin] Eclate_Deplace (fragmentation-exploded view)

      @vidy said:

      thanks pilou,
      its work in sketchup 7.. 😄
      somehow it can't on sketchup 6.. 😞 it even not showing the dialog box

      on ruby console, it show this:
      Error: #<ArgumentError: wrong number of arguments(2 for 1)>
      C:/Program Files/Google/Google SketchUp 6/Plugins/Eclate_Deplace.rb:30:in start_operation' C:/Program Files/Google/Google SketchUp 6/Plugins/Eclate_Deplace.rb:30:in pilou_explose'
      C:/Program Files/Google/Google SketchUp 6/Plugins/Eclate_Deplace.rb:132
      C:/Program Files/Google/Google SketchUp 6/Plugins/Eclate_Deplace.rb:132:in `call'

      Try this version => Test for SU 6.0

      c.plassais

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      Hi,

      ****14/07/2010 Version 0.2.3 Fixed problem layer's observer

      http://forums.sketchucation.com/viewtopic.php?f=323&t=28957#p251619

      Regards

      Christophe

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      Hi,

      Adding icons designed by Max (CadFather)

      Icons designed by max

      A big thank you max 👍

      Icons designed by max

      Christophe

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      Hi Everyone,

      a new version ChrisP_ColorEdge 0.2.2

      Adding the management layer
      Draw an edge by layer, with a color of your choice or the color of the active layer.
      Recolor the edges by filtering by layer, with a color of your choice or the color of the active layer.
      Dotted lines by filtering by layer
      Thank you to TIG for his plugin ListeLayerColors

      [flash=425,350:29yeejxt]http://www.youtube.com/v/GQ-DpoUOiTM[/flash:29yeejxt]

      Enjoy

      Christophe

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      no problem
      it suits me 😉

      posted in Plugins
      C
      c.plassais
    • RE: [Plugin] ChrisP_ColorEdge

      @stefx said:

      I use Mac and it looks like it doesn't work..... 😞
      any tips?

      stef.

      Oops!
      Sorry but I do not test on Mac.
      cmeed uses the plugin successfully on Mac
      can you send me a copy of the errors returned

      Christophe

      posted in Plugins
      C
      c.plassais
    • RE: Retrieve Color Layer assigned by Sketchup

      Hy,
      TIG plugin ListLayerColors after some modifications, can create new colors in the pallet with layer's colors

      require 'sketchup.rb'
      ###
      class CreateLayerColors
      def CreateLayerColors ;;get()
        model=Sketchup.active_model
        entities = model.active_entities    
        materials=model.materials
        layers=model.layers
        
        if model.rendering_options["DisplayColorByLayer"]==false
          model.rendering_options["DisplayColorByLayer"]=true
      	already_on=false
        else
          already_on=true
        end#if
        # create temporary entities for exporting layers
        vecteur = Geom;;Vector3d.new 0,0,1
        centre = Geom;;Point3d.new 0,0,0
        group_temp=entities.add_group()
        entities = group_temp.entities
        x =0
        layers.each {|layer|
        model.active_layer = layer
        centre = [centre[0], centre[1], centre[2] + x]
        edges = entities.add_circle centre, vecteur, 0.01
        cercle = entities.add_face(edges)
        x= x + 0.01
        }
         
        model.save "temp"
        mpath = Sketchup.find_support_file "temp", "Plugins/"
        model.export(mpath +".obj",false)
        mtl=mpath+".mtl"
        text=IO.readlines(mtl)
       0.upto(text.length-1) do |i|
        if text[i]=~/^newmtl */
          name=text[i].slice(7..-2)### layer name only
          rgbR=((text[i+2].slice(3..11).to_f)*255).to_i.to_s### color rgb values	
          rgbG=((text[i+2].slice(12..20).to_f)*255).to_i.to_s### color rgb values	
          rgbB=((text[i+2].slice(21..29).to_f)*255).to_i.to_s### color rgb values
          
        	couleur_calque = Sketchup;;Color.new(rgbR.to_i, rgbG.to_i, rgbB.to_i)
              unless materials[name]
      	    new_matiere = materials.add name
      	    new_matiere.color = couleur_calque
      	    new_matiere = new_matiere.name
      	else
      	    materials[name].color = couleur_calque
      	end
        end#if
       end#upto
      
        File.delete(mpath+".obj")
        File.delete(mtl)
        File.delete(mpath)
        group_temp.erase!
        ###
        model.rendering_options["DisplayColorByLayer"]=false if already_on==false
        ###
      end#def
      end#class
      ### menu
      # add menu items
      if(not file_loaded?("CreateLayerColors.rb"))
        UI.menu("Plugins").add_item("Create Layer Colors"){CreateLayerColors;;get}
      end#if
      file_loaded("CreateLayerColors.rb")
      ###
      

      CreateColorLayer

      Christophe

      posted in Developers' Forum
      C
      c.plassais
    • 1
    • 2
    • 3
    • 4
    • 1 / 4