sketchucation logo sketchucation
    • Login
    1. Home
    2. fatihbarut
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 22
    • Groups 1

    Posts

    Recent Best Controversial
    • SpaceClaim Plugin For Sketchup

      Hi guys,
      You know, because SU is face based 3d program solidtools sucks sometimes.
      But what about Spaceclaim, it is awsome solid 3d program and besides can save the objects as Sketchup .skp files.

      If you can't do something, think about it...

      Not: this is not advertisement just favor.

      posted in SketchUp Discussions sketchup
      F
      fatihbarut
    • RE: [solved!!]onMouseMove show component instance

      I think eventhough the title has "Solved" the last solution is missing

      Here is one of them.

      
      model = Sketchup.active_model
      ent = model.entities
      sel = model.selection
      
      defn = Sketchup.active_model.definitions
      
      def onMouseMove(flags, x, y, view)
        return nil if not @instance ### only works when instance is set
        @ip.pick(view, x, y)
        if @ip != @ip1
          view.invalidate if( @ip.display? or @ip1.display? )
          @ip1.copy!(@ip)
          view.tooltip=@ip1.tooltip
          @instance.transform!(Geom;;Transformation.new(@ip1.position))
        end
      end
      
      def onLButtonDown(flags, x, y, view)
        return nil if not @instance
        @ip1.pick(view, x, y)
        if @ip1.valid?
          @instance.transform!(Geom;;Transformation.new(@ip1.position))
          @instance=nil ### un-sets instance
        end
      end
      
      lastdefn = defn[0] # ! I had just one definition in my component definition list therefor defn[0] worked well for me
      model.place_component( lastdefn , false )
      
      
      posted in Developers' Forum
      F
      fatihbarut
    • 1
    • 2
    • 2 / 2