0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

windows11で、sketchup6 その33

Posted at

概要

windows11に、sketchup6を入れてみた。
rubyで、3Dを書く。
練習問題、やってみた。

練習問題

sketchupで円弧を閉じてpushpullで立体にするrubyスクリプトは

写真

image.png

def testent4
	model = Sketchup.active_model
	entities = model.active_entities
	center = [0, 0, 0]
	normal = [0, 0, 1]
	radius = 5
	start_angle = 0.degrees
	end_angle = 120.degrees
	arc = entities.add_arc(center, [1, 0, 0], normal, radius, start_angle, end_angle)
	curve = arc[0].curve
	vertices = curve.vertices
	points = vertices.map!{|vertex| 
		vertex.position
	}
	points << center
	face = entities.add_face(points)
	if face
		face.pushpull(-10)
	end
end
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?