I have created four lines that close a loop, but they do not create a face. Can someone explain why and how to solve it? I can manually add a line on top of any of the created lines and the face will appear, but I would like it to be automatic.
i = 0
b = 10.mm
num = 10
grp = ent.add_group
gents = grp.entities
bl = [i,i*i,0]
tl = [i,i*i+b,0]
gents.add_line(tl,bl) # add the initial line
while i < num do
pti = [i,i*i,0] # first base point
ptix = [i,i*i+b,0] # first offset point
i += 1 # go to next step
ptj = [i,i*i,0] # next base point
ptjx = [i,i*i+b,0] # next offset point
gents.add_curve(pti,ptj) # add the base curve
gents.add_curve(ptix,ptjx) # add the offset curve
end
br = [i,i*i,0]
tr = [i,i*i+b,0]
gents.add_line(tr,br) # add the closing line
I have tried this
while i < num do
pti = [i,i*i,0] # first base point
ptix = [i,i*i+b,0] # first offset point
i += 1 # go to next step
ptj = [i,i*i,0] # next base point
ptjx = [i,i*i+b,0] # next offset point
gface = gents.add_face(pti,ptj,ptjx,ptix)
end
But this creates a face for each iteration, where I would need to erase each construction line instead. I hope there is a simpler solution.