sketchucation logo sketchucation
    • Login
    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

    Transform by vectors and Hash.

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 5 Posters 343 Views 5 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.
    • D Offline
      driven
      last edited by

      hi may be of use... maybe not.
      whenI made a ruby to make the entire mac font library as 3d text in a row, it was painfully slow, but by breaking it into chunks solved that problem, dan helped me with the code, the original is in the same post
      http://sketchucation.com/forums/viewtopic.php?f=180&t=48761&start=30#p440763

      john

      learn from the mistakes of others, you may not live long enough to make them all yourself...

      1 Reply Last reply Reply Quote 0
      • jolranJ Offline
        jolran
        last edited by

        Very interesting Driven.

        I have missed that topic completely during my searchs.

        It's bedtime early today, so I have a closer peak tomorrow.
        Thanks for the link.

        1 Reply Last reply Reply Quote 0
        • jolranJ Offline
          jolran
          last edited by

          Had a peek inside that topic and while it's very interesting reading I'm uncertain it will help me in this case?

          Refering to group make uniq! VS group name. It seems Group.name is a tad quicker.(horray!)
          BUT, creating many new groups is very costly. In fact it's nearly half of the calculationtime for my script at the moment. Adding entities are of course expensive, but the difference between using instances and new groups is enourmous.

          (A longshot: There is no way to do Matrice calculations that affect tapering in Sketchup ?
          I've gotten some shearing results when playing with the Matrix, but that's about it..)

          Biggest lag comes from transformation of vertices. Trying to bundle them do speed up things, but still far from satisfactory, and I doubt I'll ever get near any sufficient workable results..

          So problem A is since making groups uniq and transforming by vectors are all SU API methods I can not get any benefit from a C-extension I persume? (If I ever go that route..)

          Anyway I think I've made a big rookie misstake when preparing and gathering information for doing all in a big loop. But then again I don't if know slicing the code up will prevent from problem A? Confused right now πŸ˜•

          See if I can split up the code a little. Any suggestions would be appreciated.

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

            You can only transform in one Entities object at a time - you cannot combine transformations in multiple Entities objects.

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

            1 Reply Last reply Reply Quote 0
            • jolranJ Offline
              jolran
              last edited by

              Ah ok, you are refering to tapering, right ?

              I sent you PM.

              1 Reply Last reply Reply Quote 0
              • T Offline
                Trogluddite
                last edited by

                @jolran said:

                There is no way to do Matrice calculations that affect tapering in Sketchup ?

                I don't know the API so well, but mathematically, the matrices would only be able to do what are known as "affine transformations", which have the property that lines which start out parallel with each other always remain parallel - so tapering would not be possible.

                1 Reply Last reply Reply Quote 0
                • jolranJ Offline
                  jolran
                  last edited by

                  @unknownuser said:

                  mathematically, the matrices would only be able to do what are known as "affine transformations"

                  That IS what I wondered. Bummer 😞

                  Whats the term for tapering? I've seen it being called "projective scaling". That is what I wanted to do to component instances anyway. Scaling one instance doesent affect the other and so on...

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @jolran said:

                    Whats the term for tapering? I've seen it being called "projective scaling". That is what I wanted to do to component instances anyway. Scaling one instance doesent affect the other and so on...

                    You CAN do this.. BUT each instance must be unique.

                    Imagine a "Box" component.

                    Insert two instances a few feet from one another.

                    If you edit one instance, you will affect the other because they both share the same definition, that "owns" the entities collection.

                    But select one of them, right-click and choose "Make unique" and it has it's own definition.
                    Now.. double-click it to enter it's edit-mode. Select the top face, and then choose the ScaleTool.
                    Hold down the CTRL key and click-drag one of the corner handles to taper the top face (about the center.)

                    πŸ’­

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • jolranJ Offline
                      jolran
                      last edited by

                      Yeah Dan thanks, sort of doing that in my code already..

                      But what i wished for was tapering one instance and it doesent affect the other and so on.

                      Now that apparently can't be done with current API, otherwise Fredoscale taper-mode probably wouldent exist.

                      Don't know if that sort of thing could be added to the API anyway since Sketchup is a surface modeler. Maybe need nurbs for this kind of behaviour ? πŸ˜•

                      Anyway getting OT on my own topic..

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        @jolran said:

                        Don't know if that sort of thing could be added to the API anyway since Sketchup is a surface modeler. Maybe need nurbs for this kind of behaviour ? πŸ˜•

                        NO not now, because the vertice positions are part of the definition, and not part of the individual instance(s).

                        An interesting idea.

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • jolranJ Offline
                          jolran
                          last edited by

                          @unknownuser said:

                          NO not now, because the vertice positions are part of the definition, and not part of the individual instance(s).

                          Thanks for answering Dan.
                          It could be an useful addition to the API, IMO.

                          What confuses me is that we are moving the vertices when scaling the instance(s) using Sketchup normal scaling behavior. So why would it be different if doing a tapering ?

                          I know the calculations for tapering is much more complex, but...
                          Maybe there is need for some symmetry calculation I havent thought about.

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

                          Advertisement