Model.linearsurfacebetweenlines#
- Model.linearsurfacebetweenlines(linelist1, endpoints1, linelist2, endpoints2, reverse)#
Creates a ruled surface between two trimmed line lists, and optionally, prepares it for immediate use within the automesher. It can also identify a region in the shape of a ruled surface for the automesher to use under the mesh without surface option.
- Parameters:
linelist1 (EntityList) – The first list of line entities forming one side of the surface.
endpoints1 (EntityList) – The list of two node entities which lie on the lines in the first line list which will be used to trim the line during surface creation. If no nodes are lie in
linelist1then in the argument please pass theent.Node.getentitylist()value.linelist2 (EntityList) – The second list of line entities forming the other side of the surface.
endpoints2 (EntityList) – The list of two node entities which lie on the lines in the second line list which will be used to trim the line during surface creation. If no nodes are lie in
linelist2then in the argument please pass theent.Node.getentitylist()value.reverse (int) –
Indicates whether the lines should be tested for a “bow tie” condition and reversed if necessary. Valid options are:
0 - No testing the lines for a “bow tie” condition and no reversing.
1 - Testing the lines for a “bow tie” condition and reversing.
Example#
Create a surface where lines with IDs 7 and 11 form one side , and line with ID 5 trimmed by nodes with IDs 37 and 38 forms the other , and not immediately bring the surface into the automesher#import hm import hm.entities as ent model = hm.Model() """ Creating a surface where lines with IDs 7 and 11 form one side (linelist1), and line with ID 5 (linelist2) trimmed by nodes with IDs 37 and 38 forms the other (endpoints2), and not immediately bringing the surface into the automesher (model.surfacemode(mode=4)). """ model.surfacemode(mode=4) line_list1 = [ ent.Line(model, 7), ent.Line(model, 11), ] line_list2 = [ ent.Line(model, 5), ] node_list2 = [ent.Node(model, 37), ent.Node(model, 38)] model.linearsurfacebetweenlines( linelist1=line_list1, endpoints1=ent.Node.getentitylist(), linelist2=line_list2, endpoints2=node_list2, reverse=1, )
Note
A case in which the surface is brought into the automesher or a case in which a region in the shape of a ruled surface is brought into the automesher to generate a mesh without using a surface are slightly more complicated. Please see the examples in
Model.linearsurfacebetweennodesandline()orModel.linearsurfacebetweennodes()on how to set a similar case for automesher.