Giter Site home page Giter Site logo

kevancress / measureit_arch Goto Github PK

View Code? Open in Web Editor NEW
261.0 261.0 38.0 28.14 MB

MeasureIt_ARCH is an addon for Blender, that adds tools to create design documentation and technical drawings that can be previewed within Blender's 3D viewport, and exported as images, vector graphics or .dxf files. Read the Doc's here:

Home Page: https://kevancress.github.io/MeasureIt_ARCH/

License: Other

Python 99.33% HTML 0.03% TeX 0.10% Roff 0.06% GLSL 0.31% CSS 0.04% JavaScript 0.12% Jinja 0.01% Batchfile 0.01%
architecture blender cad design

measureit_arch's People

Contributors

ferx avatar kant avatar kevancress avatar mjepronk avatar s-leger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

measureit_arch's Issues

Addon not loading MacOx

March 26 and 27th Blender 2.8 builds for MacOx not loading MeasureIt or MeasureIt-Arch.
When I deselect and re-select the addons in preferences following error occurs.

bpy.ops.mesh.primitive_cube_add(size=2, view_align=False, enter_editmode=False, location=(0, 0, 0))
Activated BoxCutter
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
bpy.ops.machin3.vertex_mode()
Traceback (most recent call last):
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/761CA1A9-DA18-4F2D-B7D2-024B2255EF2A/d/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 384, in enable
mod.register()
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/761CA1A9-DA18-4F2D-B7D2-024B2255EF2A/d/blender.app/Contents/Resources/2.80/scripts/addons/measureit/init.py", line 150, in register
register_class(cls)
ValueError: register_class(...): already registered as a subclass

Traceback (most recent call last):
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/761CA1A9-DA18-4F2D-B7D2-024B2255EF2A/d/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 384, in enable
mod.register()
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/761CA1A9-DA18-4F2D-B7D2-024B2255EF2A/d/blender.app/Contents/Resources/2.80/scripts/addons/measureit/init.py", line 150, in register
register_class(cls)
ValueError: register_class(...): already registered as a subclass

bpy.ops.object.editmode_toggle()
Traceback (most recent call last):
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/761CA1A9-DA18-4F2D-B7D2-024B2255EF2A/d/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 351, in enable
mod = import(module_name)
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/MeasureIt-ARCH-master/init.py", line 94, in
measureit_arch_styles.MeasureitArchDimensionSettingsPanel,
NameError: name 'measureit_arch_styles' is not defined

Permit Arrow Size Below 6; use decimal or fractional for small models

I cannot change the size of the arrows below a unit value of 6(?). This looks silly next to smaller objects(?).

This means on a cube that is 10", the arrows are laughably too large for the dimensions and object.

Can the smallest arrow size be changed to use decimal or fractions of units rather than hard coded at 6 minimum or even match 1/2 line height scale?

ARROWS

Dimensions get [REDACTED]

when I have no objects selected in the scene the text gets [REDACTED], a.k.a [DATA EXPUNGED], a.k.a. ██████, and since nobody got this refference i'm just gonna show you a screenshot
https://photos.app.goo.gl/sR9cwdw9DFec4RXt6

info that may help : I have multiple scenes in my file, some objects may share names
also, I sometimes used Alt+D to duplicate, meaning some objects share mesh data

Rendering MeasureIt Arch fails if output was once set to .png but has changed to a different format

Alright so if you set the output type to .png and render the Measureit Arch annotations all works fine. However if you change the output to anything other than png, lets say .jpg, measureit_arch_render.py will log 2 errors and fail to render. So Its seem like the addon its storing some of the render settings and not accounting for the changes made to updated render output settings as I can see one of the errors has to do with the color_depth values stored for the .png image format that was set before (This is just my initial observations without looking at whats happening in the code). I have not tried to see if the render will fail if other combinations output formats are selected or if this is only related to the .png format.

To get the render to work again one would need to change the output format back to .png, otherwise rendering in other formats will continue to fail.

Here is the error from the console:

