Home
GH Sample Files
GH Python Tutorials
Rhino Assets
Books
Blog
Plugins
About
Privacy Policy
Terms of Service
Contact
© 2025 STUDIO TAMA

- brick_w: float – レンガの幅(X方向)
- brick_h: float – レンガの高さ(Z方向)
- brick_d: float – レンガの奥行き(Y方向)
- num_x: int – X方向のレンガ数
- num_z: int – Z方向の段数
- gap_x: float – レンガ間のX方向隙間(横の目地)
- gap_z: float – レンガ間のZ方向隙間(縦の目地)- results: list of Box – レンガブロックの集合体import Rhino.Geometry as rg
# === 🔧 パラメータ例 ===
# brick_w = 200.0 # レンガの幅(X方向)
# brick_h = 60.0 # レンガの高さ(Z方向)
# brick_d = 100.0 # レンガの奥行き(Y方向)
# num_x = 20 # X方向のレンガ数
# num_z = 40 # Z方向の段数
# gap_x = 4.0 # レンガ間のX方向隙間(横の目地)
# gap_z = 4.0 # レンガ間のZ方向隙間(縦の目地)
# === 🧱 レンガ配置処理 ===
results = []
for z in range(num_z):
z_pos = z * (brick_h + gap_z)
is_odd = z % 2 == 1
x_offset = - (brick_w + gap_x) / 2 if is_odd else 0
for x in range(num_x):
x_pos = x * (brick_w + gap_x) + x_offset
base_pt = rg.Point3d(x_pos, 0, z_pos)
box = rg.Box(
rg.Plane(base_pt, rg.Vector3d.XAxis, rg.Vector3d.YAxis),
rg.Interval(0, brick_w),
rg.Interval(0, brick_d),
rg.Interval(0, brick_h)
)
results.append(box)License & Terms of Use
| Item | Allowed | Description |
|---|---|---|
| Integration into your projects | ○ | You are free to use the code as part of your scripts or works, whether for personal or commercial purposes. |
| Code modification & learning use | ○ | Customizing the code for your own learning or specific purposes is very welcome. |
| Sharing on SNS / showcasing | ○ | No permission is required to share images or URLs of your works. Please feel free to showcase them! |
| Redistribution / republishing | × | Do not publish the code or files in their entirety as content on your own site or elsewhere. |
| Reselling as materials/programs | × | Do not sell the content of this site, either as-is or with only minor modifications, for a fee. |
| Copyright notice / link | Optional | Not required, but including a link to the source would be greatly appreciated. |