Share

AcBr Structure

C++

struct AcBr {
  enum ErrorStatus {
    eOk = 0,
    eNotImplementedYet = Acad::eNotImplementedYet,
    eNotApplicable = Acad::eNotApplicable,
    eInvalidInput = Acad::eInvalidInput,
    eOutOfMemory = Acad::eOutOfMemory,
    eNullObjectPointer = Acad::eUnrecoverableErrors,
    eWrongObjectType = Acad::eWrongObjectType,
    eWrongSubentityType = Acad::eWrongSubentityType,
    eNullObjectId = Acad::eNullObjectId,
    eNullSubentityId = Acad::eInvalidIndex,
    eObjectIdMismatch = Acad::eWrongDatabase,
    eTopologyMismatch = Acad::eWrongDatabase,
    eUnsuitableGeometry = Acad::eAmbiguousOutput,
    eMissingGeometry = Acad::eDegenerateGeometry,
    eMissingSubentity = Acad::eNotInDatabase,
    eInvalidObject = Acad::eUnrecoverableErrors,
    eAmbiguousOutput = Acad::eAmbiguousOutput,
    eBrepChanged = 3008,
    eUnsuitableTopology = 3013,
    eDegenerateTopology = 3020,
    eUninitialisedObject = 3021
  };
  enum Relation {
    kUnknown = 0,
    kOutside = 1,
    kInside = 2,
    kBoundary = 3,
    kCoincident = 4,
    kTangent = 5,
    kIntersect = 6
  };
  enum Element2dShape {
    kDefault = 0,
    kAllPolygons = 1,
    kAllQuadrilaterals = 2,
    kAllTriangles = 3
  };
  enum LoopType {
    kUnclassified = 0,
    kExterior = 1,
    kInterior = 2,
    kWinding = 3,
    kLoopUnclassified = kUnclassified,
    kLoopExterior = kExterior,
    kLoopInterior = kInterior,
    kLoopWinding = kWinding
  };
  enum ValidationLevel {
    kFullValidation = 0,
    kNoValidation = 1
  };
  enum ShellType {
    kShellUnclassified = 0,
    kShellExterior = 1,
    kShellInterior = 2
  };
};

File

brgbl.h

Members

