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 その14

Last updated at Posted at 2021-04-25

概要

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?