What's wrong with my model?

I created the model
gim02.skp (868.7 KB) by Ruby API. It was small in skp size. But when opening it, it consumed much CPU and more than 5G memory. It froze Sketchup. What’s wrong with the model?

Its screenshort:
model

The edges and faces count. This is very very much.
This will force any hardware to its knees…I guess. Since you do not have a graphic card, I do not see too much chance that you will able to work with this file. (Mine also sweats, even though it is one of the better.)
image

@dezmo is absolute correct. The first clue, even without opening your model, is how the objects at the top of your towers look black in your screenshot. That happens when edges are so close together and dense that the graphics card overlaps them into a single black area. File size is no longer a good indicator of model complexity because the current SketchUp file format is compressed like a zip file, and repeated elements compress very efficiently. Over 21 million edges is a wildly complex model that will bring any computer to its knees.

I recommend that you start over and draw those objects (insulators?) using far fewer edges! Surely such insane levels of detail are not really needed.

If you are writing the code, I recommend that you create components and groups where the axes are close to their geometry.
Not like the picture below.

image

Ps.: And there seem to be many geometrically identical components, only differing in their “coordinate system.”

I do not understand here. Yes, I am writing the code. I create components (instances and definitions) . If defitiontions exist, just creating instances. The logic is straightforward. But what is “components that the axes are close to their geometry”? Thanks a lot.

Lets check the two example
cubes.skp (32.7 KB)
cubes below they are looks identical, but actually their axis are different. The “Cube” have its axes fare away from geometry, while the “Better Cube” axes are just in the corner of the geometry.
Later on when you are inserting an additional instances .- in my opinion - is more easy if the component formed similar as the “Better Cube”.

cubes_comps

Example code snippet
def create_cube
  ents = Sketchup.active_model.active_entities
  points = [ [1,0,0], [2,0,0], [2,1,0], [1,1,0] ]
  group = ents.add_group
  face = group.entities.add_face( points )
  face.pushpull(-1)
  comp = group.to_component
  comp.definition.name = "Cube"
end
create_cube

def create_better_cube
  ents = Sketchup.active_model.active_entities
  points = [ [0,0,0], [1,0,0], [1,1,0], [0,1,0] ]
  group = ents.add_group
  face = group.entities.add_face( points )
  face.pushpull(-1)
  comp = group.to_component
  comp.definition.name = "Better Cube"
  vector = Geom::Vector3d.new(1, 0, 0)
  tr = Geom::Transformation.translation(vector)
  comp.transformation = tr
end
create_better_cube
2 Likes

Got it completely. Thanks for the detailed explanation.