class RuboCop::Cop::SketchupBugs::UniformScaling

Until SketchUp 2018 `Geom::Transformation.scaling(scale)` modified the 16th value in the transformation matrix. This way of scaling the matrix isn't fully accounted in all places in SketchUp. There are also a number of exporters and render engines which also doesn't fully handle this.

@example Workaround for SketchUp versions older than SketchUp 2018

tr = Geom::Transformation.scaling(scale, scale, scale)

Constants

MSG

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/sketchup/cop/bugs/uniform_scaling.rb, line 26
def on_send(node)
  return unless valid_for_target_sketchup_version?
  return unless transformation_scaling?(node)

  add_offense(node.arguments.first)
end