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

    Question about "open" groups.

    Scheduled Pinned Locked Moved Developers' Forum
    22 Posts 5 Posters 1.8k 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.
    • T Offline
      todd burch
      last edited by

      I had a similar issue recently and I simply had to tell the user that the operation he was trying to perform was not allowed while in Group edit. This was because of the bugs dealing with working with groups and being out of context when in group/component edit.

      That's the way the ball bounces.

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by

        @unknownuser said:

        I had a similar issue recently and I simply had to tell the user that the operation he was trying to perform was not allowed while in Group edit. This was because of the bugs dealing with working with groups and being out of context when in group/component edit.

        That's the way the ball bounces.

        Thats disappointing.

        Thanks Todd.

        1 Reply Last reply Reply Quote 0
        • C Offline
          CPhillips
          last edited by

          I found a work around but its a little gross. I don't fully trust observers not to crash Sketchup.

          I put a entityObserver on my lattice group and then in onChangeEntity I store the current transformation in an attribute. Then when a user moves a point I check to see if the group is open (via observer) and if so I transform my control points by the inverse of the stored transform. That gives me a group relative point. whew.

          Thanks for the help.
          Chris

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

            I figured it out!

            If your group is open, get any entity in the group, and do this:

            entity.parent.origin

            That will give you the origin of the group's transformation. Viola!

            Todd

            1 Reply Last reply Reply Quote 0
            • C Offline
              CPhillips
              last edited by

              @unknownuser said:

              I figured it out!

              If your group is open, get any entity in the group, and do this:

              entity.parent.origin

              That will give you the origin of the group's transformation. Viola!

              Todd

              When I try that the parent is ComponentDefinition and that doesn't have .origin. Did I miss a step?

              Chris

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

                Oops. Sorry.

                entity.parent.insertion_point

                Todd

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CPhillips
                  last edited by

                  @unknownuser said:

                  Oops. Sorry.

                  entity.parent.insertion_point

                  Todd

                  Ah! That does seem to work. Its only a point though, any way to get the rest of the transformation?

                  Thanks Todd!

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

                    My hat of guessing says...

                    tr = Geom::Transformation.new(entity.parent.insertion_point)

                    Todd

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

                      ...but I don't think that will take care of any rotation. 😞

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        CPhillips
                        last edited by

                        @unknownuser said:

                        ...but I don't think that will take care of any rotation. 😞

                        Yeah without rotation it doesn't help. But the observer method seems to be working fine so far.

                        Chris

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

                          I did check with Google on this topic yesterday, and they see it as a flaw.

                          Todd

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

                          Advertisement