Go Back   AC3D Forums > Resources > AC3D Scripts and Mods
Register FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Display Modes
Old 4th December 2013, 10:55 PM   #1
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Request: Extrude in parallel

I think the math below will do the extrusion we're after, I just need to figure out how to write an Ac3d plug-in to do the work, after looking at the tcl commands available I don't think its sufficient to do much of anything.

Code:
d = distance to extrude, scalar
N[] //surface (plane) normal, vector

M[] // vertex normal vector, average (bisector) of adjoining plane normals
V0 // original vertex location, point
Vs // transformed vertex location, point

// Should replace V0 with average of all surface points?
Ps = V0+dN[] //transform point on surface vector math, point

// Helper variables

// k can live for the whole surface
k = N[x]Ps[x]+N[y]Ps[y]+N[z]Ps[z]

// t must be calculated per vertex
t=(k-N[x]V0[x]-N[y]V0[y]-N[z]V0[z])/(N[x]M[x]+N[y]M[y]+N[z]M[z])

// Vs new vertex location
Vs[x] = V0[x] + tM[x]
Vs[y] = V0[y] + tM[y]
Vs[z] = V0[z] + tM[z]
jentron is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 07:49 AM.


AC3D Forum
(C) Inivis Limited 2020