Author Topic: divide minus intermediates  (Read 12893 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
divide minus intermediates
« on: November 20, 2003, 09:18:08 AM »
hmmm wasn't sure how to title this one but i was also thinking it would be nice to come up with an easier way to divide a frame which has intermediate bracing into equal openings. so you could pick the overall frame then the number of intermediates and their width and it might be good to have the option to enter several different widths. then it would divide it so when you place the centerline of the brace on the node all the openings would be equal. did i explain that ok? anybody know of a way to automate this process?

dan

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #1 on: November 20, 2003, 09:18:51 AM »
whoops sorry bout that  :oops:

daron

  • Guest
divide minus intermediates
« Reply #2 on: November 20, 2003, 09:58:45 AM »
Sorry about what? Are you talking about a dcl file or what? I don't think I understand.

hendie

  • Guest
divide minus intermediates
« Reply #3 on: November 20, 2003, 09:59:28 AM »
double posting I think

daron

  • Guest
divide minus intermediates
« Reply #4 on: November 20, 2003, 10:04:27 AM »
I know. I deleted the other one. Shhh, don't tell him. I want him to go crazy trying to figure it out.

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #5 on: November 20, 2003, 10:27:43 AM »
hmmm how do i explain it better. i have a big ladder frame and i want the openings to equal spaces. i would like to be able to draw a line from the interior end of the frame to the other then enter the number of mullions and their widths. it would subtract the total ,half from each end of the line, then divide it into the number of mullions+1 giving you equal spaced openings. i hope i explained this right this time. the whole need for this is because i'm terrible at it for some reason. i'll try to post this once...

dan

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #6 on: November 20, 2003, 10:36:58 AM »
it doesn't neccesarily have to be a dcl you could just be prompted from the command line right?

dan

daron

  • Guest
divide minus intermediates
« Reply #7 on: November 20, 2003, 10:37:26 AM »
Terrible at what? Writing the code? Yes, it can be done. Post what you've got started and I'm sure we'll all chip in to help you out. I'm sure if you inspect each line of code that you've gathered and read the help files on the lisp functions you'll be more able to write something like this. Take a screen shot of the drawing and post it up for all to see. A picture is worth a thousand, right?

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #8 on: November 20, 2003, 11:15:19 AM »
terrible at dividing was what i was referring to but yes terrible at writing code too. i'm a beginner and am studying code that you guys write for me but am not ready yet to write my own. i can do basic stuff but nothing as complicated as this. help please

dan

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #9 on: November 20, 2003, 03:58:32 PM »
hmmm noones answering my posts why?  :cry:

dan

daron

  • Guest
divide minus intermediates
« Reply #10 on: November 20, 2003, 04:07:04 PM »
For starters, I'd like to see a screen shot of what you are trying to accomplish. I can visualize a visual a whole lot quicker than I can visualize what you are trying to say. Personally, I'd say it's about time you start learning this stuff. The only way I can help is if you explain what this is (object/layer type)?
Quote
easier way to divide a frame which has intermediate bracing into equal openings

What objects are frames and braces made out of? What layers are they on?

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #11 on: November 20, 2003, 04:54:02 PM »
ok daron i posted a little example at the lilly pond.

dan

daron

  • Guest
divide minus intermediates
« Reply #12 on: November 20, 2003, 05:06:41 PM »
Would the divide command give you anything near what you want. It draws nodes or will insert blocks. All you have to do is draw a block of the mullion and put the insertion point between the mullion at the midpoint area.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
divide minus intermediates
« Reply #13 on: November 21, 2003, 12:29:43 AM »
dan,
from you dwg it looked like you needed this, i could be off base.

Pick the corner of the glass, then pick the diagonal corner to
establish the window size.
Enter the mull width (3.875). This could be hard coded.


NO error checking in this routine, thats up to you.  :D

Code: [Select]
(defun C:Mull (/ p1 p2 x1 x2 y1 y2 Pa Pb wWidth MullHt PLL
      paneCnt mullWidth paneWidth mullPt Up left
      usercmd useros)
  (setq usercmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setq useros (getvar "osmode"))
  (setvar "osmode" 175)

  (Setq Up   (* pi 0.5)
left pi
  )
  (setq p1     (getpoint "pick glass corner")
p2     (getpoint p1 "pick diaganal glass corner")
x1     (car p1)
x2     (car p2)
y1     (cadr p1)
y2     (cadr p2)
Pa     (list x1 y2)
Pb     (list x2 y1)
wWidth (distance p1 pb) ; window width
MullHt (distance p1 pa) ; window Hight
PLL    (list (if (< x1 x2)x1 x2) ; PLL point Lower Left corner
(if (< y1 y2) y1 y2)
)
  )

  (initget 7)
  (setq paneCnt (getint "\nEnter number of panes.  "))
  (initget 7)
  (setq mullWidth (getreal "\nEnter Mull Width:  "))
  (setq paneWidth (/ (- wWidth (* (1- paneCnt) mullWidth)) paneCnt)
mullPt  PLL
  )
 
  (setvar "osmode" 0)
  (command "undo" "begin")
  ;; draw the Mulls
  (repeat (1- paneCnt)
    (setq MullPt (polar mullPt 0 paneWidth))
    (command "_line" mullPt (polar mullPt up mullHt) "")
    (command "_line"
    (polar mullPt 0 0.75)
    (polar (polar mullPt 0 0.75) up mullHt)
    ""
    )
    (setq mullPt (polar mullPt 0 mullWidth))
    (command "_line" mullPt (polar mullPt up mullHt) "")
    (command "_line"
    (polar mullPt left 0.75)
    (polar (polar mullPt left 0.75) up mullHt)
    ""
    )
  ) ; end repeat
;;;==========  Exit Sequence  ============
  (command "undo" "end")
  (setvar "osmode" useros)
  (setvar "CMDECHO" usercmd)
;;; Exit quietly
  (princ)
) ; end defun
(princ)
(prompt "Mullion routine loaded. Enter mull to run")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ELOQUINTET

  • Guest
divide minus intermediates
« Reply #14 on: November 21, 2003, 08:31:42 AM »
thanks cab that works great. i have another question though. let's say i am doing a glass wall and i want equal panes with a 1/2" gap between would i just omit this part of the code:

        (polar mullPt 0 0.75)
        (polar (polar mullPt 0 0.75) up mullHt)
        ""
    )
    (setq mullPt (polar mullPt 0 mullWidth))
    (command "_line" mullPt (polar mullPt up mullHt) "")
    (command "_line"
        (polar mullPt left 0.75)
        (polar (polar mullPt left 0.75) up mullHt)
        ""

also is there a way i could have it trim in between the 1/2" gaps top and bottom? thanks i really appreciate it.

dan