Hi all, i would like to know if there is a command to get back the generating curve from a tube shape .
It would be very helpful because many times if someone draws a tubular from a generating curve , and then for some reason deletes the curve, modifying that tube becomes very difficult.
In order to get back the curve now i creates 2 opposite isocurves at the sides of the tube, than create a intermediate curve .
Thank you for suggestion. Unfortunately,the command gives a curve non properly located.
You can see in yellow the real curve generated using the “manual” method, and the other is generated using the script. Of course creating a new tubular shape using last one the solid is created in another positionù
You’re right, the pipe is tapered. Thank you for your help. It would be helpful having a command that runs also for non-constant radius tubes, by the way I noticed that intermediate curve from opposite isocurves runs well.
Hello - yes- finding the opposite isocurve is another way to get at this - it’s not as easy in a script, at least that is what I found when I made this thing originally but I’ll take another look - I have a thought or two about how to reliably find the opposite iso.
Yeah - what the script does now is make normal offset at the radius - obviously wrong for a tapered pipe - but I think it is not hard to find the opposite iso and get a surface between - I think I prefer that as there’s no fuzz from an intersection operation - we’ll see how it works.
@akeswins, @Gijs - here’s a try at getting this working for tapered pipes. It might work…
@Gijs - script added here - it’s all pretty old except the last bit where the script decides there is no cylinder, cone, etc and falls back on it being a pipe - that is changed now to use a center isocurve of a loft between opposite isos rather than an offset normal to the middle of the pipe (original way)
I wondered if alternatively, if you could reference the end seam of of the pipe, drawing intersecting planes, sectioning cross sectional curves, which you can find the centers of.
Yeah,… the down side of that sort of approach, I’d say, is that it does not take advantage of some known and exact information inherent in the pipe surface, and instead cooks up approximations. The curve generated by the script above should have exactly the structure of the pipe surface in that direction and therefore be as exactly right as I think it can be, if the original curve is missing. If you start intersecting and then interpolating centers you’re making two successive approximations - it might be close enough much of the time but it’s also a lot more typing. Reverse engineering a mesh pipe would require something like that approach though, as far as I can see.
Hi Hannes - there is no difference in the outcome, only that an rhp can be loaded once and contains one or more command names so the whole thing is more convenient than setting up aliases to run the separate scripts.
Hi @pascal, I cave a quick question about the scripts in Rhino. Is it possible to automatically load a certain script when Rhino 7 starts, so that I will not feel the 2-3 seconds of delay that happens when I click on a custom icon consisting a script for the first time? Thanks!
Here is an example with one of the scripts I would like to make pre-loaded in Rhino: CycleDisplayModes.py (1.4 KB)
And the path to the folder where it’s stored:
_-RunPythonScript “D:\PROGRAMI\Rhinoceros 7\Добавки\Cycle display modes\CycleDisplayModes.py”