Jump to content

can anyone help me to make all my exiting polylines to end fillet of 45 degree


Recommended Posts

Posted

I want to draw a line, and at the same time, make the latter part of it bend 45 degrees, so need a click to give the direction。

Posted (edited)

As I said Have a go if stuck post.

 

Understand what you want. Remember people who post solutions are doing so as a free service so are not under a obligation to jump straight in and provide a solution, most that do have a day job as well. If you dont understand lisp say so.

Edited by BIGAL
Posted

Thank you for your reply.

I do not understand lisp except  statements like “setq”, “command”.
I have tried to understand and modify your program, but  did not achieve my requirements.
I'll try again, thanks.

  • Like 1
Posted

This is an extra to

Admin maybe join. 

 

I will see if can find time to modify what I have previously provided.

 

Posted

I have tried to modify BIGAL‘s Lisp,It basically meets my requirements.

(defun C:45dpline ( / oldsnap pt1 pt2 pt3 pt4 pt5 dire off rad ent)
(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq off 180.0 rad 0.0)  ;
(setvar 'filletrad rad)

(setq dire (getstring "\n Clockwise(Y/n): "))

(while (setq ent (entsel "\npick p/line near end Enter to exit"))
;(setq pt3 (cadr ent))
(setq obj (vlax-ename->vla-object (car ent)))
(setq pt1 (vlax-curve-getStartPoint obj))
(setq pt2 (vlax-curve-getEndPoint obj))

(setq ang (angle pt1 pt2))
(setq pt4 (polar pt2 (- ang (/ pi 2.0)) off))
(setq pt5 (polar pt4 (+ ang (* pi 0.75)) off))

(if (= dire "n")
    (progn
    (setq pt4 (polar pt2 (+ ang (/ pi 2.0)) off))
    (setq pt5 (polar pt4 (- ang (* pi 0.75)) off))
    )
)

(command "line" pt4 pt5 "")
(setq pt5 (mapcar '* (mapcar '+ pt4 pt5) '(0.5 0.5)))4 
(command "fillet" ent pt5)
)
(setvar 'osmode oldsnap)
(princ)
)

But when I click on the OFF part on the pline, it will bends like pl3,I don't understand why this happens.

How to avoid this ?   I hope No matter where I click to select ,it bends like pl2.

20210819sdf.thumb.png.922d949780bf0441885ad8d386799f93.png

  • 1 month later...
  • 1 year later...
Posted
On 19/08/2021 at 11:56, yxl030 said:

I have tried to modify BIGAL‘s Lisp,It basically meets my requirements.

(defun C:45dpline ( / oldsnap pt1 pt2 pt3 pt4 pt5 dire off rad ent)
(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq off 180.0 rad 0.0)  ;
(setvar 'filletrad rad)

(setq dire (getstring "\n Clockwise(Y/n): "))

(while (setq ent (entsel "\npick p/line near end Enter to exit"))
;(setq pt3 (cadr ent))
(setq obj (vlax-ename->vla-object (car ent)))
(setq pt1 (vlax-curve-getStartPoint obj))
(setq pt2 (vlax-curve-getEndPoint obj))

(setq ang (angle pt1 pt2))
(setq pt4 (polar pt2 (- ang (/ pi 2.0)) off))
(setq pt5 (polar pt4 (+ ang (* pi 0.75)) off))

(if (= dire "n")
    (progn
    (setq pt4 (polar pt2 (+ ang (/ pi 2.0)) off))
    (setq pt5 (polar pt4 (- ang (* pi 0.75)) off))
    )
)

(command "line" pt4 pt5 "")
(setq pt5 (mapcar '* (mapcar '+ pt4 pt5) '(0.5 0.5)))4 
(command "fillet" ent pt5)
)
(setvar 'osmode oldsnap)
(princ)
)

But when I click on the OFF part on the pline, it will bends like pl3,I don't understand why this happens.

How to avoid this ?   I hope No matter where I click to select ,it bends like pl2.

20210819sdf.thumb.png.922d949780bf0441885ad8d386799f93.png

Do not expect him to help you, of course, always incomplete and provocative solutions, compared to other professionals.

Posted

I have over 16000 posts here and respond to 4 forums occasionally I miss a request they could have sent me a private message.

 

Sounds like I did not send an answer to you for a request. Or I did as much as I was prepared to do. I test the code before posting it and make sure it works often a user will do something not considered and it does not work. 

 

The code has been changed and not by me what I posted works for the original request.

 

The code posted here is mostly provided free of charge, have you posted anything useful ?

 

 

  • Like 1
Posted

I wasn't sure if that was a serious comment or a joke - very odd either way.

 

A weird post to pick particualrly when the OP and subsequent question appear to be satisfied, have a code they can use or learnt enough that they can adjust what the suggestions above gave.

 

 

Posted (edited)
6 hours ago, BIGAL said:

I have over 16000 posts here and respond to 4 forums occasionally I miss a request they could have sent me a private message.

 

Sounds like I did not send an answer to you for a request. Or I did as much as I was prepared to do. I test the code before posting it and make sure it works often a user will do something not considered and it does not work. 

 

The code has been changed and not by me what I posted works for the original request.

 

The code posted here is mostly provided free of charge, have you posted anything useful ?

 

 

Almost funny but too on point 🤪

 

Quality over quantity IMO.

Edited by ronjonp

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...