The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Construction file loads incompletely

aelkins
3 stars
Construction file loads incompletely


When an angle bisector of two lines is created, a hidden point of intersection is created. It is possible for that point to be deleted without also deleting the angle bisector itself. While the construction itself remains intact and functions as expected, saving the construction in this state results in a construction which will load incompletely. Specifically, everything in the "Construction Text" view from and including the angle bisector itself onward will not load.

Start a fresh Cinderella session.
Create two lines, a thru A and b thru B, so that they intersect in the view.
Use "Angular Bisector" to create a bisector of the two lines (a,b).
Open a "Construction Text" view.
Observe that the bisector line c shows AngleBisector(a;b;C).
Now use the point or the intersection tool to create the intersection point of the lines.
Observe that the "Construction Text" view shows the point C as Meet(a;b) and most importantly it is shown following the bisector line c AngleBisector(a;b;C) even though it is referenced by it!
Now click Undo remove point C.
Observe that the bisector line c remains.
Now create a point anywhere in the view even at the intersection point of the lines will do.
Use Move tool to move line a or b.
Observe that the bisector line c now shows AngleBisector(a;b;_), with the placeholder '_' replacing the reference to 'C'
Now create a few other elements.
Save as IncompleteLoad?.cdy.
Close all associated windows.
Load IncompleteLoad?.cdy.
Observe that only the two lines a thru A and b thru B remain.
Also observe that the "Construction Text" view (which was open at the time of saving) did not open.

This unfortunate behavior is particularly insidious because you have three lines which can be paired three ways to create the intersection point. You may then perhaps decide to change which pair to use using undo and only after completing a complicated construction, saving it and only after loading it find it damaged.

Also observe that if Delete is clicked instead of Undo to remove point C, the bisector line c is also deleted. This will come as a surprise to someone who may have created both bisectors only to have them both disappear when only the point was to be removed. Clicking Redo then restores point C followed by bisector line c in the correct order. However if both bisectors have been created, the point is restored following them, the wrong order.

Also observe that if after the intersection point C is created, the bisector is deleted, then clicking redo places it following the point C in the correct order. However now clicking undo makes the point disappear leaving a blank line ahead of the bisector line c in "Construction Text" view.
Moving line a or b makes the blank line disappear and the bisector line c now shows AngleBisector(a;b;_). The undo should have undone the redo deleting the line again.

It is likely that there are several coding errors involved here.
1) Creating the intersection point should have inserted it ahead of the bisector, possibly appearing very early in the construction.
2) Undo should find the element to be removed from the list rather than deleting based on some stale index position.
3) "Construction Text" view should be updated under these conditions.
4) There should be a reference count for elements so that they are not removed if it is not zero as a cross check on coding errors.
5) Undo needs to remember the state of an element's setInMacro() setting and restore it to the macro list rather than deleting it.

Mirroring a circle in a circle is another example of where undo is also failing:
Start a fresh Cinderella session.
Create two circles C0 about A and C1 about B.
Use the Mirror tool to mirror C0 in C1 which creates C3 Circumcirle(D;F;H) as shown in the "Construction Text" view.
Using the point thru line creates line l thru point K.
Click Undo once removes line l thru point K.
Click Undo again removes C3.
Using the point thru line creates line l thru point K instead of line a thru point C.
The elements used to construct C3 have not been deleted.
Nor will they be reused:
Click Undo once removes line l thru point K again.
Use the Mirror tool to mirror C0 in C1 which creates C3 Circumcirle(L;N;P) as shown in the "Construction Text" view.
Using the point thru line creates line u thru point Q instead of line l thru point K showing that more element names have been used up.

Observed using Version: 2.9 build 1783 (2015/08/03 18:17)

Best regards,
Alexander Elkins



 
on: Sun 20 of Sep, 2015 [19:59 UTC] reads: 66906

Posted messages

author message
aelkins
3 stars
Re: Construction file loads incompletely
on: Fri 16 of Oct, 2015 [19:46 UTC]
Knock-knock, hello, are you paying attention? sad





Show posts:
 
Language