Occasionally FlipNormal fails...

Occasionally FlipNormal fails...

oransen
Collaborator Collaborator
698 Views
8 Replies
Message 1 of 9

Occasionally FlipNormal fails...

oransen
Collaborator
Collaborator

Occasionally a call to FlipNormal fails. I've only just added the debugging to see the COM error, but since it does not happen very often I thought I'd ask here.

 

Why would FlipNormal fail? The workplane is inside a hole on the side of a tube, but there are no constraints associated with it.

 

Here's the code, though I doubt it'll help...

 

HRESULT hRes = pWorkPlane->FlipNormal() ;
if (SUCCEEDED(hRes)) {
    return true;

} else {
    ShowCOMError(hRes,L"CCollettore::FFWPNIR(1)of rango %d plane normal flip failed\n"
                 L"plane name = <%s>",ikCollRangoNum,csPlaneName.GetString());
    return false;
}

 

 

 

0 Likes
699 Views
8 Replies
Replies (8)
Message 2 of 9

Hochenauer
Autodesk
Autodesk

I checked the implementation of FlipNormal. We block flippig the normal for

 

- Grounded

- Origin

- Fixed

 

workplanes.

 

Does this explain why you might see a failure there?

 

Thanks,

Gerald

 

 

 



Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

Message 3 of 9

oransen
Collaborator
Collaborator

I don't think those cases are my cases, but it only happens occasionally and the program is a bit complex. Also I'm working remote so I don't have access to the files which fail.

 

This is where it happens....

 

2020-06-FlipNormal.png

 

...and I've attached an example part. Of course it does not happen in this example! Sod's Law.

 

Does looking at the COM return value give me a clue?

 

All the best

 

Owen

 

0 Likes
Message 4 of 9

Hochenauer
Autodesk
Autodesk

I can certainly check if you provide the value :o).



Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

0 Likes
Message 5 of 9

oransen
Collaborator
Collaborator

I've added more detail into the error message, as soon as it happens again I'll be back with more info!

0 Likes
Message 6 of 9

oransen
Collaborator
Collaborator

Revealin my ignorance here, I understand in your list origin and grounded workplanes, but what is a "fixed workplane"?

0 Likes
Message 7 of 9

Hochenauer
Autodesk
Autodesk

 

The DefinitionType property temporarily returns kFixedWorkPlane if a Workplane is below the StopNode. Could this be the case when you see the problem?

 

 



Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

0 Likes
Message 8 of 9

Hochenauer
Autodesk
Autodesk

If a plane is constructed involving adaptive geometry, it could also result in a kFixedWorkplane DefinitionType.



Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

Message 9 of 9

oransen
Collaborator
Collaborator

"If a plane is constructed involving adaptive geometry, it could also result in a kFixedWorkplane DefinitionType."

 

Ok, thanks. I'm not doing that, but must be doing something else odd...

0 Likes