# Change the columns as the diameter increases.

Member, Employee Posts: 12
✭✭✭
edited March 28

I'm researching an approach with script in SpaceClaim to work parametrically change columns from 3-5-7 to become columns 4-6-8 or 5-7-9 etc as the diameter increases. Does anyone have similar solution with script?

Tagged:

• Member, Moderator, Employee Posts: 859
✭✭✭✭

@Gabriel Messager might have an idea ?

• Member, Employee Posts: 54
✭✭✭✭

@Takahiro Yamaguchi
Here is an example:

```import math

ClearAll()

direction = (endPoint - startPoint).Direction.ArbitraryPerpendicular
pt1 = startPoint
pt2 = endPoint
pt3 = endPoint + (direction.UnitVector * radius)
result = CylinderBody.Create(pt1, pt2, pt3)

distance_axis = MM(15)

for i in range(nb_small_cylinders):
startPoint = Point.Create(math.copysign(distance_axis*int(i/2+ i%2), i%2-0.5), 0, 0)
endPoint = Point.Create(startPoint.X, startPoint.Y, MM(5))

for i in range(nb_small_cylinders-2):
startPoint = Point.Create(math.copysign(distance_axis*int(i/2+ i%2), i%2-0.5), distance_axis, 0)
endPoint = Point.Create(startPoint.X, startPoint.Y, MM(5))
startPoint = Point.Create(math.copysign(distance_axis*int(i/2+ i%2), i%2-0.5), -distance_axis, 0)
endPoint = Point.Create(startPoint.X, startPoint.Y, MM(5))