// Bentley GenerativeComponents Transaction File -- File structure version 1.03. (Please do not delete or change this line.) environment { GCVersion = "08.09.04.76"; MSVersion = "08.09.04.51"; MSProject = "GC_Default"; MSDesignFile = "C:\\Documents and Settings\\All Users\\Dati applicazioni\\Bentley\\Workspace\\projects\\examples\\GC_Default\\out\\$gcworkdgn.tmp"; } transaction modelBased "Point by function - 1" { feature point01 GC.Point { Function = function (CoordinateSystem cs) { Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, 5, 3, 0); }; FunctionArguments = {baseCS}; } } transaction modelBased "Point by function - 2 FOR" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num) { for (int i = 0; i < num; i++) { Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, 3*i, 3, 0); } }; FunctionArguments = {baseCS,10}; } } transaction modelBased "Point by function - 3 sin cos" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num) { for (int i = 0; i < num; i++) { double xPos = Cos(360/num*i); double yPos = Sin(360/num*i); Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, 0); } }; } } transaction modelBased "Point by function - 4 sin cos + radius" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num) { for (int i = 0; i < num; i++) { double radius = 5; double xPos = Cos(360/num*i)*radius; double yPos = Sin(360/num*i)*radius; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, 0); } }; } } transaction modelBased "Point by function - 5 height" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num) { for (int i = 0; i < num; i++) { double radius = 5; double xPos = Cos(360/num*i)*radius; double yPos = Sin(360/num*i)*radius; double zPos = i; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, zPos); } }; } } transaction modelBased "Point by function - 6 normalized height" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h) { for (int i = 0; i < num; i++) { double radius = 5; double xPos = Cos(360/num*i)*radius; double yPos = Sin(360/num*i)*radius; double zPos = h/num*i; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, zPos); } }; FunctionArguments = {baseCS,10,20}; } } transaction modelBased "Point by function - 7 add points" { feature point01 GC.Point { FunctionArguments = {baseCS,25,20}; } } transaction modelBased "Point by function - 8 start and end @ 0.0" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h) { for (int i = 0; i < num; i++) { double radius = Sin(180/num*i)*5; double xPos = Cos(360/num*i)*radius; double yPos = Sin(360/num*i)*radius; double zPos = h/num*i; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, zPos); } }; } } transaction modelBased "Point by function - 9 only end @ 0.0" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h) { for (int i = 0; i < num; i++) { double radius = Sin((100/num*i)+80)*5; double xPos = Cos(360/num*i)*radius; double yPos = Sin(360/num*i)*radius; double zPos = h/num*i; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, zPos); } }; } } transaction modelBased "Point by function - 10 replicate - like swissRe" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h,int spNum) { for (int j = 0; j < spNum; j++) { for (int i = 0; i < num; i++) { double shift = 360/spNum*j; double radius = Sin((100/num*i)+80)*5; double xPos = Cos((360/num*i)+shift)*radius; double yPos = Sin((360/num*i)+shift)*radius; double zPos = h/num*i; Point point01 = new Point(this); point01.ByCartesianCoordinates(cs, xPos, yPos, zPos); } } }; FunctionArguments = {baseCS,25,20,10}; } } transaction modelBased "Point by function - 11 point data structure with arrays" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h,int spNum) { Point point01 = {}; for (int j = 0; j < spNum; j++) { point01[j]={}; for (int i = 0; i < num; i++) { double shift = 360/spNum*j; double radius = Sin((100/num*i)+80)*5; double xPos = Cos((360/num*i)+shift)*radius; double yPos = Sin((360/num*i)+shift)*radius; double zPos = h/num*i; point01[j][i] = new Point(); point01[j][i].ByCartesianCoordinates(cs, xPos, yPos, zPos); } } return point01; }; } } transaction modelBased "Point by function - 12 make polygon structure" { feature polygon01 GC.Polygon { Points = point01; } } transaction modelBased "Point by function - 13 adjust ends" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h,int spNum) { Point point01 = {}; for (int j = 0; j < spNum+1; j++) { point01[j]={}; for (int i = 0; i < num; i++) { double shift = 360/spNum*j; double radius = Sin((100/num*i)+80)*5; double xPos = Cos((360/num*i)+shift)*radius; double yPos = Sin((360/num*i)+shift)*radius; double zPos = h/num*i; point01[j][i] = new Point(); point01[j][i].ByCartesianCoordinates(cs, xPos, yPos, zPos); } } return point01; }; } } transaction modelBased "Point by function - 14 adjust tower shape with pow" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h,int spNum) { Point point01 = {}; for (int j = 0; j < spNum+1; j++) { point01[j]={}; for (int i = 0; i < num; i++) { double radius = i; double shift = 360/spNum*j; double hShift = ((1.0/num)*(Pow((num-1),3))*0.2); double height = ((-1.0/num) * (Pow(i,3))*0.2)+ hShift; double xPos = Cos((360/num*i)+shift)*radius; double yPos = Sin((360/num*i)+shift)*radius; point01[j][i] = new Point(); point01[j][i].ByCartesianCoordinates(cs, xPos, yPos, height); } } return point01; }; } } transaction modelBased "Point by function - 15 the polygon grid is child of" { feature point01 GC.Point { Function = function (CoordinateSystem cs, int num,double h,int spNum) { Point point01 = {}; for (int j = 0; j < spNum+1; j++) { point01[j]={}; for (int i = 0; i < num; i++) { double radius = i; double shift = 360/spNum*j; double hShift = ((1.0/num)*(Pow((num-1),3))*0.2); double height = ((-1.0/num) * (Pow(i,3))*0.2)+ hShift; double xPos = Cos((360/num*i)+shift)*radius; double yPos = Sin((360/num*i)+shift)*radius; point01[j][i] = new Point(); point01[j][i].ByCartesianCoordinates(cs, xPos, yPos, height); } } Polygon poly = new Polygon(this); poly.ByPointGrid(point01); }; } } transaction modelBased "variables" { feature h GC.GraphVariable { Value = 10; LimitValueToRange = true; RangeMaximum = 50.0; RangeStepSize = 0.0; } feature num GC.GraphVariable { Value = 25; LimitValueToRange = true; RangeMaximum = 50.0; RangeStepSize = 0.0; } feature spNum GC.GraphVariable { Value = 10; LimitValueToRange = true; RangeMaximum = 50.0; RangeStepSize = 0.0; } } transaction modelBased "Graph changed by user" { feature point01 GC.Point { FunctionArguments = {baseCS,num,h, spNum}; } }