Editing BlenderBIM Add-on/BlenderBIM Add-on exporting 2D documentation

From Wiki.OSArch

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{BlenderBIM_Addon_Documentation}}
+
==2D documentation==
 +
BlenderBIM add-on provides the capability to publish a complete traditional 2D documentation of your model. The result is currently a combination of vector and raster data, compiled into [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics svg] sheet files. (the projected geometry is rendered as a raster image, the cut geometry and any 2D annotations are kept as vectors)
  
 +
The svg sheet file is compiled from a svg sheet template and one or more views exported from Blender, interpreting any variables included in the template and/or view.
  
==2D Construction Documentation==
+
The resulting svg sheets can be easily converted into pdf files for presentation or dxf for collaboration. Examples of available converters:
 
 
Although still in early [https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha alpha] development, the BlenderBIM add-on provides the capability to publish a complete traditional 2D construction documentation of your model. The result is currently a combination of vector and raster data, compiled into [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] sheet files. (the projected geometry is rendered as a raster image, the cut geometry and any 2D annotations are kept as vectors)
 
 
 
There is one fundamental difference to the way traditional software handles 2D documentation. The 2D vector output from BlenderBIM add-on is not a finished fixed vector image, but as per definition of SVG a set of 2D geometry with applied CSS styling. That means, that in theory we can output one set of drawings and only by changing the applied CSS we can control the [[Level_of_detail|LOD]].
 
 
 
The SVG sheet file is compiled from a SVG sheet template and one or more views exported from Blender, interpreting any variables included in the template and/or view.
 
 
 
The resulting SVG sheets can be easily converted into pdf files for presentation or dxf for collaboration. Examples of available converters:
 
 
*[[Inkscape]]
 
*[[Inkscape]]
 
