I noticed a strange behavior of the Rhino menu command Analyze/Mass properties/Hydrostatics.
When set WaterLineElevation above 9.6 meters program returns result for Volume Displacement.
When set WaterLineElevation bellow 9.6 meters program returns nothing problem_body.3dm (1.0 MB)
for Volume Displacement.
Bellow code calculates the AREA for waterplane which cuts ship body at different height.
Program returns no AREA under height 9.9 meters. It finds nothing to calculates the area.
ids=rs.TrimBrep(plane_id, ship_id)
print("ids= ", len(ids))
if ids:
for idp in ids:
area = rs.SurfaceArea(idp)
centr=rs.SurfaceAreaCentroid(idp)
I checked my ship model with Show Edges command which returns no open edges as well.
Can someone please suggest what is wrong with the model.
Hello-thanks for the quick response.
I will try to follow your comments. But I’m afraid that I won’t be able to solve the problem, since I’m a beginner in this field.
I’ll try anyway.
Regards, Vida
Hi there!
This is the best I can do. I created an intermediate surface on the problematic area with the loft command but the problem still remains.
Any advice will be appreciated.
Hi Vida - I would replace all the coplanar side surfaces with a single trimmed plane
and where possible avoid untrimmed triangular surfaces like this one, which I would try to combine with the one above into a four-sided (usually optimal) surface
Hi Pascal!
I followed your instructions. I failed by trying to combine surfaces the ones mentioned. But I combined all the surfaces in my own way. The “What” command shows Edge and Vertex Tolerances: 0.000 to 0.019.
“ShowEdges” shows no open edges. The completed model still does not calculate volume on this basis.
Do you have more precise instructions on how to process the model.
Thanks for the tips and regards, Vida kcs_again.3dm (373.0 KB)
[quote="Vida Demsar, post:8, topic:182340, Hi Pascal!
Thanks for quick responce. Of course I allways completed the model (mirror, loft to close).
If now set WaterLineElevation between 0.20 to 0.21 meters with your model program returns NO result for Volume Displacement.
Also for given heights bellow -.15 meters there is NO result for Volume Displacement.
Similar to my first report. But much better now. What could be the cause of such a result?
You’re right that I need to learn more about using Rhino to model, but that’s not my intention. Maybe in the future.
My purpose is to perform complex calculations on an already made model using the Python interface.
Hi Vida - ExtractBadSrf, Delete, then Cap the remining object. You can in fact probably extract and delete all the coplanar faces on the sides and replace them with Cap. Or just MergeAllCoplanarFaces.
It looks like there are some more bad faces at the stern -
Untrim those and you’ll see how far off the edges are from where they need to be.
I tried to rearrange the model as you suggested. I have discovered and hopefully fixed many bad places.
I cannot fix the surface marked in the picture as suggested.
Volume calculation is still not possible after the mirror, join and lofts commands.
Again, I’m asking for a hint on how to find the bad places in the model?
Thanks and regards, Vida
“What” command gives the following display:
Geometry:
Valid polysurface.
open polysurface with 52 surfaces.
Edge Tally:
34 boundary edges
8 singular edges
89 manifold edges
= 131 total edges
Edge Tolerances: 0.000 to 0.006
median = 0.000 average = 0.000
Vertex Tolerances: 0.000 to 0.003
median = 0.000 average = 0.000
Hi Pascal!
Python code does not work properly when the horizontal cutplane intersects the model near the yellow circles in the image or when it intersects the surfaces marked with a yellow line.
My Python code correctly calculates the model outside the marked places.
It is impossible for me to convert the triangular surfaces visible there into four-sided surface. Mergesrf, joinedge commands do not work as I would like.
Kindly ask for the correct steps to convert the surfaces to the appropriate shape.
Hi Vida -what units is this model, in theory, created in? The file shows ‘No units’ and the overall length is ~7.5 . Try setting the file tolerance to .001, or the tolerance in your code.
In any case, I think building the model from dozens of patches is not a good way to do this shape.
Hi Pascal!
After following all your instructions I finally managed to calculate the model but only as non-symmetrical. When I mark in the Hydrostatics that the model is symmetrical, the program does
not calculate the Volume Displacement value.
“What” comamnd gives me:
Edge Tolerances: 0.000 to 0.174
median = 0.000 average = 0.006
Vertex Tolerances: 0.000 to 0.004
median = 0.000 average = 0.000
I kindly ask for a hint regarding this. Thanks and regards, Vida