sketchucation logo sketchucation
    • Login
    1. Home
    2. richhinton
    3. Posts
    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!
    โš ๏ธ Important | Libfredo 15.6a introduces important bugfixes for Fredo's Extensions Update
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Sketchup Web Exporter

      Adding the code above to line 822 of swivelButton.rb fixes the preview image:

      Sketchup.active_model.active_view.zoom_extents
      

      Then modify line 572 of swivelButton.rb from:

        standoff_distance = getStandoffDistance() * 1.1;
      

      to

        standoff_distance = targetNow.distance eyeNow
      

      Add the following line above line 583 so you end up with:

        standoff_eyepoint = eyeNow;
        centerpoint.z = standoff_eyepoint.z;
      

      Comment out lines 656 to 663:

      # 	bb=Sketchup.active_model.bounds
      # pmax = bb.max
      #	pmin = bb.min
      #	zdiff = bb.max[2]-bb.min[2]
      #	pcenter = bb.center
      #	targetNow = pcenter
      #	up = Geom;;Vector3d.new(0.0,0.0,1.3*zdiff)
      #	upTarget = pcenter + up
      

      The code before tried to fit the entire model into the view by getting the bounding box of the active model and drawing a circle around it, then panning the camera around that circle.

      My fix, simply draws a circle around the model from the current cameras position and then pans around that circle. ๐Ÿ˜„

      posted in Developers' Forum
      R
      richhinton
    • 1 / 1