InternalValidationError : ASMInterface::getFaceCenterPoint(pFace, centPt)

InternalValidationError : ASMInterface::getFaceCenterPoint(pFace, centPt)

gnm4pm
Contributor Contributor
400 Views
3 Replies
Message 1 of 4

InternalValidationError : ASMInterface::getFaceCenterPoint(pFace, centPt)

gnm4pm
Contributor
Contributor

I'm getting a new error since the most recent update when I try to find the centroid of a face. It doesn't affect every centroid call I make, and there doesn't seem to be any sort of pattern I can find. This previously was not a problem and I know the code was working before as I had used in many times on the exact same file under the exact same conditions. 

Error:

InternalValidationError : ASMInterface::getFaceCenterPoint(pFace, centPt)

 

I'm curious if anyone has seen an error like this before and if they have any solutions/workarounds.

0 Likes
Accepted solutions (1)
401 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor

Can you please post a design that can be used to reproduce this problem?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 4

gnm4pm
Contributor
Contributor

I spent some time yesterday readjusting my sort function to filter by a boundingbox range,  which I think improves my previous method anyway, so I am no longer experiencing the problem.  I think there is a specific problem with the way I generate one of my faces that throws the error as I can still find the centroid of other faces on the body. Either way, here is a simplified version of the code and f3z file that comes up with an error.

 

import adsk.core, adsk.fusion

app = adsk.core.Application.get()
design = app.activeProduct
root = design.rootComponent

for faces in root.bRepBodies.itemByName("Body1").faces:
    if faces.centroid.y > -10:
        print('success')


0 Likes
Message 4 of 4

BrianEkins
Mentor
Mentor
Accepted solution

One of the faces has a problem. It's the small face identified below. I deleted it and tried to recreate it using a Patch feature, but it was just as bad, if not worse. It would be good to report the Patch problem on the Fusion Support forum.

BrianEkins_0-1730826898263.png

 

I used a convoluted method to create a better surface where the centroid can be calculated. The new model is attached.

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com