joemcanciller Posted September 19, 2018 Share Posted September 19, 2018 Hello again, I want to make a lisp for my DCL. Attach here is the DCL code I used. STEEL : dialog { label = "STEEL"; : row { :boxed_column { label = "Dimensions"; : edit_box { key = "X"; label = "Width"; edit_width = 6;} : edit_box {key = "Y"; label = "Depth"; edit_width = 6;} } : boxed_column { label = "Fillet"; : toggle { key = "FT"; label = "Fillet Corners?"; } : edit_box { key = "FR1"; label = "Outer Radius"; } : edit_box { key = "FR2"; label = "Inner Radius"; } } } spacer; ok_cancel; :text {label = ""; key = "error";} } It will give me a steel section like this in the picture. I hope someone knew about this. Thanks in advance Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 19, 2018 Share Posted September 19, 2018 Most people do it the other way and get the draw shape to work 1st. Any way print out your object on a piece of paper and hopefully follow me here. Point 1 lower left then all the following is polar commands. calc p2 using width angle 0 calc p3 depth angle (/ pi 2) calc p4 width ang =pi calc and so on work out all the corners no fillet yet. Line p1 -p2 obj1 (entlast) line p2-p3 obj2 (entlast) fillet filletrad obj1 obj2 obj1 = obj2 line p3-p4 just keep repeating the entlast on the last two objects and apply the fillet where applicable. This is a good lisp learning shape using polar, fillet and entlast. Last step is make it a pline as you go. ; code part (setq fname "C:\\alan\\steel.dcl") (setq dcl_id (load_dialog fname)) (if (not (new_dialog "STEEL" dcl_id)) (exit)) (mode_tile "X" 3) (action_tile "X" "(setq X (atof $value))") (mode_tile "y" 3) (action_tile "Y" "(setq Y (atof $value))") (mode_tile "FT" 3) (action_tile "FT" "(setq FT $value)") (mode_tile "FR1" 3) (action_tile "FR1" "(setq FR1 (atof $value))") (mode_tile "FR2" 3) (action_tile "FR2" "(setq FR2 (atof $value))") (start_dialog) (done_dialog) (unload_dialog dcl_id) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.