Wednesday, March 23, 2016

Building a Midi Pedal Board Part 6: Electronics supplies and configuration

I've found some decent sites (notably a DJ site that provided some excellent information on this).
His site furnishes information on connecting potentiometers (control knobs) and linear analog faders alongside digital switches (he suggests arcade switches which are cheap and available through Amazon...though you can use, footswitches, I imagine just fine).


Electronics supplies:

Teensy 2.0 USB development board
-  I've tinkered around with UNO, Raspberry PI, and while these do provide working interfaces in developing something like a USB board (that is a board that plugs in through a USB serial interface), it isn't as arguably as easy and ready to go as the teensy board.  UNO generally requires additional work (MIDI look back interface) and thus is not really a true USB Midi system.  Though with UNO you can hack the microcontroller, but you'll lose USB write/to access in uploading Processing/Arduino scripts and you'll have to have a special programming device that actually writes using a dedicated serial port in uploading scripts for the microcontroller each time, you want to write scripts.  Teensy on the other hand, has a dedicated switch for the purpose of micro controller programming versus its existing state (once programmed) that has the controller acting as a stand alone USB dedicated device, thus why I have liked it.  If you are scared of soldering there are boards that are plug in ready to go with pin connectors already soldered on the board array, although I've found a little bit of practice and experience with soldering goes a long way.  You could afix the teensy, for instance, as I have done using a backer prototype board and solder the leads on this board which potentially offers a disconnect remedy from the cheaper board if necessary.

