mcjGCodeToPathTube


Introduction 



Usually when i want to visualize a path in daz studio i use the mcjTracePath script and the mcjTracer plugin

when i want to make sinuous tubes i use mcjRibbons or mcjTransport


There’s a few other of my scripts which let you create/fashion tubes

notably https://sites.google.com/site/mcasualsdazscripts3/mcjbuildera


This script here lets you make a simple tube from a node path

( simple but very well UV mapped )


Now this was actually the introduction for the mcjPathTube script

found here: https://sites.google.com/site/mcasualsdazscripts5/mcjpathtube


mcjGCodeToPathTube is based on mcjPathTube

BUT it also contains functions to import paths produced by the vector graphics freeware InkScape


those paths must be in the very special file format called G-Code

and it has to be the G-Code produced by the J Tech Photonics Laser Tool


So this Daz Script can only be of use for people who know how to use inkScape to produce those G-Code files





History


May 22nd 2018 7:42 PM  V2 cleaning laser node animation before re-use
May 22nd 2018 2:42 AM V1 release




Installing




The zip package is found at the bottom of this page

unzip it in your daz content folder, typically

C:\program files\daz\studio\content\
or
C:\Users\YOURNAME\Documents\DAZ 3D\Studio\My Library

once installed the prop will appear in your library under

content/props/mcasual
or
My Library/Props/mCasual



Using





Phase 1

If the Laser-On and Laser-Off commands used to create your GCode file were not M106 and M107 change those 

Click the "Load" button

select your gCode file ( which was produced by InkScape with the Laser GCode extension )

The script immediately created a null node named mcjLaser in your Daz Studio scene

the node position was animated to follow the path specified in that file

the node's XScale property inherited the Laser-On/Laser-Off events


Phase 2

- specify the number of sides your tube will use

- specify the radius in cm

- Click the "Build" button

you will have to give a location and filename for the .obj file which will contain the tube geometry

the .obj tube prop will automatically be loaded in the scene

note the values displayed in the script's window, in this case 3.14 x 754.2 

those values can be handy for your texture tiling adjustments



- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -
Options
- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -

Twist 

This setting is an angle in degrees. When you create a 4-sided tube, the Tube's outline is 
more like a diamond shape, by twisting it 45 degrees you obtain a grounded square


Mirror UVU 

flips the UV Map layout along the Horizontal axis


Mirror UVV

flips the UV Map layout along the Vertical axis


Invert Normals

If you use a shader and the renders show the tube as all pitch-black, it's because the tube happened to be built inside-out ( normals pointing inward )

by inverting the normals you are telling the shader "the exterior of the tube is ..... outside the tube

If you experience problems with Displacement maps or Bump maps, it may also be due to this issue 

Also for mcjElevale )



License



// mcjgcodetopathtube

// by mCasual/Jacques

// You can use this software freely for personal or commercial use.

// You may not resell, sub-license or rent this software in any way.

// You may credit this software to mCasual/Jacques

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,

// INCLUDING "wasBUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR

// PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE

// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,

// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


ċ
mcjGCodeToPathTube.zip
(23k)
mCasual Jacques,
May 22, 2018, 4:46 PM
Comments