1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/* autogenerated from "macros/Sinks/BARXY.sci" */
function BARXY() {
BARXY.prototype.define = function BARXY() {
model=scicos_model();
xmin=-15;
xmax=15;
ymin=-15;
ymax=15;
model.sim=list("BARXY_sim",5);
model.blocktype="d";
model.dep_ut=[true,false];
model.in1=[[-1],[-1]];
model.intyp=[1];
model.out=[];
model.evtin=[1];
model.rpar=[[xmin],[xmax],[ymin],[ymax]];
model.ipar=1;
x=standard_define([2,2],model,[],[]);
x.graphics.in_implicit=["E","E"];
x.graphics.out_implicit=[];
x.graphics.exprs=[["-15"],["15"],["-15"],["15"],["1"]];
}
BARXY.prototype.details = function BARXY() {
}
BARXY.prototype.get = function BARXY() {
}
BARXY.prototype.set = function BARXY() {
x=arg1;
graphics=arg1.graphics;
exprs=graphics.exprs;
model=arg1.model;
while (true) {
[ok,xmin,xmax,ymin,ymax,thickness,exprs]=scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess=[];
if (ymin>=ymax) {
mess=[[mess],["Ymax must be greater than Ymin"],[" "]];
ok=false;
}
if (xmin>=xmax) {
mess=[[mess],["Xmax must be greater than Xmin"],[" "]];
ok=false;
}
if (thickness<=0) {
mess=[[mess],["Thickness must be strictly positive."]];
ok=false;
}
if (!ok) {
message(mess);
} else {
model.rpar=[[xmin],[xmax],[ymin],[ymax]];
model.ipar=thickness;
graphics.exprs=exprs;
x.graphics=graphics;
x.model=model;
break;
}
}
}
}
|