I wanna know if there was a way to recreate the curve that has been used to create a pipe using the Pipe command. So there is the pipe but the “axial” curve has been deleted.
If it’s not possible, it’s ok I’ll keep my curves on a hidden layer. But that could be handy.
Actually, I just found a way to achieve this. I duplicate the edge of the length of the extruded pipe, then i create a line from the end of that curve to the center of the pipe end. Then I use sweep one rail with those two curves.
And finally, one of the edge of the created surface corresponds to the axial curve of the pipe (not 100% because it has not the same control points but that’s pretty close).
But if there was a faster and better way to do this, I’ll be glad to hear.
About workflows, I’m trying to understand if it is possible (if so, then how?) to write an alias that stops when asked for a value and write a value but still waits for me to press enter.
Let me be more specific, I’m creating some pipes from scanner point clouds with a command of the plug-in Pointools.
The command is called : ptPipeFromSel. It calculates the best fitting staight pipe from a selection of points from a pointcloud. Right after typing the command and Enter, it asks for : Geometry=Surface / S olid / Line, and then it gives a “computed diameter” and wait for our entry for the diameter, if the computed one is ok, you just press enter, otherwise you type the value you want and press enter.
I want to create pipes with a fixed diameter, so I want to type my alias, that calculates the best pipe from the selected points, then it stops so that I can watch for the computed value, and see if it is close enough the value I want to set.
So if I want to create with one click a surface pipe with a diameter of 0.33 unit, I can write it like that : "ptPipeFromSel G S Enter 0.33 Enter"
But what I miss there is a pause to watch for the computed value.
So I tried to write it like that : “ptPipeFromSel G S Enter Pause 0.33 Enter” or "ptPipeFromSel G S Enter 0.33 Pause Enter"
But either it validate the computed diameter or it just set 0.33 and there is no pause.
I don’t know how to do the pause while having the value typed in so it is just needed to press enter and not typing the value every time.
Yes, I tried and it works for stopping the command (which does stop anyway waiting for the diameter) but what I’m looking for is a way to get (when it waits for the diameter) one value automatically typed but still waiting for me to press enter to end the command. Am I clear or not enough?
To use the script, extract and save the .rvb file from the attached zip archive, then drag and drop the saved rvb over an open Rhino V4 or v5 window. This will load the script, set it up to load on startup in the future and register the alias
PipeCenterline
that will run the script much like a regular command. An alias can be typed or added to a toolbar button or keyboard shortcut (F-key).
EDIT: a cleaned up version, as a plug-in with the command ExtractCenterline
Should work on cones, cylinders, torii, pipes of constant radius, spheres (returns a point) and pieces of any of these. It also has the command
Thanks a lot for the script, Pascal.
Concerning the way of wrinting the alias of a command to type a value but do not validate, is there a solution or it’s either you set a value in the alias and do not have the pause or you pause and have to type it every time?
Hi Clement- yeah, I think what you wrote is correct- what you are looking for is for the last used value to be remembered as a default, is that correct?
Well, in the exemple of the pipe, I would like to write one alias that uses the command ptPipeFromSel to calculate the best pipe, and during the command it asks for a diameter value. There I want to be able to type one value directly in the alias (so that it will always be this value) but without validating. Because if it validates, the command ends and the pipe is created. And I need to look at the value computed that is shown in the the command line.
So to sum up I want to make a pause in an alias and during that pause the alias types a value in the command line but doesn’t validate.
Right, so this command does not have a default value I guess… where are you getting this command, by the way? I do not see it, so far, in Paneling Tools… If I can get at the command, I can monkey around with a script to see if I can make it work as you like.
It has no default value indeed. It only computes a value from the selected points, then ask for a manual imput or a validation to use the computed value. This command comes from Pointools 4 Rhino plug-in. That’s why it’s called ptPipefromSel. It only works with Rhino 4 or Rhino 5 32bits. (you may get a 15hours-trial version somewhere, or I can send you a file)
I thought there was a way to “pre”-type a value in an alias without validating it. For example, when I type “ptPipeFromSel G S _Enter 0.33”, I would expect the 0.33 to be typed in the command line but not validated, so that I have to press enter before the command ends.
Maybe there was another way to write it with a special character for instance. If not, I don’t want to bother you too much. It is already nice that you try to understand my request.
dupeEdge the seam of the pipe
extractIsoCrv the “longitudinal” isoCurve that lies on the midpoint of either end of the pipe
tweenCurve those two curves to get the centerline.
Hey, I know this is an oooold post, but for what it’s worth, I’ve made a VERY simple Grasshopper script which seems to work on 3D pipes (not Breps/polysurfaces though… Only surfaces made with the pipe command…) - but might still be useful to someone who wants to batch process a whole bunch of pipes 20200806-extractCL-3Dpipe.gh (304.3 KB)