The algorithms Use Edges to be Created Manually and Use Faces to be Created Manually allow creating a 1D or a 2D mesh in a python script (using AddNode, AddEdge and AddFace commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh.
For example, you want to use standard algorithms to generate 1D and 3D meshes and to create 2D mesh by your python code. For this, you
Consider trying a sample script demonstrating the usage of Use Faces to be Created Manually algorithm for construction of a 2D mesh using Python commands.
Mesh computed by the sample script shown in a Shrink mode.