Getting the centroid of the pipe


#1

how to get the centroid point of pipe ?


#2

Please explain what you’ve attempted so far. There are standard nodes for this.


#3

i need to get the centroid point of a pipe exist in revit, or a point at bottom of pipe surface


#4

Can you show us what you’ve attempted? Have you searched the Dynamo library for any nodes you might need?


#5


#6

Are you trying to get all elements of the same type as your selected element? You’d have to get the family type of your selected element then use All Elements of Family Type.

Element.Geometry will return solids for any solid geometry, so you don’t need to convert to polysurfaces either.


#7

all what i need is to get the point of centroid or even a point at bottom of pipe

is that possible ?


#8

Both are possible. Getting the centroid is as easy as getting the element geometry and using Solid.Centroid. Getting the bottom of pipe is a little more involved but not very complicated either. I believe there are already forum posts covering how to get bottom of pipe that you could look at.


#9

can you show me how does can be achieved by dynamo


#10

You just had a few extra nodes.


#11

It might be faster to get the mid point of the location curve of each pipe:

getting a point on the bottom of a pipe shouldn’t be very difficult either. Do you need the absolute lowest point from the geometric representation of the pipe? Then consider getting the MinPoint from the output of element.BoundingBox.

Or do you just need a pipe at the base of the pipe’s profile? Then you could pull the pipe’s radius and translate the mid point along the location line’s normal by the length of the radius.


#12

i do not want the center of pipe lenght, i mean the centroid of the pipe cross section,

another question , does that applicable to pipe accessories ?


#13

what if the category was pipe accessories ?


#14

It will work for any element with solid geometry. Just try it and see.

But wouldn’t the centroid of the pipe cross section always be the center of pipe? What is your end goal here? What are you trying to accomplish?


#15

i have tried it with pipe accessories but it does not work , you can try that

i need to get the centroid of pipe or pipe accessories in order to be able to take a dimension from this point to another point