Templot Club forums powered for Martin Wynne by XenForo :

TEMPLOT 3D PLUG TRACK - To get up to speed with this experimental project click here.   To watch an introductory video click here.   See the User Guide at Bexhill West.

  • The Plug Track functions are experimental and still being developed. Some of the earlier pages of this topic are now out-of-date.

    For an updated overview of this project see this topic.   For some practical modelling aspects of using Plug Track see Building 3D Track.

    The assumption is that you have your own machines on which to experiment, or helpful friends with machines. Please do not send Templot files to commercial laser cutting or 3D printing firms while this project is still experimental, because the results are unpredictable and possibly wasteful.

    Some pages of this and other topics include contributions from members who are creating and posting their own CAD designs for 3D printing and laser-cutting. Do not confuse them with Templot's own exported CAD files. All files derived from Templot are © Martin Wynne.
  • The Plug Track functions are experimental and still being developed.

    For an updated overview of this project see this topic.   For some practical modelling aspects of using Plug Track see Building 3D Track.

    The assumption is that you have your own machines on which to experiment, or helpful friends with machines. Please do not send Templot files to commercial laser cutting or 3D printing firms while this project is still experimental, because the results are unpredictable and possibly wasteful.

    Some pages of this and other topics include contributions from members who are creating and posting their own CAD designs for 3D printing and laser-cutting. Do not confuse them with Templot's own exported CAD files. All files derived from Templot are © Martin Wynne.

Syntax highlighting on Templot Club

Quick reply >

Martin Wynne

Admin
Location
West of the Severn UK
Info
.
Enjoy using Templot?
Thanks.

Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add
helpful replies.
With the prospect of some activity on T3, here is the good news. :)

The posting editor on this new forum has 2 code formatting options:

xf_syntax_highlighting.png


Inline code looks like this: abc:=123; blue_banana:=False; which is useful for short clips.

Code provides a full editor box with syntax highlighting for a range of languages, but unfortunately not Pascal. The nearest for us seems to be SQL:

SQL:
    if slewing=True   // 1-11-99
       then begin
              if (ABS(slew)>slew_l) or (ABS(slew)<minfp)   // no SQRT, div by zero.
                 then begin
                        slew_pull_back:=0;
                        slew_angle:=0;
                      end
                 else begin
                        try
                          slew_pull_back:=( slew_l-SQRT(SQR(slew_l)-SQR(slew)) )*2;     // 1-11-99   *2 is arbitrary approx for shortening effect of S-curve.
                          slew_angle:=ARCTAN(slew_pull_back/slew);
                        except
                          slew_pull_back:=0;
                          slew_angle:=ARCTAN(2.0);
                        end;//try
                      end;
              slew_t:=slew_angle;    //  slewing angle is same for straight track.

              if slew_mode=2
                 then begin      // calc constants once only...

                        if slew2_kmax<0.02 then slew2_kmax:=0.02;       // safety.

                        slew2_rot:=ARCTAN(1-SQR(TANH(slew2_kmax)));     // dy/dx TANH(x) = 1-TANH^2(x)  rotation angle needed in trig units.

                        pin.x:=slew2_kmax;
                        pin.y:=TANH(slew2_kmax);
                        dotransform(0-slew2_rot,0,0,pin,pout);

                        slew2_ymax:=pout.y;
                        slew2_ymin:=0-slew2_ymax;
                      end;
            end;//slewing

With a scrollbar instead of line-wrapping for long lines, which is much better that some other formatters. :)

It's worth setting the font to Courier New in the main editor before using the Code editor, because the formatted code appears only on Preview or after posting.

cheers,

Martin.
 
_______________
message ref: 486
Back
Top