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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Add_dimension_linear with group transformation

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 450 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.
    • I Offline
      issamal
      last edited by

      I am looking for a way to get the dimension to move with the group after I apply a transform.

      model = Sketchup.active_model
      entities = model.entities
      model1 = Sketchup.active_model

      tk_group = Sketchup.active_model.entities.add_group

      pt201 = [0,0,0]
      pt202 = [10,0,0]
      pt203 = [10,10,0]
      pt204 = [0,10,0]

      dim = entities.add_dimension_linear pt201, pt202, [0, 0, 10]

      tk_group.entities.add_face pt201, pt202, pt203, pt204

      new_transformation = Geom::Transformation.new([30,0,0])
      tk_group.transform! new_transformation

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        @issamal said:

        I am looking for a way to get the dimension to move with the group after I apply a transform.

        model = Sketchup.active_model
        entities = model.entities
        model1 = Sketchup.active_model

        tk_group = Sketchup.active_model.entities.add_group

        pt201 = [0,0,0]
        pt202 = [10,0,0]
        pt203 = [10,10,0]
        pt204 = [0,10,0]

        dim = entities.add_dimension_linear pt201, pt202, [0, 0, 10]

        tk_group.entities.add_face pt201, pt202, pt203, pt204

        new_transformation = Geom::Transformation.new([30,0,0])
        tk_group.transform! new_transformation

        Just put the dimension in the group

        model = Sketchup.active_model
        entities = model.entities
        model1 = Sketchup.active_model
        
        tk_group = Sketchup.active_model.entities.add_group
        
        pt201 = [0,0,0]
        pt202 = [10,0,0]
        pt203 = [10,10,0]
        pt204 = [0,10,0]
        
        tk_group.entities.add_face pt201, pt202, pt203, pt204
        dim = tk_group.entities.add_dimension_linear pt201, pt202, [0, 0, 10]
        
        
        new_transformation = Geom;;Transformation.new([30,0,0])
        tk_group.transform! new_transformation
        
        

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • I Offline
          issamal
          last edited by

          Thanks. That was really helpful.

          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