Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / custom mesh object buildMesh handler
  RSS 2.0 ATOM  

custom mesh object buildMesh handler
Rate this thread
 
40492
 
Permlink of this thread   Subscribe to this thread
avatar
  • Total Posts: 2
  • Joined: 08 March 2010 04:29 PM

Hi, I have a problem defining a mesh inside a build mesh constructor…
I want to define two custom meshes, with its own specified vertices and face arrays, like mesh1 and mesh2 , and then apply boolean operation with them, and put result in final mesh constructor, like
mesh = mesh1 - mesh2 .

But, i tried defining mesh1 like
mesh1 = mesh vertices:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) faces:#([3,2,1], [1,4,3])

and i get a message Type error: Call needs function or class, got: TriMesh <<

also i tried to create some instance convert it to mesh delete its faces and vertices and add new

like >

on buildMesh do
(
mesh1 = createInstance box
mesh1=mesh1.mesh
meshop.deleteFaces mesh1 #{1..mesh1.numfaces} delIsoVerts:true
setmesh mesh1 verts:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) faces:#([3,2,1], [1,4,3])
mesh += mesh1.mesh
)
but…
i get this error message in setmesh line of code..
>> MAXScript Scripted Plugin Handler Exception:—Unknown system exception

I really dont know what am i doing wrong or what i’m missing.. Please help



Replies: 0
avatar
  • thedour
  • Posted: 08 March 2010 10:52 AM

"setmesh mesh1” should be:

setmesh mesh1.mesh verts:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) faces:#(

Something else is wrong after that: -- No “"+"” function for Mesh class

The scripted primitive wasn’t giving much feedback to the listener, so how I got that error was by putting the buildMesh interior in its own script.

I’ve not messed with much mesh()/trimesh() stuff before though, hope this helps get you in the right direction.



thedour.net
Render 3D @ ScriptSpot.com

Replies: 1
/userdata/avatar/3q55b2cym_freesmith_100.jpg

This sounds promising, Thanks man :D
I’ll try it!

Author: freesmith

Replied: 08 March 2010 11:15 AM  




   
  Settings Choose Theme color: