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

Lines2Components?

Scheduled Pinned Locked Moved Plugins
22 Posts 4 Posters 5.5k Views
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.
  • T Offline
    TIG Moderator
    last edited by 8 Apr 2009, 11:10

    @su30 said:

    Feed back

    It takes the size of the original Definition NOT it's Instance - I think you must have scaled it in the Model ?

    Would you like it to insert the new Instances Scaled relative to the scaled Instance ? I'll post an update shortly...

    TIG

    1 Reply Last reply Reply Quote 0
    • S Offline
      su30
      last edited by 8 Apr 2009, 11:18

      @tig said:

      If you enable scaling (Z or XYZ) any 'flat' lines (Z=Z) are ignored, if you have a Line 'angled' in 3D then the Instance's Scaled height will be the difference in the Zs of the Line's two ends.

      Do you want to take the Line's Length as the Instance's Scale (as it is if it's vertical) and rotate the component to match the Line's rotation ? If so then it'd need a big rewrite...

      Note that there are some other tools to rotate/scale components 'en mass'...

      I agree with you, TIG
      I think just Z direction transfer is already enough if we combine other useful scripts! And I would like this script to be a smart short but effective plugin.
      Yeah, I'd like the height of components fit into the edges' height. If you say it is possible, I would like to go for this.

      Brilliant!

      su30

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 8 Apr 2009, 12:52

        Here's v1.1

        Usage:
        Put this file into 'Plugins' folder.
        Open a Model.
        Place Components and Lines...
        Select an Instance of the required Component, and
        at least one Line (Edge).
        Pick 'Lines2Components' from the 'Plugins' Menu.
        If the Selection doesn't contain Edges or an Instance
        an error dialog tells you...
        You are prompted for the Scaling: 'Z' [default] or 'None'.
        If 'Z' is chosen then the Z-height (blue) of each Line

        relative to the Z-height of the required Component sets
        the 'Scaling' - for 3D 'angled' lines this is the end's
        Z-difference NOT the Line's length.
        One by one the Lines are turned into Instances of the
        required Component, and Z-Scaled to suit.
        Z-Scaling is from the Instance's insertion point.
        If the Scaling is 'None' then the new inserted Instances
        have the same Z-Scaling as the initially selected Instance.
        If the Scaling is 'None' then 'flat' Lines (equal end-Zs)
        can be used, the insertion point is then the Line's 'start':
        otherwise each Instance's insertion point is taken to be
        the lower of the Line's ends. Note that any Scaling other
        than in the Z for the Selected Instance is ignored in the
        newly placed Instances...
        See how this goes...
        EDIT: Please use the latest version available here http://forums.sketchucation.com/viewtopic.php?p=330408#p330408


        Lines2Components.rb

        TIG

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris Fullmer
          last edited by 8 Apr 2009, 15:17

          Great thread here guys. A while back I made 3 Line Tool plugin. It essentially will make vertical lines very quickly. Just activate it and click click click. Use the VCB/measurement box to adjust the height of the lines. 1 tool will draw a line from wherever you click to a certain elevation. the 2nd tool will draw a line X units tall from whereever you click and the other tool draws a line perpendicular to whatever you click on. I think you might find it useful for quickly populating a scene with vertical lines.

          301 Moved Permanently

          favicon

          (www.sketchucation.com)

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • S Offline
            su30
            last edited by 9 Apr 2009, 08:30

            Thanks TIG! Great effort! πŸ‘ πŸ‘
            I have just used the Lines2Compo 1.1, It runs well, but I am afraid I still want the components' dimension in Z direction fit the lines length, that means a 100mm line turns into a component with the height of 100mm, sorry for the misleading if my wish was not clear enough...


            Lines2Compo_02.jpg

            su30

            1 Reply Last reply Reply Quote 0
            • S Offline
              su30
              last edited by 9 Apr 2009, 08:35

              @chris fullmer said:

              Great thread here guys. A while back I made 3 Line Tool plugin. It essentially will make vertical lines very quickly. Just activate it and click click click. Use the VCB/measurement box to adjust the height of the lines. 1 tool will draw a line from wherever you click to a certain elevation. the 2nd tool will draw a line X units tall from whereever you click and the other tool draws a line perpendicular to whatever you click on. I think you might find it useful for quickly populating a scene with vertical lines.

              301 Moved Permanently

              favicon

              (www.sketchucation.com)

              Chris

              It's right! I think this effort TIG have made can perfectly match your 3line tool plugin. We can combine these two plugins together and use them in jobs such as planting trees, and it's accurate when we want to do something more complicated. πŸ˜›

              su30

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 9 Apr 2009, 08:39

                @unknownuser said:

                I am afraid I still want the components' dimension in Z direction fit the lines length, that means a 100mm line turns into a component with the height of 100mm, sorry for the misleading if my wish was not clear enough...

                It does that for me ? The default of 'Z' scales the compos to match the lines' heights.
                The other option 'None' just places compos sized as the original instance's scale at the lines' bases.

                If you make a series of different height lines don't you get the compo's scaled to match ?

                EDIT: It WAS OK for me but did some more tests and after using it once it goes haywire - looking at cause... v1.2 on it's way...

                In passing - I think you could also perhaps use Grow.rb to place compo's around in a circle, each rotated to match and scaled incrementally in the Z, or just on a line etc... Download it and experiment...

                TIG

                1 Reply Last reply Reply Quote 0
                • S Offline
                  su30
                  last edited by 9 Apr 2009, 08:47

                  I think there must be something different between out programs,
                  is it because the unit?
                  I don't know. Yeah I have downloaded your grow.rb quite a while before, but I hope this can fit into more situation than circle.
                  I will keep finding the reason on my software! πŸ˜‰

                  su30

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 9 Apr 2009, 08:56

                    Here's v1.2 - I made the slightest tweak to the way it decides how to Z-scale the new instances based on the line height and definition height (not instance height) and now it "never" goes wrong for me now ! [never say never !]

                    Please try and feedback...
                    EDIT: Please use the latest version available here http://forums.sketchucation.com/viewtopic.php?p=330408#p330408


                    Lines2Components.rb

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TIG Moderator
                      last edited by 9 Apr 2009, 08:59

                      @su30 said:

                      I think there must be something different between out programs,
                      is it because the unit?

                      Units shouldn't matter as it works in SUp's base units (inches) anyway ?

                      Try the v1.2 and report back...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        su30
                        last edited by 9 Apr 2009, 09:25

                        Well done!
                        I tried the function of Z scaling, and I found it's steady and correct!
                        Here is the feedback picture...
                        And I also find the lines can turn into the right sized components, no matter if I have scaled the original component or not!!!
                        This is exactly the thing I am looking for!


                        Lines2Compo_03.jpg


                        Lines2Compo_04.jpg

                        su30

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          su30
                          last edited by 9 Apr 2009, 09:28

                          @tig said:

                          @su30 said:

                          I think there must be something different between out programs,
                          is it because the unit?

                          Units shouldn't matter as it works in SUp's base units (inches) anyway ?

                          Try the v1.2 and report back...

                          Yeah it has nothing to do with unit, I am using mm as basic unit and V1.2 fits very well!

                          su30

                          1 Reply Last reply Reply Quote 0
                          • L Offline
                            leixing
                            last edited by 10 Apr 2009, 06:54

                            tig:
                            I have the same problem for the v1.1 i like the first .
                            I still want to keep the first version of the function .i like that.
                            and also add the idea of su30 like the photo.
                            Thank you very much for the work.
                            qqqq.jpg

                            1 Reply Last reply Reply Quote 0
                            • L Offline
                              leixing
                              last edited by 10 Apr 2009, 07:07

                              so fast
                              thank you tig, i test v1.2 and it works well.
                              and i like the xyz scale item also
                              so how i could do

                              thanks agian!

                              EDIT: i want the xyz scale could do this: the height fit the line height but the comp. donot distortion.
                              qqwqw.jpg

                              1 Reply Last reply Reply Quote 0
                              • 1
                              • 2
                              • 1 / 2
                              1 / 2
                              • First post
                                18/22
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement