I’m trying to evaluate the dimensions of surfaces that all are(well should be, within tolerance) revolved circles/toruses. They might be trimmed or untrimmed. (Specifically I want to know the length of the centerline arc, but that doesn’t matter too much…) Unfortunately there is no “IsRevSurface” function so I was like well maybe I can cast the object a torus then turn that into a RevSurface, but no that just gives me the whole torus they are a part of. What would be an elegant way to do this? I had previously done this by extracting edge curves and figuring out which direction they go along, but that seems rather convoluted especially if the edges are possibly split up.
Most of your explanation of what you are trying to do is a mystery to me but, the above phrase I can understand.
It sounds like you are using python script so python’s isinstence method combined with Rhino.Geometry. RevSurface should tell you if the object of interest is a Revolved surface.
However, even if it can be defined as a revolved surface doesn’t mean Rhino is storing the data in that form. There can be a number of different geometry forms in Rhino for a revolved surface.
I wasn’t looking for something saved as a surface of revolution, but identify objects that could have been such a thing. With other sorts of “analytic primitives” you can “cast” a surface into one if it’s in tolerance, like a plane or a cylinder or a sphere…
I wound up creating a torus object from the surfaces and got the centerline length by intersecting the original brep with the torus plane, and averaging the curves.
Hi @JimCarruthers, in case you want an automatic solution, there is Surface.TryGetTorus which you could run against the underlying surface of a brep, so it should work with trims too…
_
c.
Hi I used TryGetTorus, but that gives you a full torus so I had to figure out how big a part of a torus I had, so I use the torus struct to get its plane that I intersected with the original surface…err brep, something.