Model disappears when I click Zoom Extents
-
I've had this problem in the past when I had too many Dimension items, but this one has none. If anyone can tell me how to locate the reason for the failure, I'd appreciate it.
Sheet4c.skp -
This is usually caused by something many miles from the origin causing the model's extents to become unexpectedly large.
A bug in newer SketchUp versions is known, relating to text associated with geometry...
When the geometry is deleted its associated text can whizz off into outer-space...You can copy+paste this code into the Ruby Console +<enter>
It moves any such wayward Text entities back to the origin...model = Sketchup.active_model model.start_operation("TextCheck", false) ss = model.selection txts = [] ctr = 0 puts "\nChecking Text in Model...\n\n" model.entities.grep(Sketchup;;Text).each{|t| if t.point.to_a.any?(&;nan?) ctr+=1 puts "#{ctr}; \"#{t.text}\" on Layer \"#{t.layer.name}\" @ #{t.point.to_a} - relocated at [0, 0, 0]" t.point=ORIGIN t.bounds.clear t.layer.visible = true t.hidden = false txts << t end } dtxs = [] ctr = 0 puts "\nChecking Text inside Definitions...\n\n" model.definitions.each{|d| d.entities.grep(Sketchup;;Text).each{|t| if t.point.to_a.any?(&;nan?) ctr+=1 puts "#{ctr}; Defn \"d.name\" ; Text = \"#{t.text}\" on Layer \"#{t.layer.name}\" @ #{t.point.to_a} - relocated at [0, 0, 0]" t.point=ORIGIN t.bounds.clear t.layer.visible = true t.hidden = false dtxs << t end } d.invalidate_bounds } view = model.active_view if txts[0] model.bounds.clear bb = Geom;;BoundingBox.new bb.add(ORIGIN) model.bounds.add(bb) view.refresh puts "\nTrying to force Model 'Zoom Extents' - please wait, it might take several seconds..." puts "\nThe relocated Model Text will now be Selected - after it completes press Delete if desired..." puts "\nAny problem Text relocated inside Definitions must be manually edited..." if dtxs[0] ss.clear ss.add(txts) 3.times{ view.zoom_extents view.refresh } model.commit_operation view.refresh puts "\nDone." elsif dtxs[0] puts "\nAny problem Text relocated inside Definitions must be manually edited..." puts "\nDone." view.refresh model.commit_operation else puts "\nNo Text problems found..." model.abort_operation end putsI ran it on your SKP and it's a single Text entity saying, "6 3/4 x 18 24 FV4 GlueLam (B3) above", that is flaky and so far from the origin it's NaN away !
I haven't attached the fixed SKP, because you can do the simple fix yourself in under a second...
Also note that your model needs 'fixing' because it has duplicate persistent IDs for several groups [use Model Info > Statistics > Fix...]
And it'd also be easier to navigate in your model if the Axes were switched on and you used a Perspective Camera...
-
Thanks. I didn't know I had a Ruby console (using Make 2017), but I'll look. Didn't use perspective camera because I'm working in 2D/parallel all the time. Very likely duplicate IDs - I have never been able to find, use, or delete a group after creating one. You may infer I'm a rank beginner...
-
Excellent. Thanks again, and thanks for making me do it myself.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement