Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Grrr1337 on June 25, 2019, 04:10:43 AM
Title: Convex Hull - Modification
Post by: Grrr1337 on June 25, 2019, 04:10:43 AM
Hi everyone, I'm not sure how hard is this modification to be considered as challenge - Basically provide a ConvexHull subfubfunction, (ConvexHull <PointList> <IndispensablePointList>), where the result is something in between a "ConvexHull" and/or an "Outline" (see pic or dwg)
In the above the standard convex hull would be generated from the polylines's vertices (turquoise in the picture), however when manually are specified some points (red in pic) the convex hull will be reshaped/modified (red in the picture).
Title: Re: Convex Hull - Modification
Post by: ribarm on June 25, 2019, 05:31:39 AM
Are your requested shapes always othogonal like in your pictures? So if that's the case, Convex-Hull-Modified should recognize that new point list and recognize where should new points be inserted between original Convex-Hull point list... I am wondering do you actually need new point list, if you want shapes like you showed... Basically if point and next point at some angle - not 0.0; (/ pi 2.0); pi; (* 3.0 (/ pi 2.0)); (* 2.0 pi); new point should be inserted with coords (list (car p) (cadr nextp))? Is this you are looking for? - Then no need for new sub function, just post process Convex-Hull original point list...
Title: Re: Convex Hull - Modification
Post by: ribarm on June 25, 2019, 05:46:17 AM