LoginSignup
0
1

More than 3 years have passed since last update.

sketchupでruby その14

Posted at

概要

sketchupでrubyやってみた。
scaling使ってみた。

写真

bai.png

サンプルコード

def bai
   model = Sketchup.active_model
   entities = model.active_entities
   unit = 10
   p = Array.new
   p[0] = ORIGIN
   p[1] = [unit, 0, 0]
   p[2] = [unit, unit, 0]
   p[3] = [0, unit, 0]
   group = entities.add_group
   face = group.entities.add_face p
   face.reverse! if face.normal.z < 0
   face.pushpull unit
   scale = Geom::Transformation.scaling Geom::Point3d.new(0, 0, 0), 2, 2, 2
   group.transform! scale
end


以上。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1