0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

sketchupでruby その16

Last updated at Posted at 2021-04-25

概要

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

写真

kai.png

サンプルコード

def kai
   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 * 2
   rot = Geom::Transformation.rotation [0, 0, 0], [0, 1, 0], 45.degrees
   group.transform! rot
end

以上。

0
1
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?