-Soldering Iron and Desoldering pump
- Solder
-Resistors appropriate for LEDs (I've used a bit of a higher resistor on mine at 1k)
-Foot Switches - I've used single pole momentary foot pedal switches in my cases, connected to the digital output ports.  You'll want to do a mock up test run on a bread board checking all channels before doing any of the soldering work.  Here is a parts supplier for instance.
-LEDs (using 5 mm here)
-Some PCB prototype bread board  - Arduino makes em and there are a whole host of options out there.  If you get one, I may suggest especially if you are new to all this stuff, going with something like Single Side Copper Prototype Paper PCB Breadboard 2-3-5 Joint Hole  at least.  I've used a double sided board personally on my end.  I do have another cheaper PCB prototype board (with teensy shown attached on this board), but in my opinion if you have no experience connecting the array from single hole entry to another (using copper wires in routing), it is slower work.

- Jumper cables, or wire - I like the jumper leads a bit better even if the cost is a bit more at the moment.  I've personally found that a single lead (not coiled wire) seems to be quick and easy, though I'm sure pros have solutions on working with this stuff.  I have male to female socket types for my cable endpoints.

-Cable stripper, cable snips, and pliers (needle nose and stuff like this).

A short quick experience on soldering:  A third hand tool may come in handy if you have it especially in maintaining a board's position while soldering leads.  Guides out there provide excellent information, but a short synopsis is as follows:  Hold the tip of the soldering iron on the copper point on the bread board with cable lead touching the tip of the iron.  Gently stroke the cable lead tip with the solder, once you see the solder melting release gently the solder from the cable lead, and then remove the soldering iron.  The solder will be attracted to the heat source (which is the tip of the iron and where thermal conductivity is greatest which is on both the cable lead and at the PCB breadboard copper connection point.  The PCB board is not nearly as much of a thermal conductor and thus if you don't overly supply solder, the solder will be drawn to the copper on the PCB board and the jumper cable and potentially to your iron.  Ideally there is at most a surface bubble above the board with the cable lead end poking through this, and certainly not too much of a bubble that has bridged on the array especially on the row side of the board (where as in breadboard fashion) the rows are not interconnected and you have accidentally bridged rows.  A double sided PCB board will draw solder to both ends of the connection hole.
   One you feel the soldering is completed well enough, snip off excess wire.
Watch it with the iron and components (especially plastic ones).  Too much heat can and may damage component switches.

You'll need Arduino software and Teensyduino
Programming the micro controller for USB Midi and setting this up for your Midi controller device:
All is written here

I've used this function for control change outs:
usbMIDI.sendControlChange(control, value, channel)

Channel is by default fine at 1.
Control can be any one of the control change channels.  If you are using other USB MIDI or
MIDI devices,you'll want to check with these devices when programming your controller to 
ensure avoiding conflict signaling.  I've chosen non dedicated channels like 14 to 24 
for my control outs for each given switch.  
Value can take a range of 0 to 127 (your choice).


You'll be using the digital outs on the Teensy board (array just below GND (ground) side).  These digital outs are sequentially from 0 to 10 on the left with the bottom most out on the teensy board with the mini USB jack position in the upside and the component side of the board facing you.  The first digital connector is nearest to the GND connector on the board (digital 0)
The diagram that I've used is pretty simple.  Full signal from the digital out goes to the switch from each digital connector on the Teensy board while LEDs will have to have resistance applied to their respective digital signal out channels.  I run from the digital out series.  (Inputting the signal to the big PCB prototype board from the Teensy board) then on a given row.  In series this is InputTeensy>OuttoSwtich>Capacitor (1k)>OutToLED  for each row on the main PCB Prototype breadboard.  I use a negative rail on the Main PCB prototype bread board (shown to the left in image above) in connecting to GND to all ground terminals on LED and switches alike.

The nice thing with Teensy is that once it is programmed, it is recognized immediately by Ableton which furnishes a native interface to the Teensy driver shown in Ableton properties> MIDI where you can through Ableton enable input and output of the USB Midi device, that is again, it is just like any midi device you buy in store and plug and play in so far as usage...the Teensy people eliminate all the USB driver programming stuff so you don't have to mess with any of this stuff.


The goodnews is if you have any experience with Processing you may feel welcome with Arduino's IDE interface which is basically the same deal.  In fact Processing.org provides serial interfacing references for UNO, Raspberry PI and many devices like this.

Tuesday, March 22, 2016

Designing a midi pedal board Part 5: Box building phase

Tools needed:
-  Jigsaw with decent blade.  I bought a set of Bosch blades (12 tpi) for cutting.
-  Set of Rasps or some related tool used for planning an irregular surface after cutting.
-  Orbital Sander for finishing surface of the plywood and with a a very rough grit paper can actually be used (with care) for planning edges on thin soft plywoods (like Birch).
- Woodworking clamps, general purpose C Clamps (6 to 8 inches or as necessary for your project for glue working.

-Titebond glue.  I haven't really used anything other than Titebond and highly recommend it.

-Spray Adhesive, or any decent adhesive in adhering your printed template to the surface of the wood.  Ideally you should after finishing necessary cuts and having drilled holes, be able to remove the paper and adhesive with some preferably lighter sanding, so it shouldn't be on the order of super glue strength in terms of adherence or having left any significantly stronger and more resistant than the wood itself behind in terms of residue (omit epoxy or resins of this type).  :)
-Wood worker's square
-Angle Gauge 
-120 grit, 220 grit and 400 grit paper for sanding (for Orbital sanders).
-Miter saw (optional: for cutting woodstock)
-Additional woodstock for joining plywood on glue up schedules.
-Stain, Finish, and wood filler
-Plywood (Birch or whatever you like).  (I used approximately 5 mm thickness for mine). 

Adhere the template:
Check for grain orientation as related to your design.  How do you want the grain running?

I don't use nails, screws, staples or anything of the sort for my joinery work.  If you have routers and the like or have any fancier equipment, likely for more decorative or better joinery work include dovetails, box joints, and the like included in joining this surfaces.  I've kept mine as simple as pure surface contact joining while incorporating interior wood stock cut to the interior of the necessary pieces and having glued these prior to joining plywood pieces.  The reason for this, in my case, relates to increasing the surface contact area of the joinery work for the gluing which provides overall greater strength to the integrity of the contact surface especially where the joints are likely to receive overall potentially any greater load stress (i.e., gravity and potentially foot pounding).  The Titebond as advertised is (as long as the surface contact is good) as strong as the wood itself (and probably exceeding), and generally is considered superior to nails, screws or staples.  Some might prefer the other types of joinery mentions (dovetails especially) since with fine work, these potentially could be used without glue reinforcement (and again being superior to nails, and screws).  

Cutting edges:
I generally don't use rulers or any sort of measuring device, outside of the templates which should have enough metric precision for design layouts and provide visual guidance when planning cut edges.  Any wood stock that need be cut for the interior can refer to the actual cut plywood piece when measuring and marking necessary cuts.  
When I've cut, work as slowly and carefully as needed to avoid chipping the plywood while maintaining slight small equal distance as needed from edge boundaries of the template.  I usually gap this to no more than 1 mm if I can do it, and generally maintaining a straight line in doing so.  If you feel you can incorporate fences or rails in augmenting your cuts it may be worth it, but keep in mind the precision of the cutting instrument that you are using here.  A jigsaw isn't exactly a circular saw in terms of being rigidly maintained in it articulated vertical position as it is cutting (the blade is somewhat flexible and any cutting stress could throw lateral articulation off) which means that you may need to readjust the position of the jigsaw as necessary depending on the cutting medium that you are working, so even with higher end precision cutting instruments, ultimately the blade is responsible and guidance of the machine is as good as the cutting. 

Plane edges:  Use care when planning the surface of the plywood, the veneer depending on quality of the plywood may be prone to splintering and chipping.  Check for any possible curvature of your rasp (if you use these).  You should use a square in checking overall square for pieces as necessary.

Glue ups:  I use clamps.  You shouldn't need to apply too much clamping force.  If you have a glue up jig ready to go, this is probably one of the more superior setups especially used in mass production setups, but your step up can be as simple depending on how much time you want to invest with as simple as direct clamp contact with the plywood.  With irregular angles you will likely want to have (as shown below), contact blocks which establish a perpendicular contact surface.


  
My simple configuration, for example.  I didn't want to invest too much time here.

Apply glue to all necessary contact surfaces, and generally outside of visual line of sight, you can use touch running your finger for calibrating the piece in terms of a discernible edge.  For, instance my side pieces were laid out visually, checking with my square, and then having run my finger across the edge to check for gaps, and then having readjusted a necessary.  When all is said and done post sanding, you should be able to run your finger across joinery and not be able to discern any discontinuity between one piece and the next.  Most importantly everything should visually look good.

Woodfiller: I use these in some cases in filling areas as necessary are filling in edge work on the plywood.  Really depends on what you are looking for, maybe you want something that actually looks a bit rough shod and banged up anyways, so it doesn't matter.  

A bit of advice on sanding:  First wood cutting project that I have had in awhile.  Watch over sanding, for instance, don't be tempted to sand to the extent that you plow through the plywood veneer.

Finishing:  Consult with your stain and finishing products.  Just sand between coats as necessary as directed with specified papers.  I usually have used cloth products.  Lambs wool has been suggested for high gloss finishes (e.g. wood floors) watch for bubbling which can be a sign of improper finish contact...polys do this if you don't sand between coats properly and the poly doesn't have a proper surface contact with itself.  I've used something as simple as a cloth usually.  


Sunday, March 20, 2016

Designing a Midi Pedal board Part 4: Scale design template printing



I am using Photoshop for photo editing work.  Mostly whatever photo editor that use in printing Scale prints should have Imperial or Metric rulers and grid formats with cross conversions from Pixels to Imperial or Metric units.  This should also include easy to use selection tools like a 'magic wand' that smartly allows you to easily differentiate and select your design template relative a given background which is assumed neither alpha transparent.  Your photo processing software should have decent re scale interpolation (bi cubic or bi linear...) that allows you to proportionally re scale your image as necessary to fit desired component real world unit lengths.

You'll want to make sure your printer's driver is loaded and that you hadn't, for instance, used something like Window's native drivers (as I initially had) which may restrict selection of media type...for instance, with the native Window's driver for the Epson printer that I were working with, I were unable to select Legal size paper or alternate selection ranges of media that weren't customarily of the A4 or similar type document.  Usually most inkjet printers out on market should provide online support where you can download a driver for your Windows or Mac operating system.  

Saturday, March 19, 2016

Using Blender as a Bezier Curve Editor and then importing data into Processing(language)


You'll need the following scripts found at the given link:
Bezier Animations includes Blender python scripts and Processing(language) scripts

As given from Script ReadMe:
You'll want to use the associated beziercurvedataread.py script
in Blender.  Select the associated Bezier Curve which should be named
"BezierCurve" or modify the script for your associated name on line
3 of the script.

Make sure that the Blender console is open (Windows users can do this
with a Top Menu Bar Window>Console for toggling the console visible).  Linux users can enable the console by going to the path directory of the Application
by Terminal and launching blender with a terminal command "./blender"
or "./Blender"  

Use Blender's TextEditor with application open, and choose 'Run Script'
There are three containers of data that need be copied and pasted into
the Processing script called BezierAnimation.pde 

But first you'll need to prepare data so that it is properly formatted
as an input

The data should be, for instance in a format that reads something like this:
{new PVector(1.0,0.0,0.0), new PVector(x.x,x.x,x.x), ...}

where the x.x shown is some float given from the data inputs of your bezier curve

But our output is written in the format:

[(x.x,x.x,x.x), (x.x,x.x,x.x),...]

So you'll need to change this.  You'll need to use your favorite text editor and copy and paste 
for each data set in the form [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
this into the text editor (new file).  You'll copy the data for each
data set which is given in the Blender Console (just toggle it visible
and scroll as necessary with the given data lines shown in view).
In your console you should see something like: 
....
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]  
....

Paste the data sets into your text editor program and use a 'find and replace' function that should
exist for your text editor and search the string "("
and for the replacement string input "new PVector(" 

Next you'll need to change in [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
"["  to "{" and "]" to "};" 

So your new data set should like 
{new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};

The data sets in the form [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
are for the PVector[] points, PVector[] lpoints, and PVector[] rpoints
respectively.

so you'll need to copy each data set (after modifications given above)
and paste these after the "=" of each of PVector[] points, PVector[] lpoints, and PVector[] rpoints in the associated bezier processing(language) script that I've written called 'BezierAnimation.pde'

Make sure that each of these lines ends with a ";" as stated with 
given form that I've indicated post modifications.

So the appropriate lines of 'BezierAnimation.pde' should look like:

PVector[] points = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
PVector[] lpoints = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
PVector[] rpoints = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};

Then run the processing script in your processing IDE environment.

My processing(language) includes both path tracing animations as well as full curve drawing.  

For the full curve drawing just enable variable:

showTrack = true;

My program is designed in tracing and rendering a closed cyclic Bezier curve.  

Handy Blender Hot key and procedures:

In Edit Mode:  
'a' to select all vertices (on the bezier curve)
Extruding points from a given selected vertex (at its anchor point):
Shift + Left Mouse Button Click
Creating a bezier curve segment between two unconnected anchor points on the bezier curve:  Select both curve points using Shift + Right Mouse Button, and the hit 'f' (for fill).




Sunday, March 13, 2016

Trump created out of a vacuum?

Nope.  Its all written into the way things are shaped and given to all matter of probability leading up this point.

In a post 9/11 culture, there is less tolerance for individual civil liberties period.   Less tolerance for civil dissent and more likely a given that not only that a US government is as likely involved in snooping on its citizenry as it is drafting formally and informally its own citizen spy brigade.  While elements of McCarthyism were rearing an ugly head in the early days immediately post 9/11, certainly there were an older, remembering generation, that were seeing some of the obvious signs while ignoring generally others.  Never mind, that even corporate culture could be in on the act in one greater vast conspiracy, or that individual homes could be spied upon given any massive violation of privacy, this all to be ignored...

Remedy comes in the sign of changes but changes that shouldn't be substantive enough.  Certainly voter anger ushered the GOP swiftly out of office, not because of massive privacy violations, certainly not because of Guantanamo, not because of America's carceral addiction, not because of anything longstanding that had shifted the psyche of the American landscape over decades to the path of the angry white man repleat with shock jock in tote to slut shame former Hollywood child stars turned to prostitution, but because the economy took a jolt.  The solution...elect a man that should serve in pronouncing diametric shifts from one side to another.  Even criticized for at times sounding too Reaganesque, criticized likely having done too little in the way of liberalism and too much all the same which might have been expected but also given to all the hyperbole of action especially in relating to the absent pedigree of skin color.  The problem isn't merely given the inaction in regulatory reform on economic/financial fronts or that the blurred lines between corporation and government should be so much that it might harder to tell where one started and the other stopped.  It is that even more social conditions in America are generally ignored and the election of a first black president should be an obvious sign to any given remedy.  The festering problem comes to even greater head when it is merely suggested that America is also one of the most punitive countries on Earth in so far as incarceration.  Another part of America resents the idea, save a family member thrown in prison for heroin substance abuse, that the 'remedy' weren't enough.   As to the infringements on civil liberties, yes, some revisions and another 'remedy' too the domestic security issue supposedly safeguarding the people that don't like their family members being thrown in prison for heroin substance addiction.

And then there is problem of 'demonstration' remaining in all of this.  Demonstration of power, emblematic demonstrations, but mostly surface and veneer demonstrations that are raised as an ill forgotten ghost of all this...as though in order to have an enemy, one need empower the enemy in proving an existential threat, but generally speaking, the more looming and pressing issue were that America has already deemed it okay in restricting civil liberties enough, or in having passed laws in spying on itself to so much greater tolerance that a game show could at times be made of the massive invasions of privacy and the social tolerance given were enough so much that most people think little to say much of anything.  That is mostly silent submission, and threats of impunity suggestive in culture for moving too far against supposed social currents, and yeah apparently somewhere secret and silent 'don't tell' wars suggested being waged.

And Establishment claims to risk itself foot and hand in principle, but uses Machiavellian populism in its back hand.  Do as thou art commanded by the people and you have done no wrong...and certainly, but only as convenient as in the arrangement of a neo liberal war with all investments having been made neither being offed in the process of populism.  Thus manipulation in populism, smoke screening and hoodwinking a populace with respect to inherent problems that apparently do matter relative to those that don't.  The populace doesn't like being contradicted and especially if their loved one's are thrown in prison for heroin related offenses.  The populace might not care if they are robbed blind of their retirement securities in the process so long as restoration means a 'whiter' country in the process.

Trump hasn't surfaced from a vacuum here, and certainly while some have attempted claim that I were personally at times 'delusional' for saying otherwise that problems have been growing domestically in the US for quite some time.  Now, I am sort of amused by all of this, because what should be sensed in all of this, is that little talk and much repression has brought much of a social political situation to a greater surface.  Its a bit more than as Trump has suggested being an issue of 'political correctness'.  I don't know, I think it is of greater concern that no where in the history of the US has polarization in politics been as extreme as it has been and likely the 'remedy' isn't more asinine populism, is it?  As to all the problems mentioned above...if it isn't not only a rising culture of victim blaming having surfaced from at one time apathy, or a marked trend of cultural sadism, there isn't anything new here.  It is written in all the warning signs of a population that loves to pretend.  

Saturday, March 12, 2016

Part 2: Midi Pedal Board Prototyping

This is a more advanced design prototyping construction tutorial.  The aim of this is to provide information on steps and modeling techniques in designing a Midi Pedal Board that includes, for instance, plywood media wall thickness into the overall design.  Added to this, you'll learn how to make usefully convenient component layouts of your design, so that this can be used in furthered refinement of your given design.

Covered in this tutorial:

-Precision numeric design working principles in Blender
-Previous research to have in mind before diving in...
-Use of unit system in design translation.
-A vertex oriented approach to precision working in Blender with mesh design construction.
  - This includes in design finding points on a given edge where such edge is neither perpendicular or parallel to a 'global' coordinate axis.  
-Better design practices when refining an overall object to sub component objects/parts.

Pre requisites:  You'll want to have watched the previous Tutorial in the series that I have done for the basics of layout, and I presume you have some basic working knowledge in Blender.  I'll cover more advanced topics such as individual vertex extrusions in redefining your design mesh.

Useful Blender functions:

Handy Blender Hotkey functions (used for this tutorial):

Transform viewport view (with mouse): Hold the middle mouse button down and drag mouse, or use numeric buttons (4,8,6,2).

Align view to selected object (with mouse cursor over the 3D View viewport window) press '.'
Top down view (in 3D view) press 7

All transform operations and extrusion have similar option inputs as follows:
(optional: single toggle + 'x' or 'y' or 'z' to global axis restriction or double toggling 'x' or 'y' or 'z' restriction to a selected transform orientation...also hitting shift+'x' restricts transform/extrusion to yz plane or shift + 'y' restricts transform/extrusion to xz plane or shift + 'z' restricts transform/extrusion to xy plane) + optional : other transform type (you can mix and match for instance Scaled Extrusions by pressing 'E' + 'S' + other optionals) + optional : numpad entry for numerically controlling transform/extrusion as opposed to providing mouse input..

Box Select (either in Edit or Object Mode) : B + mouse input boundaries (left mouse button to confirm boundaries)

Circle Select (either in Edit or Object Mode) : C + optional (middle mouse button rolling to increase
or decrease radius of selection boundary...optional left mouse button to select ...optional middle mouse button pressed to deselect

Translation/Move (either Edit or Object Mode): G + optionals mentioned above.
Scale (either Edit or Object mode)  'S' + optionals mentioned above.

Align Object to Transform Orientation:  Object selected in 'Object' Mode, select Object > Transform > Align Object to Transform Orientation:

Converting a Bezier Object to a Mesh Object:  With object selected Alt + C
Extruding (Edit mode) : 'E'  + optionals mentioned above.

Joining any added mesh object to another:  Select the first object (Object Mode), then hold the shift key and right mouse button select the second object, and then

Cursor Snapping:  In this tutorial, I do use cursor snapping to a given face especially in rapidly finding geometric centers.  For instance, selecting a face (Edit Mode) on the object, and then selecting Mesh > Snap (or Shift + S) > Cursor to Selected allows for selecting the face centroid rapidly on such mesh object.  This in turn can be used when adding any new object type and snapping it into a given coordinate position rapidly (e.g., with the newly added object selected in Object mode use path Object > Snap (or Shift + S) > Selection to Cursor.

Toggling Wireframe Mode on/off: 'Z'  This makes selecting groups of vertices, for instance, on a given perspective view axis easier.


Topically you'll learn also some new things such as:   in Edit Mode, duplicating selection vertices, and then separating selection vertices (while duplicated and bounded to the present mesh) to a new Object.

Prerequisite data for design:  W 12.5" x 5" L or 317.5 mm W x 127 mm L
Switch holes: 9.75 mm diameter
Led holes: 3.0 mm diameter
Plywood thickness 5.08 mm

Blender file: Pedal Board Blender File for this project

Midi Pedal Board Design prototyping in Blender

You can use blender like Sketch Up in a real world design context for 3D printing or as I have used it, in the context of 1:1 scaled design prints applied directly to plywood for cutting out the design component parts.

This tutorial gives provides some basic useful starting principles in working up to a design mock up:
Difficulty Level/Pre requisites:  (somewhat experienced in Blender...should know how to navigate Edit and Object mode, should know how to select between edges, vertices, and faces in Edit Mode, should know where Transform Orientation box is)

Covered in this tutorial:

-Precision numeric design working principles in Blender
-Previous research to have in mind before diving in...
-Use of unit system in design translation.
- Translating pre requisite data for overall dimension specification to a given starting geometry (in this case a plane)
- Build the pedal board geometry.  I don't cover repeating steps (procedural) but at least demonstrate, for instance, the process of adding a switch hole to the mesh design.  This is useful if you
want to cut into your mesh some geometry which is more smooth and continuous-like geometry (e.g., drill holes for component parts like switches, pentiometers, and so forth)

Things not covered:
-Subdividing the board into convenient easy to access component parts which then can be orthographically projection rendered (see previous Tutorial in this posting series on my blog site).
-More sophisticated anatomically correct model accounting for media type used (i.e., incorporating wall thickness of say the plywood stock that you intend to use for the prototype in the mesh model).

Handy Blender Hotkey functions (used for this tutorial):

Transform viewport view (with mouse): Hold the middle mouse button down and drag mouse, or use numeric buttons (4,8,6,2).

Align view to selected object (with mouse cursor over the 3D View viewport window) press '.'
Top down view (in 3D view) press 7

All transform operations and extrusion have similar option inputs as follows:
(optional: single toggle + 'x' or 'y' or 'z' to global axis restriction or double toggling 'x' or 'y' or 'z' restriction to a selected transform orientation...also hitting shift+'x' restricts transform/extrusion to yz plane or shift + 'y' restricts transform/extrusion to xz plane or shift + 'z' restricts transform/extrusion to xy plane) + optional : other transform type (you can mix and match for instance Scaled Extrusions by pressing 'E' + 'S' + other optionals) + optional : numpad entry for numerically controlling transform/extrusion as opposed to providing mouse input..

Box Select (either in Edit or Object Mode) : B + mouse input boundaries (left mouse button to confirm boundaries)

Circle Select (either in Edit or Object Mode) : C + optional (middle mouse button rolling to increase
or decrease radius of selection boundary...optional left mouse button to select ...optional middle mouse button pressed to deselect

Translation/Move (either Edit or Object Mode): G + optionals mentioned above.
Scale (either Edit or Object mode)  'S' + optionals mentioned above.

Align Object to Transform Orientation:  Object selected in 'Object' Mode, select Object > Transform > Align Object to Transform Orientation:

Converting a Bezier Object to a Mesh Object:  With object selected Alt + C
Extruding (Edit mode) : 'E'  + optionals mentioned above.

Joining any added mesh object to another:  Select the first object (Object Mode), then hold the shift key and right mouse button select the second object. Then hit Ctrl + 'J'.

Cursor Snapping:  In this tutorial, I do use cursor snapping to a given face especially in rapidly finding geometric centers.  For instance, selecting a face (Edit Mode) on the object, and then selecting Mesh > Snap (or Shift + S) > Cursor to Selected allows for selecting the face centroid rapidly on such mesh object.  This in turn can be used when adding any new object type and snapping it into a given coordinate position rapidly (e.g., with the newly added object selected in Object mode use path Object > Snap (or Shift + S) > Selection to Cursor.

Tip for numeric entry and precision matching a desired input measurement with transform/extrusion operations:
I frequently use the backspace to go left (back out of ) the existing digit placement on the mantissa.
Work sequentially on the mantissa as you input numerically a transform/extrusion starting from on the left side of the mantissa working right.  The method for numeric correspondence between a numeric transform can be honed in like a newton's method procedure whereby if you have a precise measurement, you are looking for a lower and upper boundary values where the min and max range is above and below a desired measure, select the min value at that position on the mantissa...(e.g. you find that .4 is the min and .5 is the max for providing a range of values below and above the desired precise transform measurement), so select .4 and then proceed selecting '5'  yielding .45 for the next digit on the mantissa.  If this is too high, select '4' yielding .44 and so forth until finding the lower boundary, or conversely selecting '6' yielding  .46 and so forth until finding the upper boundary and repeat the procedure until honing in precisely (or range tolerance) on the desired measure.  

Tips on Imperial versus Metrics which should I use? Problem with Blender...Blender uses decimal (base10) measurements for Feet for any length measure greater than a foot while anything less than a foot uses a decimal measure for inches.  Inches are implicit but not converted from feet ...for instance, 1 feet 6 inches is expressed in Blender as 1.5 feet. Problem: you'll have to convert between decimal feet measure for any sub feet lengths to inches.  Working in Imperial units may require some added conversion work relative to the metric system if you do decide to stick with Imperial units.  SketchUp I believe does make it easier when designing in Imperial units using feet inches readings as opposed to decimal feet or decimal inches readings alone.  So, in Blender, I personally use Google or some convenient Imperial to Metric conversion utility and sticking with Metric in Blender unless as stated you have all your measures converted to decimal feet units in Imperial units and not Feet inches units.  

Friday, March 11, 2016

True to Scale Design Blueprinting in Blender

   3D printing may be all the rage, or if you know someone with a CNC mill or have access to one, you may be able to build scale models of your work if you know how to adequately convert your model to .svg (or of similar appropriate file type) but what about true to scale printing blueprints of your work and transferring this to a desired media (e.g. wood, plywood) in aid for building your model?  Actually, you can do this, and it certainly could also help in the path to building your 3d model even as in the case of the CNC milling process.

I have a brief tutorial in prepping your model and exporting (bitmap files) from blender which can then be used for to scale printing from your favorite photoshop editor program.
Here is my Blender object file Pedal board design


Here are the steps in working with a model in blender:

 Your model needs to be adequately ready from 2 dimensional projection rendering.  This means that when you render parts of the model that you are able to align the planar viewport to an orthogonal view relative to its general parts geometry.  For instance, if you were rendering the sides of a box, you'd select each side of the box and project at an orthogonal angle relative to the face.  This gets more complicated, however, if your geometry (even being linear) has skew angles relative to the customary 3 dimensional axis.  In this case, each part of your 3 D model object should be broken down into object components that share a self similarity in terms of object geometry and its local or normal coordinate axis.  Good design practice in blender should allow you to select either groups of vertices or where the design is delineated at least as a separate object that is part of the overall 3D design.  

Once having the model ready as stated above, with components of the model that are neither orthogonal to one of the 3 Dimensional planes (and likely given at skew angle for orthogonal projection view) means you can as I have found:  Duplicate this component object (Shift + D) and then translate it to some position where it is not mixed in with the existing components 'assembled' model overall.  

Now in '3D View' if you select under 'Transform Orientation' > 'Normal' if the overall object's Normal coordinate axis matches that of 'Global' then you'll need to assign and record a Tranform Orientation object reference.  






To do this, having selected the duplicated component object, go into 'Edit Mode' and then select one of the representing faces of the object (that the viewport plane will be orthogonal to) and then under Transform Orientations in the Properties box under 3D view, select the '+' button.  



Enter a name in the 3D Tool Shelf (left side of the 3D view...if it is not opened toggle View > ToolShelf ) for the given Transform Orientation.  For instance, my Transform Orientation named 'a' is shown. 


 Now the Transform Orientation named 'a' is applied to the object overall if go back into 'Object' mode.


 This is important since this will allow us to transform the object component's geometry to match are desired Transform Orientation which is correspondent to our Global coordinate axis.  Next, select Object > Transform > Align to Transform Orientation.


  Now the Component Geometry may have been further rotated in a direction we don't like.


  We can remedy this by going to the 'Properties (tab) > Object tab > Transform : Rotation. 


 In our case, this component geometries rotation is relatively simple since it is restricted to one axis so we can change the sign of the rotation so that it is opposite of the existing value...(e.g., was 15... something degrees change this to -15.... something degrees). 


 There we fixed the rotation.  With more complicated rotations you may have to permute sign changes to get the rotations right for flattening the component axis to a 'Global' coordinate axis.   In any event we verify that the object is perpendicular to the 'Global' axis.  


Next,  a 'Top Down view' (numpad 7) aligns the selected and now rotated component into an orthogonal position relative our desired frame, or according to the rotation of the object relative the global axis you will want to position your view port (with a numpad 7 and then 6, 4, 8, or 2 keys) a view port position such that your view is perpendicular/orthogonal/90 degrees relative to the components projection (show picture).  


Next, we will need to scale the dimensions for rendering resolution in Blender.  Higher quality blueprints might use something like 300 dpi (dots/pixels per inch), in any event, you will also need to use the objects dimensions.  Optimally when you are designing your object, you have set and used a real world unit system (like 'Metric' or 'Imperial') before hand when designing your model especially as it is to be translated from virtual to real world mock up.  Thus you will have wanted to have enabled under the 'Properties (tab)' > 'Scene (tab)' > Units ( metric or imperial) and having chosen a scaling factor appropriate to the design level work that you are intending.  

Modeling tip:  I recommend before you even start modeling your 3D object setting this using the generic default cube pretending that at least one side of the cube represents the overall scale length axis of at least one axis of the object that you are working.  Thus if you have a rectangular box object that is 12.5 inches you'll want to toggle into 'Edit mode' on the Cube, and enable in View > Properties (3d view) > Display : Edge info (toggled on).  Now having selected an edge on the cube, toggle the scale factor (as mentioned above) until the edge length reads in the vicinity of an overall desired dimension length on at least one of the axis as prescribed.  

In any event (from the tip above) you should have a reading on at least one axis of the overall length of the component object  in terms of real world units (either metric or imperial).  You will need to record this (favorite notepad, or google docs or someplace where it can be referenced when you need to appropriately scale the object in a favorite photo editor program, and secondly you will use this when determining the necessary rendering resolution for your bitmap file.  As state 300 dpi is used for higher resolution blue printing work (likely for our purposes), so for my component at 12.5 inches width I need, 300 pixels/inch*12.5 inches = 3770 pixels on one dimension axis and probably 300 pixels/inch*5 inches = 1500 pixels on another axis . 


These are entered in the Properties (tab) > Render (tab) > Dimensions > Resolution (x and y) respectively this need be correspondent appropriately with the viewport rendering capture as related to the component geometry as necessary ( in avoiding clipping or rotate the views port (using the 4 or 6 keys accordingly) so that it is 90 degrees relative to present position in remedying the problem. 

Toggle the 'Toolshelf' off relative the 3D viewport (if it is shown, View>'Toolshelf') and toggle the 'Properties' off relative the 3D viewport (View > 'Properties).



Next, Shift + B allows you to frame the selected object in the viewport to desired dimension (don't forget padding your resolution for a few exta pixels in accounting for a little space for the rendering edges.  This way you don't have to get the scale of the object exactly to length of one axis when rendering it.  


You'll likely under the Properties (tab) > Render (tab) > Dimensions > Resolution (set the percentage to 100 percent).  

Make sure you are in Orthogonal view (numpad 5) image will appear flattened relative a projective geometry view.  

If all looks good, select Render > OpenGL Render Image.  



Then name and save this.  

You'll repeat the process mentioned above for 'skew' geometric components (in rotating them inline to global axis) by the duplication and rotation procedure indicated above, or for component geometry already setup for 2D projection viewing (with an orthogonal view port plane relative to the desired geometric projection plane...remembering to center the object in the viewport by pressing '.' then '7' for top down and then using numpad keys 4,6,8, or 2 to rotate the viewport to a given desired view and then Shift + B to scale the object in the viewport as necessary (in nearly filling at least the desired coordinate axis).  Don't forget that when you have component objects that have different lengths you may want to recompute the rendering resolution x and y pixel values with scale length sizes relative to 300 dpi (for higher resolution blue print work).

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...