sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Need help debugging

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 158 Views 2 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.
    • PixeroP Offline
      Pixero
      last edited by

      In my script jsAlign (http://www.pixero.com) odd things happen if you align edges/vertices inside a group.
      The face gets somehow outside the group and at the origo.
      See example file.

      Anyone knows why and how to fix it?


      jsAlign_bug.skp

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

        I think that

        Sketchup.active_model.entities.transform_entities(t,v);
        

        should be

        Sketchup.active_model.active_entities.transform_entities(t,v);
        

        You might also need to apply a transformation to these any entities equivalent to the original group's transformation...
        Something like...

        ## set their 'point'...
        t1=ORIGIN-group.transformation.origin
        t2=Geom;;Transformation.new(point)
        ## re-set for be new stuff - 'gp' here is a group...
        gp.transform!(t1)
        gp.transform!(t2)
        

        ... Hope this helps...

        TIG

        1 Reply Last reply Reply Quote 0
        • PixeroP Offline
          Pixero
          last edited by

          Thanks, that seem to work. (I didnt have to use that last part.)

          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