[AddOn] NP Float Poly

Hi,

here’s another CAD-like tool i wanted to make for the pipeline. I basically needed a way to draw a polyline while snapping to an architectural blueprint.

From there the tool can extrude the shape, making a slab or a wall. Escaping the tool during extrusion sends the shape back to 2D, making the floors and other surfaces possible. The script is best suited for fast cubic shape creation.

You can also use it without the blueprint and apply the numerical input.

It is a derivative of the point distance script and it shares some procedures with it. If someone finds it useful and tries it out, please report bugs - the script is still in development.

Current version: 001

http://pasteall.org/pic/show.php?id=106508

Example of floor creation

Example of wall creation

Example of simple furniture creation

Example of arbitrary object creation

INSTALLATION:

Unzip and copy .py to addons_contrib folder in your Blender folder. Start Blender, go to User Preferences/Addons. Turn on Testing filter and type poly into the search box. Check the box next to the addon name. If you have a previous version uncheck it and then check the new one.

USAGE:

START - space search menu / type poly / enter or hit the shortcut key if you assigned it
LMB / CTRL+LMB - selection of points with snap
RMB - close the poly and start extrusion / finish the command
SPACE - entering / exiting the navigation mode during the command
ESC - exiting the command, reverting to current state

WARNINGS:

Unfortunately, in linux 2.77 and 2.78 testbuild it has a strange behaviour as viewport fps falls dramatically after the command. Pressing 2xTAB solves the issue. I am not sure what causses the problem. No problems in 2.75 and 2.76.

EDIT: Just tested the addon in 2.78 RC1, the issue seems to be resolved!

ADDON SETTINGS:

Unit scale: Distance multiplier for various unit scenarios
Suffix: Unit abbreviation after the numerical distance
Custom colors: Default or custom colors for graphical elements
Mouse badge: Option to display a small cursor label
Point markers: Option to display graphical markers for the start and segment points
Bevel: Option to automatically start a bevel operation after the extrusion
Base material: Option to add a basic material to the poly object
Smooth shading: Option to turn on smooth shading for the poly object
Wire contour: Option to turn on wireframe over the solid

SHORTCUT ASSIGNMENT:

Detailed instructions are inside the py.file, as with other NP add-ons.

Please report eventual bugs, the 001 version is a prototype.

It is made in 2.75a. Thanks for all the feedback and suggestions.

Attachments

NP_float_poly_001.py.zip (13.1 KB)

Great addon, thanks for sharing!!

thank you, great work :slight_smile:

Thank you , I will look at this and try it out

The helpfull thing. Thanks

You are welcome, guys. Hope it works for you.

Being an ambitious prototype, there are many places where it could hit a snag…

Very useful, i love it. thanks a lot for sharing!

Great Addon :slight_smile:

Maybe you can report the regression on the bug tracker and get it solved for 2.78?

really nice addon, thanks a lot! An idea for a feature would be to generate quads if possible for the extruded faces, but I guess that is rather hard to do…
Anyway, very comfortable to use, cool idea with the space toggle to navigate :slight_smile:

Thank you very much!!! :yes:

Good suggestion… I will check with the guys from the python support also, in case it is my wrong-doing.

@erdinc, wanilson_m

You’re welcome, hope it helps…

Sorry mbbmbbmm, didn’t see your post, thanks.
What do you mean by quads - instead of the polygon surface on top?

Yes instead of the Ngons on top optionally make Quads and Tris - but thinking about it, it’s not that important, it’s probably easier to just insert the edges quickly with j where we need them. But I have another question, when not snapping to a vertex is it possible to have the new vertices be generated in the view plane at the depth of the 3d cursor? Or maybe on the floor grid? At the moment it seems that they are generated far away in the distance.
PS: I think you couldn’t see my post because it was the last one of the first five requiring moderation :wink:

Yeah, an alternative mode of placing points is something i was thinking about, also. Right now the behaviour is such, you can only make viable poly by snapping or going orthogonally from previously snapped points, with or without numerical input. When you do neither of that, it makes points on the view plane very close to viewpoint (at least in my case) or if you accidentally miss a snap, the poly is no longer planar and becomes deformed in 3D.

If i get some free time i was thinking of making another switch (something like navigate) that would use hitray code for the placement of points on a mesh face or on the ground plane (you can check out my older NP Float Box). However, that would take a good amount of time, which is scarce right now…

Anyway, thanks for the feedback and suggestions, a prototype like this needs real-life testers for improvement.

Thank you, this is really good !
The only annoying&limiting thing, clearly visible during this addon, is impossibility of zooming&panning while ‘in command’ mode.

BTW: what CAD file format imports best into Blender, per your experience ?

any idea how to import DWG to blender?

So basically switch from vertex to face snapping? Yes that would be nice. We could then quickly add a simple plane as a “working plane” and delete it after the object has been created.

However, that would take a good amount of time, which is scarce right now…

Yeah, I can relate, no pressure :wink:

Thanks bluecd.
Did you try the ‘navigate’ mode during the command, by pressing space? That is the only way i managed to incorporate navigation and so far it helps a lot.

The addon uses the standard ‘grab’ command for point placement, which doesn’t have navigation. As a matter of fact, this is such an important missing feature that mauge is in the process of making a whole new fork of Blender in which he tackles this and other CAD improvements : Mechanical Blender

BTW: what CAD file format imports best into Blender, per your experience ?

So far that would be DXF, using the official DXF import addon v0.8.5. which is already in Blender. Dxf properly cleaned from 3D solids, xrefs, blocks, hatches, texts, dimensions and splines…

zcaalock: any idea how to import DWG to blender?

Hi, previous answer, but convert to DXF before that. DWG is a commercial file type and is mainly not supported in open-source apps.

mbbmbbmm: So basically switch from vertex to face snapping? Yes that would be nice. We could then quickly add a simple plane as a “working plane” and delete it after the object has been created.

Check also previously mentioned Mechanical Blender, there is a new ‘working plane’ feature added recently.
It is a very important project, support it if you can.

WARNINGS:

Unfortunately, in linux 2.77 and 2.78 it has a strange behaviour as viewport fps falls dramatically after the command. Pressing 2xTAB solves the issue. I am not sure what causses the problem. No problems in 2.75 and 2.76.

matali
Maybe you can report the regression on the bug tracker and get it solved for 2.78?

Just tested the addon in 2.78 RC1. Unlike in the 2.78 testbuild, the issue seems to be resolved!
If someone else notices this or some other problems, please report.

Hi. I did a cleanup of the script so it does adhere to PEP8. Noticed that it has some unused variables too. Made comments with # is this used ? in the script. So if this could be of any help, take a look. :slight_smile:

NP_float_poly_001.zip (12.9 KB)