With that in mind:-
I agree with you , even if it means making the quick set form slightly larger to replace the checkbox with a radiobutton panel.
I don't think there would be any harm in that.
My current plan of attack is to revise pad_unit.pas so that each of the experimental 2D 3D menuClick procedures invoke their a sub-procedure (as you suggested) that does not itself reference menu.click object, so that when the time comes removing a menu object will not upset the apple cart.
As a trial I revised the experimental chairing menu entries:-
Code:
procedure Tpad_form.experimental_chairing_menu_entryClick(Sender: TObject); // 214a
begin
{if alert(2,' experimental 3D chairing',
'It is now possible to have some REA bullhead chair positions shown on the trackpad templates,'
+' and for exported 3-D DXF and STL files to contain REA chair detail suitable for CAD rendering, 3D printing, CNC milling, and laser cutting.'
+'||rp.gif In order for the 3-D chair detail to be generated correctly, it is necessary for the rail section data in the templates to match the model rail section currently selected on the DXF dialog.'
+' This means the rail height and the rail head and foot widths.'
+'||green_panel_begin tree.gif If you continue your current rail section data set at `0real > rails >`1 will be ignored.||Rails will be vertical - any rail inclination angle will be ignored.green_panel_end'
+'|At present this function is fully functional only for plain track and turnout templates. Chairing of half-diamond templates is incomplete.'
+'||At present the chair outlines are not shown on printed construction templates, exported PDF and image files, or on the sketchboard.'
+'||rp.gif This function is still an experimental work in progress and subject to much further development and change. For updated information please refer to the Templot Club user forum.'
+'||rp.gif Please be aware that this function is likely to slow down the screen response significantly. It would be wise to leave this function switched off while doing track design work. It is intended for the final output only.'
+'||Your feedback is welcome. Thanks.',
'','','','','cancel','do experimental chairing',0)=5 then EXIT;
//experimental_chairing_menu_entry.Checked:=True; // radio item
rebuild_group_to_match_chairs_menu_entry.Enabled:=True;
exp_chairing:=True;
brick_form.bgnd_chairs_checkbox.Checked:=True; // 232a assume he wants to see them all
brick_form.Show;
redraw(False);}
switch_chairing_on;
end;
//______________________________________________________________________________
procedure Tpad_form.no_chairing_menu_entryClick(Sender: TObject); // 214a
begin
{no_chairing_menu_entry.Checked:=True; // radio item
exp_chairing:=False;
heave_chairs_form.Hide; // 244a
brick_form.Hide; // SC 15-OCT-2024 556
redraw(True);}
switch_off_chairing;
end;
Then added a bit of extra code to the parent menu:-
Code:
procedure Tpad_form.chairs_baseplates_menu_entryClick(Sender: TObject);
begin
// refresh using chairing switch status
experimental_chairing_menu_entry.Checked:=exp_chairing; // experimental chairs // radio items
no_chairing_menu_entry.Checked:= NOT experimental_chairing_menu_entry.Checked;
use_S1J_at_wing_front_menu_entry.Checked:=cpi.s1j_on_wing_pi;
the new routines contain most of the original code:
Code:
procedure switch_off_chairing;
begin
//no_chairing_menu_entry.Checked:=True; // radio item
exp_chairing:=False;
heave_chairs_form.Hide; // 244a
//brick_form.Hide; // SC 15-OCT-2024 556
redraw(True);
end;
procedure switch_chairing_on;
begin
if alert(2,' experimental 3D chairing',
'It is now possible to have some REA bullhead chair positions shown on the trackpad templates,'
+' and for exported 3-D DXF and STL files to contain REA chair detail suitable for CAD rendering, 3D printing, CNC milling, and laser cutting.'
+'||rp.gif In order for the 3-D chair detail to be generated correctly, it is necessary for the rail section data in the templates to match the model rail section currently selected on the DXF dialog.'
+' This means the rail height and the rail head and foot widths.'
+'||green_panel_begin tree.gif If you continue your current rail section data set at `0real > rails >`1 will be ignored.||Rails will be vertical - any rail inclination angle will be ignored.green_panel_end'
+'|At present this function is fully functional only for plain track and turnout templates. Chairing of half-diamond templates is incomplete.'
+'||At present the chair outlines are not shown on printed construction templates, exported PDF and image files, or on the sketchboard.'
+'||rp.gif This function is still an experimental work in progress and subject to much further development and change. For updated information please refer to the Templot Club user forum.'
+'||rp.gif Please be aware that this function is likely to slow down the screen response significantly. It would be wise to leave this function switched off while doing track design work. It is intended for the final output only.'
+'||Your feedback is welcome. Thanks.',
'','','','','cancel','do experimental chairing',0)=5 then EXIT;
//pad_form.experimental_chairing_menu_entry.Checked:=True; // radio item
pad_form.rebuild_group_to_match_chairs_menu_entry.Enabled:=True;
exp_chairing:=True;
brick_form.bgnd_chairs_checkbox.Checked:=True; // 232a assume he wants to see them all
brick_form.Show;
redraw(False);
end;
Performed a search all files for these two menu.clicks and revised any in need to perform the new routines instead.
All seems fine when tested.
Just need to propagate the concept down the roots (or is it branches?)
Steve