AModeler Error Codes (AModeler::ErrorCode) - List of 'Internal' Codes?

AModeler Error Codes (AModeler::ErrorCode) - List of 'Internal' Codes?

Anonymous
Not applicable
737 Views
1 Reply
Message 1 of 2

AModeler Error Codes (AModeler::ErrorCode) - List of 'Internal' Codes?

Anonymous
Not applicable

The AModeler suite is the most flexible modeller available without the complication of BREP (AcDb3dSolid is, unfortunately, somewhat slower and the modeller isn't exactly the fastest code in the world), and you can access the basic error codes by looking at the header file that contains AModeler::ErrorCode. 

 

The problem is, often the codes passed to a try / catch's catch handler are 1000+ - but the header file stops at 1000 specifying it as 'eInternalError'. For example, one of the things I discovered about the modeller is that if you perform a boolean subtraction that would leave tiny slivers that it can't represent for some reason, rather than simply flag the resulting body as invalid or emptying it, the modeller throws an exception. One such code is 1073. 

 

For that particular problem, knowing that it is a sliver issue I can go back, inflate the body being subtracted slightly, and that then eliminates the sliver, working around the problem. 

 

The trouble is, I'm routinely getting other 'internal' errors, such as 1013 & 1016. If I knew roughly what they meant, I might be able to work out what to do to try again and eliminate them, as with the slivers - but I'm clueless right now. 

 

Anyone know where those codes might be documented? 

 

0 Likes
738 Views
1 Reply
Reply (1)
Message 2 of 2

Balaji_Ram
Alumni
Alumni

Hi Jason,

 

Sorry for the delay.

 

Here is a reply from our engineering team to a similar request that we had in the past :

 

---

ErrorCodes greater than eInternalError (1000) are internal errors

 

So if you are getting 1006, 1093, 1016, 1001, and 1010, they mean eBadInput, eAtLeastTwoProfilesExpected, eRadiusMustBeNonNegative, eFail (sorry this probably doesn't signal much), and eBadLine. They intentionally do not have names because the description of the error would not say much to the client code anyway.  

 

They are almost always thrown from Boolean operations when the bodies being Booleaned are slightly inaccurate or slightly,

but not completely, touch or intersect.
Or, when the bodies are bad for any other reason, such as containing degenerate faces (possibly result of another Boolean operation).

Try to use Body::isValid(1) or Body::isValid(2) predicates to check the validity of the bodies. If these predicates return false, it means the body is bad.

---

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes