Short description
Purpose: Provide a unified dialog interface for running multiple area-processing operations inside closed polylines Use cases: Creating inside boundaries, breaking curves, converting regions to polylines, filtering out open polylines, or joining areas Memory: Stores last chosen option in *BR2P-last-option* and auto-selects it next run

Command:
Command name: BR2P Dialog: Seven radio options select different area-processing workflows Options: • rb01 BreakAll • rb02 Boundary Offset • rb03 Region2Polyline • rb04 Offset + Region2Polyline • rb05 BreakAll + Offset + Region2Polyline • rb06 Delete open polylines only • rb07 JoinAreas Cancel: Leaves the drawing untouched and prints “Command canceled.”
Description:
This routine centralizes several processing tools into a single dialog window, allowing the user to pick one workflow for generating, cleaning, or merging interior closed areas. Each radio selection triggers one or a chain of advanced geometric operations such as breaking curves at intersections, creating offset-based inside boundaries, converting regions to polylines, removing open shapes, or unifying closed polylines into single areas. The chosen method is remembered for the user’s next session, making repeated usage faster and more consistent.
Helper function: (if any)
• writeBR2PDCL Builds a temporary DCL file containing the 7-option radio dialog • radioBR2PDCL Loads the dialog, restores last selected option, retrieves the chosen radio button, and stores it globally • c:BreakAll Breaks all selected curves at mutual intersections using an adjustable gap • c:boffset Creates boundary regions from planar curves and performs offset-edge operations dynamically or at a fixed distance • c:Region2Polyline Wrapper selecting regions for conversion • :Region2Polyline Recreates closed lightweight polylines from regions by ordering segments and applying bulges • c:DEL_OPEN_PL Deletes LINEs and open polylines inside a window but keeps closed polylines untouched • c:JoinAreas Converts closed polylines to regions, unions them, explodes back to curves, and rejoins them into unified polylines
Functionalities:
• Unified workflow One command controls multiple area-processing operations • Intersection breaking Prepares geometry for clean area creation • Inside boundary generation Using region + offset-edge logic from robust Lee Mac tools • Region → Polyline Converts regions into accurate closed polylines with proper bulges • Pipeline commands rb04 and rb05 execute chained multi-step workflows automatically • Cleaning tool Deletes all open polylines inside a window selection • Area joining Regions are boolean-united then converted back to closed polylines with maintained properties • Undo safety Uses undo marks and restores system variables after operations • Temporary file cleanup Removes DCL file after use and deletes interim geometry during processing
Result:
• Final geometry Produces broken, offset, converted, cleaned, or unified polylines depending on the chosen option • Area readiness Ensures clean closed shapes perfect for catchment modeling or quantity extraction • Efficiency Complex multi-step workflows can be triggered with a single dialog choice • Repeatability Previous user settings persist, speeding repeated processing
Images, animations etc.
Log in to download.
Log in
Log in
XAML code:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
<src:RibbonToolTip x:Key="InteriorPolylinesArea">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: BR2P</Bold>
<LineBreak/>
<Bold>Version: 1 Date: 05.09.2025</Bold>
<LineBreak/>
<LineBreak/>
<Bold>BreakAll:</Bold>
<LineBreak/>
<Hyperlink>AI+http://www.theswamp.org/index.php?topic=10370.0</Hyperlink>
<LineBreak/>
<Bold>Description</Bold><LineBreak/>
This AutoLISP routine <Span Foreground="DarkRed">BR2P</Span> (Create Inside Closed Polylines Options) provides a dialog-driven interface for generating closed polylines or regions using multiple selectable workflows.<LineBreak/>
<Bold>Functionalities:</Bold><LineBreak/>
• Command syntax: <Span Foreground="DarkRed">BR2P</Span>.<LineBreak/>
• Displays a <Span Foreground="DarkRed">DCL</Span> dialog titled “Catchment area Create Inside (smallest) Closed Polylines Options.”<LineBreak/>
• Provides multiple radio button choices:<LineBreak/>
– <Span Foreground="DarkRed">BreakAll</Span> – Breaks intersecting objects to create closed outlines.<LineBreak/>
– <Span Foreground="DarkRed">Boundary Offset (Creates Closed Regions)</Span> – Generates regions from offset boundaries.<LineBreak/>
– <Span Foreground="DarkRed">Region2Polyline</Span> – Converts resulting regions into closed polylines.<LineBreak/>
– <Span Foreground="DarkRed">Boundary Offset + Region2Polyline</Span> – Combines the two steps for polylines directly.<LineBreak/>
– <Span Foreground="DarkRed">BreakAll + Boundary Offset + Region2Polyline</Span> – Full process: break, regionize, and convert to polylines.<LineBreak/>
– <Span Foreground="DarkRed">Keeps Closed Polylines only</Span> – Filters for existing closed polylines, ignoring others.<LineBreak/>
– <Span Foreground="DarkRed">JoinAreas</Span> – Performs union of created areas after generation.<LineBreak/>
• Remembers the last chosen option (<Span Foreground="DarkRed">*BR2P-last-option*</Span>) for convenience.<LineBreak/>
• Executes the corresponding routine once confirmed in the dialog.<LineBreak/>
• Includes Cancel option to exit without changes.<LineBreak/>
<Bold>Key Features:</Bold><LineBreak/>
• Combines multiple closed polyline generation techniques into one dialog.<LineBreak/>
• Integrates with existing helper routines like <Span Foreground="DarkRed">Region2Polyline</Span> and <Span Foreground="DarkRed">JoinAreas</Span>.<LineBreak/>
• Supports step-by-step workflows or all-in-one automation depending on user choice.<LineBreak/>
• Saves user preferences between runs for productivity.<LineBreak/>
<Bold>Function Syntax</Bold><LineBreak/>
• <Span Foreground="DarkRed">BR2P</Span><LineBreak/>
<Bold>Typical Workflow</Bold><LineBreak/>
• Run <Span Foreground="DarkRed">BR2P</Span>.<LineBreak/>
• In the dialog, select the desired method (e.g., BreakAll, Region2Polyline, JoinAreas).<LineBreak/>
• Confirm with OK to execute the routine.<LineBreak/>
• The program processes objects accordingly and outputs the resulting closed polylines or regions.<LineBreak/>
<Bold>BR2P – Mode Details</Bold><LineBreak/>
<Span Foreground="DarkRed">BreakAll</Span><LineBreak/>
• Purpose: Breaks all intersecting linework at crossings to help form smallest closed loops suitable for catchment or room boundaries.<LineBreak/>
• Input: Intersecting lines, polylines, arcs, and similar curve objects.<LineBreak/>
• Process: Finds intersections, inserts break points, and splits objects at those points.<LineBreak/>
• Output: A set of segmented objects ready for boundary detection or region creation.<LineBreak/>
• Notes: Does not delete geometry. Best used before region or boundary operations to avoid gaps.<LineBreak/>
<Span Foreground="DarkRed">Boundary Offset (Creates Closed Regions)</Span><LineBreak/>
• Purpose: Generates closed <Span Foreground="DarkRed">REGION</Span> objects by offsetting or buffering the input outlines, then forming closed areas.<LineBreak/>
• Input: Lines and polylines that describe perimeters or networks.<LineBreak/>
• Process: Builds candidate boundaries, creates regions, resolves overlaps when possible.<LineBreak/>
• Output: One or more closed regions suitable for Boolean operations or conversion to polylines.<LineBreak/>
• Notes: Region creation can fail on self intersections, tiny gaps, or very dense geometry.<LineBreak/>
<Span Foreground="DarkRed">Region2Polyline</Span><LineBreak/>
• Purpose: Converts each selected <Span Foreground="DarkRed">REGION</Span> into a closed lightweight polyline with proper bulges for arcs.<LineBreak/>
• Input: Region entities from previous steps or existing drawing content.<LineBreak/>
• Process: Explodes region to primitives, reconstructs a closed LWPolyline, computes arc bulges.<LineBreak/>
• Output: Clean closed polylines ready for editing, labeling, and measurement.<LineBreak/>
• Notes: Preserves geometry fidelity for arcs and lines. Deletes source regions after conversion.<LineBreak/>
<Span Foreground="DarkRed">Boundary Offset + Region2Polyline</Span><LineBreak/>
• Purpose: One click pipeline that creates regions from boundary offset then immediately converts them to closed polylines.<LineBreak/>
• Input: Lines and polylines forming candidate boundaries.<LineBreak/>
• Process: Boundary generation to regions, then automatic region to polyline conversion.<LineBreak/>
• Output: Closed polylines without leaving intermediate regions behind.<LineBreak/>
• Notes: Faster for production when regions are only an intermediate step.<LineBreak/>
<Span Foreground="DarkRed">BreakAll + Boundary Offset + Region2Polyline</Span><LineBreak/>
• Purpose: Full workflow to segment geometry, derive closed regions, and finish with clean closed polylines.<LineBreak/>
• Input: Messy intersecting networks of lines and polylines.<LineBreak/>
• Process: Break intersections, create regions from buffered boundaries, convert to polylines.<LineBreak/>
• Output: Clean closed polylines representing smallest enclosed areas.<LineBreak/>
• Notes: Best for catchment or room generation from unprepared linework. Longest runtime on large drawings.<LineBreak/>
<Span Foreground="DarkRed">Keeps Closed Polylines only</Span><LineBreak/>
• Purpose: Filters selection to retain only those polylines that are already closed and valid.<LineBreak/>
• Input: Any mix of open and closed polylines.<LineBreak/>
• Process: Tests closure flag and vertex continuity, discards open polylines from the result set.<LineBreak/>
• Output: A curated set of closed polylines for downstream use.<LineBreak/>
• Notes: Non destructive filter step to prepare inputs for union or labeling workflows.<LineBreak/>
<Span Foreground="DarkRed">JoinAreas</Span><LineBreak/>
• Purpose: Unites multiple closed polylines into a single outline by converting to regions, applying Boolean union, then rebuilding as a polyline.<LineBreak/>
• Input: Two or more closed polylines that overlap or touch.<LineBreak/>
• Process: Convert to regions, union, explode back to a closed LWPolyline, restore key properties.<LineBreak/>
• Output: A single closed polyline that represents the merged area.<LineBreak/>
• Notes: Region Boolean operations may fail on highly self intersecting or very complex shapes. Consider simplifying first.<LineBreak/>
<Bold>Dialog and Memory</Bold><LineBreak/>
• The last selected option is stored in <Span Foreground="DarkRed">*BR2P-last-option*</Span> and will be offered by default on the next run.<LineBreak/>
<Bold>General Warnings</Bold><LineBreak/>
• Region creation and union are sensitive to gaps, overlaps, and self intersections. Clean geometry improves reliability.<LineBreak/>
• Very dense drawings may require more time. Consider working in smaller selections or isolating layers first.<LineBreak/>
</TextBlock>
<Grid>
<Image Source="InteriorPolylinesArea_00.jpg" Stretch="Uniform"/>
</Grid>
<Grid>
<MediaElement
Source="GIF"
Stretch="Uniform"
Visibility="Visible"/>
</Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>
