I am trying to create a closed LineString made of a number of CircularSrings, but have got stuck. I cannot see how to add the geometry from both strings.
This is what I have so far. QGIS version 3.4.2
from qgis.PyQt.QtCore import QVariant
vl = QgsVectorLayer("LineString", "temp", "memory")
pr = vl.dataProvider()
pr.addAttributes([QgsField("name", QVariant.String)])
vl.updateFields()
cString1 = QgsCircularString.fromTwoPointsAndCenter(QgsPoint(306580,167317),QgsPoint(306680,167317),QgsPoint(306680,167217))
cString2 = QgsCircularString.fromTwoPointsAndCenter(QgsPoint(306680,167317),QgsPoint(306580,167317),QgsPoint(306680,167417))
geom_cString1 = QgsGeometry(cString1)
geom_cString2 = QgsGeometry(cString2)
f = QgsFeature()
f.setGeometry(geom_cString1)
f.setAttributes(["One"])
pr.addFeature(f)
vl.updateExtents()
QgsProject.instance().addMapLayer(vl)
