293 |
{ |
{ |
294 |
"Type": "2", |
"Type": "2", |
295 |
"Name": "SqFilletConnection", |
"Name": "SqFilletConnection", |
296 |
"Data": "float width;int flags;", |
"Data": "float width;int flags; float blendw; int power;", |
297 |
"Params": "float width, int flags", |
"Params": "float width, int flags, float blendw, int power", |
298 |
"ParamCode": "this->width = width; this->flags = flags; ", |
"ParamCode": """this->width = width; this->flags = flags; |
299 |
|
this->blendw = blendw; this->power = power; """, |
300 |
"RenderCode" : """ |
"RenderCode" : """ |
301 |
vector<ZPt> sq1; |
vector<ZPt> sq1; |
302 |
vector<ZPt> sq2; |
vector<ZPt> sq2; |
312 |
ZPt ctr2 = coords2.transform(ZPt(.5, .5, 0)); |
ZPt ctr2 = coords2.transform(ZPt(.5, .5, 0)); |
313 |
ZPt mid = 0.5*(ctr1 + ctr2); |
ZPt mid = 0.5*(ctr1 + ctr2); |
314 |
|
|
315 |
Fillet::FilletDistort d1(ctr1, mid, width, flags); |
Fillet::FilletDistort d1(ctr1, mid, width, flags, blendw, power); |
316 |
Fillet::FilletDistort d2(ctr2, mid, width, flags); |
Fillet::FilletDistort d2(ctr2, mid, width, flags, blendw, power); |
317 |
|
|
318 |
vector<ZPt> o1; |
vector<ZPt> o1; |
319 |
if(!Fillet::blendEdge(sq1.begin(), sq1.end(), |
if(!Fillet::blendEdge(sq1.begin(), sq1.end(), |