Need Help to fix my SKP file!

Thank you for helping. What caused the issue? Did I do something wrong?

1 Like

@pbacot - I copied everything and pasted into new drawing. Something in that original drawing was messed up, but because it wouldn’t let me pan or zoom or even right click, I couldn’t tell you what went wrong.

@Monirfaizi - I can tell you what is wrong with your model now that it’s been copied into a new clean drawing. Firstly, 103 mb for a single floor plan is a veerrry big file. It’s due to the furnishings you’ve chosen. Most seem to be high poly components for rendering. Did you find them from 3D warehouse? Just the desk I’ve selected here is over 80,000 polygons and that’s just one component. The whole model is at 2.8 mil which is very high and tends to start to cause lagging. There are also a lot of layers. And I’m sure that not everything is drawn on the proper layer. And there is loose geometry that should be grouped like the walls, windows, etc. So yeah, a lot that can be improved here. Good luck!

2 Likes

The issue is a rogue Text entity located very far from the model Origin. It’s a bug form several years ago[1]. There are several other discussions posted about the same issue if you search the forum.

[1] SketchUp zoom extents issue with text
[2] I've also bumped into the Zoom Extents Bug
[3] Zooming In To One Locked Position Only
[4] I've also bumped into the Zoom Extents Bug
[5] Everything disappeared in my file
[6] Model Lost in Zoom Extent
[7] Lost Model! Alot of work will be lost... HELP
[8] Model randomly bugged out
[9] Sketchup zoom extends with text and 2d problem
[10] 144 MB model went blank - can't find model, axes, or horizon
[11] When I am doing a simple drawing (as I was with the attached) zoom extend stops working and I lose most of the model

6 Likes

I dont know if it’s 2018 vs 2019.
I use a space mouse so it was a bit easier to lean on it and move back in to the origin point where the model is. Mousing such a distance, while possible, would wear out the mouse or your finger !!

Once I can see the extent of the model I tried applying the following procedure:
Turn on all layers, unlock anything locked then “select all” (ctrl+A so everything in the file is selected)
Then you can shift+marquee select the visible model parts you want, this then should leave any stray parts of the model still selected so then you can hit delete to get rid of them.

In this case this didn’t work?? maybe there is something deeply nested or there is a leader text issue I believe.

If the copying is too much of a toll, another option is to select the model (ctrl+A) or marquee select it all and make a component of it. Once its a component you can context click it and “save as” This will save the whole model as a component (essentially a skp file) which can then be reopened in a new file and subsequently exploded out of its component state.

1 Like

I tried reducing the problem a bit. This model only has one square in it, but it still has the strange orbiting issue. There is a corrupt something or other in the upper left corner, but it doesn’t show up in model info. I think that it’s text, and looks corrupt for me because I’m using macOS 10.15. SketchUp text in general looks bad in 10.15, I’ll report that.

Here is what I see, and the model…


oddsquare.skp (74.3 KB)

1 Like

Does it look like a satellite view perhaps of where the building is located, that could send things off a bit?

This is an example of what can go wrong when using parallel projection because the zoom is determined by a scale factor not by the distance from the camera to the model. The camera in this model is a very large distance away, but in parallel projection zooming won’t fix that it just tweaks the scale. With the camera so far away, any attempt at orbit goes crazy.

To repair it, change to perspective and then do a zoom extents. Because zoom moves the camera in perspective, that will bring it back to a sensible condition.

1 Like

Did you find a way to set the original file so that perspective showed anything?

Perspective is how I usually work, but you would think that orbit should cope with extreme camera positions and parallel projection. I might mention that to someone.

I never found a way to fix the original file simply by changing to perspective etc. White Rabbit has the method.

I only addressed the specific trouble file @colin showed, since others had already shared fixups for the original. In general, this kind of problem arises when

a) some model contents are extremely far from the main part of the model. The culprit I have seen most frequently is the “singular text bug”, in which a leader text flies off to infinity when the user erases the face the text is anchored to. SU 2019 has an imperfect fix for this bug (the text still gets mis-located but at least stays close to the original location).
b) the user has tried to zoom or orbit after a) has occurred, which causes the camera to also go singular.

To address issue a) one must remove the offending item(s) from the model. Copy and paste only the valid contents to a new blank model is one way to do this. The only tricky part is selecting just the valid contents for the copy. Find and erase the offenders is another way, though more technical because often due to problem b) you can’t zoom or orbit to see them.

To address issue b) you must somehow reset the camera to a sane position. Often the copy and paste technique will accomplish this because the new blank model’s camera is healthy.

Somebody shared an a Ruby script that addresses both of these issues in one go (I can’t remember who but it’s probably among the references @jim_foltz cited earlier).

Edit: It seems to me that even if the original cause is not known, SketchUp should trap and prevent any model contents or the camera from moving off to infinity, as that is clearly not valid data. It should also warn whenever model content is far enough away from the model origin that it exceeds SketchUp’s design intent and is likely to cause problems. Some importers do this already, but it should also apply to manually created geometry.

2 Likes

That’s the impression I got while working with the model.
I ran @eneroth3’s ruby snippet, saved, closed, reopened and zoom extents works as expected.

Ruby%20Console

1 Like

Here’s a fuller version of @eneroth3 's code.
It checks for rogue Text in both the model’s entities and all definitions.
It also switches any problem-text’s layer and visibility ‘on’, then moves the Text to the ORIGIN [0,0,0].
It also tries to force the model to zoom-extents after the text is relocated…
Finally it selects the problem-text [in the Model] and allows the user to press Delete to erase it if desired.

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
puts
5 Likes

Running Tig’s script this is what shows as the culprit:

1: “Motherboard” on Layer “DTR_0.2mm-WINDOW” @ [NaN, NaN, NaN] - relocated at [0, 0, 0]

That fixed version is now in the DB link I sent.

I haven’t found a way without resorting to Ruby scripting. [Edit: The Position Camera Tool puts the Camera at a reasonable location it would seem.]

The initial Camera just after loading the file is located at the coordinates (958.706633", 179.711883", 4338520844592855487600226467840")

Switch to a Perspective Camera and the model appears blank. If you then set the Camera to a sane location using Ruby, you can navigate the model as normal. Using Zoom Extents puts the Camera out to some insane distance again.

Snippet to put Camera near the model Origin:
Sketchup.active_model.active_view.camera.set([-1500,-1500,1500], ORIGIN, Z_AXIS)

did you get this sorted?

Get what sorted ?
There have been several posts, so your cryptic question is too vague to answer…

I am still working on it, cleaning up the model. I used the one whiterabbitdesigncompany fixed. Did not understand the process to figure out myself to be honest. I am good at AutoCAD & Revit, but never have done any projects using Sketchup. I am still not able to copy-past any thing from the model I shared. However, I can edit the one which is fixed. Copy-past is a one way to do the job, but I would like to know the alternative and best solution.

Have you tried doing a component Purge?
I had a similar issue and that seemed to work for me.

if you select everything and make it a component, a context click will alow you to “save as” which will save only those parts as a discreet skp file.

please ignore I ment to post that to the topic
Kim