I find a bug about Sketchup::Entities#intersect_with

Sketchup Version : 2022.0.354

test.skp (1.3 MB)

face_g, model_g = nil, nil
Sketchup.active_model.entities.grep(Sketchup::Group).each do |g|
  if g.entities.grep(Sketchup::Face).empty?
    model_g = g
  else
    face_g = g
  end
end
model_g.entities.intersect_with(true, model_g.transformation, Sketchup.active_model.entities, IDENTITY, false, face_g)

Result

Is the following issue reported last May, the issue that you describe ?

https://github.com/SketchUp/api-issue-tracker/issues/786

1 Like

I think it should not same. This is a complete face, and some of the lines in the middle are broken.And I add the situation to the issue.

1 Like

The corners of the wall at the right end of the view you showed are not at the same red axis coordinate of the left end of the wall. That can lead to some issues like this.

I moved the corners into place, see if this shows less issues.

test-2.skp (1.4 MB)

Please edit your issue post and paste in the test code (from above.)

The model is drawn by the user, and the program is not good to adjust the coordinate axis

The program does not change what the user draws.

“Garbage in, … garbage out.”