Custom Fillet with Bulge

Custom Fillet with Bulge

jdrury54QED
Explorer Explorer
415 Views
17 Replies
Message 1 of 18

Custom Fillet with Bulge

jdrury54QED
Explorer
Explorer

I am hoping to get help creating a LISP that will perform a custom "fillet" command. There are a few things to consider that I'm struggling with. The standard fillet command only works with two intersecting lines or two lines separated by a single segment. In my case I need to be able to select any two lines that will intersect regardless of how many segments separate them.

How I would like it to work. I want to run the command, be prompted for a radius (store the radius for quick repetition), then select my first line and the second line. Once the lines are selected, the second line will create an outside "bulge" based on the radius. (See image).

 

This will be used primarily for modifying CNC machining paths. Our nesting software will often produce the multi-segmented path (center in the image) which inevitably will cause an error at the machine. This "bulge" is a relief notch, so we don't have square inside corners. I had to painstakingly go through a large set of parts where there were hundreds of points I had to remove, then convert segments to arcs to get the paths to stop erroring out at the CNC machines. This would have saved hours.

Any help would be greatly appreciated.

 

jdrury54QED_0-1758285859287.png

 

0 Likes
416 Views
17 Replies
Replies (17)
Message 2 of 18

Kent1Cooper
Consultant
Consultant

By "line" it looks from the image [the grips are the giveaway] like you really mean "Polyline line segment."  Is that always the case, or might you need such a thing with two Line objects?

If always Polyline line segments, can we assume they are always parts of the same Polyline?

What if the two selected segments are not perpendicular?  Should the arc segment be tangent coming off the first segment [left side], or should it always be a half-circle arc [right side], or is there some other criterion?

Kent1Cooper_0-1758308597171.png

 

Kent Cooper, AIA
0 Likes
Message 3 of 18

jdrury54QED
Explorer
Explorer

Kent, thank you for your response to this. Ideally, if it's not a perpendicular situation, then a tangent scenario would be best. I've tried prompting AI for help with this but none of the platforms I've used have produced anything... literally nothing at all. This is a painstaking process that we do almost daily, across multiple users. It's just always been the way so no one ever thought to try to do something more efficient.

0 Likes
Message 4 of 18

Sea-Haven
Mentor
Mentor

Not sure if this will help, you can pick a pline and get its segment so could draw a dummy line as this segment and fillet the two new lines, erase the lines, break at arc ends and join the 3 pieces back together.

 

on iPad so no code.Sorry.

0 Likes
Message 5 of 18

leeminardi
Mentor
Mentor

@jdrury54QED please clarify.  Are the following all true?

  1.  The  "lines" are lines and not polylines.
  2. The bulge arc should be tangent to the first line selected and it starts at the end of the line closest to the intersection of the two lines.
  3. The first line should not be modified.
  4. The second line's end point should move to the end of the new arc.
  5. The lines might not be perpendicular. 
lee.minardi
0 Likes
Message 6 of 18

Kent1Cooper
Consultant
Consultant

@leeminardi wrote:

.... 

1. The  "lines" are lines and not polylines.

....

3. The first line should not be modified.

....


On number 1:  In the image, they're Polylines [you can tell from the shapes of the grips, and from the lack of a center-point grip for the arc].  But there are still the questions of whether that would always be the case, and whether they would always be selecting two segments within the same Polyline [those in the image could be separate ones that touch at their ends].

On number 3:  Alternatively, since there may be any number of intervening segments, when that's the case maybe the first should be modified to have its closer end at the virtual intersection of the two selected segments.

Kent1Cooper_0-1758365496919.png

 

Kent Cooper, AIA
0 Likes
Message 7 of 18

komondormrex
Mentor
Mentor

@jdrury54QED 

are these CNC machining paths always open, closed, or both?

0 Likes
Message 8 of 18

Moshe-A
Mentor
Mentor

@jdrury54QED hi,

 

to continue what @Kent1Cooper  said...does the arc is always semicircle?

cause if it is not, it is not enough to specify the radius + pick two objects. you will also need to specify the chord.

 

Moshe

 

0 Likes
Message 9 of 18

leeminardi
Mentor
Mentor

@Moshe-A see my assumption #2 in post 5. If true then you have all that you need. I think the OP needs to jump in here and clarify.

lee.minardi
0 Likes
Message 10 of 18

Moshe-A
Mentor
Mentor

@jdrury54QED  hi,

 

To tell you the truth, at first it looks like an easy task, as i start coding it grow and grow to a big program

it took more time to debug it than writing the whole program any way here is something you can start working with 🙏

this version requires you specify bulge radius plus pick two objects (lines or plines).

the angle between objects must be 90 degrees and the arc you'll get is semicircle but the objects may be at any angle (not aligned to axis) as long as they form 90 degrees.

make sure you pick the objects close to the end you want the bulge.

if it is pline, the segment you pick can not be polyarc.

works in WCS only.

 

for supporting lines angle not 90 degrees, i need to do more thinking but if you settle with this one? we will drop the idea 😀

Attached blg.zip file, extracting it, release blg.vlx, appload it in your drawing, invoke BLG to run.

 

enjoy

Moshe

 

 

 

 

 

 

0 Likes
Message 11 of 18

komondormrex
Mentor
Mentor

mark one.

 

0 Likes
Message 12 of 18

komondormrex
Mentor
Mentor

mark two.

 

0 Likes
Message 13 of 18

jdrury54QED
Explorer
Explorer

Yes, the objects in the images I shared initially are polylines. In virtually all situations they will be polylines. Less than 2% would probably be actual "lines", so I'm not worried about anything other than polylines. And to confirm, the first line should not be modified - this will help us to create a standard process.

0 Likes
Message 14 of 18

jdrury54QED
Explorer
Explorer

In most cases the arc will be a semi-circle as our most common scenario will be 90-degree corners.

0 Likes
Message 15 of 18

jdrury54QED
Explorer
Explorer

The videos look ideal for what we need. Very impressive.

0 Likes
Message 16 of 18

Kent1Cooper
Consultant
Consultant

@jdrury54QED wrote:
A.  .... I need to be able to select any two lines that will intersect regardless of how many segments separate them. ....
B.  ....the first line should not be modified. ....

C.  .... In most cases the arc will be a semi-circle as our most common scenario will be 90-degree corners.


Hmm....

@komondormrex 's videos are all used at adjacent segments, ignoring A above.

Your first image violates B above.

C above, even with perpendicular segments, cannot be achieved if B above is complied with, in a situation such as, for example, this:

Kent1Cooper_0-1758648802335.png

The green is the supposedly-preferred semi-circle bulge, but clearly, the end of segment 1 must be modified if it is to meet that.

So which of B and C is more important?

Kent Cooper, AIA
0 Likes
Message 17 of 18

komondormrex
Mentor
Mentor

Kent, you are just wrong. look carefully at rn_2.avi !-) the white one is a closed lw polyline))) 

0 Likes
Message 18 of 18

CADaSchtroumpf
Advisor
Advisor

Here is a code that can make a fillet with arc between different types of lines (line, pline, ray xline)
The adjustments of the lines have not yet been made.
In the case of a polyline with arc, the code works but the arc is set up with the tangent of the arc at the selected point. So I don"t recommend selecting an arc in a polyline.
Works mainly in the WCS or parallel UCS to the WCS.

0 Likes