Author Topic: Fillet a polyline corner by corner...  (Read 1976 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
Fillet a polyline corner by corner...
« on: June 20, 2017, 05:48:30 AM »
I have to fillet a polyline (LW and classic ..), but not in common (command fillet r 30 ...), but step by step:

- check the polyline
- check if the segments are to short for the defined radius R. Report problems
- fillet only corners and arc with r<R; arc with r>R stay unchanged

Do you know some code snippets to start with?

Thanks a regards

Peter

EDIT:
Link to the necessary (and many other) formulas - University Berlin, Geoinformatics and Survey:

http://public.beuth-hochschule.de/~korth/Formelsammlung_VK1.pdf
« Last Edit: July 12, 2017, 10:15:53 AM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

tedg

  • Swamp Rat
  • Posts: 811
Re: Fillet a polyline corner by corner...
« Reply #1 on: June 20, 2017, 06:46:30 AM »
I have to fillet a polyline (LW and classic ..), but not in common (command fillet r 30 ...), but step by step:

- check the polyline
- check if the segments are to short for the defined radius R. Report problems
- fillet only corners and arc with r<R; arc with r>R stay unchanged

Do you know some code snippets to start with?

Thanks a regards

Peter
How is this different from the fillet command>polyline?
If the segment is too short it wont fillet it and returns
Code: [Select]

X lines were filleted
X were too short


I suppose that could be turned into a routine,

Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

Peter2

  • Swamp Rat
  • Posts: 650
Re: Fillet a polyline corner by corner...
« Reply #2 on: June 21, 2017, 06:31:14 AM »
Thanks tedg

but at the moment I don't see a way to solve it with the standard "fillet" commands. The current question is:

What's the background (the formula) of calculating a fillet of two lines?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

tedg

  • Swamp Rat
  • Posts: 811
Re: Fillet a polyline corner by corner...
« Reply #3 on: June 21, 2017, 06:53:44 AM »
Thanks tedg

but at the moment I don't see a way to solve it with the standard "fillet" commands. The current question is:

What's the background (the formula) of calculating a fillet of two lines?
Maybe I don't understand your process,
But your original post mentioned you want to fillet a pline with a defined radius, and if a segment is too short, to not have it fillet it.
And so that's what I was proposing, the fillet > polyline command does this and reports back what was filleted and what wasn't (if too short).


I have a simple lisp that this:
Code: [Select]

;;fillet polyline command that askes for radius first
(defun c:frp (/ rad pol fr)
(setq rad (getreal "Radius?")) (terpri);;<<-you define your desired radius
(setq pol (ssget))
(setq fr (getvar "filletrad"))
(setvar "filletrad" rad )
(command ".fillet" "p" pol)
(setvar "filletrad" fr)
(princ)
)


Hope it helps, or maybe you could explain more why you need something different.
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

ChrisCarlson

  • Guest
Re: Fillet a polyline corner by corner...
« Reply #4 on: June 21, 2017, 03:50:04 PM »
Are you asking for a method to perform the maximum fillet if it's less than the specified?

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Fillet a polyline corner by corner...
« Reply #5 on: June 21, 2017, 11:26:31 PM »
If you go to 1st principle and look at pline vertices then its simple to work out if radius is to big, likewise you can work out 2 new pick pts using two vertice points and the angle between them. If you want to just pick the corner check the vertices for that corner co-ords, then its a before and after pts, check also needed for closed or open as last point can be the same as 1st. Use vl-lisp 'get-cordinates.
A man who never made a mistake never made anything

Peter2

  • Swamp Rat
  • Posts: 650
Re: Fillet a polyline corner by corner...
« Reply #6 on: June 22, 2017, 11:09:29 AM »
Thanks for all the postings.

In the meantime I made a solution with "analyse vertex - analyse segment before and behind - create the "fillet data" with a circle with TTR - analyse the circle, check if it correct to fillet - create new lists of coordinates and bulges".

It is a little bit tricky to check "what to fillet - what not - is it 'filletable' - ...., but at the moment this is my approach.

Have a fine day (rather warm here...)

Peter
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23