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

    Add_dimension_linear with group transformation

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 422 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