I just discovered this useful add-on PRJ for Blender , I share directly the readme.md file from the source page. This is underdevelopment but is already full of features
prj
What is prj
prj is a Blender add-on for generating technical drawings from 3d model.
Its main purpose is to help architects and designer to make building and interior drawings automatically. [anim]
Disclaimer
prj is currently under development and may be subject to changes: using it on production is on your own responsibility.
At the moment prj has been tested on Linux and Windows machines only and is not supposed to work on other OS
About prj
prj generates linked data-rich SVG drawings. In particular:
drawings are in SVG format Scalable Vector Graphics is a non-binary and non-proprietary format that can be viewed by a simple browser on any device. Interactivity can be implemented on it and its style can be handled by CSS. Editing is easy and graphically powerful using both open source source and proprietary softwares.
drawings are linked
Every 3D object is represented in a single dedicated SVG file and all those files are linked (as <use> element) to the main drawing. That allows to keep files size small and to limit redrawing to changed objects only.
drawings are data-rich
Every object stores informations about it directly inside the SVG. Hence text searches are possible over single and multiple drawings.
prj uses Blender Line Art feature and SVG grease pencil exporter.
Getting started
Donwload the addon from here and install it in Blender
Remember to install the dependencies to complete the installation (if it doesn’t work you can try to launch Blender as administrator)
Select the camera for the drawing and set its type as Orthographic.
In data properties window you can set other options for the camera such as the drawing scale or the file name.
Clip start position defines cut plane.
In order to set the objects drawing properties (like visibility, tagging or symbol type) check the object properties window.
In the Output properties set the output path. Then, with the camera selected, in data properties window, click on Draw it!
Your drawing is ready!
Look for the svg file in the output path.
Use an SVG editor to add dimensions, texts, graphics and create compositions and use css to style your drawing.
I’ve installed the dependencies but not works, I think my OS has some issues since the upgrade to Ubuntu 20.04LTS, in fact after upgrade come out various issues with Apparmor.
And I get this error:
bpy.context.space_data.system_bookmarks_active = 3
Modules Installed (prj-main) from '/home/us128128/Scaricati/prj-main.zip' into '/home/us128128/.config/blender/2.93/scripts/addons'
Traceback (most recent call last):
File "/home/us128128/Software/blender-2.93.10/2.93/scripts/modules/addon_utils.py", line 351, in enable
mod = __import__(module_name)
File "/home/us128128/.config/blender/2.93/scripts/addons/prj-main/__init__.py", line 33, in <module>
from prj.main import reset_scene, main
ModuleNotFoundError: No module named 'prj'
The problem seems related to the name of the folder where the add-on is installed: “prj-main” is not the correct one.
It seems that the add-on has been downloaded from the button at the top of the web page
You could just rename the folder in “prj” but I suggest you to download the most recent version from the releases page or use the direct link reported in the Getting started guide
Let me know if it works
Now seem working with the renaming of dir, but inside the release file zipped have a different name with version numbering, so I have to rename even this.
But I think the exported file need a better naming like the blender file name with camera. or maybe the collection.
An other thing the SVG is a bit strange because I can’t open it with QCAD or FreeCAD, and from Inkscape I can’t have a working DXF when I try to export into DXF.
But anyway is good tool to have with Blender
Thanks @pafurijaz for your report! It’s very useful!
Now seem working with the renaming of dir, but inside the release file zipped have a different name with version numbering, so I have to rename even this.
The zipped file name contains the version number but the folder inside is correctly named as “prj” (during the installation process blender ignore the zipped file name: it’s its content that matter)
But I think the exported file need a better naming like the blender file name with camera. or maybe the collection.
It’s a good advice, thanks: at the moment the svg file is named after the camera or you can set the name in the “Drawing name” field. Your suggestion is interesting: let me think about it
An other thing the SVG is a bit strange because I can’t open it with QCAD or FreeCAD, and from Inkscape I can’t have a working DXF when I try to export into DXF.
I didn’t try to open the svg in other softwares than Inkscape and some browser (Firefox and Brave). I definitively should make some test on Illustrator, QCAD, Freecad, ect… but I think that the problem is caused by the svg linked structure: the final drawing is a collection of links (as
Sorry: I didn’t point out that the link to the add-on in the releases page is the “Add-on” one (I imagine you clicked on the “Source code (zip)” one, instead).
About the choice of using the SVG format with a linked structure it’s worth saying that prj aims to produce drawings that store data: every object in the drawing can, therefore, return informations about it (product id, size, weight, physical properties, cost, typology, family belonging, etc… like in BIM) and allow user to get, for example, bill of quantities or interactive drawing you can query…
File formats like dxf or dwg can’t do this (no need to say that I think it’s better to avoid proprietary formats).
The underlying idea of prj is to avoid other steps than modeling (storing all data, using in Blender) and representing (composing, adding annotations and dimensions, styling it with css, using Inkscape).
Anyway, if you need to edit the SVG in another software, you have to embed all the linked parts of the drawing. To do that select all the objects (on all layers) and click on “Edit > Clone > Unlink Clones recursively”. All the external drawings will be embedded and, after saving the file, you should be able to open it on other applications.
I hope I have been helpful
Regarding the need for DXF is mainly to add dimensions to drawings, an indispensable thing, however it is still essential to use the DXF format, I don’t use DWG but to communicate with other design applications and for production with CNC machines is the use of the DXF format is still essential.
But your script still looks great, and if you can add dimensions capability in the future, perhaps using the Measure it add-on in some way, it will be a great thing.
Thank @pafurijaz,
at the moment I suggest to add dimensions with Inkscape with the Measure segments LPE tools: I used for a lot of architectural drawings and I could say that it works pretty well (even if, compared to CAD softwares, it lacks some features: in that case I needed to do some tweak with the css).
I never worked with CNC machines: do you know if SVG files aren’t compatible with this kind of works?
Thanks, will try this tools, again about DXF file format is at today the exchange format to everyone, I understand your idea, but in architectural and CAD drawings field, is also the common one, for laser cutting machine is still used widely by every company in the world. I think there are few machine can read also SVG, maybe with dedicated software I’ve seen something around the web, but I think they convert path to DXF.
I would love to see a tutorial on how to create an Inkscape drawing border, views, dimensions and annotations using SVGs generated from the Blender prj addon.
Hi Ben,
I should definitely make some documentation and tutorial. At the moment I’m a little busy so I can’t do it but I’ll tell you here when I do something.
For now I can suggest to import the drawing made with prj in a new svg file (in Inkscape click on File > Import > … > Include SVG image as editable object(s) in the current file) in order to keep the linked system working (this way you can redraw the scene and your edits will not affected).
About drawing border and graphics, if you prefer not to draw them yourself, you can download those I made from https://gitlab.com/marzof/prj/-/tree/main/assets (you can find them in the assets folder of the add-on too). Then you can import the ones you need in a new drawing as well.
For the dimensions you can use the LPE Measure segments as you can see here…
I’ve a request the ability to export also the #lineart already computed without regenerating everything all times, because I make drawing also in this way, this can also reduce the time because you can export a partial parts of the scene, maybe with the ability to select scenes or objects or LineArt.
Maybe this change cause you a problem because you have to move your form from the camera table to the output render.