# Null AreaMassProperty

I have a set of 150 frames, placed one after another. 4 curves, located in 1/4, 1/2, 3/4 of a span of curves can’t have Area calculated. I attach one of those invalid curves, can anyone please tell me what I do wrong in my projection to brep and join operations, that I get such a bad curve?
Attached 3dm with curve and a picture of pattern of “bad” curves, shown on the picture as an empty spots.

frame.3dm (25.8 KB)

Please help.

The curve does not appear to be planar. You might consider create a plane though the curve’s control points. Then pull the curve to the resulting plane.

I do this programaticlly, by projecting line onto a brep faces, and then closing them with straight line, doing anything manually is out of consideration. Main question I think should be why do I get this kind of geometry, when I do all operations within the tolerance? Also, why this happens in such a regular distances? This is quite suspecious behaviour for me, and I don’t want to implement new behaviour to my plugin, which would only make frames planar. How to get around increase tolerance for some operations?

Too many mistakes made today. It apeared, that I was using two different tolearrance values for projection
and for area calculations.
Thank you Dale for quick answer by the way, I haven’t spotted the it was you answering my post actually.

What I suggested can be done in a plug-in.

Why you are seeing his problem is something that I cannot answer, as I don’t have access to your source code. Your coordinates are getting large - I would not rule out floating point rounding error as a potential cause of the problem.

If you follow my above instructions to (to create a plane through the control points of the profile curve) and then use the PointDeviation command, you can see how far off the plane the control points are:

``````Average distance: 0.00681119
Median distance: 0.00606436
Standard deviation: 0.00364771
Maximum distance: 0.0157712
Minimum distance: 0.00120189
``````

There is a version of `Rhino.Geometry.AreaMassProperties.Compute` that allows you to pass in a custom planar tolerance - the absolute tolerance used to insure the closed curve is planar. Providing something looser should allow the area to be computed.

Also, I notice the model’s absolute tolerance is 0.001 meters, which is pretty high for the size of the object you are modeling. For something the size of a ship, I would think something on the order of 0.01 meters would be more appropriate.

Yes, thank you again. I will stop my work for today, as it is late at night where I am right now, and I’m loosing my concentration form time to time, which force me to make mistakes. I have implemented one tolerance for curve projection onto a brep, and another for calculating areas, which is a source of this problem. After doing both operations with the same tolerance, problem disappear. Model tolerance is quite high as you mentioned, and units used are meters instead of millimeters, which made cross section enormously large, this also doesn’t help.