*[http://xmlgraphics.apache.org/batik/ Batik]
 
*[http://xmlgraphics.apache.org/batik/ Batik]
  
 
==Setting up a view==
 
==Setting up a view==
A view is basically an orthographic camera, which you can place manually, or by using the "Add Drawing" button in Output Properties > SVG Drawings. This command creates the necessary camera with a default name, centered on origin. The newly created camera is automatically activated and you can rename it by double clicking its name.  
+
A view is basically an orthographic camera, which you can place manually, or by specifying the view name in "Drawing Name" field and using the "Create view" button in Output Properties > Drawings and Sheets. This command creates the necessary camera with your specified name, centered on origin. The newly created camera is automatically activated.  
  
You can also activate any camera used as a view by selecting it from the list and using the "Activate View" command.
+
You can also activate any camera used as a view by selecting it from the "Available drawings" drop down menu and using the "Activate View" command.
  
 
==Selecting geometry to be cut==
 
==Selecting geometry to be cut==
Line 24: Line 18:
 
[[Building and exporting an IFC model with BlenderBIM Add-on|How to export an IFC file from Blender.]]
 
[[Building and exporting an IFC model with BlenderBIM Add-on|How to export an IFC file from Blender.]]
  
The ifc file on which the vector cut will be performed has to be chosen under Output Properties > SVG Drawings > Add IFC File and selecting one or more IFC files.
+
The ifc file on which the vector cut will be performed has to be chosen under Output Properties > Documentation > Add IFC File and selecting one or more IFC files.
 
[[File:BlenderBIM IFCFileSelection 01.JPG|frame|center|Selecting an IFC file for a section cut]]
 
[[File:BlenderBIM IFCFileSelection 01.JPG|frame|center|Selecting an IFC file for a section cut]]
 
==Defining drawing appearance==
 
As mentioned earlier, the resulting SVG file gets its final appearance from the style sheet, defined in the [[Setting_up_a_BIM_Project_with_BlenderBIM_Add-on|Project data directory]]. The CSS controls the appearance using classes, which means that by assigning an arbitrary class, any group of objects can be assigned a specific appearance. Some of the classes are defined as an example in the <code>PROJECT_DATA_DIRECTORY&frasl;styles&frasl;default.CSS</code>, defining the appearance of the annotation elements added through UI (see below) and some basic material hatches.
 
The symbols and hatches referenced by the CSS file are standard SVG files stored in <code>PROJECT_DATA_DIRECTORY&frasl;templates&frasl;</code>
 
 
The predefined material classes are assigned automatically to all objects, based on the name of their Blender material. As an example, when no material is defined, the section hatch in SVG is the default black. By assigning a material named named <code>brick</code> (case sensitive!) to an object, its resulting hatch in SVG changes in two parallel diagonal lines. Note that it is's blender material name if your object's material is IfcMaterial. If it's not IfcMaterial (for example if it's IfcMaterialLayerSet) then <code>brick</code> should be IfcMaterialLayerSet's name.
 
 
There are more patterns for materials you can find in [https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/blenderbim/blenderbim/bim/data/assets/patterns.svg?short_path=11be0ee blenderbim\bim\data\assets\patterns.svg] that comes with BlenderBIM. Patterns like <code>crosshatch1</code>, <code>crosshatch2</code>, <code>crosshatch3</code>, <code>sand</code>, <code>grass</code>, etc. You can also define your own patterns in the similar manner.
 
[[File:Svg brick hatch pattern.jpg|frame|center|Left: object without material, Right: object with Blender material named "brick".]]
 
  
 
==Adding annotation==
 
==Adding annotation==
There are currently two ways to add annotation. First, the BlenderBIM plug-in recognizes a number of appropriately named objects on view export and interprets them as 2D annotation and second, it also recognizes the annotation added by the [[MeasureIt-ARCH]] plug-in. (currently only in the latest git master branch, see [https://github.com/kevancress/MeasureIt_ARCH/commit/831fe4a20f585d0f75b9f4c9e5a6893c3f4a5933 MeasureIt_ARCH readme] for more information on how to make it work with BlenderBIM)
+
The plug-in recognizes a number of apropriately named objects on view export and interprets them as 2D annotation. Currently recognized objects with their respective necessary names are:
 
 
Currently recognized objects with their respective necessary names are:
 
 
 
 
 
 
*Curve - IfcAnnotation/Dimension.Number - as a dimension
 
*Curve - IfcAnnotation/Dimension.Number - as a dimension
 
*Curve - IfcAnnotation/Equal.Number - as a dimension with the letters EQ instead of its value
 
*Curve - IfcAnnotation/Equal.Number - as a dimension with the letters EQ instead of its value
Line 50: Line 31:
 
*Mesh - IfcAnnotation/Hidden.Number - as a dashed curve
 
*Mesh - IfcAnnotation/Hidden.Number - as a dashed curve
 
*Text - IfcAnnotation/Text.Number - as a text field
 
*Text - IfcAnnotation/Text.Number - as a text field
* Curve - IfcAnnotation/Fall - indicate slope on a ramp, for example
 
  
The plug-in provides commands to create the correctly named dummy object in the Sidebar ("N" panel) > BlenderBIM > Annotation.
+
The plug-in provides commands to create the correctly named dummy object under Output properties > Documentation > Annotation.
 
[[File:BlenderBIM_Annotation_01.JPG|frame|center|Dummy annotation objects]]
 
[[File:BlenderBIM_Annotation_01.JPG|frame|center|Dummy annotation objects]]
 
==Dimensions==
 
 
* Override a dimension
 
** Set the Description attribute of that dimension. This means that that dimension needs to be separate from other dimensions.
 
** Add BBIM_Dimension pset and enable "DescriptionOnly". Otherwise the description is shown in addition, instead of replacing the dimension.
 
 
* Show ticks on dimension strings in Blender viewport [[File:Dimension.png]]
 
** EPset_Annotation.Classes = oblique
 
*** [[File:Ticks.png]]
 
 
==Intelligent Tagging of Objects==
 
 
Go [[BlenderBIM Add-on Adding labels linked to properties and quantities|here]] for adding labels, like wall/window tags, that are intelligently linked to the object's data.
 
 
[[File:Bulk tag location.png|thumb]]
 
 
To tag objects:
 
* select Annotation Tool choose annotation type
 
* select objects to tag
 
* use "Bulk Tag"
 
 
 
 
If you moved the tagged objects or changed them (for example stair is wider now) you can readjust tags by selection annotations and using "Readjust" in Annotation Tool.
 
 
Currently there are 2 ways of tagging:
 
# Text tagging - will create IfcAnnotation of type Text at the center of the object then you can refer to the tagged object properties in the text. [[BlenderBIM_Add-on_Adding_labels_linked_to_properties_and_quantities#Adding_a_text_with_a_variable|More]].
 
# Stair Arrow tagging - will create stair arrow by the stair X axis going until the last stair step. [https://i.imgur.com/xFHtY73.png Example].
 
 
==Drawing Styles and Filters==
 
 
If you select the camera object of the drawing, and go to EPset_Drawing property you can set the following property values
 
 
* Metadata:
 
** For example add property you'd like to be exported to SVG class.  Examples
 
*** <code>Pset_WallCommon.Status</code>
 
*** <code>r"Pset_.*Common"</code>
 
**** Will attach a class like the following to the SVG object <code>rPsetCommon-StatusEXISTINGDEMOLISHid68585</code>
 
***** Example of how a css regular expression to style the svg <code>[class*="PsetCommon-StatusEXISTINGDEMOLISH"] { fill: url(#demolish); stroke: red; stroke-dasharray: 2, 1; }</code>
 
    ''NOTE: currently attaching metadata is not supported for 2d representations and it's not possible to create custom style for them. See [https://community.osarch.org/discussion/comment/16117/#Comment_16117 example], [https://github.com/IfcOpenShell/IfcOpenShell/issues/3330 related issue to track progress]''
 
* Include and Exclude
 
** In the Include and Exclude property you can indicate what to include/exclude from the drawing.  A few examples.
 
*** Exclude:
 
**** <code>IfcElement , /Pset_.*Common/.Status=DEMOLISH</code>
 
**** <code>IfcElement , /Pset_.*Common/.Status=NEW</code>
 
**** <code>IfcElement , EPset_Status.Status=DEMOLISH</code>
 
*** Include:
 
**** <code>IfcElement , /Pset_.*Common/.Status=DEMOLISH</code> only show demo.
 
**** <code>IfcElement , /Pset_.*Common/.Status=NEW</code> only show new.
 
* Paths to...
 
** Stylesheet:
 
*** defaults to: <code>drawings/assets/default.css</code>
 
** Markers:
 
*** defaults to: <code>drawings/assets/markers.svg</code>
 
** Symbols:
 
*** defaults to: <code>drawings/assets/symbols.svg</code>
 
** Patterns:
 
*** defaults to: <code>drawings/assets/patterns.svg</code>
 
** ShadingStyles:
 
*** defaults to: <code>drawings/assets/shading_styles.json</code>
 
 
* Dimension Rounding
 
** MetricPrecision:
 
** ImperialPrecision:
 
*** Example: <code>1/2</code> rounds to the nearest 1/2"
 
* JoinCriteria
 
** If no JoinCriteria is given, it defaults to unjoin the following things <code>["class", "material.Name", 'r"Pset.*Common"."Status"']</code>. If you want to unjoin just <code>material.Name</code>, for example, set JoinCriteria value to: <code>material.Name</code>
 
 
==Text Styling==
 
 
* Background for Ifc Text annotations in SVG
 
To add fill background of Ifc Text annotation with white color you can add "fill-bg" class to EPset_Annotation.
 
[[File:Text fill-bg class tag.png|frame|center|Top: in Blender setup, Bottom: the result in svg]]
 
 
  
 
==Exporting a view==
 
==Exporting a view==
To export a view, select the proper camera, go to Object Data Properties > Diagrams and Documentation > Cut section. On running the "Cut section" command a SVG file is generated in the Diagrams folder in your [[Setting up a BIM Project with BlenderBIM Add-on#Project data directory|Data Directory.]]
+
To export a view, select the proper camera, go to Object Data Properties > Diagrams and Documentation > Cut section. On running the "Cut section" command a svg file is generated in the Diagrams folder in your [[Setting up a BIM Project with BlenderBIM Add-on#Project data directory|Data Directory.]]
The contents of the generated SVG file depend on the options you check in the Diagrams and Documentation section:
+
The contents of the generated svg file depend on the options you check in the Diagrams and Documentation section:
 
*Should Recut - a vector image is generated by intersecting a plane parallel to the camera plane in camera origin with geometry of the ifc files selected in Output Properties > Documentation.
 
*Should Recut - a vector image is generated by intersecting a plane parallel to the camera plane in camera origin with geometry of the ifc files selected in Output Properties > Documentation.
 
*Should Render - a raster image is generated by rendering the current Blender model with the current camera
 
*Should Render - a raster image is generated by rendering the current Blender model with the current camera
 
*Should Extract - metadata from the IFC file, such as material or property data (such as in smart annotations), are re-extracted
 
*Should Extract - metadata from the IFC file, such as material or property data (such as in smart annotations), are re-extracted
 
[[File:BlenderBIM ViewExportOptions 01.JPG|frame|center|View export options]]
 
[[File:BlenderBIM ViewExportOptions 01.JPG|frame|center|View export options]]
 
==Creating schedules and adding them to a sheet==
 
 
video: https://matrix.to/#/!WKUQKbTubvxEQJxrIY:matrix.org/$ESx7ajDMO8ZBQahCuD63p0UXn38TCz7cfK4ipq0bgcw?via=matrix.org
 
 
Using IFCCSV
 
https://wiki.osarch.org/index.php?title=BlenderBIM_Add-on/BlenderBIM_IFCCSV
 
 
==Background SVG==
 
Background SVG's: https://github.com/IfcOpenShell/IfcOpenShell/issues/3002#issuecomment-1518668495
 
 
==Copying Annotation from one drawing to another==
 
https://github.com/IfcOpenShell/IfcOpenShell/issues/2966#issuecomment-1606914228
 
 
= Settings in Blender Preferences - Add-ons=
 
* SVG Command:
 
** Windows Examples:
 
*** <code> [[[["C:/Program Files/Google/Chrome/Application/chrome.exe",  "path"]]]] </code>
 
*** <code> [[[["C:/Program Files/Inkscape/bin/inkscape.exe",  "path"]]]] </code>
 
 
= See also=
 
* [[Getting_started_with_2D_CAD_drafting]]
 
 
=Updating from older Drawing System=
 
https://github.com/IfcOpenShell/IfcOpenShell/issues/2978#issuecomment-1510374693
 
 
=External Resources=
 
* [https://www.bountysource.com/issues/95048565-make-construction-drawing-generation-like-really-really-awesome Support making construction drawing generation like, really, really awesome]
 
 
Tutorial & Examples
 
* [https://peertube.social/videos/watch/cb5ec2ca-5469-477a-8fd7-db357ba4c289 Creating drawings - BlenderBIM Add-on 200912 Technical WIP Demo - September 12, 2020]
 
* [https://peertube.social/videos/watch/021a6574-b175-4c43-b83d-6a133c54a199 IFC OpenBIM SVG construction documentation - 200620 BlenderBIM Add-on Technical WIP Demo - June 23, 2020]
 
* [https://community.osarch.org/discussion/199/demonstration-of-blenderbim-add-on-used-to-produce-house-alteration-drawings Housing alteration design documentation with BlenderBIM Add-on]
 
* [https://community.osarch.org/discussion/comment/693/#Comment_693 The Revit office building as pure IFC documentation]
 
* [https://community.osarch.org/discussion/comment/4419/#Comment_4419 Examples of floor plans derived from IFC]
 
 
[[Category:Blender]] [[Category:BlenderBIM Add-on]]
 

Please note that all contributions to Wiki.OSArch are considered to be released under the Creative Commons Attribution-ShareAlike (see Wiki.OSArch:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)