api-issue-tracker icon indicating copy to clipboard operation
api-issue-tracker copied to clipboard

Layout::SketchUpModel.model_to_paper_point Always returns same point with different point_3d Parameter

Open 3dmod opened this issue 2 years ago • 3 comments

  1. SketchUp/LayOut Version:
  • Version 22.0.353
  • Version 23.0.418
  1. OS Platform: macOS Ventura

I need to find the Layout Coordinate of a SketchUp Model Reference

Layout::SketchUpModel.model_to_paper_point returns the same point regardless of the parameter point_3d.

  • This method broke for every SU version after SU22
def self.model_to_paper_point_test
	pts = [[0, 0, 0], [100, 0, 0], [0, 100, 0], [0, 0, 100] ]
	path =  "/Users/***/Downloads/not_work.layout"
	doc = Layout::Document.open(path)
	mv = doc.pages[0].entities.to_a.find { |e| e.is_a?(Layout::SketchUpModel) }
	pts.map! { |pt| {p3: pt, p2: mv.model_to_paper_point(pt)} }
	pts.reject! { |pt| pt[:p2].nil?}
	pts.each{ |pt| puts " - #{pt}"}
end

Results are:

  • {:p3=>[0, 0, 0], :p2=>Point2d(17.7384, 2.48386)}
  • {:p3=>[100, 0, 0], :p2=>Point2d(17.7384, 2.48386)}
  • {:p3=>[0, 100, 0], :p2=>Point2d(17.7384, 2.48386)}
  • {:p3=>[0, 0, 100], :p2=>Point2d(17.7384, 2.48386)}

I will email the file used to get the given results to [email protected])

3dmod avatar Jun 29 '23 16:06 3dmod

Logged as: SKEXT-3761

sketchup[bot] avatar Jul 17 '23 15:07 sketchup[bot]

I will email the file used to get the given results to [email protected])

I'm going over some of these issues and I'm not finding an email relating to this issue. I got one for #872 and #907, but not this one.

thomthom avatar Sep 28 '23 08:09 thomthom

This issue has not presented itself in 2024 yet. My inclination is that it is an issue SU2023 but opening files made with SU2022. I think you can close this and I will reference it if it comes up again.

3dmod avatar Apr 26 '24 02:04 3dmod