BricksCAD calculator?

pre.cjk { font-family: "Droid Sans Fallback",monospace; }p { margin-bottom: 0.1in; line-height: 120%; }Hello. I have the trial version of BricksCAD16 installed on Ubuntu 14.04. When I tried to use the “cal” command to use a calculator, the program don't do anything. When I open the program via terminal and repeat the process it shows me:
execvp(calc.exe) failed with error 2!”
The “cal” command is not available for Ubuntu? Only for Windows users? 

Comments

  • I found galculator handy. I keep it on my panel, it pops onto Bricscad and will copy/paste as easily in this format as the Windows version. It's a more powerful tool as well.
  •  I also keep a calculator handy in the tool panel, but for a calculation on the fly, I'll do a command line calculation. I have no idea what the notation system is called, but here are some examples.
    to add two numbers like 10 and 12
    (+ 10 12)

    to multiply
    (* 10 12)

    to divide
    (/ 10 12.0)
    Note, include the ".0" or you'll get a whole integer answer.

    (sqrt 15.0)

    find the area of a room 10'-6 1/2" x 14'-7 3/4" 
    (* (+ 10 (/ 6.5 12)) (+ 14 (/ 7.75 12)))
    Or draw a rectangle and ask.

    always fun


  • @John:
    That is Lisp code.
    Your last example can rewritten:
    [code](* (distof "10'-6 1/2\"") (distof "14'-7 3/4\""))[/code]
  • p { margin-bottom: 0.1in; line-height: 120%; }a:link { }

    Thanks for reply. I can use a galculator or handheld calculator, but I prefer the CAL command.

    It’s a good idea use the autolisp syntax to make calculus. Maybe I can upgrade this for my main objective.

    In a AutoCAD program, it’s possible to combine the CAL command with others. For exemple, I can use the OFFSET command and using the apostrophe character (‘) and CAL I can input the a value calculated . See the prompt below:

    [code]

    OFFSET

    specify offset distance or [Through/Erase/Layer] <2148.4547>: ‘cal

    CAL >>>> Expression: dist(end,end)/5

    [/code]


    For me, the cal command is a powerfull tool.

  • Note that the _Cal command in BricsCAD is not the same as in AutoCAD. In the Windows version just calls the Windows calculator so it is not 'a powerful tool'.
  •  Thanks Roy, for the 'distof' function, but I the results must depend on how units are set. I compared our examples and got different answers with the distof function returning the answer in square inches. - Will probably learn to use it anyway because fractional inches are a pain to convert to feet. - John
    [code(* (+ 10 (/ 6.5 12)) (+ 14 (/ 7.75 12)))
    154.391493055556
    : (* (distof "10'-6 1/2\"") (distof "14'-7 3/4\""))
    22232.375
    : (/ (* (distof "10'-6 1/2\"") (distof "14'-7 3/4\"")) 144.0)
    154.391493055556[/code]
  • distof results don't depend on your units settings. It will always convert to the base decimal value.

    you can use cvunit to convert to square feet.

    [code](cvunit (* (distof "10'-6 1/2\"") (distof "14'-7 3/4\"")) "sq in" "sq ft")[/code]
    returns: 154.391493055556

    [code](cvunit (* (distof "10'-6 1/2\"") (distof "14'-7 3/4\"")) "sq in" "sq m")[/code]
    returns: 14.343439055

    cvunit gets its unit conversion factors from the default.unt file, which is customisable.

    Regards,
    Jason Bourhill

  • p { margin-bottom: 0.1in; line-height: 120%; }a:link { }

    Thanks for reply. I can use a galculator or handheld calculator, but I prefer the CAL command.

    It’s a good idea use the autolisp syntax to make calculus. Maybe I can upgrade this for my main objective.

    In a AutoCAD program, it’s possible to combine the CAL command with others. For exemple, I can use the OFFSET command and using the apostrophe character (‘) and CAL I can input the a value calculated . See the prompt below:

        OFFSET    specify offset distance or [Through/Erase/Layer] <2148.4547>: ‘cal    CAL >>>> Expression: dist(end,end)/5    


    For me, the cal command is a powerfull tool.



    Equivalent in LISP is
    [code](/ (distance (getpoint "1st Point: ") (getpoint "2nd point: ")) 5.0)[/code]
    : OFFSET
    Enter offset distance or [Through point/Erase/Layer] <21.88623>:(/ (distance (getpoint "1st Point: ") (getpoint "2nd point: ")) 5.0)
    1st Point:
    2nd point: 60.0
    Enter offset distance or [Through point/Erase/Layer] <21.88623>:60
    Select entity/subentity or [Exit] :


    you can make it more universal by prompting for the divisor
    [code](/ (distance (getpoint "1st Point: ") (getpoint "2nd point: ")) (getreal "Divide by:"))[/code]
    : OFFSET
    Enter offset distance or [Through point/Erase/Layer] <61.55106>:(/ (distance (getpoint "1st Point: ") (getpoint "2nd point: ")) (getreal "Divide by:"))
    1st Point:
    2nd point:
    Divide by:4
    75.0
    Enter offset distance or [Through point/Erase/Layer] <61.55106>:75
    Select entity/subentity or [Exit] :

    if it is something you use a lot, then you could make a command alias of it using CUSTOMIZE

    : OFFSET
    Enter offset distance or [Through point/Erase/Layer] <63.58953>:'ddist
    1ST POINT:
    2ND POINT:
    DIVIDE BY:3
    100.0
    Enter offset distance or [Through point/Erase/Layer] <63.58953>:100
    Select entity/subentity or [Exit] :


    Regards,
    Jason Bourhill
    imageDDIST-Alias.png
  •  Thanks, Jason and Roy, for the lisp lessons.
This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!