I've also bumped into the Zoom Extents Bug


#1

Hi Everyone,

I seem to have also bumped into the zoom extents issue. My model had been fine - so I’m not sure when it went off the rails.
I’ve read through the other threads on this topic and have tried the following:

  • delete all txt from the model…
  • Select the relevant parts and try to delete objects outside the selection (there are none)

I did cut/paste the model to a new file and it appears everything came across and works fine - except my scenes … I use Scenes to make plans, etc. - I may have to go try to recreate all 25 of them…

I consider myself an intermediate Sketchup user and have done many models (all woodworking plans)
Happy to share my model if it will he helpful to track down the issue…


#2

read the second post as well…

john


#3

John has given you a good answer about transferring the scenes.

It would be valuable to the community to know whether this is another example of issues seen before (most likely) or something new. If you upload the model, I’ll take a look.

BTW, so far nobody has been able to find the cause of this bug, only the consequences. If the developers have any leads, to my knowledge they haven’t mentioned them.


#4

Are there any other threads about this zoom extents bug? Any models showing the issue? I was asked a few times to make a plugin for exporting and importing scenes specifically for the copy-to-fresh-model thing but ironically never had to do that myself. I even forgot about that use case when first posting about the plugin and had to write a comment on it.


Lost Model! Alot of work will be lost... HELP
#5

There are a few threads on the topic… It is believed to be related to text labels… I’m leaning toward some sort of file corruption in that area since cut/paste to a new model picks up the good info and leaves the bad behind… (it seems)
Zoom Extents model

I did do some testing - deleting txt, selecting and hiding and looking for items miles away, etc… No luck…

Hopefully this link gets you to my model.
Thanks for taking a look.


#6

Wait! I think I’ve gotten a similar error when moving around vertices of a face having a 2D text added to it. I’ve downloaded your model and it seems to be the same problem :smiley: .

If you run this code you’ll see that one text is at the position NaN, NaN, NaN.

Sketchup.active_model.active_entities.grep(Sketchup::Text).map { |t| t.point.to_a }

The following code deletes the invalid text but doesn’t update the bounding box of the model, meaning rendering is still off. Saving and reopening the model seems to solve that half of the problem though :smiley: .

Sketchup.active_model.active_entities.grep(Sketchup::Text).each { |t| t.erase! if t.point.to_a.any?(&:nan?) }

Before running the code deleting the text you can run this code to print the text of the corrupted text so you know what text is missing and can manually add it back where it should be. (“the text of the text” sounds weird but I hope you get what I mean).

Sketchup.active_model.active_entities.grep(Sketchup::Text).to_a.each { |t| puts t.text if t.point.to_a.any?(&:nan?) }; nil

The question now for the SketchUp team to solve is why the text gets corrupted in the first place and why the validity check doesn’t find it.

I hope people will still buy my plugin despite this fix :open_mouth: :stuck_out_tongue: .


Lost Model! Alot of work will be lost... HELP
Model Lost in Zoom Extent
Sketchup zoom extends with text and 2d problem
#7

Yes, @eneroth3 is correct: this is another example of the singular text bug. Even if the cause isn’t yet known, I agree it would be a simple and valuable addition to the validity check since there is no way to determine where the errant Text was meant to go.


#8

Looks like you found the fix!

The label you found only exists once in the model. After “cleaning” it. My original label is still there…
So something along the way likely duplicated it but didn’t pick up the coordinates leaving the orphan stranded.

Thank you for creating such a simple and elegant solution.
I probably will not use copy scenes much - but you saved me a lot of time on this issue.
So I will purchase your plugin in gratitude!
You will be helping many with this I’m sure.
Thanks
Bob


#9

One extension I use quite a bit is: Cleanup3 - I wonder if an extension could be creating this type of issue?
I do not know the internals as you guys do… but its a thought.
Agreed - a validity check during “save” would do a world of good for those who have been tripped up by this.
thanks again.


#10

I’ve accidentally managed to create it independently of using an extension. If you attach a Text object to any SU geometry - edge, component, face, etc - then delete the attachment object, the Text object can lose its positional information, and shoot off (effectively) to infinity with coordinates (NaN, NaN, NaN) [NaN = Not A Number]

It doesn’t seem to happen in small, simple models, just in larger ones (for me at any rate) but as @slbaumgartner says, no-one has yet found a way to reproduce the behaviour, except by accident.


#11

I noticed the issue with one of my extensions in an early phase of development and added the hack shown above to purge the invalid texts. This was fixed before the extension was published but it’s not unlikely other extensions have a similar issue. What is needed is more info regarding the Zoom Extents issue: when it appears, what users have done just before, what extensions are installed etc.


#12

I don’t know exactly when it happened -

But…
I had selected my entire model - move copy and moved it to a new layer and into a new scene…
At that point I was deleting items in the new scene (including the one that had the text attachment) to create a new plan view that I needed.
Then hit zoom extents… blam… it turned into a little ball of fuzz.

That said - on the cleaned up one - I did the exact same thing (because I still needed that plan view) and it did not reoccur. Obviously I didn’t do it identically - so who knows… I’ll experiment a bit and see if I can get it to happen…

But the fix is the fix.
Thanks for that!


#13

To add to the canon on this issue. This happened to me with a very simple model. It happened when text was attached to a 2d object, and rather than deleted, was accidentally copied into a component, nested into a group.


#14

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.