@jderekito said:
Thanks TIG,
The defaulting to inches explains it. For now I am just trying to draw a single line. If I just drawing a single line does it still need the face and edges. Thanks again for you assistance as I am still learning my way around SU.
Derek
'Line' and 'Edge' are interchangeable in this context...
A line [edge] is just a line.
edge=entities.add_line(pt1,pt2)
for one line,
edges=add_edges(pt1,pt2,pt3); edge0=edges[0]; edge1=edges[1]
for multiple lines [edges] strung between the list of points - if you use .add_edges you get an array of edges - if there's only one you still need to use edges[0] to find it, if you .add_line you get just the one edge [line].
A face needs at least 3 edges with common vertices. More edges also have to be coplanar.
face=entities.add_face(xxxxx)
takes a 'list/array of points', it then makes new edges with a new face,
or a 'list/array of edges', or a 'closed-curve' - it then makes a new face to these existing edges
So there are several ways:
Make the points and then make the edges and face in one go - probably what you want -
face=entities.add_face(pointsList)
Make the edges from the points and add the face to them - useful if some edges pre-exist -
edges=entities.add_edges(pointsList); face=entities.add_face(edges)
Make the edges and then 'find_faces' that they can have - useful if it's a set of 3D edges -
edges=entities.add_edges(pointsList); edges[0].find_faces
it returns only the number of faces that it's made - if you want to find the face itself then you then need to use
face=edges[0].faces[0]
additionally...