Jump to content

How can I write the code for a batch fillet plugin for images like this?


Recommended Posts

Posted

Drawing2.dwg

 

As shown in the figure below:
Select multiple graphics in batch and change the R value from 0.2 to another value?

 

ScreenShot_2026-01-30_151107_009.png.3c4f4910e2903544a5da95980a20ea86.png

Posted

Code what's that for ?

 

Join Fillet R 0.4 P pickobject enter

 

All done

  • Like 1
Posted
1 hour ago, BIGAL said:

Code what's that for ?

Join Fillet R 0.4 P pickobject enter

All done

 

Have to fillet the 3 long arcs segments before joining. But yes no lisp needed for simple task.

 

image.thumb.png.cee607824745901d591eafe6148cd61c.png

 

 

 

 

Posted (edited)

The large arc is like the base radius for all the teeth, so changing that may need a complete redraw. behind the shape must be some form of formula, or design rules.

 

Sounds like a custom gear.lsp is needed.

Edited by BIGAL
Posted

Much like Elvis, the OP seems to have left the building.

 

In case there is a dramatic return, here is a LISP that should work, though unclear what "code" they want or or if this is for an actual plug-in.

 

Solved: Fillet multiple polyline all at once by lisp - Autodesk Community

 

I didn't look at Kent Cooper's version to prompt for a radius, but used the original and added something simple to it. I am sure Kent Cooper's is better.

 

(defun C:FMP_R (/ plss n rad)
  (setq rad (getdist "\nEnter fillet radius: "))
  (if (and rad (> rad 0.0))
    (progn
      (command "_.fillet" "_radius" rad)
      (if (setq plss (ssget "_:L" '((0 . "LWPOLYLINE"))))
        (repeat (setq n (sslength plss))
          (command "_.fillet" "_polyline"
                   (ssname plss (setq n (1- n))))
        )
      )
    )
  )
  (princ)
)

 

  • Like 1
Posted (edited)

Lee Mac has a similar code.

The FMP_R and fpoly codes perform conjugations with a given radius. 
Only in these codes it is impossible to set the value radius = 0
Is there a code for interfacing with a radius of 0?

There's also the marko_ribar code, but I couldn't verify it. When loading, the message appears: Unknown command.

 

Edited by Nikon

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