Function Syntax: CookieCutter2 / CC / DelOutside / CookieCutter2Multi / CC2M Version: 1.1 Date: 20.06.2026 6:38:50PM https://www.cadtutor.net/forum/topic/66934-help-lisp-cookiecutter2-v12-mod-by-vva-dont-trim-polyline-3d/ πŸš€ CookieCutter2 CookieCutter2 is an AutoCAD and Civil 3D AutoLISP utility for trimming geometry or erasing objects inside or outside a selected closed cutting boundary. It extends the EXTRIM-style workflow by processing blocks, nested blocks, hatches, and regions while providing boundary-based drawing cleanup options. Main Commands 🧰 Run CookieCutter2 or CC to select one closed cutting boundary and trim or erase geometry on the chosen side. πŸ—ΊοΈ Run CookieCutter2Multi or CC2M to keep objects inside any of several selected closed boundaries by erasing objects outside their combined areas. SEO Optimized Description πŸ“ This AutoCAD cookie cutter trim tool uses a circle or closed polyline, ellipse, or spline as a cutting edge for inside trimming, outside trimming, boundary cleanup, and area-based erasing. πŸ” The routine supports CAD production workflows where intersecting lines, curves, blocks, hatches, and regions need to be processed against a closed boundary more efficiently than repetitive manual TRIM and ERASE operations. 🧠 It uses Visual LISP ActiveX IntersectWith logic, boundary tracing, point-in-polygon tests, offset geometry, and sorted intersection points to determine reliable trimming locations. πŸ“Œ CookieCutter2 is useful for CAD technicians, Civil 3D users, survey drafting, utility plans, site drawings, map cleanup, detail isolation, hatch cleanup, block-heavy drawings, and any AutoCAD workflow that requires EXTRIM-style boundary processing. Functionalities πŸš€ EXTRIM-style workflow - selects one closed boundary, asks for the side to process, and trims intersecting geometry when erase-all is not selected. πŸ“ Supported cutting edges - accepts circles, closed lightweight or 2D polylines, ellipses, and closed splines as trimming boundaries. 🧹 Inside or outside erase - can erase all objects on visible layers either inside or outside the selected trimming object. 🧩 Block processing - explodes intersecting blocks, recursively processes nested blocks, and converts block attributes into text when possible. 🎨 Hatch and region support - explodes regions and non-solid hatches that cross the boundary so their supported geometry can be trimmed. πŸ“ Solid hatch conversion - optionally converts intersecting solid hatches to ANSI31 lines before trimming. πŸ” Boundary validation - rejects open, self-intersecting, spline-fit, or unsupported trimming objects before editing the drawing. 🧠 Intersection sorting - orders multiple trim points along curve parameters to make repeated trimming more predictable. πŸ”“ Layer-state handling - temporarily unlocks locked non-xref layers and relocks them when processing ends. ↩️ Undo and recovery - wraps changes in an AutoCAD undo mark and restores modified system variables, visibility states, layer locks, and the original view. πŸ—ΊοΈ Multi-boundary cleanup - the CookieCutter2Multi command preserves objects inside or crossing any selected closed boundary and erases objects outside all selected areas. Practical Result βœ… The result is a faster AutoCAD boundary trimming and cleanup workflow that can trim intersecting geometry, erase objects on a selected side, process block and hatch content, and isolate geometry inside multiple closed areas. This makes CookieCutter2 useful for EXTRIM replacement workflows, cookie-cutter editing, drawing cleanup, area isolation, hatch conversion, nested block processing, Civil 3D drafting support, and repetitive boundary-based CAD editing tasks. Important Note This command directly edits, erases, and may explode drawing objects. Review the result and use AutoCAD undo when needed. The routine operates only on visible layers, ignores true external references, does not trim annotation objects, and may require cleanup after processing. The CookieCutter2Multi command performs outside erasing only and does not trim objects that cross the selected boundaries.