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

    Push/pull (or drag) with increment ?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 1.2k 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.
    • T Offline
      TBoy
      last edited by

      In scripts when we drag with mouse, code looks like:

      view.draw_line startPossition, endPossition

      'start Position' is defined by click, 'end Position' is moving with mouse.
      Is it possible while dragging mouse to snap on every next 0,5cm or 1cm (for example) instead of smooth dragging.
      What code can I use to obtain such a behavior?

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

        @tboy said:

        In scripts when we drag with mouse, code looks like:

        view.draw_line startPossition, endPossition

        'start Position' is defined by click, 'end Position' is moving with mouse.
        Is it possible while dragging mouse to snap on every next 0,5cm or 1cm (for example) instead of smooth dragging.
        What code can I use to obtain such a behavior?

        Here is a simple example of how I would do it.


        By Increment.rb

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

        http://sdmitch.blogspot.com/

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

          Thank you !
          Exactly as I wanted to be.

          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