// Bentley GenerativeComponents Transaction File -- File structure version 1.60. (Please do not delete or change this line.) environment { GCVersion = '10.08.00.40'; MSVersion = '10.15.01.23'; MSProject = ''; MSDesignFile = 'divide_curve.dgn'; MSMasterUnit = {Meter, 'mm', Metric, 1.0, 1000.0}; MSSubUnit = {Meter, 'mm', Metric, 1.0, 1000.0}; MSStorageUnit = {Meter, '', Metric, 1.0, 1000.0}; MSUorsPerStorageUnit = 1000.0; } transaction 1 stateChange 'Add baseCS' { gcModel { node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem { Technique = 'AtDGNModelOrigin'; DGNModelName = 'Design Model'; SymbolSize = 1.0; GraphLocation = {40.0, 40.0, 0.0, 118.59}; } } } transaction 2 stateChange 'Add point1, point2, point3, point4, point5, point6' { gcModel { node User.Objects.point1 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = -3618.76659405273; YTranslation = -1903.51859023737; ZTranslation = 0.0; GraphLocation = {314.0, 40.0, 0.0, 158.87}; } node User.Objects.point2 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = -538.962544752637; YTranslation = -2592.38988740536; ZTranslation = 0.0; GraphLocation = {314.0, 238.87, 0.0, 158.87}; } node User.Objects.point3 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 3686.25766352346; YTranslation = -12.6476473054738; ZTranslation = 0.0; GraphLocation = {314.0, 437.74, 0.0, 158.87}; } node User.Objects.point4 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 5825.17081740847; YTranslation = -1323.93023314477; ZTranslation = 0.0; GraphLocation = {314.0, 636.61, 0.0, 158.87}; } node User.Objects.point5 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 10903.0467022753; YTranslation = 1046.86899439994; ZTranslation = 0.0; GraphLocation = {314.0, 835.48, 0.0, 158.87}; } node User.Objects.point6 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 12679.3626400044; YTranslation = -361.611135308814; ZTranslation = 0.0; GraphLocation = {314.0, 1034.35, 0.0, 158.87}; } } } transaction 3 stateChange 'Add bsplineCurve1' { gcModel { node User.Objects.bsplineCurve1 Bentley.GC.NodeTypes.BSplineCurve { Technique = 'ByPoles'; Poles = { point1,point2,point3,point4,point5,point6 }; Order = 0; Color = Colors.Red; GraphLocation = {588.0, 40.0, 0.0, 118.59}; } } } transaction 4 stateChange 'Add point7' { gcModel { node User.Objects.point7 Bentley.GC.NodeTypes.Point { Technique = 'ByNumberAlongCurve'; Curve = bsplineCurve1; NumberAlongCurve = 10; NumberAlongCurveOption = NumberAlongCurveOption.ArcLength; IncludeStart = true; IncludeEnd = true; GraphLocation = {829.381, 70.557, 0.0, 132.017}; } } } transaction 5 stateChange 'Add bsplineCurve2' { gcModel { node User.Objects.bsplineCurve2 Bentley.GC.NodeTypes.BSplineCurve { Technique = 'SplitAtPoint'; CurveToSplit = bsplineCurve1; SplitPoint = point7; SwapStartEnd = false; AutoHideInputs = true; Color = Colors.Blue; GraphLocation = {1036.192, -130.491, 0.0, 132.017}; } } } transaction 6 stateChange 'Add operation1' { gcModel { node User.Objects.operation1 Bentley.GC.NodeTypes.Operation { Technique = 'Default'; Subject = bsplineCurve2; OperatorKey = 'object.ToList'; GraphLocation = {1257.142, -150.086}; } } } ========== XML ================================================================ object ShapeGF(pList2d) { object pListOut = FilledList2d(0,0); for (int j=0; j<pList2d[0].Count-2; j+=2) { for (int i=(j%4)*0.5; i<pList2d.Count-2; i+=2) { pListOut = Add( pListOut, {pList2d[i][j],pList2d[i+2][j],pList2d[i+2][j+1],pList2d[i+1][j+1],pList2d[i+1][j+2],pList2d[i][j+2]} ); } } return pListOut; }