From 0baf624598ebedc62da6dfab308a0aab710869b2 Mon Sep 17 00:00:00 2001 From: andywar65 Date: Tue, 29 Nov 2022 19:34:02 +0100 Subject: [PATCH] update messages and readme --- README.md | 21 +++++----- locale/it/LC_MESSAGES/django.mo | Bin 4635 -> 4787 bytes locale/it/LC_MESSAGES/django.po | 72 ++++++++++++++++++-------------- 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 3964f31..97fef8e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# django-geocad 1.5.0 +# django-geocad 1.6.0 Django app that imports CAD drawings in Leaflet maps ## Overview Show CAD drawings with no geo location in interactive web maps. Change / add layers to drawings, change / add elements to layers, change blocks and change / add it's instances, download changed DXF files. @@ -11,27 +11,26 @@ In your project root type `git clone https://github.com/andywar65/djeocad`, add "DEFAULT_ZOOM": 10, "RESET_VIEW": False, }` -If you want a satellite map layer you need a [Mapbox](https://www.mapbox.com/) token adding this to `settings.py` (I use `environs` for secrets): -`MAPBOX_TOKEN = env.str("MAPBOX_TOKEN")` +If you want a satellite map layer you need a [Mapbox](https://www.mapbox.com/) token adding this to `settings.py` (I use `environs` for secrets): `MAPBOX_TOKEN = env.str("MAPBOX_TOKEN")` ## Usage -Django-geocad has three models: `Drawing`, `Layer` and `Insertion`. Creation, update and deletion of models may happen in admin, where you will need staff permission to perform these tasks. A `GeoCAD Manager` permission group is created at migration, but at the moment the feature is not implemented. -To create a `Drawing` you will need a `DXF file` in ASCII format. `DXF` is a drawing exchange -format widely used in `CAD` applications. +Django-geocad has three models: `Drawing`, `Layer` and `Insertion`. Creation, update and deletion of models may happen in admin or on the frontend. To perform these tasks user must be granted `GeoCAD Manager` permission group (created at migration). +To create a `Drawing` you will need a `DXF file` in ASCII format. `DXF` is a drawing exchange format widely used in `CAD` applications. If `geodata` is embedded in the file, it will be ignored: this app is suitable for small drawings, -representing a building, a group of buildings or a small neighborhood. To geolocate the drawing you just need to know where your `World Coordinate System origin (0,0,0)` is located. A good position for the `WCS origin` could be the cornerstone of a building, or another geographic landmark close to -the items of the drawing. -Check also the rotation of the `Y axis` with respect to the `True North`: it is typical to orient -the drawings most conveniently for drafting purposes, unrespectful of True North. Please note that positive angles (from Y axis to True North) are counter clockwise. +representing a building, a group of buildings or a small neighborhood. To geolocate the drawing you just need to know where your `World Coordinate System origin (0,0,0)` is located. A good position for the `WCS origin` could be the cornerstone of a building, or another geographic landmark close to the items of the drawing. +Check also the rotation of the `Y axis` with respect to the `True North`: it is typical to orient the drawings most conveniently for drafting purposes, unrespectful of True North. Please note that positive angles (from Y axis to True North) are counter clockwise. So back to our admin panel, let's add a Drawing. You will have to select the `Author` of the drawing, a `Title`, a short description, an image and the `DXF file`. In the map select the location of your `WCS origin`, then enter the `Rotation` (angle with respect to True North). Eventually check `Private` to prevent other users from viewing your drawing. Press the `Save and continue` button. If all goes well the `DXF file` will be extracted and a list of `Layers` will be attached to your drawing. Each layer inherits the `Name` and color originally assigned in CAD. `ARC`, `CIRCLE`, `LINE` and `LWPOLYLINE` entities are visible on the map panel. It is possible to change layer name and layer entities. -If unnested `BLOCKS` are present in the drawing, they will be extracted and inserted on respective layer. Please notice that all entities forming the `BLOCK` will be placed on layer `0`. `Blocks` share the same model as `Layers`, so they can be modified in frontend. Insertion point is at (LAT=0, LONG=0). When updating a `Block` you will be able to access it's instances. Apart from normal CRUD operations, you can also `explode` an instance: the instance will be deleted, but it's entities will be transferred to insertion layer (this is common practice in CAD). +If unnested `BLOCKS` are present in the drawing, they will be extracted and inserted on respective layer. Please notice that all entities forming the `BLOCK` will be placed on layer `0`. `Blocks` share the same model as `Layers`, so they can be modified in frontend. Insertion point is at (LAT=0, LONG=0). When updating a `Block` you will be able to access it's instances. Apart from normal CRUD operations, you can also `explode` an instance: the instance will be deleted, but it's entities will be transferred to insertion layer (this is common practice in CAD). If you want to create a new `BLOCK`, make a `Layer` first. Layer can be transformed to block (an instance of the block will replace layer). ## On the frontend On the navigation bar look for `Projects/GeoCAD`. Two `List` frontend views are implemented: `List of all drawings`, `List by author`, where drawings are just markers on the map. Note that `private` drawings will be hidden from non authors in all views. Click on a marker and follow the link in the popup: you will land on the `Drawing Detail` page, with layers displayed on the map. If you are the author of this drawing, you can access all `CRUD` views for `Drawings`, `Layers` and `Insertions`. Note that all entities on a layer inherit layer color. ## Downloading In `Drawing Detail` view it is possible to download back the (eventually modified) `DXF file`. Some limitations apply: the `True North` will be respected, `ARC` and `CIRCLE` entities will be approximated to `LWPOLYLINES`, and `Layers` will have `True Colors` instead of `ACI Colors`. Beware that if layers have been modified and a download is performed, the stored file will be replaced too, and rotation will be set to zero (True North). +## Changelog v1.6.0 +* Transform layer to block +* C*UD views need permissions ## Changelog v1.5.0 * CRUD of block instances * Ability to switch single layers on/off in drawing detail view diff --git a/locale/it/LC_MESSAGES/django.mo b/locale/it/LC_MESSAGES/django.mo index 7da78607e32ce6240de8678168f9806df8bcce9a..970a6bd9492143a491e74d63f4a70b7d20d3e048 100644 GIT binary patch delta 1659 zcmYk+OGs2v9LMpK<7>3ZSDI_O2olm@~!Evrp0dI>?%s*s|`B4}as{mmSq!~ExS&$;)WbMF6~d#@IR3Y`zB(W8da zOe`W=qm1dmp=kan$+5;1VG8D>4>Pe17vlgf!BJbE#0Au+Fav+s_P97>a;O)h3!5;} z7{_ekU@i^2(2bpu6UL9LsSn}`yo;;wJubtfcw?%t9vQL|z7%TSr9M%}mD+K#2v51=M+ z0X6VtREEaU&G_cAz2GILQh#TiMx|^9=VNw4WI`3FC#yjX*lgRkqgHJXrePZ@6TPVG z9n{2!ZT%)XTJs4G)X`H^Cf=f+{5vWmzfm2zNP{{^MYZRnGE!mnp`Ne-H_c%pm`8n# zi%ak!s{haEMdM-pOEJ$Axv&K_p+l$(&!9HfZF~L^YNB6I6ZvV4Vs@&hSqrd^dKIp~ zUaZFJw*JPRcO{X3J?T2~Bb!hiZL{vR?E%!24PYS-+4g&wMg0LPBd<{t{DjKPG?E1K z%hvxQKNHI!I-lWiP{2X1ZD_Q%U=8g%Q5~K|4RjHenQ>GHPpmIc6P&_@_#M@+JB59N zWvJ`7B0sZ(Kem-|_Hm#A0;tV%47t~wKyA8nn2xtl15Bcx;5lmPKB78uvvW028mhl? z)Mobar_I=c>Zcvm{{XVBHk;Ft19KiVz!&=mDjRuG$sCPFWzHUZNzYY64Jkx&|{2{v2!%cC8t6sYLY zY;nRX-Aqjjpi)bC2`xl9v7Y$9=<}xCRAd|Vd1GgW7hd056>Vb`Exw9ghuN}{1AQQJ ziB#RSjsxXTMc+n!Xg8`tsU)<(dLc`QGGZyQA@nUKc}{$Pu)NbB>^eB|EH*PV6MMy# z+1l3;II=(3cgXASINsgo?GJh*SBxf1#MOE$YwId2LfaBEqTD@!@V#BZk#bK~sMAvw coz2bRdpo@To}=AkbTl8?n3lSUK84zSMk`yHNfaVP-`~u!MTh&ppL6cLbI$*sbLJ*$CaR;$h2Hx{ z86e7u{xq{oIPB#_S<5i1#UHpAOEU=!V+EeYDjad`hgd@UEe3G`ci{@AV}{Qx2eUBO zENaD6vba#?ZZzN_+MU>lSFjZ)@Bq$Z8*UZO|L^A<13W;@#1m8plc*m~x$ASNnOJmwLA}`u_Iu3!;2zq2bW(>A)LyxZmG}bd z@jdFf^<3s(nH1%v9t@#woIoWuj7ng{dD}Vee2HD$pTb7`iS1ZL_G+I)-5N-%<&k*lb^GV0nlk;Cq|_G7H3{mivz zobypC9o$$%byz?)8mJUCb*-oYPCCz^50hveT$FyNv26hU#b>wP~NCHeCYs`x#WnOUQPxRp$n(UoSuM zpq7PFn>;rp`4jhX?Kqr`EdE\n" "Language-Team: \n" "Language: it\n" @@ -46,11 +46,11 @@ msgstr "Immagine" msgid "DXF file" msgstr "File DXF" -#: .\djeocad\models.py:63 .\djeocad\models.py:511 +#: .\djeocad\models.py:63 .\djeocad\models.py:564 msgid "Location" msgstr "Posizione" -#: .\djeocad\models.py:65 .\djeocad\models.py:513 +#: .\djeocad\models.py:65 .\djeocad\models.py:566 msgid "Rotation" msgstr "Rotazione" @@ -75,7 +75,7 @@ msgstr "Disegni" msgid "Layer / block name" msgstr "Nome del livello / blocco" -#: .\djeocad\models.py:403 .\djeocad\models.py:524 +#: .\djeocad\models.py:403 .\djeocad\models.py:577 msgid "Entities" msgstr "Entità" @@ -83,8 +83,8 @@ msgstr "Entità" msgid "Block definition" msgstr "Definizione del blocco" -#: .\djeocad\models.py:414 .\djeocad\models.py:438 .\djeocad\models.py:509 -#: .\djeocad\models.py:549 +#: .\djeocad\models.py:414 .\djeocad\models.py:491 .\djeocad\models.py:562 +#: .\djeocad\models.py:602 #: .\djeocad\templates\djeocad\htmx\insertion_inline.html:10 #: .\djeocad\templates\djeocad\htmx\layer_detail.html:4 #: .\djeocad\templates\djeocad\htmx\layer_inline.html:12 @@ -95,13 +95,13 @@ msgstr "Livello" msgid "Layers" msgstr "Livelli" -#: .\djeocad\models.py:436 .\djeocad\models.py:503 .\djeocad\models.py:551 +#: .\djeocad\models.py:489 .\djeocad\models.py:556 .\djeocad\models.py:604 #: .\djeocad\templates\djeocad\htmx\layer_inline.html:10 #: .\djeocad\templates\djeocad\includes\insertion_update.html:9 msgid "Block" msgstr "Blocco" -#: .\djeocad\models.py:442 .\djeocad\models.py:547 +#: .\djeocad\models.py:495 .\djeocad\models.py:600 #: .\djeocad\templates\djeocad\htmx\insertion_inline.html:9 #: .\djeocad\templates\djeocad\htmx\layer_inline.html:14 #: .\djeocad\templates\djeocad\includes\layer_update.html:10 @@ -109,11 +109,11 @@ msgstr "Blocco" msgid "ID" msgstr "" -#: .\djeocad\models.py:517 +#: .\djeocad\models.py:570 msgid "X scale" msgstr "Scala in X" -#: .\djeocad\models.py:521 +#: .\djeocad\models.py:574 msgid "Y scale" msgstr "Scala in Y" @@ -261,78 +261,86 @@ msgstr "Ancora nessuna istanza" msgid "Add instance" msgstr "Aggiungi istanza" -#: .\djeocad\urls.py:27 -msgid "/drawing//" -msgstr "/disegno//" +#: .\djeocad\templates\djeocad\includes\layer_update.html:49 +msgid "Transform layer to block" +msgstr "Trasforma livello in blocco" -#: .\djeocad\urls.py:32 +#: .\djeocad\urls.py:28 msgid "/drawing/add/" msgstr "/disegno/aggiungi/" -#: .\djeocad\urls.py:37 +#: .\djeocad\urls.py:33 +msgid "/drawing//" +msgstr "/disegno//" + +#: .\djeocad\urls.py:38 msgid "/drawing//update/" msgstr "/disegno//aggiorna/" -#: .\djeocad\urls.py:42 +#: .\djeocad\urls.py:43 msgid "/drawing//delete/" msgstr "/disegno//elimina/" -#: .\djeocad\urls.py:47 +#: .\djeocad\urls.py:48 msgid "/drawing//layer/add/" msgstr "/disegno//livello/aggiungi/" -#: .\djeocad\urls.py:52 +#: .\djeocad\urls.py:53 msgid "/layer//" msgstr "/livello//" -#: .\djeocad\urls.py:57 +#: .\djeocad\urls.py:58 msgid "/layer//update/" msgstr "/livello//aggiorna/" -#: .\djeocad\urls.py:62 +#: .\djeocad\urls.py:63 +msgid "/layer//to/block/" +msgstr "/livello//in/blocco/" + +#: .\djeocad\urls.py:68 msgid "/block//instance/add/" msgstr "/blocco//aggiungi/istanza/" -#: .\djeocad\urls.py:67 +#: .\djeocad\urls.py:73 msgid "/block-instance//update/" msgstr "/istanza//aggiorna/" -#: .\djeocad\urls.py:71 +#: .\djeocad\urls.py:77 msgid "drawing//download/" msgstr "disegno//download/" -#: .\djeocad\views.py:106 +#: .\djeocad\views.py:105 msgid "Drawing does not belong to User" msgstr "Il disegno non appartiene all'utente" -#: .\djeocad\views.py:177 .\djeocad\views.py:312 .\djeocad\views.py:394 -#: .\djeocad\views.py:408 +#: .\djeocad\views.py:180 .\djeocad\views.py:339 .\djeocad\views.py:425 +#: .\djeocad\views.py:441 msgid "Request without HTMX headers" msgstr "" -#: .\djeocad\views.py:203 +#: .\djeocad\views.py:206 msgid "Layer does not belong to User" msgstr "Il livello non appartiene all'utente" -#: .\djeocad\views.py:315 +#: .\djeocad\views.py:342 msgid "Can't delete layer '0'" msgstr "Non si può cancellare il livello '0'" -#: .\djeocad\views.py:318 +#: .\djeocad\views.py:347 #, python-format msgid "Layer \"%s\" deleted" msgstr "Livello \"%s\" eliminato" -#: .\djeocad\views.py:332 +#: .\djeocad\views.py:361 msgid "Layer is not a block" msgstr "Il livello non è un blocco" -#: .\djeocad\views.py:398 +#: .\djeocad\views.py:431 #, python-format msgid "Insertion \"%d\" deleted" msgstr "Inserimento \"%d\" eliminato" -#: .\djeocad\views.py:412 +#: .\djeocad\views.py:448 #, python-format msgid "Insertion \"%d\" exploded" msgstr "Inserimento \"%d\" esploso"