AlanW Posted May 5, 2018 Share Posted May 5, 2018 (edited) This node only extrudes along path, The VW EAP command provides options to the Lock profile Plane and Fix Profile. Is it possible to add this in. I am toying with creating handrails that continue up a stair and along the landing and on further so it would be nice for the extrude to stay level through the twists and turns. Thnaks Edited May 5, 2018 by Alan Woodwell Quote Link to comment
Marionette Maven Marissa Farrell Posted May 5, 2018 Marionette Maven Share Posted May 5, 2018 I've looked into this before, it looks like we don't have access to some of the calls we need in the Python API, unfortunately. I'll put in a request to expose them. 2 Quote Link to comment
AlanW Posted May 5, 2018 Author Share Posted May 5, 2018 (edited) Thanks, other than that with a bit more thinking this could work well as this is always a problem with the stair tool. The handrail. This is a continuous rail. Edited May 5, 2018 by Alan Woodwell Quote Link to comment
twk Posted May 6, 2018 Share Posted May 6, 2018 You could force the parameter? Below is the node with all fields available. Set Fix Profile to True. Disclaimer, I haven't tested this extensively. So use at own risk, save work, etc. #Modified by TWK May 2018 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Path Extrude" ) this.SetDescription('Extrudes a profile along a path') #Input Ports profiles = Marionette.PortIn( vs.Handle(0), 'hProfile' ) profiles.SetDescription('The profile to extrude') paths = Marionette.PortIn( vs.Handle(0), 'hPath' ) paths.SetDescription('The path to extrude along') eapScale = Marionette.PortIn( 1, 'eapScale' ) eapScale.SetDescription('Set scale of the Profile') eapFactor = Marionette.PortIn( 1, 'eapFactor' ) eapFactor.SetDescription('Set Factor?') eapLockProfile = Marionette.PortIn( False, 'eapLockProfile' ) eapLockProfile.SetDescription('Lock Profile') eapFixProfile = Marionette.PortIn( False, 'eapFixProfile' ) eapFixProfile.SetDescription('Fix Profile') #OIP Controls #Output Ports xtrds = Marionette.PortOut('hObj') xtrds.SetDescription('The resulting object') #BEHAVIOR this.SetLinksObjects() savedView = None this.SetInitFunc(Marionette.InitializeView) this.SetFinalFunc(Marionette.RestoreView) def RunNode(self): #inputs prof = self.Params.profiles.value path = self.Params.paths.value scale = self.Params.eapScale.value Factor = self.Params.eapFactor.value LockProfile = self.Params.eapLockProfile.value FixProfile = self.Params.eapFixProfile.value FixProfile = "Yes" if FixProfile else "No" #script if prof != 0 and path != 0: profile = vs.CreateDuplicateObject(prof, vs.Handle(0)) cntr = vs.HCenter(profile) vs.HMove(profile, -cntr[0], -cntr[1]) if vs.GetTypeN(path) is not 111: oldPath = path path = vs.ConvertToNURBS(path, True) vs.Marionette_DisposeObj(oldPath) eap = vs.CreateCustomObjectPath('Extrude Along Path', path, profile) vs.SetObjectVariableBoolean(eap, 1167, True) vs.SetRField(eap, 'Extrude Along Path', 'Scale', str(scale)) vs.SetRField(eap, 'Extrude Along Path', 'Factor', str(Factor)) vs.SetRField(eap, 'Extrude Along Path', 'Lock Profile Plane', str(LockProfile)) vs.SetRField(eap, 'Extrude Along Path', 'Fix Profile', str(FixProfile)) vs.Marionette_DisposeObj(prof) #outputs self.Params.xtrds.value = eap Quote Link to comment
AlanW Posted May 6, 2018 Author Share Posted May 6, 2018 @twkHi Thanks for this. I cant seem to get the left line to extrude correctly. Both nodes react the same way. Scaling doesn't seen to work either. Must be doing something wrong. Untitled1.vwx Quote Link to comment
lgoodkind Posted September 29, 2018 Share Posted September 29, 2018 I too could use this functionality. Did you have any success? 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.