# Check if HSS is bent in only one direction (not twisted)?

The fabricator we are working with can bend tubes in one direction, but not in 2. I want to confirm/validate that my model is only curving in one direction (within a tolerance) but i cant seem to figure out how to check the entire tube as an object. I have found examples that check individual surfaces for curvature, but not a shape. The HSS are sloping, but that has no impact on the fabrication, only installation. Also the ends can be cut to whatever angle they want.

How can I confirm that the HSS is only bent in one axis?

I have attached a GH file that has 2 sample extrusions if that helps!

bendy tube.gh (29.8 KB)

Iād have to think through this one in graph space but perhaps you can deconstruct the brep to get the edges. And all edges should be planar, if one isnāt that would indicate a compound curving object.

I believe in the curves category there is a āIs Planarā node.

Another idea would be to evaluate the end surface normals, if the form only curves in one direction, 1 surface normal (in this example likely the Z) should be the same value. If they arenāt it isnāt planar.

One possibility is to look at the Gaussian curvature for each surface. If itās zero, then the surface can be laid flat. I took a sample grid for each surface on each tube and looked at the Gaussian curvature at each point. Summing all the results, a zero means everything can be unfolded flat. I added a twisted tube, #3 to check; if itās not zero then somewhere, one of the surfaces is curved in two dimensions.

OTOH, each surface could be developable, like a ruled surface, section of a cone, or a plane,in which case its Gaussian curvature is zero so the above method fails.

bendy tube-b.gh (83.1 KB)

3 Likes

Hi Michael,

There is also a requirement that, if there are curvature planes for a tube, then they must be parallel, otherwise edges are curving in different directions.

Regards
Jeremy

1 Like

The sample extrusions are obviously curved in one direction, but also slightly curved in the other (i.e the long sides which might be assumed to be planar are not, as indicated by the surface planarity component in gh and by measurement in Rhino). What is the tolerance pemitted?

Hi @rjohnson1,

Maybe this helps?

ā Dale

Thanks everyone for the responses!

I think that @akilli 's approach should work. (Side note for people coping the script from the image, you need to put a ā-2ā in the Shift Paths input - or just download what he uploaded)

@dale - I need to make sure that the entire brep is not twisting, so the approach above works better since its accounting for all the surfaces in the brep.

Tolerance wise, I donāt know exactly, but it is some construction tolerance, so for example 1/16" over the length of these tubes (they are all around 3ā long).

What are the output / Units of the Gaussian curvature? If i knew this, then i could come up with a equation to see if its within tolerance.

The curvature is in 1/(whatever units youāre using)^2. So the Gaussian curvature of a 10 mm radius sphere would be .01 (mm^-2)

1 Like