Jump to content

Recommended Posts

Posted

Hey guys,

This lisp have some defects, Below:

chamfer.png

 

And It's only support "Line" But I want support "Pline" .

 

Thanks you all for what ever advice or help you can spare.

hsc.dcl

hsc.LSP

Posted

I think choose two lines can't do, May need to choose three lines.

shaft_chamfer .png

Posted

maybe, select only line 3, then use it as a fence to select the other two.

Posted
maybe, select only line 3, then use it as a fence to select the other two.

 

Thank you for your reply! ymg3, can you can you help me modify it ?

Posted

Don't have time but it is pretty simple so you should e OK

Posted
(defun c:test ()
  (setq line1 (car (entsel))
        data1 (entget line1)
        
  )
  (setvar 'chamfera 5)
  (setvar 'chamferb 5)
  (if (= (cdr (assoc 0 data1)) "LINE")
     (progn
         (setq end10 (cdr (assoc 10 data1))
               end11 (cdr (assoc 11 data1))
               ss    (ssget "_F" (list end10 end11))
         )      
         (command "_pedit" line1 "_Y" "_J"  ss "" "")
         (vl-cmdf "_chamfer" "_P" (entlast))
      )
   )
   (princ)
)

Posted
(defun c:test ()
  (setq line1 (car (entsel))
        data1 (entget line1)
        
  )
  (setvar 'chamfera 5)
  (setvar 'chamferb 5)
  (if (= (cdr (assoc 0 data1)) "LINE")
     (progn
         (setq end10 (cdr (assoc 10 data1))
               end11 (cdr (assoc 11 data1))
               ss    (ssget "_F" (list end10 end11))
         )      
         (command "_pedit" line1 "_Y" "_J"  ss "" "")
         (vl-cmdf "_chamfer" "_P" (entlast))
      )
   )
   (princ)
)

 

 

Thank you ! ymg3 ,It's nice,what about pline? and what about hole chamfer.

20140411124912.jpg

Posted

liuhaixin,

 

I don't intend to write the program for you.

 

Only showing you techniques that might help you.

 

For polylines study the vlax-curve functions. From your point

of selection you can determine which segment is the end of

your shaft and work out the rest of the geometry.

 

ymg

Posted
liuhaixin,

 

I don't intend to write the program for you.

 

Only showing you techniques that might help you.

 

For polylines study the vlax-curve functions. From your point

of selection you can determine which segment is the end of

your shaft and work out the rest of the geometry.

 

ymg

 

ok,ymg,Still thank you!

  • 2 weeks later...
Posted

I think this is an interesting topic, for mechanical Industry. but it Sink into the deep sea.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...