// 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 script "Points sequence by script transaction" { for (int j = 0; j < 10; ++j) { Point point = new Point("p_" + j); point.ByCartesianCoordinates(baseCS,j+1.0,0.0,j*j/10); } } transaction modelBased "First (using full point Features) BSpline curve" { feature curve1 GC.BSplineCurve { Points = {p_0, p_1, p_2, p_3, p_4, p_5, p_6, p_7, p_8, p_9}; SymbolXY = {103, 103}; Color = 3; } } transaction modelBased "Point (compound) defined by internal function" { feature points2 GC.Point { Function = function (cs,num,scale) { for (int j = 0; j < num; ++j) { Point point = new Point(this); point.ByCartesianCoordinates(cs,j+1.0,0.0,scale*j*j/num); } }; FunctionArguments = {baseCS,10,10}; SymbolXY = {102, 99}; } } transaction modelBased "Second (using child Feature points) BSpline curve" { feature curve2 GC.BSplineCurve { Points = points2; SymbolXY = {103, 99}; Color = 4; } } transaction modelBased "Third (using DSeries lightweight points) BSpline curve (defined by internal function)" { feature curve3 GC.BSplineCurve { Function = function (cs,num,scale) { DPoint3d dPoint = {}; // list of points for (int j = 0; j < num; ++j) { dPoint[j] = new DPoint3d(1.0+j, 0.0, scale*j*j/num); } this.ByPointsAsDPoint3ds(cs, dPoint); }; FunctionArguments = {baseCS,10,5}; SymbolXY = {103, 97}; } } transaction modelBased "Fourth BSpline curve only as point" { feature p5T GC.GraphVariable { Value = 0.5; LimitValueToRange = true; RangeMinimum = 0.0; RangeMaximum = 1.0; SymbolXY = {109, 98}; LimitValueToRange = true; RangeMinimum = 0.0; RangeMaximum = 1.0; } feature point4 GC.Point { Function = function(cs,num,scale,t) { DPoint3d dPoint = {}; // list of points for (int j = 0; j < num; ++j) { dPoint[j] = new DPoint3d(1.0+j, 0.0, scale*j*j/num); } BSplineCurve childBSpline = new BSplineCurve(); childBSpline.ByPointsAsDPoint3ds(cs, dPoint); this.ByParameterAlongCurve(childBSpline,t); }; FunctionArguments = {baseCS, 10, 20,p5T}; SymbolXY = {104, 95}; } } transaction modelBased "Graph changed by user" { feature p5T GC.GraphVariable { Value = 0.41; } } transaction modelBased "create graph function A" { feature pointsAtParamterAlongCurve_A GC.GraphFunction { Definition = bool function (ICurve supportCurve, int numPoints) { double t_spacing = 1.0/(numPoints-1); for (int i = 0; i < numPoints; ++i) { Point childPoint = new Point(this); childPoint.ByParameterAlongCurve(supportCurve, i*t_spacing ); } return true; }; } } transaction modelBased "apply funcionA on curve3" { feature point01 GC.Point { Function = pointsAtParamterAlongCurve_A; FunctionArguments = {curve3,30}; } }