From 2d6e71479312919d270345e32580f464641e3a5c Mon Sep 17 00:00:00 2001 From: mozman Date: Mon, 18 Mar 2024 14:50:40 +0100 Subject: [PATCH] finalize the tutorial for the ezdxf.select module --- docs/source/tutorials/entity_selection.rst | 160 ++++++++++++++++++ docs/source/tutorials/gfx/select-base.png | Bin 0 -> 5561 bytes .../source/tutorials/gfx/select-by-circle.png | Bin 0 -> 7272 bytes .../tutorials/gfx/select-by-polygon.png | Bin 0 -> 7021 bytes docs/source/tutorials/gfx/select-chained.png | Bin 0 -> 6929 bytes docs/source/tutorials/gfx/select-fence.png | Bin 0 -> 7310 bytes .../tutorials/gfx/select-inside-window.png | Bin 0 -> 6883 bytes .../tutorials/gfx/select-outside-window.png | Bin 0 -> 6852 bytes docs/source/tutorials/gfx/select-point.png | Bin 0 -> 6732 bytes docs/source/tutorials/src/select.py | 110 ++++++++++++ 10 files changed, 270 insertions(+) create mode 100644 docs/source/tutorials/gfx/select-base.png create mode 100644 docs/source/tutorials/gfx/select-by-circle.png create mode 100644 docs/source/tutorials/gfx/select-by-polygon.png create mode 100644 docs/source/tutorials/gfx/select-chained.png create mode 100644 docs/source/tutorials/gfx/select-fence.png create mode 100644 docs/source/tutorials/gfx/select-inside-window.png create mode 100644 docs/source/tutorials/gfx/select-outside-window.png create mode 100644 docs/source/tutorials/gfx/select-point.png create mode 100644 docs/source/tutorials/src/select.py diff --git a/docs/source/tutorials/entity_selection.rst b/docs/source/tutorials/entity_selection.rst index c21835bb7..3774c6790 100644 --- a/docs/source/tutorials/entity_selection.rst +++ b/docs/source/tutorials/entity_selection.rst @@ -7,6 +7,10 @@ This tutorial shows how to use the :mod:`ezdxf.select` module, which provides fu to select entities based on various shapes. These selection functions offer a way to filter entities based on their spatial location. +This is the base document for this tutorial: + +.. figure:: gfx/select-base.png + Why Bounding Boxes? ------------------- @@ -14,6 +18,11 @@ The :mod:`~ezdxf.select` module primarily relies on bounding boxes to perform se Bounding boxes offer a fast way to identify potential overlaps between entities and the selection shape. This approach prioritizes performance over absolute accuracy. +.. note:: + + The bounding boxes for text-based entities and entities containing curves are not + accurate! For more information read the docs for the :mod:`ezdxf.bbox` module. + Source of Entities ------------------ @@ -53,11 +62,47 @@ Bounding Box Inside Selection Selects entities which bounding boxes are completely within the selection shape. +Example to select entities inside a window: + +.. figure:: gfx/select-inside-window.png + + +.. code-block:: Python + + import ezdxf + from ezdxf import select + + doc = ezdxf.readfile("base.dxf") + msp 0 doc.modelspace() + + window = select.Window((150, 105), (280, 240)) + for entity in select.bbox_inside(window, msp): + print(str(entity)) + +output:: + + CIRCLE(#9D) + LWPOLYLINE(#9E) + Bounding Box Outside Selection ------------------------------ Selects entities whose bounding box is completely outside the selection shape. +.. figure:: gfx/select-outside-window.png + +.. code-block:: Python + + window = select.Window((185, 105), (245, 240)) + for entity in select.bbox_outside(window, msp): + print(str(entity)) + +output:: + + TEXT(#9F) + SPLINE(#A0) + LINE(#A1) + Bounding Box Overlap Selection ------------------------------ @@ -69,19 +114,134 @@ selection shape. This will also select elements where all of the entity geometr outside the selection shape, but the bounding box overlaps the selection shape, e.g. border polylines. +.. figure:: gfx/select-inside-window.png + +.. code-block:: Python + + window = select.Window((150, 105), (280, 240)) + for entity in select.bbox_overlap(window, msp): + print(str(entity)) + +output:: + + CIRCLE(#9D) + LWPOLYLINE(#9E) + TEXT(#9F) + SPLINE(#A0) + LINE(#A1) + LWPOLYLINE(#A2) + Bounding Box Chained Selection ------------------------------ Selects elements that are directly or indirectly connected to each other by overlapping bounding boxes. The selection begins at the specified starting element. +.. figure:: gfx/select-chained.png + +.. code-block:: Python + + # choose entity for the beginning of the chain: + line = msp.query("LINE").first + for entity in select.bbox_chained(line, msp): + print(str(entity)) + +output:: + + LINE(#A1) + CIRCLE(#9D) + LWPOLYLINE(#9E) + SPLINE(#A0) + Bounding Box Crosses Fence -------------------------- Selects entities whose bounding box intersects an open polyline. +.. figure:: gfx/select-fence.png + +.. code-block:: Python + + for entity in select.bbox_crosses_fence([(83, 101), (186, 193), (300, 107)], msp): + print(str(entity)) + +output:: + + CIRCLE(#9D) + LWPOLYLINE(#9E) + SPLINE(#A0) + LINE(#A1) + +.. note:: + + The polyline does not cross the entity geometry itself! + Point In Bounding Box Selection ------------------------------- Selects entities where the selection point lies within the bounding box. +.. figure:: gfx/select-point.png + +.. code-block:: Python + + for entity in select.bbox_point((264, 140), msp): + print(str(entity)) + +output:: + + LWPOLYLINE(#9E) + SPLINE(#A0) + +Circle Selection +---------------- + +For the circle shape, the selection tests are carried out on the real circlar area. + +This example selects all entities around the CIRCLE entity within a 60 unit radius +whose bounding box overlaps the circle selection: + +.. figure:: gfx/select-by-circle.png + +.. code-block:: Python + + entity = msp.query("CIRCLE").first + circle = select.Circle(entity.dxf.center, radius=60) + for entity in select.bbox_overlap(circle, msp): + print(str(entity)) + +output:: + + CIRCLE(#9D) + LWPOLYLINE(#9E) + TEXT(#9F) + SPLINE(#A0) + +Polygon Selection +----------------- + +As for the circle shape, the polygon selection tests are carried out on the real polygon +area. + +.. note:: + + This may not work 100% correctly if the selection polygon has a complex convex shape! + +This example selects all entities whose bounding box lies entirely within the selection +polygon: + +.. figure:: gfx/select-by-polygon.png + +.. code-block:: Python + + + polygon = select.Polygon([(110, 168), (110, 107), (316, 107), (316, 243), (236, 243)]) + for entity in select.bbox_inside(polygon, msp): + print(str(entity)) + +output:: + + LWPOLYLINE(#9E) + SPLINE(#A0) + LINE(#A1) + diff --git a/docs/source/tutorials/gfx/select-base.png b/docs/source/tutorials/gfx/select-base.png new file mode 100644 index 0000000000000000000000000000000000000000..1d75773fca8a5010246bbc827accfe56939dad78 GIT binary patch literal 5561 zcmb_f2{_bi+n-XAit3!BBaCUH2s3tB2Fbp!+2S`Q6X`-1qPQyYD|YtSyZW@E_#| zfj|dLjP-3npdCxVSC(%luv0nEn+XE#*2CI6k)15eH9YZtFeD1^frbV95da(n($Wbg zAU%E2WQYga3+s=7&R5k!Ay^aw>ZoENZ$UVV_Qo1hh-f>CrM)M`*Haw@)zRk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9kKsNA^;ttido zn48a>5*EF4C{t45Q`dnt=`ce!8Di^c(4O12Gv!xQ@=@-2t8!0w z(Zdih2l&R^6-j4^vab!v4u;)#cNXgc>uf%jNAgY}S=C2FrYTJV(%L{aA`-(b51A58 zSvYI{26N>8M>Zs`hfFjjTmEX6)M>yaHOUguEo>4joV2dvCV1&*K!@im$+M z8RCbUn;(zA((_q1_tUDEg5UT}IW-A`=oWPV@tbAIwlzL-?ou{N(sYot`57~A3&Xzl zY)PQdq|8W%Yzut=X634#?7rCcC8(< zQ>Om9OX-VZ#~ZBl)`*yX~0P7kIjoj33=5%N?5Lz2~Xu2|FUuf3L~ zCOf(bq=z2f>Vo@~4n&Sw&B_-tL#&&72LCxt+WPWiG9!H}gq!JQ=O1mZ#RKpgE^KBR zb>p;|%7@O1GSd!$gRxUmVpCbB7FPgUpKE7GNoRYCCf(4Vt|3qY?}zJoJ(URcQO?Ok nH_*La9pZNQfBOgUP4ebW$Zu~i8ufQIaD7b-EcFZZE?oH+L3aiE literal 0 HcmV?d00001 diff --git a/docs/source/tutorials/gfx/select-by-circle.png b/docs/source/tutorials/gfx/select-by-circle.png new file mode 100644 index 0000000000000000000000000000000000000000..86cc2e0e16fdc95c14b42fba1b958679a4d20f9b GIT binary patch literal 7272 zcma)g2UJsA*X@B&LKUPVH8iCpRDn4Mi7y%RdO(A+~z--LU3+ZCS`{@gv72SlI?4j~7ZMf{VD^TZOd1W)Y$Fy$}! zUlY-Rn7{Y%U&|aJ|DqEy?*9Y*2>BNs%(a=>|GooKohWjcsKM}f3z=A)sVV)veu1f09*@3d$fE`A;@z50neh<^PBOSHh7;>_0?-*8E=;{XIt)dj*RJ z#esWJ_$~Ht$VgZBJRa+gxdLK@3kEtuMrUxdl zO8`Bl0aN;OBY&f||3DS~iT+;wB3NAD5`Tm|I$NZXkBbM|8iOKw{vGXaz!dH4afJLQ z(r@JGjIQ_{ncT`31D>kA|avQRzkYC9j&hc!{M&cDr2E$Q*}*2DAwarol* zpGvRAc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_k5r>RFXf{l}j%?l=s(o?Sih3mU{LCrK-7ZS@uZOY~#C|fehl)IaeU;z>Vsn?nyRD>c)Qc>O zS2LNdnAIP9#%1snV{|iO;avmeWRbw#@HPe6Pxj9j>f*AR^NKK*!$lR>JgxzOoMwOW zol`&KQ*)tcbnW|*vcc=3d?bNYz1=eo@Za!y9W0(nU3TmvU%!zh3gtCr3M9Ko#~ooT z4^xquQ7h`BNHzJOQ1L>!Djjrp4=Sj<$M$;pLU8!Q9g^1l0A}!juW26ZC4ppY3Y`r8 zi%QCMBi**+6^B-9Xw#LhGh^1N)m^N+&XTpB=5X#U92Br$+_@hIcR+p!e~Yv}v&Xly zkFW|$+ZorGLB?|hYs_1m+tn<=Bt^T#oYA;Y+-?YdSAVQi;%jY2>az8`(-WIQoH|u<%^p9d*7eRb6WhzV;4axvEj5=Cf#pImQ>&$&@L zE%9i=Q#)ajxC$o!WDo(-iv`Yl*JZQSnf@>mA1V8d$@9FOt8t@^)>}r9+Ocxdvk!~M zP15mn90OWmSyq={)8}F8g`yg$K#~z=lsb>~i0mFj)RcsoH%f%Nk}aJeFuVw2CbgyG z)y)eN(u;@4QOoPaFZSk*8z)o&mC5uLjY5{{bXKUFp>_`^=Gh3UEF!ocrDIgQPpL#U zG#9!*ioV#>z1ckG1bKDGh(%<>CnRGO(3xlc_D-_e1fL$MC&y!cl_|rINlonj%~=Z5 z7B#5J7w>P~*^~1Q%C@I!@4%Rj#{pX$+C63izmKm zRL8@(f=bP6`bL)Y?UkBtY0XqESO;NMsY790#@aZLly5t_-SYkjuBp3$z6NrS59DO* zLk&xWno+g!cJP2sbags{Ku}s72o`&I`23%4PTzW)yAd?r^`f_Lw|NB87xzFSlD(>+ lP1JM)0=zZ+|9--i55P|YQQ&}`hu()e^t22$E7Tn#{s$Srho%4k literal 0 HcmV?d00001 diff --git a/docs/source/tutorials/gfx/select-chained.png b/docs/source/tutorials/gfx/select-chained.png new file mode 100644 index 0000000000000000000000000000000000000000..1e16832e00ec75663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!3+Fo zYb2On(^`t3T=flus0mZmwqxR{hMpy|(yeCMCOM_a_R8zKMp3CMXgp+|UBtXm zA6wZS`r1L;yr>*qYJznC4O=uQhYxkhQ%X6*U)ft8I_g*#bNs#vZSGpNefL&j6{FRo z-dg`@Ii^X?IyCLljf28vjP2(?EdtRU$lDJ6z;Xu?cvocV?uBS=nqecUYOjnkY ze?1}G9!;L&&tS+sqKq5w7$M8ORM7UV)INUv1!fYbR23^dv*h5SK2l@lrP(NdKT~s| zoY~Yt&ofuZ{rSgqB~xSixF{+A-n$Ffr&Pw1j%D2XaSsmCC?L?}kkfk*l19CqR;#+( zLAuUE8~x_+1qrv)%F4~L_!doxuN8d6NBTRhH|oe(9t|;Kv)Q8)-HmRuhm;Tq3`0LY zEqmQO8(ON+l46HgUr;n2RI$=Fw~t?yi8d*XS0MP^{J288D~v>{f}pz6)`(6U ztMo@PW|mc_AG{0&>6MsEc2|Jcsw;;Al4iU>bY--n{Bzp&b!E$7P_&l<2H$t!TZ11D zC|Hw!DJ?(z5ChOwsJsafMW@Dz1ma-YQu<_|Mto1q8|W`KhXm4=B`OUm8|Srd4V7=Ry`nMl!NC?hrF%Zbau^RrBD=MbI+O z3t2sr6PNrGHj*ngG9+%P_9ob6o|j!%!yXAzkdj=zY4)cBNwX!e64o?)7#fd@PI$7O zuPB;TjKL!+br^3`IclhvJMQA~Ys!6>rh~0fVMa}WzTWW`Cl#4o>zRHVhl7yLTLJ&# za42cG^KZTLUK5W-^P_>p3E+=PV`5Cw_rR53ilbN9rs8ut{xHGe8sh+i@skiaf}Z8qK7{?$Y7J zNLVj3d8?6`cejEf? literal 0 HcmV?d00001 diff --git a/docs/source/tutorials/gfx/select-fence.png b/docs/source/tutorials/gfx/select-fence.png new file mode 100644 index 0000000000000000000000000000000000000000..41927aa7874de4df2aeece6d9aa2fb83b5020f20 GIT binary patch literal 7310 zcma)A2RNH;+m3owQM9(Iy^0ch2Q4*fkD8@55<(@!h*7Gj(b}UZwY^5I7A3V>b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MA zvxTCMYpzgJIC1Ya`8Y2f?gMx(o9C-&MI$ENZ%1u+>gs$BgKzlBm-kzs02(S>lzD|GyKp5vn??*RKI9DvbFG9#=+ct`o&vxiXl+SNOO5pN8RgT{VkV=ieYBH%K+5KJn(`lOidqxYLh z84SYx|waw(6GX6N~BkrkQ-xM z4iPTeS2@r9xzG(_-lld_<=uLL+xlPbfS88rl2TJ%Ui|uueJdWhZO8jgyf4%jVV$tzh3#CAtIZ^fQ zHMK?a1_1`q8>+jCT5X6YPYq&v8RPT4iWloCH8w0=r2U?EygiLPkk0p7c>mtd;o*d> zdhY3TWu}XT60%qdFjMY#X)L3&WKi(fplwnu_dh;c)y*ylYA%ksi8r1;K5PCuN&<(@ z|89_Y5!I)^fcug4m(A%&#;$0GmR#NAI}mpa*ZtPOL34`LvYwz|Gr)fM}j F{|CQo9Wej^ literal 0 HcmV?d00001 diff --git a/docs/source/tutorials/gfx/select-point.png b/docs/source/tutorials/gfx/select-point.png new file mode 100644 index 0000000000000000000000000000000000000000..1c260da376fa9cd7b8c2dd8959a362cc6154c74c GIT binary patch literal 6732 zcmb7I2{hE*-~SES*C+e zitIeL7F!es@&4#p&-4EO=Y5^?JIB4B&-Zh`_kNdq&s;Y(KE=U$m=yp34*kFf~@FijRvc=B$q1@5bOr73Sva zOT-|N{{H?5e^~^<2Zux{DJdak&`2~|8e~Y5$lkt=0n*;2qq`EnG<2{eXCFM#7f`v+3#zZHeG;W~@}x8xf!gEl#tmbN55Rg_>fpVw-Xt)` zRAKVJZ{#o3>Tjs*-_gC*&w<4SF7ZopH?|mkFGn2K0`KDM_LtgUfFaf!w~PFtw1@1* z$n)}UlArg+gHc8AIk*Q|{)MT+lujc5wvg4opxv^8s_Z2b<}{w6LibV$Zdg$6pOO4~x*&gd4Y^y_fB2??{FnDCdxXC=0?_W)9N1vM zPKErlRe^&)n;q60Od}t#l?9guL&0_#jt3LsUx@$!$Ko%?cb#Z<6ntYp$}?hd~qtg>I%V)ja}=$FAwRX*8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9yerl`(1` zF35J#G}+2z@e;G*n+$*HO6{_%Z(Y_cz15TyRW8&%Wv+`y0AZSpXnT6_vO)|n$DAyu z12Ry&e8&-x1|iva)knT3abkC+=@qr}Psm)BqUU}(GwzM<^4gZxB63By3jsj3owlp@ z`m(e3vhj>Ccd9Y~Xw+4=k9-tMEve>^dpS@NUquf9?+e?9J08tfwZ*WSc~+T&?>PYY z(UwXP!&8b>;?;9*rd<0aCVEMpY~Wtnggl5|1LF$;fGLnefnVKn@778eO+UnA}xoA{{ej2zqJ4W literal 0 HcmV?d00001 diff --git a/docs/source/tutorials/src/select.py b/docs/source/tutorials/src/select.py new file mode 100644 index 000000000..fe57dc7e8 --- /dev/null +++ b/docs/source/tutorials/src/select.py @@ -0,0 +1,110 @@ +# Copyright (c) 2024, Manfred Moitzi +# License: MIT License +from pathlib import Path +import ezdxf +from ezdxf import bbox, select + +CWD = Path("~/Desktop/Now/ezdxf/select").expanduser() +if not CWD.exists(): + CWD = Path(".") + +BASE = "base.dxf" + + +def select_inside_window(): + print("\nselect inside window:") + doc = ezdxf.readfile(CWD / BASE) + + window = select.Window((150, 105), (280, 240)) + for entity in select.bbox_inside(window, doc.modelspace()): + print(str(entity)) + + +def select_outside_window(): + print("\nselect outside window:") + doc = ezdxf.readfile(CWD / BASE) + + window = select.Window((185, 105), (245, 240)) + for entity in select.bbox_outside(window, doc.modelspace()): + print(str(entity)) + + +def select_overlap_window(): + print("\nselect overlap window:") + doc = ezdxf.readfile(CWD / BASE) + + window = select.Window((150, 105), (280, 240)) + for entity in select.bbox_overlap(window, doc.modelspace()): + print(str(entity)) + + +def select_crosses_fence(): + print("\nselect crossing fence:") + doc = ezdxf.readfile(CWD / BASE) + msp = doc.modelspace() + + for entity in select.bbox_crosses_fence( + [(83, 101), (186, 193), (300, 107)], msp.query("*").layer == "Entities" + ): + print(str(entity)) + + +def select_chained(): + print("\nselect chained entities:") + doc = ezdxf.readfile(CWD / "chained.dxf") + msp = doc.modelspace() + line = msp.query("LINE").first + for entity in select.bbox_chained(line, msp.query("*").layer == "Entities"): + print(str(entity)) + + +def select_point(): + print("\nselect entities by point in bbox:") + doc = ezdxf.readfile(CWD / "point.dxf") + msp = doc.modelspace() + for entity in select.point_in_bbox((264, 140), msp.query("*").layer == "Entities"): + print(str(entity)) + + +def select_by_circle(): + print("\nselect by circle:") + doc = ezdxf.readfile(CWD / BASE) + msp = doc.modelspace() + entity = msp.query("CIRCLE").first + circle = select.Circle(entity.dxf.center, radius=60) + for entity in select.bbox_overlap(circle, msp.query("*").layer == "Entities"): + print(str(entity)) + + +def select_by_polygon(): + print("\nselect by polygon:") + doc = ezdxf.readfile(CWD / BASE) + msp = doc.modelspace() + + vertices = [(110, 168), (110, 107), (316, 107), (316, 243), (236, 243)] + polygon = select.Polygon(vertices) + for entity in select.bbox_inside(polygon, msp): + print(str(entity)) + + +def draw_bboxes(filename: str) -> None: + doc = ezdxf.readfile(CWD / filename) + msp = doc.modelspace() + for entity in msp.query("*").layer == "Entities": + box = bbox.extents((entity,)) + msp.add_lwpolyline( + box.rect_vertices(), close=True, dxfattribs={"layer": "BoundingBox"} + ) + doc.saveas(CWD / "bboxes.dxf") + + +if __name__ == "__main__": + draw_bboxes(BASE) + select_inside_window() + select_outside_window() + select_overlap_window() + select_crosses_fence() + select_chained() + select_point() + select_by_circle() + select_by_polygon()