Menu

Online examples and scripts

2014-05-21
2014-06-18
  • Davide Bucci

    Davide Bucci - 2014-05-21

    Dear Nicola,
    first of all, let me thank you for your work, I think that a Javascript reader for drawings in the FidoCadJ format will be very useful for a lot of online communities.

    I am sometimes having a look at the code (even if I am not a Javascript developer) and I see that the work continues steadily.

    Is there a way to run an example on my browser?

    BTW here is a possible test code:

    [FIDOCAD]
    FJC C 1.5
    FJC A 0.35
    FJC B 0.5
    LI 5 50 90 50 0
    FCJ 0 0 3 2 4 0
    LI 5 45 90 45 0
    FCJ 0 0 3 2 3 0
    LI 5 40 90 40 0
    FCJ 0 0 3 2 2 0
    EP 5 5 15 15 0
    EV 20 5 30 15 0
    EV 50 5 60 15 0
    FCJ 2 0
    EV 65 5 75 15 0
    FCJ 3 0
    EV 80 5 90 15 0
    FCJ 4 0
    RP 5 20 15 30 0
    RV 20 20 30 30 0
    RV 50 20 60 30 0
    FCJ 2 0
    RV 65 20 75 30 0
    FCJ 3 0
    RV 80 20 90 30 0
    FCJ 4 0
    LI 100 5 185 5 0
    FCJ 3 0 3 1 0 0
    LI 100 15 185 15 0
    FCJ 3 0 3 1 2 0
    LI 100 20 185 20 0
    FCJ 3 0 3 1 3 0
    LI 100 25 185 25 0
    FCJ 3 1 3 1 0 0
    LI 100 35 185 35 0
    FCJ 3 1 3 1 2 0
    LI 100 40 185 40 0
    FCJ 3 1 3 1 3 0
    LI 100 45 185 45 0
    FCJ 3 2 3 1 0 0
    LI 100 55 185 55 0
    FCJ 3 2 3 1 2 0
    LI 100 60 185 60 0
    FCJ 3 2 3 1 3 0
    LI 100 65 185 65 0
    FCJ 3 3 3 1 0 0
    LI 100 75 185 75 0
    FCJ 3 3 3 1 2 0
    LI 100 80 185 80 0
    FCJ 3 3 3 1 3 0
    BE 15 80 10 55 50 55 35 85 0
    BE 25 80 20 55 60 55 45 85 0
    FCJ 0 0 0 0 2 0
    BE 30 80 25 55 65 55 50 85 0
    FCJ 0 0 0 0 3 0
    BE 35 80 30 55 70 55 55 85 0
    FCJ 0 0 0 0 4 0
    SA 70 60 0
    SA 70 65 0
    SA 80 60 0
    SA 80 65 0
    SA 80 70 0
    SA 70 70 0
    PL 10 110 90 110 5 0
    PL 10 120 90 120 6 0
    PL 10 90 90 90 3 0
    PL 10 100 90 100 4 0
    RP 100 85 110 95 0
    PA 15 135 10 10 2 0 0
    PA 30 135 10 10 2 1 0
    PA 45 135 10 10 2 2 0
    BE 130 125 50 150 135 175 80 125 0
    FCJ 1 0 3 1 0 0
    BE 145 125 65 150 150 175 95 125 0
    FCJ 2 0 3 1 0 0
    PP 0 165 45 150 0 185 50 160 0
    PV 40 165 85 150 40 185 90 160 0
    PV 120 165 165 150 120 185 170 160 0
    FCJ 2 0
    PV 160 165 205 150 160 185 210 160 0
    FCJ 3 0
    PV 200 165 245 150 200 185 250 160 0
    FCJ 4 0
    TY 220 10 4 3 0 0 0 * Text
    TY 220 10 4 3 0 4 0 * Text
    TY 220 20 4 8 0 0 0 * Text
    TY 220 20 4 8 0 4 0 * Text
    TY 220 25 8 3 0 0 0 * Text
    TY 220 25 8 3 0 4 0 * Text
    TY 220 35 8 3 0 0 0 * Text
    TY 225 40 8 3 20 0 0 * Text
    TY 230 45 8 3 40 0 0 * Text
    TY 235 50 8 3 60 0 0 * Text
    TY 240 55 8 3 80 0 0 * Text
    TY 245 60 8 3 90 0 0 * Text
    TY 215 40 8 3 20 4 0 * Text
    TY 210 45 8 3 40 4 0 * Text
    TY 205 50 8 3 60 4 0 * Text
    TY 200 55 8 3 80 4 0 * Text
    TY 220 35 8 3 0 4 0 * Text
    TY 195 60 8 3 90 4 0 * Text
    EV 200 60 215 70 0
    EV 225 60 240 70 0
    EV 215 70 225 80 0
    BE 205 80 215 90 225 90 235 80 0
    BE 190 60 195 115 245 110 250 60 0
    EP 205 65 210 70 0
    EP 230 65 235 70 0
    TY 230 130 4 3 0 4 0 * Text
    TY 230 130 4 3 90 4 0 * Text
    TY 230 130 4 3 180 4 0 * Text
    TY 230 130 4 3 270 4 0 * Text
    CV 0 170 130 195 135 200 110 240 115 245 140 215 145 195 100 0
    CP 1 125 150 135 135 175 145 145 130 135 150 0
    CV 0 70 80 90 80 100 105 115 125 105 105 0
    FCJ 3 0 3 2 0 0
    CV 0 240 5 260 25 240 30 0
    FCJ 2 2 3 1 0 0
    RP 105 90 115 100 1
    RP 110 95 120 105 2
    RP 115 100 125 110 3
    RP 120 105 130 115 4
    RP 125 110 135 120 5
    RP 130 105 140 115 6
    RP 135 100 145 110 7
    RP 140 95 150 105 8
    RP 145 90 155 100 9
    RP 150 85 160 95 10
    RP 155 90 165 100 11
    RP 160 95 170 105 12
    RP 165 100 175 110 13
    RP 170 105 180 115 14
    RP 175 110 185 120 15
    MC 55 195 0 0 170
    FCJ
    TY 55 185 4 3 0 0 0 Helvetica C
    TY 65 205 4 3 0 0 0 Helvetica 
    LI 65 195 75 195 0
    LI 75 195 75 210 0
    LI 55 195 45 195 0
    LI 45 195 45 210 0
    SA 45 210 0
    SA 75 210 0
    LI 50 230 20 230 0
    LI 50 240 40 240 0
    LI 40 240 40 250 0
    SA 20 230 0
    LI 65 210 90 210 0
    LI 90 210 90 235 0
    LI 75 235 100 235 0
    SA 90 235 0
    MC 50 240 2 1 580
    FCJ
    TY 65 245 4 3 0 0 0 Helvetica U
    TY 60 235 4 3 0 0 0 Helvetica 
    MC 20 250 3 0 240
    FCJ
    TY 25 240 4 3 0 0 0 Helvetica D
    TY 30 260 4 3 0 0 0 Helvetica 
    MC 55 210 0 0 080
    FCJ
    TY 65 215 4 3 0 0 0 Helvetica R
    TY 65 220 4 3 0 0 0 Helvetica 
    LI 55 210 20 210 0
    LI 20 210 20 235 0
    MC 20 250 0 0 045
    MC 40 250 0 0 045
    MC 145 215 0 0 elettrotecnica.mam
    MC 180 215 0 0 elettrotecnica.matscsaar
    MC 210 245 0 0 ihram.lcd44780
    TY 85 195 4 3 0 0 0 Helvetica Stdlib
    TY 235 195 4 3 0 0 0 Helvetica IHRAM
    TY 150 195 4 3 0 0 0 Helvetica Elettrotecnica
    TY 265 110 4 3 0 0 0 Helvetica PCB
    MC 285 130 0 0 pcb.to92-45
    

    It contains all the graphic primitives, all layers (which partially overlap) and symbols from all the libraries supposed to be loaded. You also find deformed, inclined and mirrored text.

    Best regards,

    D.

     

    Last edit: Davide Bucci 2014-05-21
  • Nicola Vitale

    Nicola Vitale - 2014-05-22

    Hi Davide,

    if you want to try any example, you can check out a copy of the repository

    svn checkout svn://svn.code.sf.net/p/fidoreadjs/svn/ fidoreadjs-svn

    and then open the HTML files under ./trunk/examples/drawing-elements/* in your browser.

    BTW, if you want to add other examples, I can assign write access to the repository to you.

    Thanks for the above test, I'll use it for sure. At the moment only 4 graphic primitives are implemented, so it's a bit early for trying that. :)

     

    Last edit: Nicola Vitale 2014-05-22
  • Davide Bucci

    Davide Bucci - 2014-05-22

    Dear Nicola,
    I have tried them and the results are indeed very promising.
    Maybe, you might want to consider to set up a webpage showing them, to show what the project can do. Concerning the example I indicated above, the interest is that by observing it you have an immediate view of the development status of the project.

    BTW, in the recent versions of FidoCadJ (from 0.24.3), I upgraded the way the spline curves are drawn. The result should be much more accurate, so if you want to test them be sure you are comparing the results to this version.

    Thumbs up and best regards,

    D.

     
  • Nicola Vitale

    Nicola Vitale - 2014-05-23

    Hi Davide,

    Maybe, you might want to consider to set up a webpage

    Yes, I'm going to set up it soon; there is already a first draft, but it needs a better look.

    in the recent versions of FidoCadJ (from 0.24.3), I upgraded
    the way the spline curves are drawn. The result should be much
    more accurate, so if you want to test them be sure you are
    comparing the results to this version.

    I have just updated the FreeBSD port, so now all the image are produced by the last version of FidoCadJ. Besides I'll modify the standard Makefile so that it can automatically put the FidoCadJ version used in the sample pages.

    Thanks for your comment.

    Ciao.

    --
    Nicola Vitale

     
  • Davide Bucci

    Davide Bucci - 2014-05-26

    Dear Nicola,
    thanks for the update of the FreeBSD port, this is a very useful stuff.
    For the webpage about the FidoReadJS, I am eager to have a look at it?
    From what I have seen, you are a better webmaster than I am, but may I suggest to adopt something with a look in some sort similar to this one (it is just a very simple HTML+CSS site):

    http://fidocadj.sourceforge.net

    maybe for colors and fonts, it can provide a certain "family look".

    Best

     
  • Davide Bucci

    Davide Bucci - 2014-06-02

    Dear Nicola,
    I really like Catullus, too :-)
    Just notice that the TE primitive is the obsolete text one. FidoCadJ does not use it any more and converts it ro TY, which is far more flexible.
    Wonderful work, in any case!

    Cheers,

    D.

     
  • Davide Bucci

    Davide Bucci - 2014-06-06

    Dear Nicola,
    someone has tried independently to do something in JS to parse FidoCadJ drawings. He contacted me today via this message:

    http://www.electroyou.it/forum/viewtopic.php?f=16&t=46069&p=505757#p505756

    Would it be possible to merge the two projects or, at more reasonably, to benefit from what Ifrit_Prog did there?

    Cheers,

    D.

     
  • Nicola Vitale

    Nicola Vitale - 2014-06-14

    Hi Davide,

    Pardon for the delay of the answer, but I didn't receive any notification about your replies.

    I had a look at what Ifrit_Prog has done, and it's very impressive, also because it was written in only two days. :-o

    I don't know if we can merge them, for a couple of reasons: 1) mine is not there yet, 2) he has chosen KineticJS as graphic framework, that uses the canvas element for its output, while I had decided to use one with an SVG output, like snap.svg, even if at the moment all the examples were made with PaperJS (canvas).

    Said that, if Ifrit_Prog needs a little help to complete his script, I can do it, and at this point maybe we can also close this project here at SF.

    Ciao.

     
  • Davide Bucci

    Davide Bucci - 2014-06-15

    Hi Nicola,
    no problem!

    In my opinion, you should definitively try do discuss with Ifrit_Prog and with fairyvilje, who recently joined to the discussion on ElectroYou. Fairyvilje has also done a few commits to the FidoReadPHP project a few months ago.

    Cheers,

    Davide

     
  • Nicola Vitale

    Nicola Vitale - 2014-06-17

    Hi Davide,

    I and Ifrit_prog already talked about that, and decided to write a new script from scratch using snap.svg. If Fairyvilje want to join us, he's welcome! :)

     
  • Davide Bucci

    Davide Bucci - 2014-06-18

    Dear Nicola,
    that's great news!

    I am eager to see the results of your joint efforts.

    Cheers,

    D.

     

Log in to post a comment.