Mesh Surface

12 votes
Version: 
0.02a
Author Name: 
Vojtech Cada

Creates surface defined by four splines. The order of picking the splines matters - they should form a closed loop. If you get a weird looking mesh, try once again starting with another of the four splines:

Note that if any of the splines are animated, the resulting mesh is animated, too.

Additional Info: 

Installation:

Copy the .ms file to your scripts\startup folder or run as a script if you only want to try it out. The object primitive will be available under Examples in the Create panel.

There's also an additional .mcr file - after you've installed the .ms file, it's enough to run the .mcr file once. It creates a Make Surface From Selection item in the Shortcuts category under Customize UI, which you can then add to a quadmenu or assign a shortcut to it (that's what I'm showing in the preview gif). To use it, select the four individual splines in a circular manner (counter-clockwise is preffered but will work with either - you can always flip normals) and press the button/keyboard shortcut.

Version Requirement: 
3ds Max 9
AttachmentSize
meshSurface.ms6.34 KB
meshSurfaceFromSelection.mcr558 bytes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Swordslayer's picture

 

Glad that you like it. That's one way of using it, and because it's not really intuitive, I've made the macroscript to simplify that a bit. Once you run the .mcr file (one-time operation only), it will make a new item available in Customize UI dialog and you can bind it to a shortcut, quadmenu/menu item or toolbar button. After that, it's enough to select the splines in the right order and run it.

vlada021's picture

Thank you very much, great script

Thank you very much, this is a life saver.

I didn't know how to use it at first, since tool was shut down each time I selected pick spline, so I will explain how I use it now, if anyone else has the same problem.

- create 4 splines that will define desired surface
- go to create/geometry/ examples
- click on mesh surface button and make one mesh by clicking anywhere on the scene
- select that mesh, go to modify
- then select 4 splines as described, by clicking select spline for each spline and select them in order so that they form a loop, as we can see on animated gif
- selected mesh will transform into a mesh that follows the splines

Thank you again, this is great script

Sincerely,
Vlada

Swordslayer's picture

 

There's both a script, how to install and use it is explained for example here. And there's also a macroscript file - mcr. That one is used to make a shortcut in quadmenu, menu, on a toolbar etc. and it's enough to drop the the viewport once and it should appear in the Shortcuts category (you will find it in the Customize UI dialog).

razib082's picture

I want to Help for Mesh Surface script Install

Its must be helpful tools, but i couldn't installed it, i have used 3d max 13,

vikirecon's picture

error using script

thanks it worked

it would be great if it worked with more than 4 splines but nonetheless its great script helped my work very much thanks again

Swordslayer's picture

Both files are needed

The meshSurface.ms file must be installed first, the macroscript is just the shortcut to use that, nothing else. That means, copy the file to your scripts/startup folder (so that it will work out of the box after starting a new max instance) - and if you want to avoid having to restart max for it to take effect, run the .ms script once. After that, the macroscript will work as expected.

If you are unsure where to find the scripts/startup folder, run this command in maxscript listener:

shellLaunch (getdir #scripts + "\Startup") ""

vikirecon's picture

error using script

hi sword slayer thanks for the reply ,i hope this is what you ewre asking thanks.

-- Error occurred in anonymous codeblock; filename: C:\Users\viki\AppData\Local\Autodesk\3dsMaxDesign\2015 - 64bit\ENU\usermacros\Shortcuts-meshSurfaceFromSelection.mcr; position: 255; line: 8
-- Frame:
-- meshSurface: undefined
>> MAXScript MacroScript Error Exception:
-- Type error: Call needs function or class, got: undefined <<

AttachmentSize
screenshot_2016-07-19_11.37.02.png 169.15 KB
Swordslayer's picture

Have a screenshot?

I'd need the full stack trace to tell you what's wrong, what function, what are the values etc.

vikirecon's picture

error using script

hi swordslayer,

my first post so please bear with me, when i use script it gave me this error (class needs function got undefined ).i dont know what a am doing wrong. please help me and thanks for your wonderful script.

barigazy's picture

...+1

Another amazing tool. Thanks for sharing this.
Cheers!

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.