Skip to content

emreonen/librecad-hole-selection-wizard

Repository files navigation

Hole Selection Wizard for LibreCAD

A selection tool for LibreCAD that allows progressive die designers to select circles and arcs by diameter, color, line type, and layer.

Features

  • Filter circles and arcs by diameter (with tolerance)
  • Filter by color (ByLayer or custom color)
  • Filter by line type (ByLayer, Continuous, Dash, Dot, DashDot, DashDotDot, Center)
  • Filter by layer
  • Apply to entire active layer or a user-defined area
  • Only selects entities on visible layers (frozen layers are ignored)
  • All filter states are preserved when redefining the selection area

Use Case

Designed for progressive die designers who need to quickly select specific hole features (bolts, pins, columns, etc.) in 2D technical drawings.

Installation (from source)

Modified Files

File Destination
lc_actionselectbyproperties.h librecad/src/actions/drawing/selection/
lc_actionselectbyproperties.cpp librecad/src/actions/drawing/selection/
lc_selectbypropertiesdialog.h librecad/src/ui/dialogs/actions/
lc_selectbypropertiesdialog.cpp librecad/src/ui/dialogs/actions/

Integration Steps

1. rs.h — Add after ActionSelectPoints:

ActionSelectByProperties,

2. lc_actionfactory.cpp — Add to createSelectActions():

{"SelectByProperties", RS2::ActionSelectByProperties, tr("Hole Selection &Wizard"), ":/icons/select_all.lci"},

Add to createSelectActionsUncheckable() as well.

Add to fillActionLists() in select_actions:

"SelectByProperties",

3. lc_menufactory.cpp — Add after "SelectLayer" (two places):

"SelectByProperties",

4. lc_actionhandlerfactory.cpp — Add include and case:

#include "lc_actionselectbyproperties.h"
case RS2::ActionSelectByProperties: {
    return new LC_ActionSelectByProperties(ctx);
}

5. src.pro — Add to HEADERS and SOURCES:

actions/drawing/selection/lc_actionselectbyproperties.h
actions/drawing/selection/lc_actionselectbyproperties.cpp
ui/dialogs/actions/lc_selectbypropertiesdialog.h
ui/dialogs/actions/lc_selectbypropertiesdialog.cpp

Usage

Tools → Select → Hole Selection Wizard

  1. Set your filters (diameter, color, line type, layer)
  2. Choose Entire active layer or User defined area
  3. If user defined area: click two corners to define the rectangle
  4. All matching circles/arcs in visible layers will be selected
  5. Apply any LibreCAD operation (move, copy, delete, etc.)

Screenshots

Coming soon

Contributing

Feel free to open issues or pull requests!

License

GPL-2.0 — same as LibreCAD

About

Hole Selection Wizard plugin for LibreCAD - select circles and arcs by diameter, color, line type and layer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages