Author Topic: Different chamfer routine  (Read 3902 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Different chamfer routine
« on: February 21, 2005, 07:54:08 AM »
I am seeking a way to draw a chamfer with a specified distance with the following situations:

1. I have two lines that form a 90 degree corner or attempting to do so.

2. I have a line with another line perpendicular to the first line but when the chamfer is created the first line remains intact....which means a line is simply drawn to form a chamfer.


Thanks
[/img]

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Different chamfer routine
« Reply #1 on: February 21, 2005, 08:03:17 AM »
1. use a chamfer distance of 0 for both lines.

2 I think that if EDGEMODE sysvar is off, the lines will not trim, leaving them intact
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

TJAM51

  • Guest
Different chamfer routine
« Reply #2 on: February 21, 2005, 08:06:29 AM »
I tried edgemode and nothing happens no matter what I set it to. It has only two setting, 1 and 2.

SMadsen

  • Guest
Different chamfer routine
« Reply #3 on: February 21, 2005, 08:14:06 AM »
TRIMMODE = 0 -> leaves edges intact.

Is that what you're looking for?

TJAM51

  • Guest
Different chamfer routine
« Reply #4 on: February 21, 2005, 08:15:30 AM »
That works great.........thanks

SMadsen

  • Guest
Different chamfer routine
« Reply #5 on: February 21, 2005, 08:26:07 AM »
TJAM51, pick up a copy of sysvardlg.lsp. Just type in "cham", hit the search button and it'll show all sysvars with "CHAM" in their names.
Type in "chamfer", select "Descriptions" and hit the search button. It'll show all sysvars with CHAMFER in the description - e.g. TRIMMODE.

TJAM51

  • Guest
Different chamfer routine
« Reply #6 on: February 21, 2005, 08:40:08 AM »
Thanks....it is really fantastic.... :D

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Different chamfer routine
« Reply #7 on: February 21, 2005, 08:45:16 AM »
As for the 1st routine,
Code: [Select]

(DEFUN C:ch0 ()
  (SETQ CH-A (GETVAR "CHAMFERA")
CH-B (GETVAR "CHAMFERB")
A    (ENTSEL "\nPick First Line: ")
B    (ENTSEL "\nPick Second Line: ")
  )
  (setvar "CHAMFERA" 0)
  (setvar "CHAMFERB" 0)
  (COMMAND "CHAMFER" A B)
  (SETVAR "CHAMFERA" CH-A)
  (SETVAR "CHAMFERB" CH-B)
)



It needs a little work, but it will get you started
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

TJAM51

  • Guest
Different chamfer routine
« Reply #8 on: February 21, 2005, 12:17:11 PM »
Here is my version


(DEFUN C:chA ()
  (COMMAND "TRIMMODE" "0")
  (SETQ   CH-A (GETVAR "CHAMFERA")
   CH-B (GETVAR "CHAMFERB")
   A    (ENTSEL "\nPick First Line: ")
   B    (ENTSEL "\nPick Second Line: ")
  )
  (setvar "CHAMFERA" 11.0)
  (setvar "CHAMFERB" 11.0)
  (COMMAND "CHAMFER" A B)
  (SETVAR "CHAMFERA" CH-A)
  (SETVAR "CHAMFERB" CH-B)
  (COMMAND "TRIM" "L" "")
  (command "trimmode" "1")
)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Different chamfer routine
« Reply #9 on: February 21, 2005, 01:39:08 PM »
I dont know if it makes much difference, but you can change the trim mode like
Code: [Select]

(setvar "trimmode" 0)
and (setvar "trimmode" 1)  OR

capture and reset like
Code: [Select]

(setq tmode (getvar "trimmode))
(setvar "trimmode" 0)

;later
(setvar "trimmode" tmode)
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

jermjmm

  • Guest
Re: Different chamfer routine
« Reply #10 on: October 02, 2007, 05:01:43 PM »
I'm haveing a problem with the chamfer also.  what I'm trying to do is I have 2 lines that form a cross and I want to put a chamfer on one of them so you end up with a T with a chamfer (PIC INCLUDED). whenever I try to use the chamfer command inside of lisp (command "chamfer" . . . . . it keeps saying unknown command, I had someone tell me to use this instead (command "_chamfer . . . .  but it still says unknown command.  any ideas?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Different chamfer routine
« Reply #11 on: October 02, 2007, 05:12:14 PM »
I'm haveing a problem with the chamfer also.  what I'm trying to do is I have 2 lines that form a cross and I want to put a chamfer on one of them so you end up with a T with a chamfer (PIC INCLUDED). whenever I try to use the chamfer command inside of lisp (command "chamfer" . . . . . it keeps saying unknown command, I had someone tell me to use this instead (command "_chamfer . . . .  but it still says unknown command.  any ideas?
Do (command "_.chamfer" .. ) the period is what lets you use the default Acad command (incase it has be redefined), and the underscore lets it work on other Acad's beside the english version.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Different chamfer routine
« Reply #12 on: October 02, 2007, 06:05:18 PM »
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.