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

    [Plugin] Eclate_Deplace (fragmentation-exploded view)

    Scheduled Pinned Locked Moved Plugins
    159 Posts 50 Posters 216.0k Views 50 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      @unknownuser said:

      Ah Damned! 😳 Thx 👍
      With esperanto that will be more easy just one language 😒

      There is already one World language - unfortunately it's English [and it's American too!] 😉
      Il y a déjà une langue du monde - c'est malheureusement anglais [et aussi c'est Américain!]
      Estas jam unu Monda lingvo - bedaŭrinde ĝi estas Angla [kaj tio estas Amerika ankaŭ!]
      🤣

      TIG

      1 Reply Last reply Reply Quote 0
      • C Offline
        c.plassais
        last edited by

        👿 👿 👿 👿 👿 👿 👿

        Good Works Pilou...............for the translation OF COURSE!!!

                     :facepunch:  :facepunch:  :facepunch:  :facepunch: :facepunch: :facepunch: :facepunch:
        

        c.plassais

        1 Reply Last reply Reply Quote 0
        • pilouP Offline
          pilou
          last edited by

          @C.plassais: sorry a very hard hyperactive end of year 💚
          See you soon next year! 😉
          [flash=500,405:1je4n8r4]http://www.youtube.com/v/o9698TqtY4A[/flash:1je4n8r4]

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

          1 Reply Last reply Reply Quote 0
          • MALAISEM Offline
            MALAISE
            last edited by

            Oh Guys, I miss a lot beeing on travel for the last 15 days.

            Excellent work, I 'll use it very fast for technical explanations 😄

            MALAISE

            La Connaissance n'a de valeur que partagée

            1 Reply Last reply Reply Quote 0
            • X Offline
              xrok1
              last edited by

              great plugin, thanks. if you could rename this "Exploded View" or "Exploded Model Viewer" or similiar, it would be much more precise and easier to find. 😉

              “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

              http://www.Twilightrender.com try it!

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                @xrok1 said:

                great plugin, thanks. if you could rename this "Exploded View" or "Exploded Model Viewer" or similiar, it would be much more precise and easier to find. 😉

                Edit the script with a plain text editor - like Notepad.exe [osa] - and replace any 'French' text inside "" with your 'English' translation[s]. Keep a copy in case you screw up...
                You can adjust a script to say whatever you want.... 🤓

                TIG

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  @unknownuser said:

                  if you could rename this "Exploded View"

                  you speak about the title of the tread?

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

                  1 Reply Last reply Reply Quote 0
                  • X Offline
                    xrok1
                    last edited by

                    yes, i was refering to the thread title. i don't think anyone searching for an "exploded view" would ever find it currently.

                    “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                    http://www.Twilightrender.com try it!

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

                      He got a point..

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • X Offline
                        xrok1
                        last edited by

                        it would make it a little more clear what the plugin is for as well. 😉

                        “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                        http://www.Twilightrender.com try it!

                        1 Reply Last reply Reply Quote 0
                        • pilouP Offline
                          pilou
                          last edited by

                          Done and tested with the search Engine ☀
                          No someone can find it by the title and by your post 😉

                          Frenchy Pilou
                          Is beautiful that please without concept!
                          My Little site :)

                          1 Reply Last reply Reply Quote 0
                          • Rich O BrienR Offline
                            Rich O Brien Moderator
                            last edited by

                            Anyone experiencing Bugsplats with SU7.1 and this plugin?

                            Haven't used since last SU update now it Bugsplat everytime. I've attached the model if anyone want to see if it's just me?

                            I know i have the components nested in a component but use this plugin when not nested


                            CherryMax Rivet.skp

                            Download the free D'oh Book for SketchUp 📖

                            1 Reply Last reply Reply Quote 0
                            • S Offline
                              Stephan
                              last edited by

                              @unknownuser said:

                              Anyone experiencing Bugsplats with SU7.1 and this plugin?

                              Haven't used since last SU update now it Bugsplat everytime. I've attached the model if anyone want to see if it's just me?

                              I know i have the components nested in a component but use this plugin when not nested

                              Hello,

                              Same problem for me with SU7.16860, I get a Bugsplat each time I try to use it. 😕

                              Any idea?

                              Rgds,

                              Stephan

                              1 Reply Last reply Reply Quote 0
                              • K Offline
                                kostas_designer
                                last edited by

                                No bugsplat to me, although i do not understand why some groups stay glued together..
                                In this example there are only first-class groups:


                                Eclate_Deplace check.jpg

                                1 Reply Last reply Reply Quote 0
                                • Rich O BrienR Offline
                                  Rich O Brien Moderator
                                  last edited by

                                  Is this plugin not compatible with the latest SU? Pilou if you've time can you look?

                                  It is behaving strangely with mixed results.

                                  Download the free D'oh Book for SketchUp 📖

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dtrarch
                                    last edited by

                                    Also see Smustard for Todd Burch's ExplodeImplode script.
                                    Works OK with SU 7.1 and older.

                                    dtr

                                    1 Reply Last reply Reply Quote 0
                                    • pilouP Offline
                                      pilou
                                      last edited by

                                      [url]some groups stay glued[/url]
                                      The explosion is made by level by level of grouped elements

                                      @unknownuser said:

                                      not compatible with the latest SU?

                                      Normally no reason for that 😄
                                      Have you a file for test it?

                                      Frenchy Pilou
                                      Is beautiful that please without concept!
                                      My Little site :)

                                      1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        c.plassais
                                        last edited by

                                        Hi all,

                                        just a little precision

                                        plugin Pilou ➡

                                        model = Sketchup.active_model
                                        entities = model.entities
                                        selection = model.selection
                                        
                                        xp=100  # Pivot Point (as you want)
                                        yp=100
                                        zp=100
                                        
                                        q=50 # Measure of translation (as you want) 
                                        
                                        selection.each do |e| # update!
                                          # Skip all entities that aren't groups or components (replace follow "ComponentInstance" by "Group" if you have groups
                                          next unless e.is_a? Sketchup;;ComponentInstance  # Now we process the component or group
                                        center = e.bounds.center #Center Point of the grouped object
                                           xc= center.x
                                           yc= center.y
                                           zc= center.z
                                           
                                        xe=xc #End Point of the grouped object
                                        ye=yc
                                        ze=zc
                                        
                                        if xc<xp
                                        xe =xc - q
                                        end
                                        
                                        if xc>xp
                                        xe =xc + q
                                        end
                                        
                                        if yc<yp
                                        ye =yc - q
                                        end
                                        
                                        if yc>yp
                                        ye =yc + q
                                        end
                                        
                                        if zc<zp
                                        ze =zc - q
                                        end
                                        
                                        if zc>zp
                                        ze =zc + q
                                        end
                                        
                                          point = Geom;;Point3d.new xe,ye,ze
                                          t = Geom;;Transformation.new point
                                          # Apply the transformation
                                          e.transform!(t)
                                        end
                                        

                                        plugin modified by me ➡

                                        # Designed December 2009 by C.plassais + Pilou 
                                        
                                        # Permission to use this software for any purpose and without fee is hereby granted
                                        # Distribution of this software for commercial purpose is forbidden;
                                        
                                        # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
                                        # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                                        # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                                        #-----------------------------------------------------------------------------
                                        # Name			;   Eclate_Deplace
                                        # Original Date	;  03 Juil 2009 version 0.0 (thx to TIG, Thomthom)
                                        # Type			;   Plugin
                                        # Description	;   Exploding movements of groups or/and components
                                        # Usage			;   Right Click - Context Menu
                                        # Version 0.3.2
                                        #---------------------------------------------------------------------------------------
                                        # petit plug d'explosion deplacement" de groupes ou de composants
                                        
                                        	require 'sketchup.rb'
                                        
                                        	def pilou_explose
                                        		myModel = Sketchup.active_model
                                        		myEntities = myModel.entities
                                        		selection = myModel.selection
                                        
                                        		if selection.empty?
                                        		    UI.messagebox "Veuillez Selectionner des\nComposants ou des Groupes"
                                        		end
                                        
                                        		myModel.start_operation "Deplacement Eclate",true
                                                group = myModel.active_entities.add_group(selection)
                                        		centre_selec = group.bounds.center
                                        		point_ligne = UI.messagebox "Voulez-matérialiser les déplacement \npar des points et des lignes de construction", MB_YESNO
                                                (point_ligne == 6) ? (myEntities.add_cpoint (centre_selec)) ;()
                                        
                                                resultat1 = UI.messagebox "Voulez vous faire une copie de l'original", MB_YESNO
                                        		if resultat1 == 6
                                        		    group2 = group.copy
                                        		    group2.explode
                                        		end
                                        
                                                selection = group.explode
                                        
                                                cent_selec_x = centre_selec[0].to_i   # determination
                                        		cent_selec_y = centre_selec[1].to_i   # du centre de
                                        		cent_selec_z = centre_selec[2].to_i   # la selection
                                        
                                               		prompts = ["Ecarter ou centrer/par rapport au pivot", "Deplacement pivot x", "Deplacement pivot y", "Deplacement pivot z", "Coef translation x de 0 a...", "Coef translation y de 0 a...", "Coef translation z de 0 a...", "Groupe Composant les 2"]
                                        		val_defaut = ["Centrer", cent_selec_x, cent_selec_y, cent_selec_z, 1.00, 1.00, 1.00, "Les 2"]
                                        		liste_val = ["Centrer|Ecarter", "", "", "", "", "", "" , "Groupe|Composant|Les 2"]
                                        		results = UI.inputbox prompts, val_defaut, liste_val, "Parametres"
                                        		return if not results
                                        		decent_pivot, deplac_pivot_x, deplac_pivot_y, deplac_pivot_z, coef_trans_x, coef_trans_y, coef_trans_z, group_ou_comp = results
                                        
                                                # Translation des axes suivant unites
                                                convertit = []
                                                convertit[0]= 1.inch
                                                convertit[1]= 1.feet
                                                convertit[2]= 1.mm
                                                convertit[3]= 1.cm
                                                convertit[4]= 1.m/100
                                                uniteCourante = myModel.options["UnitsOptions"]["LengthUnit"]
                                        
                                                coef_trans_x = coef_trans_x.to_f * convertit[uniteCourante]
                                                coef_trans_y = coef_trans_y.to_f * convertit[uniteCourante]
                                                coef_trans_z = coef_trans_z.to_f * convertit[uniteCourante]
                                        
                                                # Calcul de la distance entre le centre d'origine de la selection et le nouveau
                                                nouv_pivot_x =  cent_selec_x-deplac_pivot_x
                                                nouv_pivot_y =  cent_selec_y-deplac_pivot_y
                                                nouv_pivot_z =  cent_selec_z-deplac_pivot_z
                                                     
                                                case decent_pivot
                                                     when "Ecarter"
                                                          (point_ligne == 6) ? (
                                                          myEntities.add_cpoint [(cent_selec_x + nouv_pivot_x), (cent_selec_y + nouv_pivot_y), (cent_selec_z + nouv_pivot_z)]
                                                          myEntities.add_cline [cent_selec_x, cent_selec_y, cent_selec_z],[(cent_selec_x + nouv_pivot_x), (cent_selec_y + nouv_pivot_y), (cent_selec_z + nouv_pivot_z)]) ; ()
                                        
                                                     when "Centrer"
                                                         nouv_pivot_x =  - nouv_pivot_x
                                            		     nouv_pivot_y =  - nouv_pivot_y
                                            		     nouv_pivot_z =  - nouv_pivot_z
                                        
                                                         (point_ligne == 6) ? (
                                            		     myEntities.add_cpoint [deplac_pivot_x,deplac_pivot_y,deplac_pivot_z]
                                            		     myEntities.add_cline [cent_selec_x, cent_selec_y, cent_selec_z],[deplac_pivot_x, deplac_pivot_y, deplac_pivot_z]) ; ()
                                        
                                                end
                                                
                                                case group_ou_comp
                                                    when "Groupe"
                                                        group_ou_comp = comp_ou_group = Sketchup;;Group
                                                    when "Composant"
                                                        group_ou_comp = comp_ou_group = Sketchup;;ComponentInstance
                                                    else
                                        	           group_ou_comp = Sketchup;;Group
                                        	           comp_ou_group = Sketchup;;ComponentInstance
                                                end
                                        
                                        		selection.each do |e| # debut de la transformation
                                        
                                        			next unless (e.is_a? group_ou_comp) or next unless(e.is_a? comp_ou_group)
                                        			centre_objet = e.bounds.center
                                        			centre_objet_x = centre_objet[0].to_i  # Determination
                                        			centre_objet_y = centre_objet[1].to_i  # du centre
                                        			centre_objet_z = centre_objet[2].to_i  # de l'objet
                                        
                                                   (centre_objet_x == cent_selec_x) ? (nouv_centobj_x = nouv_pivot_x) ; (nouv_centobj_x = ((centre_objet_x-cent_selec_x) * coef_trans_x) + nouv_pivot_x)
                                                   (centre_objet_y == cent_selec_y) ? (nouv_centobj_y = nouv_pivot_y) ; (nouv_centobj_y = ((centre_objet_y-cent_selec_y) * coef_trans_y) + nouv_pivot_y)
                                                   (centre_objet_z == cent_selec_z) ? (nouv_centobj_z = nouv_pivot_z) ; (nouv_centobj_z = ((centre_objet_z-cent_selec_z) * coef_trans_z) + nouv_pivot_z)
                                        
                                                    point_trans = Geom;;Point3d.new nouv_centobj_x,nouv_centobj_y,nouv_centobj_z
                                                    t = Geom;;Transformation.new point_trans
                                                    e.transform!(t)
                                                    
                                                    (point_ligne == 6) ? (
                                                    nouv_centobj = e.bounds.center
                                        			myEntities.add_cpoint (nouv_centobj)
                                        			myEntities.add_cpoint (centre_objet)
                                        			constline = myEntities.add_cline [centre_objet_x, centre_objet_y, centre_objet_z],nouv_centobj
                                        			constline.stipple = ".") ; ()
                                        
                                        			myModel.selection.add e
                                        
                                        		end
                                        		myModel.commit_operation
                                        	end # pilou_explose
                                        
                                        	if( not file_loaded?("Eclate_Deplace.rb") )
                                                UI.add_context_menu_handler do |context_menu|
                                        	       context_menu.add_separator
                                        	       context_menu.add_item("Eclate_Deplace") { pilou_explose }
                                                end
                                                file_loaded("Eclate_Deplace.rb")
                                        	end
                                        

                                        Thanks

                                        Christophe

                                        1 Reply Last reply Reply Quote 0
                                        • pilouP Offline
                                          pilou
                                          last edited by

                                          No problem 😄
                                          Idea 💭 Pilou for training Ruby 5%
                                          Realisation Ruby C.Plassais 95%

                                          Frenchy Pilou
                                          Is beautiful that please without concept!
                                          My Little site :)

                                          1 Reply Last reply Reply Quote 0
                                          • BoxB Offline
                                            Box
                                            last edited by

                                            I'm using the latest version of sketchup and I get a bug splat every time I try to use Eclate.

                                            Even with a simple cube. As soon as you click yes or no on the copy dialog it shuts down and goes to bug splat.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 5 / 8
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement