nisus Posted December 27, 2002 Share Posted December 27, 2002 Hi all, I want to be able to offset any spline a fixed amount with a single click, but I can't get the 'applyoffset()' to work properly. Can anyone help me pls? tnx nisus ps: I'm using the max5 demo, so you are not bound to max3.1 restrcitions anymore Link to comment Share on other sites More sharing options...
plastic Posted December 27, 2002 Share Posted December 27, 2002 hey nisus, please post the full code that failed and the maxscript-listener output. [ December 27, 2002, 07:07 PM: Message edited by: plastic ] Link to comment Share on other sites More sharing options...
nisus Posted December 28, 2002 Author Share Posted December 28, 2002 Hi Marc, For now there is no full code yet, as I can't get the command to work properly. It is exactly this what I'm trying to achieve. Once I know how the applyoffset-command works, I can proceed. I'll try to explain what I've done so far: - I draw a spline - make this object a variable called 'obj' (code: obj = $) - I switch to subobject mode spline (code: subobjectlevel = 3) - using the Maxscript Listener (& the Maxscript help) I try to find a way to offset the spline (a fixed amount of 10 for now) by typing in a command line. Unfortunately none of these work so far... codes: applyOffset obj 10 --> -- Type error: Call needs function or class, got: undefined obj.applyoffset 10 --> -- Unknown property: "applyoffset" in $Line:Line01 @ [36.826347,-0.239522,0.000000] This is what the help file says about applyOffset: applyOffset For each spline in the shape, makes a copy of the spline, offset on all sides to the distance in units specified by offset_float. If a spline is open, the resulting spline and its outline will make a single closed spline. Negative offset_float values create an offset spline to the left of the spline (as the spline is drawn from its start to its finish). The spline_shape_node is converted to a SplineShape (Editable Spline) if it is not already a SplineShape. I don't really know what to do with that ... Another way to accomplish the same goal was by using the 'startoutline'-command, but that only activate a button in sub-objectmode code: splineOps.startoutline obj (make sure you are in subobjectlevel 3 (spline)) Any help would be most welcome rgds nisus Link to comment Share on other sites More sharing options...
plastic Posted December 28, 2002 Share Posted December 28, 2002 applyOffset this function only works with viz4, not max 5. strange but true. seems like discreet forgot to put the extention into max5... i don't have a quick solution for this right now. i'll look if i can find an offset routine somewhere. Link to comment Share on other sites More sharing options...
nisus Posted December 28, 2002 Author Share Posted December 28, 2002 *GRRRRR* awful!!! (tnx anyway marc) [ December 28, 2002, 08:19 AM: Message edited by: nisus ] Link to comment Share on other sites More sharing options...
abicalho Posted December 28, 2002 Share Posted December 28, 2002 The MAXScript Help file clearly states that this function is only valid in VIZ. Alexander Link to comment Share on other sites More sharing options...
nisus Posted December 28, 2002 Author Share Posted December 28, 2002 I know... but why the hell does a max5 help file contains info of viz4 only? On the other hand, as the same info was available in the max4 helpfile (imho) discreet might have changed it in the main time... unfortunately they haven't... This is horrible imho... imagine you bought a car and it's manual tells you all kind of etherical things about the open roof, but you didn't buy a cabrio... damn hell... [ December 28, 2002, 12:33 PM: Message edited by: nisus ] Link to comment Share on other sites More sharing options...
nisus Posted December 29, 2002 Author Share Posted December 29, 2002 Hi all, I tested the ApplyOffset command in viz4 and it worked without any problems... Does anyone knows how I can transfer that 'command' from viz4 to max5(/3.1)? tnx nisus Link to comment Share on other sites More sharing options...
plastic Posted December 29, 2002 Share Posted December 29, 2002 probably you can. if this function is an extension you should be able to transfer it to max5 (not 3.1, different SDK) by copying the responsible dll/dl? file. but you'd have to find the right file, and it's not sure (but very possible) that it's really an extension... better look if you can find an open source offset algorithm on the net or something, it would be easy to make a script then. (i'm not good at vector geometry math stuff, i don't think i can do it from the scratch) Link to comment Share on other sites More sharing options...
nisus Posted December 30, 2002 Author Share Posted December 30, 2002 Hi Marc, I've tried the path of analytical math about 1.75years ago. I've sketched out graphically what to do, set up most equatations but... I'm not a programmer! So where can we find these allready programmed sources? About the dll and stuff: I've posted the same question on the discreet boards recently too, but I wonder if anyone will answer my call since the great bobo himself told me (a while ago) that it would be hard to script (and rather useless if the applyoffset was available in viz4) rgds nisus Link to comment Share on other sites More sharing options...
proces2 Posted March 25, 2003 Share Posted March 25, 2003 just stumbled upon this thread. i have been looking for a one-click offset tool. what is the script that works for Viz 4? Link to comment Share on other sites More sharing options...
nisus Posted March 26, 2003 Author Share Posted March 26, 2003 applyoffset() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now