Skip to content

Commit 2b5c36f

Browse files
committed
Use numbers based on MGED editing - in particular, set curr_e_axes_pos for trans.
1 parent 1a5aa90 commit 2b5c36f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/librt/tests/edit/tor.cpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ main(int argc, char *argv[])
431431
//
432432
// In essense, xpos and ypos are intended to simulate what a GUI toolkit
433433
// would provide us from a mouse cursor position.
434-
int xpos = 50;
435-
int ypos = 80;
434+
int xpos = 1372;
435+
int ypos = 1383;
436436
vect_t mousevec; /* float pt -1..+1 mouse pos vect */
437437
/* map xpos and ypos to the -1 to +1 range*/
438438
mousevec[X] = xpos * INV_BV;
@@ -447,7 +447,7 @@ main(int argc, char *argv[])
447447
// set cmp vals to expected
448448
VMOVE(cmp_tor->v, orig_tor->v);
449449
VMOVE(cmp_tor->h, orig_tor->h);
450-
cmp_tor->r_a = 20.19531250000000000;
450+
cmp_tor->r_a = 23.37646484375000000;
451451

452452
rt_solid_edit_process(s);
453453

@@ -471,9 +471,12 @@ main(int argc, char *argv[])
471471
s->e_inpara = 0;
472472
s->es_scale = 0;
473473

474+
// XY transform cares about curr_e_axes_pos
475+
VMOVE(s->curr_e_axes_pos, orig_tor->v);
476+
474477
// Prepare mousevec.
475-
xpos = 100;
476-
ypos = 200;
478+
xpos = 1482;
479+
ypos = 762;
477480
/* map xpos and ypos to the -1 to +1 range*/
478481
mousevec[X] = xpos * INV_BV;
479482
mousevec[Y] = ypos * INV_BV;
@@ -484,7 +487,7 @@ main(int argc, char *argv[])
484487
bu_exit(1, "ERROR: RT_SOLID_EDIT_TRANS(xy) failed ft_edit_xy call: %s\n", bu_vls_cstr(s->log_str));
485488

486489
// set cmp vals to expected
487-
VSET(cmp_tor->v, 7.28225503464339674,4.81374219599902631,22.93261631551052560);
490+
VSET(cmp_tor->v, -12.61323935991339340,24.90340037137704243,22.73653941175349047);
488491
VMOVE(cmp_tor->h, orig_tor->h);
489492
cmp_tor->r_a = orig_tor->r_a;
490493

0 commit comments

Comments
 (0)