MATLAB Answers

Constructing an Offset-Curve

18 views (last 30 days)
Ben on 2 Dec 2014
Commented: Ben on 28 Apr 2017
Probably this question has already been posted several times, however I was not able to find an answer.
I have a smooth curve given as a set of X and Y data points and I am trying to constrcut an offset curve. Bascially my strategie was to search for the perpendicular direction at each point of the given [X,Y] data set and then follow this direction according to the desired offset. This works well for convex curves. However for concave curves, there will be a setback at certain points.
This is actually a very common problem in CNC programming. Commercial CAD and CAM software packages mostly offer a solution to this problem. Unfortunately I was not able to find a solution in matlab. Maybe I am looking in the wrong place...
I would be glad if someone could share their knowledge.
Thanks in advance! Ben
Andries Paula
Andries Paula on 23 Feb 2017
Hey. Did you managed to find out what approche is the best ?

Sign in to comment.

Accepted Answer

Unai San Miguel
Unai San Miguel on 28 Apr 2017
The subject is not trivial, a nice description can be found in the Patrikalakis et al. ebook, Offset curves and surfaces. They also speak about the particular problems of CNC.
  1 Comment
Ben on 28 Apr 2017
I agree, it is not a trivial task! Thank you for your input, this looks very informative.

Sign in to comment.

More Answers (1)

Matt J
Matt J on 2 Dec 2014
You haven't said what properties your "offset curve" must satisfy, so this is just a shot in the dark. However, what you could do is create a binary image that is white in the region above or below the given curve. Then apply imerode(). Then, find the boundary of the eroded region using bwboundaries. Then, do a curve fit to the boundary points and call that your final offset curve.
Matt J
Matt J on 2 Dec 2014
Guys, you're missing my point. Of course I know there must be more constraints. My point is that the discussion can't go forward without us being told what they are!!

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!