Rank: 471874 based on 0 downloads (last 30 days) and 0 file submitted
photo

Patrik Ek

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Patrik Ek View all
Updated File Comments Rating
03 Jan 2014 Polygon Clipping and Offsetting Mex wrapper for a fast, robust C++ library to clip and offset arbitrary polygons. Author: Emmett

Ok I got it working by using version 4.8. However, I could only offset perfect rectangles and only if the offset polygon were smaller the half the minimum side length. Is it possible for you to create an example where the algorithm works as it should, and include only one polygon in the example so it is easier to see how it works.

03 Jan 2014 Polygon Clipping and Offsetting Mex wrapper for a fast, robust C++ library to clip and offset arbitrary polygons. Author: Emmett

I am afraid that some recent changes in clipper have cause problems here. A few examples,

Polygons class is not found,
AddPolygons does no longer exist.

Also I am unsure why you use the identifier long64, since it does not exist in clipper or in any attached header.

30 Oct 2013 INSERTROWS (v2.0, may 2008) Insert rows into a matrix at specific locations Author: Jos (10584)

Thank you for a good function. This should be a part of MATLAB's standard package. You should consider however, the case where ind is larger than the maximum number of rows.

eg.

A = zeros(2,3) ; B = [1;1];
c = insertrows(A.', B.',5)
c =
0 0
0 0
0 0
1 1

Here it would be a good idea to add zeros at the end, or something like that. I guess the current implementation is a safety for users that have counted worng, but this should not be a limitation for the users that do this intently.

Also, the first index seems to be zero here. This is not normally the case in MATLAB and may cause confusion if a script or program have more than one author.

Contact us