POOCRACKIN Posted January 22, 2010 Posted January 22, 2010 I am in the middle of a lisp to put wall panels onto the outline of a building. w/ dimensions and a panel count. I would like the panel run to start from the side IF the building length is exactly divisible by the panel width.. Otherwise the panel run will go from middle to edge. I just have no idea how to check if it is exactly divisible (with no remainder).. Quote
lpseifert Posted January 22, 2010 Posted January 22, 2010 off the top of my head... (if (= 0 (rem [color=Red]bldglength panelwidth)) [color=Black] (start from end) (start from middle) ) [/color][/color] Quote
POOCRACKIN Posted January 22, 2010 Author Posted January 22, 2010 Spectacular, thank you., ., i wan't even through localizing variables yet. And that's just what I needed. Quote
David Bethel Posted January 22, 2010 Posted January 22, 2010 I use something very similar for modular refrigeration panels owid = overall width pwid = panel width xl = list of seam points [b][color=BLACK]([/color][/b]if [b][color=FUCHSIA]([/color][/b]zerop [b][color=NAVY]([/color][/b]rem owid pwid[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]progn [b][color=NAVY]([/color][/b]setq xp 0 i 0[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]repeat [b][color=MAROON]([/color][/b]1+ [b][color=GREEN]([/color][/b]fix [b][color=BLUE]([/color][/b]/ owid pwid[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq xl [b][color=GREEN]([/color][/b]cons [b][color=BLUE]([/color][/b]* pwid i[b][color=BLUE])[/color][/b] xl[b][color=GREEN])[/color][/b] i [b][color=GREEN]([/color][/b]1+ i[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]progn [b][color=NAVY]([/color][/b]setq xp [b][color=MAROON]([/color][/b]* owid 0.5[b][color=MAROON])[/color][/b] i 0[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]repeat [b][color=MAROON]([/color][/b]fix [b][color=GREEN]([/color][/b]* [b][color=BLUE]([/color][/b]/ owid pwid[b][color=BLUE])[/color][/b] 0.5[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq xl [b][color=GREEN]([/color][/b]cons [b][color=BLUE]([/color][/b]- xp [b][color=RED]([/color][/b]* pwid [b][color=PURPLE]([/color][/b]+ i 0.5[b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] xl[b][color=GREEN])[/color][/b] xl [b][color=GREEN]([/color][/b]cons [b][color=BLUE]([/color][/b]+ xp [b][color=RED]([/color][/b]* pwid [b][color=PURPLE]([/color][/b]+ i 0.5[b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] xl[b][color=GREEN])[/color][/b] i [b][color=GREEN]([/color][/b]1+ i[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]setq xl [b][color=MAROON]([/color][/b]cons 0 xl[b][color=MAROON])[/color][/b] xl [b][color=MAROON]([/color][/b]cons owid xl[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] xl is sorted with equal panels, not with the mid point list. -David Quote
POOCRACKIN Posted January 22, 2010 Author Posted January 22, 2010 That does look pretty similar to what i'm doing, I've got it to where you pick the roof-line then the wall-line, input panel width, and it creates poly rectangles incremented to the highest point (of roof on panel) with a dimension for each... I'll post it when i'm (close to) done in case someone can find a need for it.. Poo it'll save me about an hour per building.. especially if i print the dim values to a csv....Hmmm:huh: Quote
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.