Traceback (most recent call last):
  File "C:\Users\MarcelQ\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\MeasureIt-ARCH-master\measureit_arch_render.py", line 120, in execute
    if render_main(self, context) is True:
  File "C:\Users\MarcelQ\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\MeasureIt-ARCH-master\measureit_arch_render.py", line 233, in render_main
    settings.color_depth = '16'
TypeError: bpy_struct: item.attr = val: enum "16" not found in ('8')

location: <unknown location>:-1

Brainstorming for Interactive Dimensions in the 3D Viewport

A spot for me to drop resources on how this might be accomplished, and for you to drop Ideas/Feedback/Suggestions.

Current Thoughts: A modal operator(or operators?) That allow for click and drag to edit dimension properties (Offset, Distance, etc)

Jayanam's Drag-able UI Panel tutorial might be helpful here: https://www.youtube.com/watch?v=ylggq0eFN5A

Each Select-able element/property would need 'hitbox' projected into the 2d screen space to determine selection. (Or maybe I could raycast the mouse position into 3d space and check against the dimensions position??)

Magnitude of the 2D mouse move vector after click could then used to add to the property.

Actually Gizmos might be my best bet here, looks like they can be assigned directly to properties and have the draw/selection/mousemove functionality already there

Error if I Delete a Dimensioned Object

Hello, I have just started working with your add-on and find two things:

  1. I can't find an option to Delete a dimension, which may have been placed in error.

  2. When I delete the Object with dimensions, I get this error:

Traceback (most recent call last):
  File "/Users/mac/Library/Application Support/Blender/2.80/scripts/addons/MeasureIt-ARCH-master/measureit_arch_gizmos.py", line 118, in poll
    if 'DimensionGenerator' in ob:
TypeError: argument of type 'NoneType' is not iterable

location: <unknown location>:-1

location: <unknown location>:-1

Can you look into this for me please?

EDIT:

Also Dimensions should be read from the right, or bottom, you can see here that the dimension on the right of the cube is read from the left and the dimension at the bottom of the cube is read from the underneath, not the bottom, this is probably user error on my part, but I can't find a way to correct this. I have tried selecting vertices in either order BTW.

Screen Shot 2019-10-31 at 10 51 22

Love what you have done here, a good system! It's nice to see gaps between the dimensions and the object...

Installation problem

Hi,
getting the following error when I tried to activate addon into latest build of blender 2.8

Modules Installed () from '/Users/newuser/Downloads/BLENDER/2.8 addons/archectural/measureit_arch_v01.zip' into '/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons'
Traceback (most recent call last):
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/283ADC70-B960-4CC9-8C28-6F0E0F4DEBEC/d/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 351, in enable
mod = import(module_name)
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/init.py", line 84, in
auto_load.init()
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/auto_load.py", line 23, in init
modules = get_all_submodules(Path(file).parent)
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/auto_load.py", line 51, in get_all_submodules
return list(iter_submodules(directory, directory.name))
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/auto_load.py", line 55, in iter_submodules
yield importlib.import_module("." + name, package_name)
File "/private/var/folders/k6/1x1hxh5d6bs54nmjxb030mr00000gn/T/AppTranslocation/283ADC70-B960-4CC9-8C28-6F0E0F4DEBEC/d/blender.app/Contents/Resources/2.80/python/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/measureit_arch_annotations.py", line 42, in
from .measureit_arch_main import get_smart_selected, get_selected_vertex
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/measureit_arch_main.py", line 40, in
from .measureit_arch_geometry import draw_annotation, draw_alignedDimension, draw_line_group, draw_angleDimension, update_text, draw_vertices, draw_object, draw_edges
File "/Users/newuser/Library/Application Support/Blender/2.80/scripts/addons/measureit_arch_v01/measureit_arch_geometry.py", line 54, in
Dashed_Shader_3D.fragment_shader)
Exception: Shader Compile Error, see console for more details

Can MeasureIt display a furniture design's bounding box dimensions?

I import wrl files of furniture designs to Blender. These designs have many different parts. I would like to display overall dimensions like shown in the photo below:

overall_dimensions

I have tried to join all the parts, get a bounding box for the overall furniture design, then enable "Edge Length" in Viewport overlays, but all the individual parts' dimensions get displayed. I end up with a mess like this:

edge_length

It seems all parts' dimensions are shown except for the overall bounding box's dimensions, which are what I need.

Can MeasureIt display bounding box dimensions? That seems to be the most accurate way to display overall dimensions. Thank you!

Could dimension lines and annotations benifit from a z offset property?

I have attached an example of where dimension lines have a z fighting issue with 3D objects. This is expected when the lines overlay objects, but sometimes it is necessary to offset dimensions in the direction of the objects. Could this issue be resolved by including a z offset property for dimensions and annotations?

It seems like text doesn't have this issue but perhaps annotation lines will also have an issue like the dimension lines. I have also tested with line styles applied to the objects and although the result is better z fighting is still an issue even when trying different z offsets on the lines styles.

I see the z offset property is marked as TEMP in the tool tip so maybe you have a better solution that will fix all the issues with z fighting.
MeasureIt Arch dimension z fighting issue

MeasureIt Arch dimension z fighting issue with lines

Improvements for Arc Dimension Display

The following need to be added to arc dimensions before V0.4:

  • An option to toggle radius display
  • An option for the arc length to show as an angle, rather than a length.
  • A point or dot to clearly show the Arc's center point
  • An operator to spawn and keep an empty at the arcs center point for further dimension's

Current Text Drawing Method is SLOW

Writing text to a list property on the object, and then reading it back to a buffer for drawing is stupidly slow (like 1-2 milliseconds per dimension slow) and there has to be a better way to manage this I just don't understand enough about assigning openGL textures to get this work.

If anyone wants to take a look at solutions the relevant code is in measureit_arch_geometry.py in the methods update_text and draw_text_3d

Presumably I should be able to store the text textures as OpenGL textures on the GPU but last time I tried that resulted in this issue: #7

Looks like saving textures to the GPU still results in an upper limit depending on the hardware capabilities... (192 textures on my gtx 750).

MeasureIt Arch not visible in object mode - only in edit mode

Hi Kevan, Thx for your great work on this add-on. Much appreciated.

I have been trying it out but I am experiencing an issue where i cannot get any of the MeasureIt Arch visuals to show if I am in object mode. If I am in edit mode they display. I have enabled Show in the MeasureIt panel with the option to display for all objects.

I thought what might be the issue is my blender version. I'm using it in both 2.83 alpha and the stable 2.82 but both have the same issue.

I have not tried it in 2.80. However I have noticed in your wiki page you are directing to the daily builds page so that also makes me point out that your add-on doesn't specify what version of blender 2.8x you support. So I presume when you specify 2.8 in your documentation you mean for all 2.80 versions.

My only last resort is to reset my Blender install to defaults and see if that fixes the issue. I have also attached a zipped video for your reference.

Any help will be appreciated.
Blender 2020-03-09 11-46-51.zip

Thx

Mesh Obj Origin to Mesh Obj Origin behavior for Aligned Dims not working

Array iterator out of range: (index 9999999)
Traceback (most recent call last):
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\measureit_arch\measureit_arch_main.py", line 462, in draw_callback_3d
draw_main_3d(context)
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\measureit_arch\measureit_arch_main.py", line 449, in draw_main_3d
draw_alignedDimension(context, myobj, DimGen, alignedDim)
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\measureit_arch\measureit_arch_geometry.py", line 226, in draw_alignedDimension
selectedNormal = Vector(select_normal(myobj,dim,normDistVector,midpoint))
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\measureit_arch\measureit_arch_geometry.py", line 443, in select_normal
vertA = myobj.data.vertices[dim.dimPointA]
IndexError: bpy_prop_collection[index]: index 9999999 out of range, size 8

Arrow style; length vs width ratio

Awesome tool!

Is there a way to change the arrow head style on the dimensions lines so they are longer, more streamlined?

Traditionally CAD arrows are longer and wider than the addon exhibits? Arrowheads more typically have a 3:1 ratio in length vs width. In essence, what I am looking for is more akin to the "closed filled" arrowhead from AutoCAD. Currently, the arrow is too fat.

Love to ideas on how.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.