Members Description
eOk The operation was successful.
eNotImplementedYet The function is not implemented yet.
eNotApplicable The inherited function is not applicable to this subclass. Returned when next() or restart() is called on an AcBrLoopVertexTraverser.
eInvalidInput The input argument points to an invalid object. Returned by traverser set functions in the following circumstances: the owning AutoCAD object for the list owner or list position argument has been modified since the associated AcBr* object was last set (side effect: the associated AcBr* object is invalidated); an uninitialized or invalidated (that is, empty) argument is passed to the set functions; or the argument contains an invalid subentity path.
eOutOfMemory Unable to allocate memory for the object. Returned when an object instantiated to pass by reference comes back NULL (for example, AcBrFace::getSurface() is unable to generate a not NULL AcBrSurface object).
eNullObjectPointer API object points to missing or null IMP object (internal error). Returned by all functions when the implementation is missing. This represents a catastrophic error (for instance, a program writes over the AcBr library's address space) and should be reported.
eWrongObjectType AcDbFullSubentPath points to an AcDbObject object that is not supported as a brep. Returned by all functions as part of object validation, when the object or traverser points to an AutoCAD object that cannot be opened or that is not an AcDb3dSolid, AcDbBody, or AcDbRegion. The setSubentPath() function applies this criteria to the final entry in the subentity path argument's object ID array. Also returned by AcBrFace::getSurface(), AcBrEdge::getCurve(), and AcBrVertex::getPoint(), if any of the chained transforms in the subentity path cannot be opened.
eWrongSubentityType The subentity type does not match the subclass. Returned by setSubentPath() when the subentity path argument's subentity ID is the wrong type for the given subclass (for example, AcBrFace is passed an edge subentity). Note that there is no subentity in AutoCAD associated with a loop or the full brep, so both AcBrBrep and AcBrLoop expect kNullSubentType.
eNullObjectId AcDbFullSubentPath does not point to an AutoCAD object. Returned by setSubentPath() when the subentity path argument is null, or when its object ID array is empty or contains a null final entry. Also returned by AcBrFace::getSurface(), AcBrEdge::getCurve(), and AcBrVertex::getPoint(), if any of the chained transforms in the subentity path are represented by null object IDs.
eNullSubentityId AcDbFullSubentPath does not point to a subentity. Returned by setSubentPath() when the subentity path argument's subentity ID is null. Exception: AcBrBrep, for which kNullSubentId is the only legitimate value.
eObjectIdMismatch The traverser list owner and list position do not point to the same AutoCAD object. Returned by traverser functions that set list position, when the traverser list owner and the list position argument do not have the same owning AutoCAD object and modification level.
eTopologyMismatch The traverser list position cannot be set because the subentity is not connected to the list owner. Returned by traverser functions that set list position, when the list position argument represents a subentity that is not in the current topological connectivity list.
eUnsuitableGeometry An AcGe object has unsuitable geometry for this function. Returned by getCurveRelationToXXX() functions when an AcGeCurve3d object is used as an argument that is not a line segment. This compensates for a regretful step back on functionality due to an internal modeler error on certain curve types that cannot be fixed at this point in time.
eMissingGeometry The geometry is fully or partially missing. Returned by all geometry queries (including orientation queries), when the object or traverser's subentity pointer has no associated geometry, or when part of the component geometry (such as subset interval) is invalid or missing.
eMissingSubentity The topology does not map to a subentity. Returned by traverser getXXX() functions, AcBrLoop::getFace(), AcBrEdge::getVertex(), AcBrEntity::getPointContainment(), and AcBrEntity::getLineContainment() when the object's, traverser's, or return argument's subentity pointer has no associated subentity ID.
eInvalidObject The AcBr* object is uninitialized or invalidated. Returned by all functions as part of object validation, when the object is uninitialized or invalidated (that is, empty). As such, does not apply to functions which specifically initialize an object or traverser, such as setSubentPath() and traverser functions that set list owner.
eAmbiguousOutput Unable to compute result. Returned by getLineContainment() when an internal error prevents the determination of the result, or by getPointContainment() when the containment simply cannot be determined due to computational ambiguity. This generally represents an internal modeler error and should be reported.
eBrepChanged AutoCAD object has been modified since this AcBr* object was last set. Returned by all functions as part of object validation, if the owning AutoCAD object has been modified since the AcBr* object was last set. As such, this error cannot come up as part of a setSubentPath() call, or as part of a traverser function to set list owner. For traverser functions that set list position, this error is returned when the owning AutoCAD object for the list position argument has been modified since the associated AcBr* object was last set.
eUnsuitableTopology The AutoCAD object or subentity has an unsuitable topology for this function. Returned by AcBrEdge::setSubentPath() if an attempt is made to set the edge to a singularity (for example, the apex of a cone, which should instead be used to set an AcBrVertex) or to a free or unembedded edge (such as a wire; though they are currently unsupported in AutoCAD anyway). Also returned by traverser functions that set the list owner, when the associated AcBr* object does not contain a list that matches the type of the traverser (for example, AcBrBrepFaceTraverser::setBrep() using a brep that has no faces (such as an empty or deleted model); AcBrFaceLoopTraverser::setFace() using a face that has no loops (such as a full sphere or torus); AcBrLoopEdgeTraverser::setLoop() using a loop that has no edges (that is, a singularity, such as the apex of a cone); AcBrLoopVertexTraverser::setLoop() using a loop that is not a singularity (that is, a loop that has an edge list); AcBrEdge::getVertex() when there is no start and/or end vertex on the edge (such as a (semi-)infinite or closed loop edge).
eDegenerateTopology The subentity does not map to the topology. Returned by setSubentPath() when the subentity path argument's subentity ID has no associated subentity pointer, and by traverser setXXX() functions when the list owner or list position argument contains a subentity ID that has no associated subentity pointer. Also returned by traverser getXXX() functions, next(), AcBrLoop::getFace(), and AcBrEdge::getVertex(), when the subentity pointer is null.
eUninitialisedObject The AcBr* object is uninitialized.
kUnknown Unable to determine containment. Due to an internal modeler error, it is not possible to determine whether the point is inside, outside, or on the boundary of the selected topology. This return code should be reported when it occurs. If a curve, this code is returned when the curve is partially inside and partially outside the selected topology bounds.
kOutside The point or curve is outside the topology bounds. The point is outside the bounds of the selected topology, or the curve is fully outside the bounds.
kInside The point or curve is inside the topology bounds. The point is inside the bounds of the selected topology, or the curve is fully inside the bounds.
kBoundary The point is on the topology bounds. The point is outside the bounds of the selected topology, or the curve lies entirely on the curve or surface associated with the selected topology. (Note: it is not possible to receive this return code from AcBrVertex::getCurveRelationToVertex().)
kCoincident The point or curve is coincident with the topology. This return code is currently unused, due to ambiguity. This condition now returns kInside instead.
kTangent The curve is tangent to the topology bounds. This return code is currently unused, due to ambiguity. This condition now returns kUnknown.
kIntersect The curve intersects the topology bounds. This return code is currently unused, due to ambiguity. This condition now returns kUnknown.
kUnclassified Obsolete. Now returns kLoopUnclassified.
kExterior Obsolete; now returns kLoopExterior.
kInterior Obsolete; now returns kLoopInterior.
kWinding Obsolete; now returns kLoopWinding.
kLoopUnclassified Loop type cannot be determined at this time, or is ambiguous (such as for loops embedded in spherical, toroidal or periodic nurb surfaces).
kLoopExterior Loop is on peripheral boundary (there is exactly one, unless the loop is on a conic surface, in which case there are winding loops instead).
kLoopInterior Loop is a hole in the interior of a face (there may be more than one interior loop per surface).
kLoopWinding Loop is winding on a conic surface (there is one winding loop for each non-degenerate base).
kShellUnclassified Shell type cannot be determined at this time.
kShellExterior Shell is on peripheral boundary of region or Brep.
kShellInterior Shell is a void in the interior of a region or Brep (there may be more than one interior shell per solid).

Description

The AcBr structure contains definitions for the Autodesk Boundary Representation library, which are shared between internal and third-party developers. This structure holds error codes that are specific to AcBr, using a starting base of 3000 to avoid conflict with AutoCAD, the Mechanical API, or the Mechanical Desktop.

An enumerated field for relation of bounded geometry to topology (for example, point in Brep, curve on face) is also included. The kInside and kOutside values are relative to the object's topological boundary.

Remarks

This structure is used by the entire AcBr class library.

The intended use of the AcBr structure is to provide a local AcBr context for error reporting and other enumerations. Note that errors from acdbOpenObject() may be filtered by AcBr through the AcBr::ErrorStatus enum to a higher level function that knows how to interpret Acad::ErrorStatus.

Was this information helpful?