Functions

Functions

MSPSOLID_EXPORT StatusInt mdlSolid_elementToBody (BODY_TAG *bodyP, TransformP bodyTransformP, MSElementDescrP edP, DgnModelRefP modelRef, UInt32 nodeId=1L)
 This function converts an element to a brep which can be a solid (type 19 elements), a sheet (type 18 elements, shapes, bspline surfaces, ellipses etc.) or a wire (curves, line strings etc). More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_elementToBodyList (TAG_ENTITY_LIST **bodyListPP, NON_ENTITY_LIST **templateListPP, NON_ENTITY_LIST **transformListPP, MSElementDescrH remainingEdPP, MSElementDescrP edP, DgnModelRefP modelRef, bool getSolids, bool getSheets)
 Converts a given element into a list of BODY_TAG entities. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_bodyToElement (MSElementDescrH edPP, BODY_TAG bodyTag, bool wireframe, int uIsoParametrics, int vIsoParametrics, unsigned int useSmartIso, MSElementP templateP, DgnModelRefP modelRef)
 Converts a body to a MicroStation element. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_bodyToElements (MSElementDescrH edPP, BODY_TAG bodyTag, bool wireframe, int uIsoParametrics, int vIsoParametrics, unsigned int useSmartIso, MSElementP templateP, DgnModelRefP modelRef)
 Converts a body to MicroStation elements and returns them in an element descriptor chain. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_planarFaceToElement (MSElementDescrH edPP, FACE_TAG face, DgnModelRefP modelRef)
 Creates an equivalent MicroStation element for the input planar face. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_faceToElement (MSElementDescrH edPP, FACE_TAG face, bool wireframe, int nIsoparametrics, MSElementP templateP, DgnModelRefP modelRef)
 Creates an equivalent MicroStation element for the input face. More...
 
MSPSOLID_EXPORT int mdlSolid_elementFromEdge (MSElementDescrH edPP, MSElementP templateP, EDGE_TAG edge, double *startParameterP, double *endParameterP, DgnModelRefP modelRef)
 Creates an equivalent MicroStation element for the input kernel edge. More...
 
MSPSOLID_EXPORT int mdlSolid_createChainFromEdgeList (MSElementDescrH outEdPP, TAG_ENTITY_LIST *pEdgeList, MSElementP templateP, DgnModelRefP modelRef)
 Converts the set of edges input into an equivalent MicroStation chain of elements. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_getSurfaceElements (MSElementDescrH outEdPP, MSElementDescrP inEdP, DgnModelRefP modelRef)
 Creates an equivalent surface element for the input element. More...
 
MSPSOLID_EXPORT UInt32 mdlElmdscr_smartSolidRewrite (MSElementDescrH newEdPP, BODY_TAG newBody, MSElementDescrP oldEdP, BODY_TAG oldBody, UInt32 filePos)
 Rewrites the element descriptor representing the old body with the element descriptor representing the new body using the mdlElmdscr_rewrite function. More...
 
MSPSOLID_EXPORT int mdlSolid_booleanDisjoint (TAG_ENTITY_LIST *resultBodyListP, BODY_TAG targetBody, TAG_ENTITY_LIST *toolBodyListP, int op)
 Accepts as input a set of bodies and booleans them. More...
 
MSPSOLID_EXPORT int mdlSolid_unite (BODY_TAG b2, BODY_TAG b1)
 Performs the boolean union operation and leaves the result in b2. More...
 
MSPSOLID_EXPORT int mdlSolid_subtract (BODY_TAG b2, BODY_TAG b1)
 Subtracts b1 from b2 and leaves the result (possibly consisting of a set of disjoint lumps) in b2. More...
 
MSPSOLID_EXPORT int mdlSolid_intersect (BODY_TAG b2, BODY_TAG b1)
 Intersects the two input bodies and leaves the result in b2. More...
 
MSPSOLID_EXPORT int mdlSolid_slice (BODY_TAG *slice, BODY_TAG b1, BODY_TAG b2)
 Intersects the two input bodies and returns the intersection as a wire body. More...
 
MSPSOLID_EXPORT int mdlSolid_edgeFaceIntersection (TAG_ENTITY_LIST **interEnts, EDGE_TAG e, FACE_TAG f)
 Computes the intersections between the given edge and the given face. More...
 
MSPSOLID_EXPORT int mdlSolid_faceFaceIntersect (BODY_TAG *b, FACE_TAG f1, FACE_TAG f2)
 Finds the intersect curve between two faces. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_combineBodies (BODY_TAG b1, BODY_TAG b2)
 Combines two possibly disconnected bodies into a single body by moving the lump from one body into the body of the other. More...
 
MSPSOLID_EXPORT int mdlSolid_debugEntity (ENTITY_TAG entity, WCharCP labelP)
 This function prints diagnostic messages about the entity including its type and data. More...
 
MSPSOLID_EXPORT void mdlSolid_debugEntitySize (ENTITY_TAG entityIn)
 This function prints diagnostic messages about the entity's size. More...
 
MSPSOLID_EXPORT int mdlSolid_checkEntity (ENTITY_TAG entityIn)
 Checks the topology and geometry of a given entity and writes the results to the MicroStation text window. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_checkBody (BODY_TAG body, bool checkGeometry, bool checkTopology, bool checkSize)
 Checks the input body for geometric, topological and size validity. More...
 
MSPSOLID_EXPORT int mdlSolid_addNodeIdAttributes (BODY_TAG body, UInt32 nodeId, int overrideExisting)
 Adds or updates ids to the faces and edges of a body. More...
 
MSPSOLID_EXPORT int mdlSolid_deleteNodeIdAttributes (BODY_TAG body)
 Removes node Ids and entity Ids from all the faces of a body and edge ids attached to edges of the body. More...
 
MSPSOLID_EXPORT int mdlSolid_extractId (UInt32 *nodeIdP, UInt32 *entityIdP, ENTITY_TAG entity)
 Extracts the node Id and entity Id from a given entity. More...
 
MSPSOLID_EXPORT int mdlSolid_idFromEntity (FaceId *faceIdP, ENTITY_TAG ent, bool useHighestId)
 Get the faceID (node-ID, entity-ID) pair of the input entity. More...
 
MSPSOLID_EXPORT int mdlSolid_idFromFace (FaceId *faceIdP, FACE_TAG face, bool useHighest)
 Get the face id of a face. More...
 
MSPSOLID_EXPORT int mdlSolid_idFromEdge (EdgeId *edgeIdP, EDGE_TAG edge, bool useHighest)
 Get the edge id of an edge. More...
 
MSPSOLID_EXPORT int mdlSolid_idFromVertex (VertexId *vertexIdP, VERTEX_TAG vertex, bool useHighest)
 Get the vertex id of a vertex. More...
 
MSPSOLID_EXPORT int mdlSolid_facesFromId (TAG_ENTITY_LIST *faceListP, FaceId *faceIdP, BODY_TAG body)
 Returns the entity list of faces matching the input face ID. More...
 
MSPSOLID_EXPORT int mdlSolid_faceFromId (FACE_TAG *faceP, FaceId *faceIdP, BODY_TAG body)
 Finds a face in the input body that has the given face id. More...
 
MSPSOLID_EXPORT int mdlSolid_edgesFromId (TAG_ENTITY_LIST *edgeListP, EdgeId *edgeIdP, BODY_TAG body)
 Returns the entity list of edges in the input body that have the given edge ID. More...
 
MSPSOLID_EXPORT int mdlSolid_edgeFromId (EDGE_TAG *edgeP, EdgeId *edgeIdP, BODY_TAG body)
 Finds an edge which has the given edge id. More...
 
MSPSOLID_EXPORT int mdlSolid_vertexFromId (VERTEX_TAG *vertexP, VertexId *vertexIdP, BODY_TAG body)
 Finds the vertex which has the given vertex id. More...
 
MSPSOLID_EXPORT int mdlSolid_entityFromId (ENTITY_TAG *entityP, FaceId *entityIdP, int isEdge, BODY_TAG body)
 Finds the entity matching the given face Id. More...
 
MSPSOLID_EXPORT int mdlSolid_updateBodyNodeId (BODY_TAG body)
 Updates the node ids for the body. More...
 
MSPSOLID_EXPORT int mdlSolid_lowestUniqueIdFromEdge (EdgeId *edgeIdP, EDGE_TAG edge)
 Returns the lowest edge ID on the edge. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_facetBody (DPoint3d **ppPoints, long *pNumVertice, long **ppFacets, long *pNumFacets, ENTITY_TAG bodyTag, TransformP pTransform, int iMaxSides, double dChordHeight, double dNormalAngle, double dSideWidth)
 This function is used to polygonize (facet) a body. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_facetBodyWithNormals (DPoint3d **ppPoints, long *pNumVertex, long **ppFacetVertex, DPoint3dP *ppNormals, long *pNumNormal, long **ppFacetNormal, long *pNumFacets, ENTITY_TAG bodyTag, TransformP pTransform, int iMaxSides, double dChordHeight, double dNormalAngle, double dSideWidth)
 Polygonize a body allocating memory for the created arrays of vertex points, normals, and facets. More...
 
MSPSOLID_EXPORT void mdlSolid_freeFacetArray (void *pArray)
 Frees memory associated with the specified facet array. More...
 
MSPSOLID_EXPORT int mdlSolid_facetToIndices (FacetCallbackFunc funcId, ENTITY_TAG entity, double dNmax, double dmax, double hmax)
 Facets a body and provides the output to the calling application through a callback function. More...
 
MSPSOLID_EXPORT int mdlSolid_facetBodiesFromEntity (TAG_ENTITY_LIST *pList, ENTITY_TAG entity, TransformP pTransform, double dChordHeight, double dNormalAngle, double dSideWidth, int maxSides)
 Facets a solid or sheet body and returns a list of sheet bodies each of which represents a facet. More...
 
MSPSOLID_EXPORT int mdlSolid_listCreate (TAG_ENTITY_LIST **lP)
 Creates an empty entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listDelete (TAG_ENTITY_LIST **lP)
 Frees the memory allocated for the entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listAdd (TAG_ENTITY_LIST *lP, ENTITY_TAG ent)
 Appends an entity to the end of the entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listAddList (TAG_ENTITY_LIST *lDP, TAG_ENTITY_LIST *lSP)
 Adds the contents of list lSP to an existing list lDP. More...
 
MSPSOLID_EXPORT int mdlSolid_listRemove (TAG_ENTITY_LIST *lP, ENTITY_TAG ent)
 Removes an entity from an entity list. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_listRemoveByIndex (TAG_ENTITY_LIST *listP, int index)
 Removes the entry at a supplied index from an entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listCount (int *count, TAG_ENTITY_LIST *lP)
 Returns the number of entries in an entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listLookup (int *nth, TAG_ENTITY_LIST *lP, ENTITY_TAG ent)
 Searches for a given entity and returns its zero based index in the list. More...
 
MSPSOLID_EXPORT int mdlSolid_listNthEl (ENTITY_TAG *entP, TAG_ENTITY_LIST *lP, int nth)
 Returns the entity at a given index in an entity list. More...
 
MSPSOLID_EXPORT int mdlSolid_listEmpty (TAG_ENTITY_LIST *lP)
 Removes all entries from an entity list. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToCurve2d (CURVE_TAG *curveP, MSBsplineCurve *msbCurveP)
 Creates a planar curve in the solid kernel from a b-spline curve definition. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToCurve (CURVE_TAG *curveP, MSBsplineCurve *msbCurveP)
 Creates a curve in the solid kernel from a b-spline curve definition. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToSurface (SURFACE_TAG *surfaceP, MSBsplineSurface *msbSurfP)
 Creates a surface in the solid kernel from a b-spline surface definition. More...
 
MSPSOLID_EXPORT int mdlSolid_makePrism (BODY_TAG *prismP, double height, double radius, int nSides)
 Creates a solid circular prism of the given height, radius, and number of sides. More...
 
MSPSOLID_EXPORT int mdlSolid_makeCuboid (BODY_TAG *cuboidP, double dx, double dy, double dz)
 Creates a solid cuboidal (rectangular box) body centered at 0,0,0 and aligned with x, y, z axes. More...
 
MSPSOLID_EXPORT int mdlSolid_makeCone (BODY_TAG *coneP, double height, double base, double top)
 Creates a solid conical body with the input parameters. More...
 
MSPSOLID_EXPORT int mdlSolid_makeSphere (BODY_TAG *sphereP, double radius)
 Creates a solid spherical body with the input radius and center at 0,0,0. More...
 
MSPSOLID_EXPORT int mdlSolid_makeTorus (BODY_TAG *bodyP, double primaryRadius, double secondaryRadius, double angle)
 Creates a solid torus with input major and minor radii. More...
 
MSPSOLID_EXPORT int mdlSolid_makeWedge (BODY_TAG *bodyP, double radius, double height, double angle)
 Creates a pie-shaped solid (wedge) from the supplied input parameters. More...
 
MSPSOLID_EXPORT int mdlSolid_makePlane (BODY_TAG *bodyP, DPoint3dP pointP, DPoint3dP normalP, DPoint3dP refDirP, double *intervalP)
 Creates a finite planar rectangular sheet body. More...
 
MSPSOLID_EXPORT int mdlSolid_makeSheetBody (BODY_TAG *bodyP, SURFACE_TAG surfTag, double *intervalP)
 Given a surface and parameter boundaries, it creates a sheet body representing the surface within the rectangular parametric box. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_makeLineCurve (CURVE_TAG *pCurveTagOut, DPoint3dP pStartPointIn, DPoint3dP pEndPointIn)
 Creates a finite kernel line entity given the start and end points of the line. More...
 
MSPSOLID_EXPORT int mdlSolid_fixBlends (BODY_TAG *pBody)
 Makes implicit blend attributes on edges and vertices explicit. More...
 
MSPSOLID_EXPORT int mdlSolid_fixBlendsWithSetback (BODY_TAG *pBody, TAG_ENTITY_LIST *vertexListP, double setback)
 Blends the edges of the specified solid applying the given setback value. More...
 
MSPSOLID_EXPORT void mdlSolid_removeUnfixedBlends (BODY_TAG body)
 Removes the implicit blend attributes from all edges in the body. More...
 
MSPSOLID_EXPORT int mdlSolid_setConstantRounds (TAG_ENTITY_LIST *list, double radius, double startSetback, double endSetback)
 Attaches implicit rounds as attributes to each edge in the list. More...
 
MSPSOLID_EXPORT int mdlSolid_setConstantChamfers (TAG_ENTITY_LIST *list, double leftRange, double rightRange, double startSetback, double endSetback)
 Attaches implicit chamfers as attributes to each edge in the list. More...
 
MSPSOLID_EXPORT int mdlSolid_offsetFaces (TAG_ENTITY_LIST *pFaceList, double *pOffset, double tolerance, bool faceFaceCheck)
 Offsets an input set of faces by the provided offset distances. More...
 
MSPSOLID_EXPORT int mdlSolid_hollowBody (BODY_TAG body, TAG_ENTITY_LIST *oldFaceListP, TAG_ENTITY_LIST *newFaceListP, double offset, TAG_ENTITY_LIST *noOffsetFaceListP, TAG_ENTITY_LIST *offsetFaceListP, double *offsetValuesP)
 Offsets faces of the input body by the offset distance provided to created a thin shell body. More...
 
MSPSOLID_EXPORT int mdlSolid_sweepBodyVector (BODY_TAG body, DPoint3dP directionP, double distance, double shell, double draft)
 Sweeps a wire or sheet body a fixed distance along a vector. More...
 
MSPSOLID_EXPORT int mdlSolid_sweepBodyAxis (BODY_TAG body, DPoint3dP revolveAxisP, DPoint3dP radialAxisP, double angle, double shell, double draftAngle, bool closeOpenProfiles)
 Revolves a wire or sheet body about the axis passing through the point radialAxisP and along revolveAxisP. More...
 
MSPSOLID_EXPORT int mdlSolid_sweepBodyWire (BODY_TAG *bodyP, BODY_TAG wireBody, DPoint3d *pathStartP, double shell, bool capped, DgnModelRefP modelRef)
 Sweeps an input wire or sheet body along a path represented by wireBodyP. More...
 
MSPSOLID_EXPORT int mdlSolid_sweepFaces (TAG_ENTITY_LIST *faceListP, DPoint3dP translationP, bool faceFaceCheck)
 Sweeps the set of faces belonging to the same body by the input translation vector. More...
 
MSPSOLID_EXPORT int mdlSolid_spinFaces (TAG_ENTITY_LIST *faceListP, DPoint3dP originP, DPoint3dP axisP, double angle, bool faceFaceCheck)
 Spins one or more faces belonging to the same solid body around the input axis. More...
 
MSPSOLID_EXPORT int mdlSolid_thickenSheetBody (BODY_TAG body, TAG_ENTITY_LIST *oldFaceListP, TAG_ENTITY_LIST *newFaceListP, double forwardDist, double backwardDist)
 Thickens the input sheet body into a solid body. More...
 
MSPSOLID_EXPORT int mdlSolid_offsetWire (TAG_ENTITY_LIST *pOffsetList, BODY_TAG wireBody, EDGE_TAG refEdge, DPoint3d *pNormal, double distance, double tolerance, int gapFill, bool localCheck)
 Returns a list of edges that are the offset edges of the input wire body. More...
 
MSPSOLID_EXPORT bool mdlSolid_ambiguousBoresite (BODY_TAG body, DgnModelRefP modelRef, DPoint3d *pointP, int view)
 Determines whether the input point in the given view locates a body. More...
 
MSPSOLID_EXPORT void mdlSolid_getBoresiteFromACS (DPoint3dP borePointP, DPoint3dP boreDirectionP, DPoint3dCP pointP, int view, DgnModelRefP modelRef, bool useACS, bool frontClipBorePoint)
 Returns a bore point and bore direction from the input point, view and ACS. More...
 
MSPSOLID_EXPORT void mdlSolid_getBoresite (DPoint3d *borePointP, DPoint3d *boreDirectionP, DPoint3d *pointP, int view, DgnModelRefP modelRef)
 Takes the input point pointP in the view specified by view, and returns the boresite point and boresite direction in solid kernel units. More...
 
MSPSOLID_EXPORT void mdlSolid_getLocateBoresite (DPoint3d *borePointP, DPoint3d *boreDirectionP, double *radiusP, DgnModelRefP modelRef)
 Returns a bore point and bore direction from the locate point. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_findClosestPointOnBody (DPoint3dP pPointOut, ENTITY_TAG *pEntityOut, double *pDistance, BODY_TAG bodyTagIn, TransformP pTransformIn, DPoint3dP pPointIn)
 Finds the closest point and the closest entity on the body from the input test point (pPointIn). More...
 
MSPSOLID_EXPORT int mdlSolid_closestPointOnBody (DPoint3dP pointOutP, ENTITY_TAG *entityOutP, double *distanceP, BODY_TAG body, TransformP transP, DPoint3dP pointP, DgnModelRefP modelRef)
 Computes the closest point on the body and the entity on the body this point lies on. More...
 
MSPSOLID_EXPORT int mdlSolid_closestPointToFace (DPoint3d *clstPt, DPoint3d *normal, DPoint2d *param, DPoint3d *testPt, FACE_TAG face)
 Computes the closest point on the input face to a input point. More...
 
MSPSOLID_EXPORT int mdlSolid_closestPointToEdge (DPoint3d *clstPt, double *param, DPoint3d *testPt, EDGE_TAG edge)
 Computes the closest point to an edge from a given point. More...
 
MSPSOLID_EXPORT int mdlSolid_closestPointToSurface (DPoint3d *clstPt, DPoint3d *normal, DPoint2d *param, DPoint3d *testPt, FACE_TAG face)
 Computes the closest point to the input test point on the input face. More...
 
MSPSOLID_EXPORT int mdlSolid_closestPointToCurve (DPoint3d *clstPt, double *param, DPoint3d *testPt, EDGE_TAG edge)
 Computes the closest point to the input test point on the input edge. More...
 
MSPSOLID_EXPORT int mdlSolid_pointFromVertex (DPoint3d *point, VERTEX_TAG vertex)
 Returns the global coordinates of the point underlying the vertex. More...
 
MSPSOLID_EXPORT bool mdlSolid_locateBodyList (FACE_TAG *faceP, EDGE_TAG *edgeP, DPoint3dP outPointP, int *bodyIndexP, TAG_ENTITY_LIST *bodyListP, NON_ENTITY_LIST *transformListP, DPoint3dP inPointP, double locateTolerance, int view, DgnModelRefP modelRef)
 Given a datapoint and a view, this function can be used to get the closest face and edge among a list of bodies. More...
 
MSPSOLID_EXPORT int mdlSolid_getEntities (TAG_ENTITY_LIST *hits, double **params, DPoint3dP origin, DPoint3dP dir, double radius, int type, BODY_TAG b, DgnModelRefP modelRef)
 Fires an infinite length ray of radius 'radius' from the input starting point, along the ray direction and returns the entities on the input body that the ray intersects with. More...
 
MSPSOLID_EXPORT int mdlSolid_rayTestBody (ENTITY_TAG **entities, double **params, int *hitsFound, DPoint3d *origin, DPoint3d *dir, BODY_TAG b, int hitsWanted, bool backupRayOrigin, DgnModelRefP modelRef)
 Fires a ray from origin along dir and finds all entities in the input body that intersect with the ray. More...
 
MSPSOLID_EXPORT int mdlSolid_rayTestFace (DPoint3dP *pointPP, DPoint2d **uvPP, double **rayParamPP, int *hitsFoundP, DPoint3dCP originP, DVec3dCP dirP, FACE_TAG face, double minRayDistance, double maxRayDistance)
 Fires a ray from origin and along dir and the points of intersection between the ray and the face. More...
 
MSPSOLID_EXPORT int mdlSolid_boresiteToFace (DPoint3d *outPointP, DPoint3d *outNormalP, FACE_TAG *outFaceP, DPoint3d *inPointP, DPoint3d *inNormalP, BODY_TAG body, bool backupRayOrigin, DgnModelRefP modelRef)
 
Fires a ray from inPointP along inNormalP at the input body and

returns the first face it hits as well as the intersection point and the normal direction of the face at this point. More...

 
MSPSOLID_EXPORT int mdlSolid_boresiteToEdge (DPoint3d *outPointP, EDGE_TAG *outEdgeP, DPoint3d *inPointP, DPoint3d *inNormalP, BODY_TAG body, bool backupRayOrigin, DgnModelRefP modelRef)
 
Fires a ray from inPointP along inNormalP at the input body and

returns the first edge it hits as well as the intersection point. More...

 
MSPSOLID_EXPORT int mdlSolid_boresiteToVertex (DPoint3d *outPointP, VERTEX_TAG *outVertexP, DPoint3d *inPointP, DPoint3d *inNormalP, BODY_TAG body, bool backupRayOrigin, DgnModelRefP modelRef)
 
Fires a ray from inPointP along inNormalP at the input body and

returns the first vertex it hits as well as the intersection point. More...

 
MSPSOLID_EXPORT int mdlSolid_boresiteFaceByEdge (FACE_TAG *pFace, FACE_TAG *pFace1, FACE_TAG *pFace2, int *pHitStatus, DPoint3d *pBorePt, DPoint3d *pBoreDir, BODY_TAG body, DgnModelRefP modelRef)
 This function tries to get the face at the boresite by first getting the edge near the boresite and then extracting the faces adjacent to the edge that is gotten. More...
 
MSPSOLID_EXPORT int mdlSolid_pointInBody (int *inBody, DPoint3d *loc, BODY_TAG body)
 
The mdlSolid_pointInBody function tests whether a point lies inside,

outside or on the boundary of a given body. More...

 
MSPSOLID_EXPORT int mdlSolid_faceIntersectLine (DPoint3dP *pointPP, DPoint2d **uvPP, double **rayParamPP, int *hitsFoundP, DPoint3d *originP, DPoint3d *dirP, FACE_TAG face, BODY_TAG body)
 
Fires a ray from the origin, originP, along the direction,

dirP, towards the face, faceP, of the body. More...

 
MSPSOLID_EXPORT int mdlSolid_faceIntersectCurve (DPoint3dP *pointPP, DPoint2d **faceUVPP, double **curveParamPP, int *numIntsP, FACE_TAG face, CURVE_TAG curve, double startParam, double endParam)
 
Intersects the portion of the given curve between

startParam and endParam with the given face, and returns the absolute points of intersection between the curve and face, the surface parameters at the points of intersection, and the curve parameters at the points of intersection. More...

 
MSPSOLID_EXPORT int mdlSolid_getEntityBox (DPoint3d *lo, DPoint3d *hi, ENTITY_TAG en)
 Computes the bounding box of an entity. More...
 
MSPSOLID_EXPORT int mdlSolid_getBodyBox (DPoint3d *lo, DPoint3d *hi, BODY_TAG b)
 Computes the bounding box of a body. More...
 
MSPSOLID_EXPORT int mdlSolid_loopExternal (int *isExternal, LOOP_TAG l)
 Determines if a loop is an internal or external loop of a face. More...
 
MSPSOLID_EXPORT void mdlSolid_getNewSharedEdges (TAG_ENTITY_LIST *listP, BODY_TAG body)
 
Returns a list of edges that are newly created and have no node

ids attached. More...

 
MSPSOLID_EXPORT bool mdlSolid_isSmoothEdge (EDGE_TAG edge)
 
Checks whether the two adjacent faces of the given edge are

connected with tangent continuity. More...

 
MSPSOLID_EXPORT void mdlSolid_getSmoothFaceList (TAG_ENTITY_LIST *listP, FACE_TAG face, bool addSmoothFaces, int allowedFaceTypeMask)
 
This function adds a face to the list of faces, and also adds a face

smoothly connected to the faces in the list. More...

 
MSPSOLID_EXPORT void mdlSolid_getSmoothEdgeList (TAG_ENTITY_LIST *listP, FACE_TAG edge, SmoothEdgeType smoothEdges)
 This function adds an edge to a list of edges. More...
 
MSPSOLID_EXPORT int mdlSolid_getEdgeListFromFace (TAG_ENTITY_LIST *edgeListP, FACE_TAG face)
 Returns all the edges that make up the loops of the face. More...
 
MSPSOLID_EXPORT int mdlSolid_getVertexListFromFace (TAG_ENTITY_LIST *vertexListP, FACE_TAG face)
 Returns all the vertices that belong to a face. More...
 
MSPSOLID_EXPORT int mdlSolid_wireIsG1 (BODY_TAG wire)
 
This function determines whether the input wire body is

G1 continuous (smooth) across all of its vertices. More...

 
MSPSOLID_EXPORT int mdlSolid_edgeCurveLength (double *length, double startParam, double endParam, EDGE_TAG edge)
 
Computes the length (in solids kernel units) of the edge

between the startParam and endParam parameters. More...

 
MSPSOLID_EXPORT int mdlSolid_bodyMassProperties (double *pVolumeOut, double *pPeripheryOut, DPoint3d *pCentroidOut, double inertiaOut[3][3], BODY_TAG bodyIn, TransformP transformP, double requiredToleranceIn)
 
Calculates the volume, center of gravity and moments of inertia

of a body. More...

 
MSPSOLID_EXPORT int mdlSolid_entityArea (double *area, double *achTol, ENTITY_TAG ent, double reqTol)
 
Calculates the surface area of a face, sheet body, or two-dimensional

general body. More...

 
MSPSOLID_EXPORT int mdlSolid_minimumDistanceBetweenEntities (DPoint3dP pPoint1, DPoint3dP pPoint2, double *pDistance, ENTITY_TAG entity1, ENTITY_TAG entity2)
 Compute minimum distance between two entities. More...
 
MSPSOLID_EXPORT int mdlSolid_transformFromSurfaceUV (TransformP transformP, TransformP inverseTransformP, FACE_TAG face, DPoint2d *uvP, DgnModelRefP modelRef)
 
Creates a transformation matrix from a point on the

given face. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_simplifyBody (BODY_TAG *bodyP, bool local)
 Attempts to simplify bspline curves and surfaces into analytic curves and surfaces wherever possible. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_imprintCurveNormal (TAG_ENTITY_LIST *pImprintList, BODY_TAG body, TAG_ENTITY_LIST *pEdgeList, double tolerance)
 This function takes as input a body and a list of edges and tries to imprint the edges on to the body. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_imprintCurveVector (TAG_ENTITY_LIST *pImprintList, BODY_TAG body, TAG_ENTITY_LIST *pEdgeList, DPoint3d *pVector, double tolerance)
 This function is similar to the mdlSolid_imprintCurveNormal except that instead of projecting curves along face normals, it takes an explicit vector along which the curves are projected. More...
 
MSPSOLID_EXPORT double mdlSolid_getParasolidScale (DgnModelRefP modelRef)
 
Returns the scale factor to convert from solid modeling kernel

units to Units of Resolution(UORs). More...

 
MSPSOLID_EXPORT void mdlSolid_beginCurrTrans (DgnModelRefP modelRef)
 
Pushes a transformation matrix which converts solid

modeling kernel units to Units of Resolution onto the stack. More...

 
MSPSOLID_EXPORT void mdlSolid_endCurrTrans ()
 This function pops the transform pushed by mdlSolid_beginCurrTrans. More...
 
MSPSOLID_EXPORT double mdlSolid_samePointTolerance ()
 
Returns the tolerance set within a .dgn file that

determines whether two points are the same (i.e. More...

 
MSPSOLID_EXPORT int mdlSolid_applyTransform (ENTITY_TAG entity, TransformP transformP)
 Transforms the input entity by the input transformation matrix. More...
 
MSPSOLID_EXPORT int mdlSolid_capSurface (TAG_ENTITY_LIST *faces, BODY_TAG *lamina)
 
Converts a sheet body to a solid by adding faces to fill up

"hollow spaces." Example of an application of this function is when you have sheet body in the shape of cube but with one face missing, then you can use this function to cap the sheet body and convert it into a solid body. More...

 
MSPSOLID_EXPORT int mdlSolid_coverWires (TAG_ENTITY_LIST *faceList, BODY_TAG wires)
 
Covers the input wire body by creating faces out of closed edges

and then fitting the faces with appropriate surfaces. More...

 
MSPSOLID_EXPORT int mdlSolid_reverseBody (BODY_TAG body)
 Reverses the orientations all faces of the body. More...
 
MSPSOLID_EXPORT int mdlSolid_regulariseEntity (ENTITY_TAG entity)
 
The mdlSolid_regulariseEntity function removes all faces,

edges and vertices which are unnecessary for supporting the topology of the given entity. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_sewBodies (TAG_ENTITY_LIST *sewnBodyListP, TAG_ENTITY_LIST *unsewnBodyListP, TAG_ENTITY_LIST *inputBodyListP, double gapTolerance)
 This function sews or stitches a list of sheet bodies and returns two sets of bodies. More...
 
MSPSOLID_EXPORT int mdlSolid_sewBodiesRecursively (TAG_ENTITY_LIST *sheetBodyListP, double minTol, double maxTol, double mulTol)
 The function accepts a list of sheet bodies as input and tries to stitch them all together into one are more bodies. More...
 
MSPSOLID_EXPORT int mdlSolid_recursiveSewSheetsToElement (MSElementDescrH ppEdP, TAG_ENTITY_LIST *pSheetList, MSElementP templateP, DgnModelRefP modelRef, double maxTol)
 The function takes as input a list of sheet bodies and tries to stitch them into a single sheet body. More...
 
MSPSOLID_EXPORT int mdlSolid_copyEntity (ENTITY_TAG *copy, ENTITY_TAG source)
 
Copies an entity and all the entities below it to a newly created

entity. More...

 
MSPSOLID_EXPORT int mdlSolid_deleteEntity (ENTITY_TAG e)
 Deletes the given entity and frees the memory allocated for it. More...
 
MSPSOLID_EXPORT int mdlSolid_copyBody (BODY_TAG *copy, BODY_TAG source)
 Make a copy of a body. More...
 
MSPSOLID_EXPORT void mdlSolid_freeBody (BODY_TAG body)
 Frees the memory allocated for the body. More...
 
MSPSOLID_EXPORT int mdlSolid_free (void *v)
 
Frees memory allocated by the solid kernel when the results are

returned as arrays. More...

 
MSPSOLID_EXPORT int mdlSolid_evaluateEdge (DPoint3d *pointP, DPoint3d *duP, DPoint3d *duuP, DPoint3d *tangentP, DPoint3d *normalP, DPoint3d *binormalP, double u, EDGE_TAG edge)
 
Evaluates an edge at the input parameter and computes the point,

the first derivative, second derivative, tangent vector, main normal vector and binormal vector of an edge at that parameter. More...

 
MSPSOLID_EXPORT int mdlSolid_evaluateFace (DPoint3d *pointP, DPoint3d *normalP, DPoint3d *duP, DPoint3d *dvP, DPoint3d *duuP, DPoint3d *duvP, DPoint3d *dvvP, double u, double v, FACE_TAG face)
 
Evaluates the face (or the surface underlying the face) at the

input parameter and returns the point, surface normal direction, first partial derivatives, second partial derivatives and mixed partial derivative of the face at the given parameter. More...

 
MSPSOLID_EXPORT int mdlSolid_bodyData (WIRE_TAG *wire, LUMP_TAG *lump, void **transfPP, BODY_TAG b)
 
The mdlSolid_bodyData function returns the first wire in the

case of wire bodies and the first lump in the case of solid, sheet and general bodies. More...

 
MSPSOLID_EXPORT int mdlSolid_planarFaceData (DPoint3d *rootPointP, DPoint3d *normalP, FACE_TAG face)
 Finds a point on the face and computes the normal direction of the face. More...
 
MSPSOLID_EXPORT int mdlSolid_lumpData (SHELL_TAG *shell, LUMP_TAG *next, LUMP_TAG l)
 
Returns the first shell data and the next lump pointed to by

the given lump. More...

 
MSPSOLID_EXPORT int mdlSolid_shellData (FACE_TAG *face, SHELL_TAG *next, SHELL_TAG s)
 
Returns the first face of the input shell and the next shell

in the lump or NULL if this is the last shell in the lump. More...

 
MSPSOLID_EXPORT int mdlSolid_vertexData (DPoint3d *pointP, VERTEX_TAG vertex)
 Extracts the underlying point from a vertex. More...
 
MSPSOLID_EXPORT int mdlSolid_edgeData (VERTEX_TAG *startVertexP, VERTEX_TAG *endVertexP, DPoint3d *startPointP, DPoint3d *endPointP, double *startParamP, double *endParamP, COEDGE_TAG *coEdgeP, CURVE_TAG *curveP, bool *reversedP, EDGE_TAG edge)
 Returns topological and geometric information about the edge. More...
 
MSPSOLID_EXPORT int mdlSolid_faceData (LOOP_TAG *loop, FACE_TAG *next, SURFACE_TAG *surfaceP, bool *reversedP, bool *doubleSidedP, FACE_TAG f)
 
Returns the first loop in the input face, the next face in the

body, the surface underlying the face and sense information for the face. More...

 
MSPSOLID_EXPORT int mdlSolid_loopData (FACE_TAG *face, COEDGE_TAG *coedge, LOOP_TAG *next, LOOP_TAG l)
 
Returns the face containing the loop, the first coedge in the loop, and

the next loop in the face. More...

 
MSPSOLID_EXPORT int mdlSolid_coedgeData (EDGE_TAG *edge, ENTITY_TAG *owner, COEDGE_TAG *partner, COEDGE_TAG *next, COEDGE_TAG *prev, DPoint3d *start, DPoint3d *end, bool *reversed, COEDGE_TAG coedge)
 Returns topological and geometry information about the loop. More...
 
MSPSOLID_EXPORT int mdlSolid_coedgesFromEdge (COEDGE_TAG *coedge1P, COEDGE_TAG *coedge2P, EDGE_TAG edge)
 Returns all the coedge(s) that reference the input edge. More...
 
MSPSOLID_EXPORT int mdlSolid_loopFromCoedge (LOOP_TAG *loopP, COEDGE_TAG coedge)
 Returns the loop that owns the coedge. More...
 
MSPSOLID_EXPORT int mdlSolid_faceFromLoop (FACE_TAG *faceP, LOOP_TAG loop)
 Returns the face that owns the input loop. More...
 
MSPSOLID_EXPORT int mdlSolid_facesFromEdge (FACE_TAG *face1P, FACE_TAG *face2P, EDGE_TAG edge)
 Returns the faces that intersect at the input edge. More...
 
MSPSOLID_EXPORT void mdlSolid_getVertexList (TAG_ENTITY_LIST *listP, BODY_TAG body)
 Returns all vertices of a body. More...
 
MSPSOLID_EXPORT void mdlSolid_getEdgeList (TAG_ENTITY_LIST *listP, BODY_TAG body)
 Returns all edges of the body. More...
 
MSPSOLID_EXPORT void mdlSolid_getFaceList (TAG_ENTITY_LIST *listP, BODY_TAG body)
 Returns all faces in the body. More...
 
MSPSOLID_EXPORT void mdlSolid_getCoEdgeList (TAG_ENTITY_LIST *listP, BODY_TAG body)
 Returns all coedges of a body. More...
 
MSPSOLID_EXPORT void mdlSolid_getLoopList (TAG_ENTITY_LIST *listP, BODY_TAG body)
 Returns all loops in the body. More...
 
MSPSOLID_EXPORT int mdlSolid_bodyAskFirstEdge (EDGE_TAG *pEdge, BODY_TAG body)
 Returns the first edge of a body. More...
 
MSPSOLID_EXPORT int mdlSolid_body (BODY_TAG *b)
 Creates an empty minimal body. More...
 
MSPSOLID_EXPORT int mdlSolid_sheetFromFaces (BODY_TAG *sheetP, TAG_ENTITY_LIST *faceListP)
 Creates a sheet body by joining together the input faces. More...
 
MSPSOLID_EXPORT int mdlSolid_sheetFromFace (BODY_TAG *sheetP, FACE_TAG face)
 Creates a sheet body from a single face. More...
 
MSPSOLID_EXPORT int mdlSolid_removeFace (FACE_TAG f)
 
The mdlSolid_removeFace function removes a face from its owning

body. More...

 
MSPSOLID_EXPORT int mdlSolid_removeFaces2 (TAG_ENTITY_LIST *bodyListP, TAG_ENTITY_LIST *faceListP, int healOption, bool healLoop)
 Removes the set of input faces from their owning body. More...
 
MSPSOLID_EXPORT int mdlSolid_uncoverFace (FACE_TAG face)
 Removes a face from it's owning sheet body. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_trimByEdgesAndFaces (BODY_TAG body, TAG_ENTITY_LIST *pEdgeList, TAG_ENTITY_LIST *pFaceList, bool keep)
 This function trims a sheet body using a set of supplied edges. More...
 
MSPSOLID_EXPORT StatusInt mdlSolid_imprintBodies (TAG_ENTITY_LIST *pTargetEdges, TAG_ENTITY_LIST *pToolEdges, BODY_TAG target, BODY_TAG tool, double tolerance, bool imprintTool)
 
Intersects the two input bodies and imprints their intersection

on one, or both, by adding new edges and faces. More...

 
MSPSOLID_EXPORT bool mdlSolid_isSmartSolidElement (MSElementDescrP edP, DgnModelRefP modelRef)
 Determines whether the input element is a smartsolid element. More...
 
MSPSOLID_EXPORT bool mdlSolid_isSmartSheetElement (MSElementDescrP edP, DgnModelRefP modelRef)
 
Determines whether the input element is a smartsheet

element. More...

 
MSPSOLID_EXPORT bool mdlSolid_isSmartElement (MSElementDescrP edP, DgnModelRefP modelRef)
 
Determines whether the input element is a smartsolid

or smartsheet. More...

 
MSPSOLID_EXPORT bool mdlSolid_isSolidElement (MSElementDescrP edP, DgnModelRefP modelRef)
 Determines whether the input element is a solid element. More...
 
MSPSOLID_EXPORT bool mdlSolid_isSheetElement (MSElementDescrP edP, DgnModelRefP modelRef)
 
Determines whether the input element is an element

that can be represented as a sheet body. More...

 
MSPSOLID_EXPORT bool mdlSolid_isSheetOrSolidElement (MSElementDescrP edP, DgnModelRefP modelRef)
 Determines whether the input element is a sheet or solid element. More...
 
MSPSOLID_EXPORT bool mdlSolid_isModelerElement (MSElementDescrP edP)
 
Tests whether the element is a modeler element (has a node

linkage attached to it) More...

 
MSPSOLID_EXPORT bool mdlSolid_isSheetBody (BODY_TAG bodyTag)
 Determines whether the input body is a sheet body. More...
 
MSPSOLID_EXPORT bool mdlSolid_isSolidBody (BODY_TAG bodyTag)
 Determines whether the input body is a solid body. More...
 
MSPSOLID_EXPORT bool mdlSolid_isWireBody (BODY_TAG bodyTag)
 This function determines whether the input body is a wire body. More...
 
MSPSOLID_EXPORT bool mdlSolid_isAnalyticBody (BODY_TAG bodyTag)
 
Determines whether the surfaces underlying the faces

in a body are analytic (non b-spline) surfaces. More...

 
MSPSOLID_EXPORT bool mdlSolid_isGeneralBody (BODY_TAG bodyTag)
 
This function determines whether the input body is a general

(non-manifold) body. More...

 
MSPSOLID_EXPORT bool mdlSolid_isMinimalBody (BODY_TAG bodyTag)
 
Tests whether the given body is the simplest type of manifold

body, a minimum (or minimal) body, sometimes called an "acorn". More...

 
MSPSOLID_EXPORT int mdlSolid_getFaceType (FACE_TAG faceTag)
 This function returns the type of the given face. More...
 
MSPSOLID_EXPORT int mdlSolid_getEdgeType (EDGE_TAG edgeTag)
 This function returns the type of the given edge entity. More...
 
MSPSOLID_EXPORT bool mdlSolid_isBody (ENTITY_TAG entityTag)
 Checks whether input entity is a body or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isLump (ENTITY_TAG entityTag)
 Checks if the input entity is a lump or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isShell (ENTITY_TAG entityTag)
 Checks if entity is SHELL or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isFace (ENTITY_TAG entityTag)
 Checks if entity is FACE or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isLoop (ENTITY_TAG entityTag)
 Checks if input entity is loop or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isCoEdge (ENTITY_TAG entityTag)
 Checks if input entity is COEDGE or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isEdge (ENTITY_TAG entityTag)
 Checks if input entity is EDGE or not. More...
 
MSPSOLID_EXPORT bool mdlSolid_isVertex (ENTITY_TAG entityTag)
 Tests whether input entity is vertex or not. More...
 
MSPSOLID_EXPORT int mdlSolid_bodyType ()
 
Returns the BODY_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_wireType ()
 
Returns the WIRE_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_lumpType ()
 
Returns the LUMP_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_shellType ()
 
Returns the SHELL_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_subShellType ()
 
Returns the SUBSHELL_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_faceType ()
 
Returns the FACE_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_loopType ()
 
Returns the LOOP_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_coedgeType ()
 
Returns the COEDGE_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_edgeType ()
 
Returns the EDGE_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT int mdlSolid_vertexType ()
 
Returns the BODY_TYPE constant that can be used as input to

many functions. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_removeBlends (double blendRadius, BODY_TAG bodyTag)
 
The mdlSolid_removeBlends function removes blend faces from its 

owning body. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_removeHoles (double holeRadius, BODY_TAG bodyTag)
 
The mdlSolid_removeHoles function removes holes from its 

owning body. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_removeTinyFaces (double tinyArea, BODY_TAG bodyTag)
 
The mdlSolid_removeTinyFaces function removes tiny faces from its 

owning body. More...

 
MSPSOLID_EXPORT StatusInt mdlSolid_removeFeatures (double blendRadius, double holeRadius, double tinyArea, BODY_TAG bodyTag)
 
The mdlSolid_removeFeatures function removes small features from its 

owning body. More...

 

Detailed Description

Function Documentation

MSPSOLID_EXPORT UInt32 mdlElmdscr_smartSolidRewrite ( MSElementDescrH  newEdPP,
BODY_TAG  newBody,
MSElementDescrP  oldEdP,
BODY_TAG  oldBody,
UInt32  filePos 
)

Rewrites the element descriptor representing the old body with the element descriptor representing the new body using the mdlElmdscr_rewrite function.

In addition, it also transfers the wireframe tags from the old element descriptor to the new one. Associative dimensions are transferred from the oldbody to the new body. This function should be used when the brep underlying a smart element is modified and element created from the resultant brep is written back to the file replacing the old element.

Parameters
[in,out]newEdPPthe element descriptor representing the modified brep. This also gets the wireframe tags and associations from the old element
[in]newBodythe new body after modification
[in]oldEdPthe element descriptor for the original body element
[in]oldBodythe original body before modification
[in]filePosthe original file position of the old element
Returns
The file position of the rewritten element.
MSPSOLID_EXPORT int mdlSolid_addNodeIdAttributes ( BODY_TAG  body,
UInt32  nodeId,
int  overrideExisting 
)

Adds or updates ids to the faces and edges of a body.

Each face is given a nodeId and an entityId. The nodeId represents an integer value > 0 that indicates the operation that created the face. The entityId differentiates the face among all the faces that were created during that operation. Consider the following example: A solid with six faces is created in MicroStation. When a solid operation (a blend) is attempted on the cube, the type 19 element is converted to a SmartSolid cell. This operation attaches face ids for the six faces. While all the six faces get a node id of 1, each face will get a unique entityid between 1 & 6 if this function is used to add the node ids Edge ids are also attached to the body. An Edge id consists of the face ids of the two faces adjacent to it.

See also
mdlSolid_deleteNodeIdAttributes
Parameters
[in]bodyis the given body.
[in]nodeIdis the node Id.
[in]overrideExistingtrue if override existing node Id.
Returns
returns SUCCESS/ERROR to indicate successful completion or otherwise
See also
mdlSolid_deleteNodeIdAttributes
MSPSOLID_EXPORT bool mdlSolid_ambiguousBoresite ( BODY_TAG  body,
DgnModelRefP  modelRef,
DPoint3d *  pointP,
int  view 
)

Determines whether the input point in the given view locates a body.

The function works in two steps. First, the input pointP and view is used to calculate a bore site and a bore direction in solid kernel units using the mdlSolid_getBoresite function. Then, a ray is fired from the boresite along bore direction onto the input body. If the ray intersects the body, then this function returns TRUE and FALSE otherwise.

Parameters
[in]bodythe body to test
[in]modelRefthe model containing the body element
[in]pointPboresite point
[in]viewthe view to test
Returns
TRUE if an intersection is found from the boresite to the body in the given view.
MSPSOLID_EXPORT int mdlSolid_applyTransform ( ENTITY_TAG  entity,
TransformP  transformP 
)

Transforms the input entity by the input transformation matrix.

The transformation matrix can have translational, scaling and rotational components but not shear components. Transforming a entity changes the geometry underlying the topology of the entity. Care must be taken when scaling bodies. A large scale factor applied to a entity can cause the entity to become invalid thereby causing downstream modeling operations to fail.

Parameters
[in,out]entityis the input entity.
[in]transformPis the transformation matrix.
Returns
SUCCESS if entity is successfully transformed
MSPSOLID_EXPORT void mdlSolid_beginCurrTrans ( DgnModelRefP  modelRef)

Pushes a transformation matrix which converts solid

modeling kernel units to Units of Resolution onto the stack.

For each call to this function there should always be a call to mdlSolid_endCurrTrans to pop the transfomation matrix from the stack. Using this function, it becomes easier to convert between MicroStation elements and solid modeling kernel entities.

Parameters
[in]modelRefinput model ref for which solid modeling transformation needs to be pushed on to the stack
See also
mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_body ( BODY_TAG b)

Creates an empty minimal body.

A minimum body is a zero dimensional body that contains only a single vertex. It is also called an acorn. A typical example of its application is when a wire body is build through scribing of curves. Consider four trimmed lines in the form of a square that need to go into a wire body. In such cases, an acorn is frist created and then the lines segments are scribed onto the acorn to create the wire body.

Parameters
[in,out]bis the body created.
Returns
SUCCESS if body is successfully created
See also
mdlSolid_elementToBody mdlSolid_isBody
MSPSOLID_EXPORT int mdlSolid_bodyAskFirstEdge ( EDGE_TAG pEdge,
BODY_TAG  body 
)

Returns the first edge of a body.

Parameters
[out]pEdgeis the first edge of the body.
[in]bodyis the input body
Returns
SUCCESS if the data extraction is successful; ERROR otherwise
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_bodyData ( WIRE_TAG wire,
LUMP_TAG lump,
void **  transfPP,
BODY_TAG  b 
)

The mdlSolid_bodyData function returns the first wire in the

case of wire bodies and the first lump in the case of solid, sheet and general bodies.

It also returns the transformation matrix stored with the body.

Parameters
[out]wireis the first wire or NULL.
[out]lumpis the first lump or NULL.
[out]transfPPis the transformation or NULL (identity transformation).
[in]bis the input body.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_shellData
MSPSOLID_EXPORT int mdlSolid_bodyMassProperties ( double *  pVolumeOut,
double *  pPeripheryOut,
DPoint3d *  pCentroidOut,
double  inertiaOut[3][3],
BODY_TAG  bodyIn,
TransformP  transformP,
double  requiredToleranceIn 
)

Calculates the volume, center of gravity and moments of inertia

of a body.

The major diagonal of the inertia tensor returned contains values for the inertias about each axis relative to (0, 0, 0) in the world coordinate system.

Remarks
For the inertia about the x-axis the value is returned in inertia[0,0].
For inertias relative to the centroid and parallel to world x, y, z axes, certain transformations need to be applied.
Parameters
[out]pVolumeOutis the volume of the body in the case of solid bodies and three-dimensional general bodies. It returns the surface area in case of sheet bodies. It returns the length in case of wire bodies.
[out]pPeripheryOutbody's periphery value. It returns the surface area in case of solid bodies and three-dimensional general bodies. It returns the circumference in case of sheet bodies. It is not used in case of wire bodies.
[out]pCentroidOutis the centroid of the body.
[out]inertiaOutis the inertia matrix.
[in]bodyInis the given body.
[in]transformPtrasnform to apply before calculating mass properties
[in]requiredToleranceIntolerance within which the above properties are calculated.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT StatusInt mdlSolid_bodyToElement ( MSElementDescrH  edPP,
BODY_TAG  bodyTag,
bool  wireframe,
int  uIsoParametrics,
int  vIsoParametrics,
unsigned int  useSmartIso,
MSElementP  templateP,
DgnModelRefP  modelRef 
)

Converts a body to a MicroStation element.

A solid body will return a single SmartSolid, a cell element with the name (Smart Solid). A sheet body may return a SmartSheet, a cell element with the name (Smart Surface) or when it can be represented more simply, a shape, complex shape or bspline surface element. The SmartSolid or SmartSheet cell has dgn store components that hold the actual brep data. The brep data is used in modeling operations; the converted graphic elements are used for wireframe display purposes only.

Parameters
[out]edPPis the single (cell) element
[in]bodyTagis the body to be converted
[in]wireframeset true for edge geometry representation (preferred), or false for a surface representation.
[in]uIsoParametricsis the number of u isoparametrics. (-1 for active settings)
[in]vIsoParametricsis the number of v isoparametrics. (-1 for active settings)
[in]useSmartIsoflags controlling smart iso calculation for certain faces, usually SMART_ISO_Auto. (see msbrepcommon.r.h)
[in]templatePis a symbology template for the element descriptor.
[in]modelRefindicates the model containing the body to convert.
Returns
SUCCESS if the operation successful; ERROR otherwise
See also
mdlSolid_bodyToElements
MSPSOLID_EXPORT StatusInt mdlSolid_bodyToElements ( MSElementDescrH  edPP,
BODY_TAG  bodyTag,
bool  wireframe,
int  uIsoParametrics,
int  vIsoParametrics,
unsigned int  useSmartIso,
MSElementP  templateP,
DgnModelRefP  modelRef 
)

Converts a body to MicroStation elements and returns them in an element descriptor chain.

Parameters
[out]edPPis the element descriptor chain.
[in]bodyTagis the body to be converted
[in]wireframeset true for edge geometry representation (preferred), or false for a surface representation.
[in]uIsoParametricsis the number of u isoparametrics. (-1 for active settings)
[in]vIsoParametricsis the number of v isoparametrics. (-1 for active settings)
[in]useSmartIsoflags controlling smart iso calculation for certain faces, usually SMART_ISO_Auto. (see msbrepcommon.r.h)
[in]templatePis a symbology template for the element descriptor.
[in]modelRefindicates the model containing the body to convert.
Returns
SUCCESS if the operation is successful
See also
mdlSolid_bodyToElement
MSPSOLID_EXPORT int mdlSolid_bodyType ( )

Returns the BODY_TYPE constant that can be used as input to

many functions.

Returns
the constant BODY_TYPE.
See also
mdlSolid_bodyType
MSPSOLID_EXPORT int mdlSolid_booleanDisjoint ( TAG_ENTITY_LIST resultBodyListP,
BODY_TAG  targetBody,
TAG_ENTITY_LIST toolBodyListP,
int  op 
)

Accepts as input a set of bodies and booleans them.

Unlike the other boolen functions (ex. mdlSolid_unite), it produces a set of disjoint bodies rather than a single body with multiple lumps (see LUMP_TAG).

Parameters
[out]resultBodyListPoutput list of disjoint bodies
[in]targetBodytarget body to boolean the tool bodies with
[in]toolBodyListPtool bodies to boolean with target body
[in]opboolean operation. This can be one of MODELER_BOOLEAN_unite - Unites tool bodies with target body MODELER_BOOLEAN_intersect - Intersects target and tool bodies MODELER_BOOLEAN_difference - Subtracts tool bodies from target body
Returns
SUCCESS if the operation is successful
MSPSOLID_EXPORT int mdlSolid_boresiteFaceByEdge ( FACE_TAG pFace,
FACE_TAG pFace1,
FACE_TAG pFace2,
int *  pHitStatus,
DPoint3d *  pBorePt,
DPoint3d *  pBoreDir,
BODY_TAG  body,
DgnModelRefP  modelRef 
)

This function tries to get the face at the boresite by first getting the edge near the boresite and then extracting the faces adjacent to the edge that is gotten.

The function takes in as parameters, a bore point, a bore point, a bore direction and a body. Then, it fires a ray onto the body from the bore point along bore direction. Gets all the edges. Then, it gets the faces that at the edge. If it does not encounter any edge during the ray hit, it gets the first face along the ray if any.

Parameters
[out]pFaceface hit by the ray if there is no edge hit
[out]pFace1if an edge is hit by the ray, the first face at the edge
[out]pFace2second face at the edge
[out]pHitStatusreturns whether hit was successful
[in]pBorePtstart of ray
[in]pBoreDirdirection of ray
[in]bodyinput body to fire ray onto
[in]modelRefmodel to which file belongs to
Returns
sucess OUT returns SUCCESS if at least one edge or face is hit
See also
mdlSolid_boresideFaceByEdge
MSPSOLID_EXPORT int mdlSolid_boresiteToEdge ( DPoint3d *  outPointP,
EDGE_TAG outEdgeP,
DPoint3d *  inPointP,
DPoint3d *  inNormalP,
BODY_TAG  body,
bool  backupRayOrigin,
DgnModelRefP  modelRef 
)

Fires a ray from inPointP along inNormalP at the input body and

returns the first edge it hits as well as the intersection point.

The ray is usually defined in such a way that the ray origin is outside the body and its direction is towards the body, i.e., the given boresite point and direction are translated and reversed respectively. The boresite point can be inside the body. In this case if the backupRayOrigin is TRUE, the origin is backed up in a direction opposite to the ray direction until it is outside the body.

Parameters
[out]outPointPis a pointer to the intersection point.
[out]outEdgePreturns a pointer to the edge hit.
[in]inPointPis the ray origin point, or boresite point.
[in]inNormalPis a pointer to the input direction.
[in]bodyis a pointer to the given body.
[in]backupRayOriginif this is TRUE, the origin of the ray is backed up in a direction opposite to the ray direction until it is outside the input body.
[in]modelRefmodel in which the body is present
Returns
SUCCESS if an edge is found; ERROR otherwise
See also
mdlSolid_boresiteToFace
MSPSOLID_EXPORT int mdlSolid_boresiteToFace ( DPoint3d *  outPointP,
DPoint3d *  outNormalP,
FACE_TAG outFaceP,
DPoint3d *  inPointP,
DPoint3d *  inNormalP,
BODY_TAG  body,
bool  backupRayOrigin,
DgnModelRefP  modelRef 
)

Fires a ray from inPointP along inNormalP at the input body and

returns the first face it hits as well as the intersection point and the normal direction of the face at this point.

The ray is usually defined in such a way that the ray origin is outside the body and its direction is towards the body, i.e., the given boresite point and direction are translated and reversed respectively. The boresite point can be inside the body. In this case if the backupRayOrigin is TRUE, the origin is backed up in a direction opposite to the ray direction until it is outside the body.

Parameters
[out]outPointPis the intersection point.
[out]outNormalPis the face normal at the intersection point.
[out]outFacePis the first face that the ray intersects
[in]inPointPis the origin of the ray.
[in]inNormalPis the input ray direction.
[in]bodyis the body to find the face in.
[in]backupRayOrigindetermines whether the ray needs to be backed out of the body.
[in]modelRefmodel in which the body is present (or the smartelement from which body is extracted is present)
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_boresiteToEdge
MSPSOLID_EXPORT int mdlSolid_boresiteToVertex ( DPoint3d *  outPointP,
VERTEX_TAG outVertexP,
DPoint3d *  inPointP,
DPoint3d *  inNormalP,
BODY_TAG  body,
bool  backupRayOrigin,
DgnModelRefP  modelRef 
)

Fires a ray from inPointP along inNormalP at the input body and

returns the first vertex it hits as well as the intersection point.

The ray is usually defined in such a way that the ray origin is outside the body and its direction is towards the body, i.e., the given boresite point and direction are translated and reversed respectively. The boresite point can be inside the body. In this case if the backupRayOrigin is TRUE, the origin is backed up in a direction opposite to the ray direction until it is outside the body.

Parameters
[out]outPointPis the intersection point in solids kernel units
[out]outVertexPis the intersection vertex
[in]inPointPis the boresite point in solids kernel units
[in]inNormalPis the boresite normal
[in]bodyis the body to intersect
[in]backupRayOrigindetermines whether the origin is projected to a point outside the bounding box of the body prior to processing.
[in]modelRefmodel in which the body is present (or the model in which the smart element that the body is extracted from is present)
Returns
SUCCESS if a vertex was found successfully.
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_capSurface ( TAG_ENTITY_LIST faces,
BODY_TAG lamina 
)

Converts a sheet body to a solid by adding faces to fill up

"hollow spaces." Example of an application of this function is when you have sheet body in the shape of cube but with one face missing, then you can use this function to cap the sheet body and convert it into a solid body.

Parameters
[out]facesis the list of faces in the solid body.
[in]laminais the input sheet body to be converted to a solid body.
Returns
SUCCESS if capping is successful; ERROR otherwise
MSPSOLID_EXPORT StatusInt mdlSolid_checkBody ( BODY_TAG  body,
bool  checkGeometry,
bool  checkTopology,
bool  checkSize 
)

Checks the input body for geometric, topological and size validity.

A body must be valid for downstream modeling operations to work as expected. In general, a solids operation is guaranteed to succeed only if the input body passes these checks. A typical application of this function is when a translation is required to create the body in MicroStation. For example, if a body is imported using either IGES or STEP, this function can be used to check whether the imported body is valid for MicroStation's purposes. Usually, MicroStation solids operations on bodies leave the bodies in a valid state.

Parameters
[in]bodyis the body that needs to be checked.
[in]checkGeometryif TRUE, the function will fail in the following cases:
  • If any topological entity in the body does not have a geometry associated with it (applies for faces, edges and vertices).
  • If any geometry attached to any of the topological entities in the body is self-intersecting (applies for faces, edges, vertices, and co-edges).
  • If any geometry attached to any of the topological entities in the body is degenerate (applies for faces, edges, co-edges, and vertices).
  • If any b-spline curve attached is invalid. B-spline curves should not be self-intersecting (except at an end point), should not be G1 discontinuous, and should not have first derivative of zero length.
  • If any b-spline surface attached is invalid. Bspline surfaces should not be self-intersecting, should not meet at a point, should not have zero length first partial derivatives, and should not be G1 discontinuous in either direction.
[in]checkTopologyif TRUE, the function will fail in the following cases:
  • A vertex does not lie on an edge (distance between a point of vertex and curve of edge is not less than the solids kernel tolerance).
  • An edge (curve of edge) does not lie on a face (surface of face) within solids kernel tolerance.
  • Two vertices of the same edge lie within solids kernel tolerance.
  • If an edge is reversed.
  • There is not a vertex at an edge singularity.
  • Two faces in the body intersect other than at their common edge.
  • If loops of a face are inverted.
  • If shells are inside out.
  • If the topology structure is incorrect.
[in]checkSizeif TRUE, the function will fail if any portion of the solid body lies outside the 1000x1000x1000 box. Bodies should lie within this box (in solid modeling kernel units) to be valid. When requiring a large solid working area, change the design file unit settings to get a larger solid modeling area. Note that changing the modeling area will increase the effective tolerance for the solid geometries.
Returns
SUCCESS if operation is successful
See also
mdlSolid_bodyType mdlSolid_bodyData
MSPSOLID_EXPORT int mdlSolid_checkEntity ( ENTITY_TAG  entityIn)

Checks the topology and geometry of a given entity and writes the results to the MicroStation text window.

This function is intended for debugging and diagnostic purposes only.

Parameters
[in]entityInis a pointer to the given entity to check.
Returns
SUCCESS/ERROR depending on whether the check is successful or not
See also
mdlSolid_checkBody
MSPSOLID_EXPORT int mdlSolid_closestPointOnBody ( DPoint3dP  pointOutP,
ENTITY_TAG entityOutP,
double *  distanceP,
BODY_TAG  body,
TransformP  transP,
DPoint3dP  pointP,
DgnModelRefP  modelRef 
)

Computes the closest point on the body and the entity on the body this point lies on.

For example, if the point on the body that is closest to the test point is a vertex, then the entity returned is that vertex. If the closest point lies on a FACE, then the entity returned is the face. Optionally a transformation matrix, transP, can be given. The input point will be inverse- tranformed by this matrix, if given, prior to the operation. Pass NULL for identity transformation.

Parameters
[out]pointOutPis the closest point on the body
[out]entityOutPis the component entity on which pointOutP lies.
[out]distancePis the distance from the test point to the closest point in solid kernel units
[in]bodyis the input body
[in]transPis an optional tranformation matrix applied to the point prior to processing
[in]pointPis the test point
[in]modelRefmodel in which the body is present (or the smartelement from which body is extracted is present)
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_findClosestPointOnBody mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_closestPointToCurve ( DPoint3d *  clstPt,
double *  param,
DPoint3d *  testPt,
EDGE_TAG  edge 
)

Computes the closest point to the input test point on the input edge.

Parameters
[out]clstPtis closest point to test point on edge in solids kernel units
[out]paramis the u parameter of clstPt on the edge
[in]testPtis the test point
[in]edgeis the given edge
Returns
SUCCESS if the operation is successful
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_closestPointToEdge ( DPoint3d *  clstPt,
double *  param,
DPoint3d *  testPt,
EDGE_TAG  edge 
)

Computes the closest point to an edge from a given point.

It also calculates the tangent vector at the closest point.

Parameters
[out]clstPtis the closest point on the edge.
[out]paramis the parameter value at the closest point.
[in]testPtis the input test point.
[in]edgeis the input edge.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_closestPointToSurface usmtmdlSolid_closestPointToFaceC
MSPSOLID_EXPORT int mdlSolid_closestPointToFace ( DPoint3d *  clstPt,
DPoint3d *  normal,
DPoint2d *  param,
DPoint3d *  testPt,
FACE_TAG  face 
)

Computes the closest point on the input face to a input point.

It also calculates the normal to the face at this point and the (u,v) parameters at that point.

Parameters
[out]clstPtis the closest point on face to the given point.
[out]normalis the normal direction at the closest point.
[out]paramis the (u,v) parameter at the closest point.
[in]testPtinput point to test.
[in]faceinput face to test
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_closestPointToEdge mdlSolid_closestPointToSurface
MSPSOLID_EXPORT int mdlSolid_closestPointToSurface ( DPoint3d *  clstPt,
DPoint3d *  normal,
DPoint2d *  param,
DPoint3d *  testPt,
FACE_TAG  face 
)

Computes the closest point to the input test point on the input face.

Parameters
[out]clstPtis the closest point on the face in kernel units
[out]normalis the face normal direction at the closest point
[out]paramis the (u,v) parameters of the closest point on the surface (param- >x, param->y)
[in]testPtis the input test point
[in]faceis the input face
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_coedgeData ( EDGE_TAG edge,
ENTITY_TAG owner,
COEDGE_TAG partner,
COEDGE_TAG next,
COEDGE_TAG prev,
DPoint3d *  start,
DPoint3d *  end,
bool *  reversed,
COEDGE_TAG  coedge 
)

Returns topological and geometry information about the loop.

Parameters
[out]edgethe edge entity that the coedge references. An edge of a body may be referenced by one or more coedges in the body and for all these coedges, this will be the referenced egde.
[out]owneris the owning loop of the body
[out]partneris the partner coedge of the input coedge. In the normal case of a manifols solid, each edge is referenced by at most two coedges, each of which is a partner to the other. In such cases, the proper partner coedge is returned. In the case of open sheet bodies, there will be edge which are referenced by only one coedge. These coedges do not have a partner coedge and the returned value is NULL. In the case of non-manifold bodies, there may be cases where an edge is referenced by more than two coedges and in such cases the partner coedge may be any one of the other coedges that reference the same edge.
[out]nextis the next coedge in the loop. In the case of closed loops, this will return the first coedge in the loop when the input coedge 'coedge' is the last coedge in the loop.
[out]previs the previous coedge in the loop. In the case of closed loops, this will returns the last coedge in the loop when the input coedge 'coedge' is the first coedge in the loop.
[out]startis the starting point of the edge referenced by the coedge
[out]endis the ending point of the edge referenced by the coedge
[out]reversedif reversed is TRUE, then the orientation of the COEDGE is opposite to that of the referenced EDGE. In the normal manifold case, each EDGE is referenced by two coedges, one in the same direction as the edge (reversed = FALSE) and the other in the opposite direction (reversed = TRUE).
[in]coedgeis the input coedge
Returns
SUCCESS if operation is successful
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_coedgesFromEdge ( COEDGE_TAG coedge1P,
COEDGE_TAG coedge2P,
EDGE_TAG  edge 
)

Returns all the coedge(s) that reference the input edge.

In case of open sheet bodies and wire bodies in which there may be edges referenced by only one coedge, the second coedge returned will be set to NULL.

Parameters
[out]coedge1Pis the first coedge referencing the input edge.
[out]coedge2Pis the second coedge refernced by the edge or NULL
[in]edgeis the given edge.
Returns
SUCCESS if operation is successful
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_coedgeType ( )

Returns the COEDGE_TYPE constant that can be used as input to

many functions.

Returns
the constant COEDGE_TYPE
See also
mdlSolid_bodyType
MSPSOLID_EXPORT StatusInt mdlSolid_combineBodies ( BODY_TAG  b1,
BODY_TAG  b2 
)

Combines two possibly disconnected bodies into a single body by moving the lump from one body into the body of the other.

This is a purely topological operation and produces only a change in the data structure. The second body b2 is deleted and should not used henceforth.

Parameters
[in]b1the first body to join
[in]b2the second body to join
Returns
SUCCESS/ERROR depending on whether the operation is sucessful or not
MSPSOLID_EXPORT int mdlSolid_copyBody ( BODY_TAG copy,
BODY_TAG  source 
)

Make a copy of a body.

Parameters
[out]copyis the copy.
[in]sourceis the input body.
Returns
success OUT SUCCESS if operation is successful
See also
mdlSolid_copyEntity
MSPSOLID_EXPORT int mdlSolid_copyEntity ( ENTITY_TAG copy,
ENTITY_TAG  source 
)

Copies an entity and all the entities below it to a newly created

entity.

Memory is allocated to the new entity and the new entity must be separately deleted.

Parameters
[out]copyis the newly created entity
[in]sourceis the entity to be copied
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_coverWires ( TAG_ENTITY_LIST faceList,
BODY_TAG  wires 
)

Covers the input wire body by creating faces out of closed edges

and then fitting the faces with appropriate surfaces.

It first tries to fit a plane to the faces and it it fails, then it tries to fit spline surfaces to the faces. If it still fails, it leaves the face as a rubber face without a surface.

Parameters
[out]faceListis the list of the faces made.
[in]wiresis the given wire body.
Returns
SUCCESS if the covering succeeds; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_createChainFromEdgeList ( MSElementDescrH  outEdPP,
TAG_ENTITY_LIST pEdgeList,
MSElementP  templateP,
DgnModelRefP  modelRef 
)

Converts the set of edges input into an equivalent MicroStation chain of elements.

Parameters
[out]outEdPPis the output chain of MicroStation elements.
[in]pEdgeListis the input list of edges to create elements for
[in]templatePgives the symbology to be used for creating the new element. Pass NULL to use the active symbology settings.
[in]modelRefthe model to create the element in
Returns
SUCCESS if operation is successful
MSPSOLID_EXPORT int mdlSolid_debugEntity ( ENTITY_TAG  entity,
WCharCP  labelP 
)

This function prints diagnostic messages about the entity including its type and data.

Consider the case of a simple cube. A call to this function prints out the that the cubical body consists of one lump, one shell, six faces, twelve edges, and eight vertices. It also prints out the types of surfaces and curves that make up the faces and edges respectively.

Parameters
[in]entityis the entity to be debugged.
[in]labelPis a string label to be printed in diagnostics, or NULL
Returns
SUCCESS if the entity could be successfully debugged.
See also
mdlSolid_debugEntitySize
MSPSOLID_EXPORT void mdlSolid_debugEntitySize ( ENTITY_TAG  entityIn)

This function prints diagnostic messages about the entity's size.

Parameters
[in]entityInis the entity about which the diagnostic messages will be printed.
See also
mdlSolid_debugEntity
MSPSOLID_EXPORT int mdlSolid_deleteEntity ( ENTITY_TAG  e)

Deletes the given entity and frees the memory allocated for it.

The entity should not be used henceforth.

Parameters
[in,out]eis the entity to be deleted.
Returns
SUCCESS if entity is successfully deleted; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_deleteNodeIdAttributes ( BODY_TAG  body)

Removes node Ids and entity Ids from all the faces of a body and edge ids attached to edges of the body.

Parameters
[in]bodyis the given body.
Returns
SUCCESS/ERROR depending on whether operation is successful or not
See also
mdlSolid_addNodeIdAttributes
MSPSOLID_EXPORT int mdlSolid_edgeCurveLength ( double *  length,
double  startParam,
double  endParam,
EDGE_TAG  edge 
)

Computes the length (in solids kernel units) of the edge

between the startParam and endParam parameters.

Parameters
[out]lengthis the length of the curve between the startParam and endParam
[in]startParamis the starting value of the curve parameter
[in]endParamis the ending value of the curve parameter
[in]edgeis the input edge
Returns
SUCCESS if the operation is successful; ERROR otherwise
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_edgeData ( VERTEX_TAG startVertexP,
VERTEX_TAG endVertexP,
DPoint3d *  startPointP,
DPoint3d *  endPointP,
double *  startParamP,
double *  endParamP,
COEDGE_TAG coEdgeP,
CURVE_TAG curveP,
bool *  reversedP,
EDGE_TAG  edge 
)

Returns topological and geometric information about the edge.

Parameters
[out]startVertexPis the starting vertex of the edge.
[out]endVertexPis the ending vertex of the edge.
[out]startPointPis the starting point of the edge.
[out]endPointPis the ending point of the edge.
[out]startParamPis the parameter of the curve underlying the edge which corresponds to the starting vertex of the edge
[out]endParamPis the parameter of the curve underlying the edge which corresponds to the starting vertex of the edge
[out]coEdgePreturns a pointer to one of the coedges lying on the edge. If there is more than one coedge that references the edge, there is no sinificance attached to the coedge that is returned.
[out]curvePreturns the edge's underlying curve.
[out]reversedPif the parametrization of the curve underlying the edge is in a direction opposite to that of the edge, then this value is returned as TRUE; otherwise FALSE.
[in]edgeis the input edge
Returns
SUCCESS if the data extraction is successful; ERROR otherwise
See also
mdlSolid_coedgeData
MSPSOLID_EXPORT int mdlSolid_edgeFaceIntersection ( TAG_ENTITY_LIST **  interEnts,
EDGE_TAG  e,
FACE_TAG  f 
)

Computes the intersections between the given edge and the given face.

Then, it makes up the containment of the intersections and forms the edges or vertices, depending on whether the intersections are isolated or coincident.

Parameters
[out]interEntsintersecting entity list
[in]eis the given edge.
[in]fis the given face.
Returns
SUCCESS/ERROR depending on whether the operation is successful or not
See also
mdlSolid_faceFaceIntersect
MSPSOLID_EXPORT int mdlSolid_edgeFromId ( EDGE_TAG edgeP,
EdgeId *  edgeIdP,
BODY_TAG  body 
)

Finds an edge which has the given edge id.

Parameters
[out]edgePreturns a pointer to the edge.
[in]edgeIdPis a pointer to the given edge id.
[in]bodyis the body in which to search for edge
Returns
SUCCESS/ERROR depending on whether an edge is found or not
MSPSOLID_EXPORT int mdlSolid_edgesFromId ( TAG_ENTITY_LIST edgeListP,
EdgeId *  edgeIdP,
BODY_TAG  body 
)

Returns the entity list of edges in the input body that have the given edge ID.

Parameters
[out]edgeListPis the list of edges matching the edge ID.
[in]edgeIdPis the edge ID to match.
[in]bodybody to search for the edges with the given edge ID.
Returns
SUCCESS if no errors occured.
MSPSOLID_EXPORT int mdlSolid_edgeType ( )

Returns the EDGE_TYPE constant that can be used as input to

many functions.

Returns
the constant EDGE_TYPE
See also
mdlSolid_wireType
MSPSOLID_EXPORT int mdlSolid_elementFromEdge ( MSElementDescrH  edPP,
MSElementP  templateP,
EDGE_TAG  edge,
double *  startParameterP,
double *  endParameterP,
DgnModelRefP  modelRef 
)

Creates an equivalent MicroStation element for the input kernel edge.

It also takes a start and end parameter if a MicroStation element representing a portion of the edge is needed.

Parameters
[out]edPPis the equivalent MicroStation element
[in]templatePtemplate to be used in element creation. If NULL, the default values for symbology are used for the creation of the new element
[in]edgeis the edge element to convert.
[in]startParameterPif NULL, the starting point of the element is the starting vertex of the edge. Otherwise, the starting point is the point on the edge indicated by this parameter.
[in]endParameterPif NULL, the ending point of the element is the ending vertex of the edge. Otherwise, the ending point is the point on the edge indicated by this parameter.
[in]modelRefthe model in which element is to be created
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_bodyToElement
MSPSOLID_EXPORT StatusInt mdlSolid_elementToBody ( BODY_TAG bodyP,
TransformP  bodyTransformP,
MSElementDescrP  edP,
DgnModelRefP  modelRef,
UInt32  nodeId = 1L 
)

This function converts an element to a brep which can be a solid (type 19 elements), a sheet (type 18 elements, shapes, bspline surfaces, ellipses etc.) or a wire (curves, line strings etc).

If the input element is a smart element, the embedded brep is returned. The body needs to be deleted by the calling application after they are manipulated. When the optional body transform is being returned the body is left in the coordinates of the solids kernel, which is important to ensure that it is not transformed or scaled such that falls outside or exceeds the solids working area.

Parameters
[out]bodyPis the body created by the function.
[out]bodyTransformPis the currtrans scaled transform from solid kernel coordinates to MicroStation coordinates.
[in]edPis the MicroStation element.
[in]modelRefindicates the model containing the element.
[in]nodeIdwhen edP is not a smart element, the nodeId is used to assign face ids to the body, normally 1L.
Returns
SUCCESS/ERROR depending on whether operation is successful or not
See also
mdlSolid_bodyToElement mdlSolid_bodyToElements
MSPSOLID_EXPORT StatusInt mdlSolid_elementToBodyList ( TAG_ENTITY_LIST **  bodyListPP,
NON_ENTITY_LIST **  templateListPP,
NON_ENTITY_LIST **  transformListPP,
MSElementDescrH  remainingEdPP,
MSElementDescrP  edP,
DgnModelRefP  modelRef,
bool  getSolids,
bool  getSheets 
)

Converts a given element into a list of BODY_TAG entities.

Parameters
[out]bodyListPPlist of output BODY_TAG entities. The returned bodies need to be deleted using mdlSolid_deleteEntity.
[out]templateListPPis a list of symbology template elements for each body. This should only be freed using mdlElmdscr_freeAll if not equal to edP.
[out]transformListPPis a list of tranforms. The solid currtrans scaled display transform for each returned body. Free using dlmSystem_mdlFree, a NULL entry denotes a unit transform.
[out]remainingEdPPis a list of unconverted elements.
[in]edPis the element to be converted.
[in]modelRefindicates the model containing the element.
[in]getSolidsadd solids.
[in]getSheetsadd sheets.
static void bodyListFunction (MSElementDescrP edP, DgnModelRefP modelRef)
{
TAG_ENTITY_LIST *bodyListP = NULL;
NON_ENTITY_LIST *transListP = NULL;
mdlSolid_beginCurrTrans (); // Establish the solids kernel->UORs transformation
if (SUCCESS == mdlSolid_elementToBodyList (&bodyListP, NULL, &transListP, NULL, edP, modelRef, true, true))
{
BODY_TAG bodyTag = 0L;
for (int i=0; SUCCESS == mdlSolid_listNthEl (&bodyTag, bodyListP, i); i++)
{
TransformP transP = NULL;
mdlSolid_listNthNonEntity (&transP, transListP, i);
// Do something with body...
if (NULL != transP)
}
}
mdlSolid_listDelete (&bodyListP);
}
Returns
SUCCESS if the operation was completed successfully.
Remarks
New applications should use IElementGraphicsProcessor and should not call this method.
See also
mdlSolid_bodyToElement
MSPSOLID_EXPORT void mdlSolid_endCurrTrans ( )

This function pops the transform pushed by mdlSolid_beginCurrTrans.

Each call to this function must match a corresponding call to mdlSolid_beginCurrTrans.

See also
mdlSolid_beginCurrTrans
MSPSOLID_EXPORT int mdlSolid_entityArea ( double *  area,
double *  achTol,
ENTITY_TAG  ent,
double  reqTol 
)

Calculates the surface area of a face, sheet body, or two-dimensional

general body.

Both requested and achieved accuracy are relative accuracy. For example, 0.01 means an accuracy of one percent.

Parameters
[out]areais resultant surface area
[out]achTolis the relative accuracy achieved.
[in]entis the given entity.
[in]reqTolis the requested tolerance.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_entityFromId ( ENTITY_TAG entityP,
FaceId *  entityIdP,
int  isEdge,
BODY_TAG  body 
)

Finds the entity matching the given face Id.

The face ID attribute can be on an edge or a vertex. The isEdge parameter should be set to TRUE if edges need to be queried, and set to FALSE if vertices should be queried. The found entity is returned in entityP.

Parameters
[out]entityPis the entity matching the given face ID.
[in]entityIdPis the faced ID attribute to look for on the body.
[in]isEdgeis TRUE=edge, FALSE=vertex.
[in]bodyis the body containing the face or edge.
Returns
SUCCESS if the operation was completed successfully.
MSPSOLID_EXPORT int mdlSolid_evaluateEdge ( DPoint3d *  pointP,
DPoint3d *  duP,
DPoint3d *  duuP,
DPoint3d *  tangentP,
DPoint3d *  normalP,
DPoint3d *  binormalP,
double  u,
EDGE_TAG  edge 
)

Evaluates an edge at the input parameter and computes the point,

the first derivative, second derivative, tangent vector, main normal vector and binormal vector of an edge at that parameter.

Parameters
[out]pointPis the point on edge corresponding to the input paramter.
[out]duPis the first derivative at the point.
[out]duuPis the second derivative at the point.
[out]tangentPis the tangent vector at the point.
[out]normalPis the main normal vector at the point.
[out]binormalPis the binormal vector at the point.
[in]uis the given parameter value.
[in]edgeis the given edge.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
dlKISolid_evaluateFace
MSPSOLID_EXPORT int mdlSolid_evaluateFace ( DPoint3d *  pointP,
DPoint3d *  normalP,
DPoint3d *  duP,
DPoint3d *  dvP,
DPoint3d *  duuP,
DPoint3d *  duvP,
DPoint3d *  dvvP,
double  u,
double  v,
FACE_TAG  face 
)

Evaluates the face (or the surface underlying the face) at the

input parameter and returns the point, surface normal direction, first partial derivatives, second partial derivatives and mixed partial derivative of the face at the given parameter.

Parameters
[out]pointPis the point on the face evaluated at the given parameter.
[out]normalPis the surface normal direction at the point.
[out]duPis the first partial derivative in u direction.
[out]dvPis the first partial derivative in v direction.
[out]duuPis the second partial derivative in u direction.
[out]duvPis the mixed second partial derivative.
[out]dvvPis the second partial derivative in v direction.
[in]uis the given u parameter value.
[in]vis the given v parameter value.
[in]faceis the face to evaluate.
Returns
SUCCESS if evaluation is successful; ERROR otherwise
See also
mdlSolid_evaluateEdge
MSPSOLID_EXPORT int mdlSolid_extractId ( UInt32 nodeIdP,
UInt32 entityIdP,
ENTITY_TAG  entity 
)

Extracts the node Id and entity Id from a given entity.

Parameters
[out]nodeIdPreturned node id
[out]entityIdPreturned entity Id.
[in]entitythe input entity.
Returns
SUCCESS/ERROR depending on whether the extraction is successful or not
MSPSOLID_EXPORT int mdlSolid_faceData ( LOOP_TAG loop,
FACE_TAG next,
SURFACE_TAG surfaceP,
bool *  reversedP,
bool *  doubleSidedP,
FACE_TAG  f 
)

Returns the first loop in the input face, the next face in the

body, the surface underlying the face and sense information for the face.

Parameters
[out]loopthe first loop data of the face.
[out]nextthe next face in the body or NULL if input face is last face in body
[out]surfacePis the surface underlying the input face
[out]reversedPif TRUE the sense of the face is reversed that is the face normal is opposite in direction of the surface normal at any given point on the face
[out]doubleSidedPhas value TRUE if the face is a double sided face. Double sided faces are typically found in sheet bodies. A face of sheet body is always double sided. A double sided face indicates a infinitely thin wall of the body.
[in]fis the input face
Returns
SUCCESS if operation is successful
See also
mdlSolid_bodyData mdlSolid_loopData mdlSolid_lumpData mdlSolid_shellData
MSPSOLID_EXPORT int mdlSolid_faceFaceIntersect ( BODY_TAG b,
FACE_TAG  f1,
FACE_TAG  f2 
)

Finds the intersect curve between two faces.

The intersection curve is represented by a wire body where each of its edges has two coedges.

Parameters
[out]breturns a pointer to the wire body representing the intersection between the two faces.
[in]f1is the first face.
[in]f2is the second face.
Returns
SUCCESS/ERROR depending on whether the operation is successful or not
See also
mdlSolid_edgeFaceIntersection
MSPSOLID_EXPORT int mdlSolid_faceFromId ( FACE_TAG faceP,
FaceId *  faceIdP,
BODY_TAG  body 
)

Finds a face in the input body that has the given face id.

Parameters
[out]facePreturns a pointer to the face.
[in]faceIdPis a pointer to the given face id.
[in]bodyis the given body.
Returns
SUCCESS/ERROR depending on whether a face is found or not
See also
mdlSolid_edgeFromId
MSPSOLID_EXPORT int mdlSolid_faceFromLoop ( FACE_TAG faceP,
LOOP_TAG  loop 
)

Returns the face that owns the input loop.

Parameters
[out]facePis the face that owns the loop.
[in]loopis the input loop
Returns
SUCCESS if operation is successful, ERROR otherwise
See also
mdlSolid_loopFromCoedge
MSPSOLID_EXPORT int mdlSolid_faceIntersectCurve ( DPoint3dP *  pointPP,
DPoint2d **  faceUVPP,
double **  curveParamPP,
int *  numIntsP,
FACE_TAG  face,
CURVE_TAG  curve,
double  startParam,
double  endParam 
)

Intersects the portion of the given curve between

startParam and endParam with the given face, and returns the absolute points of intersection between the curve and face, the surface parameters at the points of intersection, and the curve parameters at the points of intersection.

Parameters
[out]pointPPis an array of points at which the face and curve intersect
[out]faceUVPPis an array of surface (u,v) parameters at the points of intersection
[out]curveParamPPis an array of curve parameters at the points of intersection
[in]numIntsPis the number of points of intersection between the curve and the face
[in]faceis the input face
[in]curveis the input curve
[in]startParamis the start parameter on the curve
[in]endParamis the end parameter on the curve
Returns
SUCCESS if the operation is successful; ERROR otherwise
See also
mdlSolid_faceFaceIntersect
MSPSOLID_EXPORT int mdlSolid_faceIntersectLine ( DPoint3dP *  pointPP,
DPoint2d **  uvPP,
double **  rayParamPP,
int *  hitsFoundP,
DPoint3d *  originP,
DPoint3d *  dirP,
FACE_TAG  face,
BODY_TAG  body 
)

Fires a ray from the origin, originP, along the direction,

dirP, towards the face, faceP, of the body.

It returns the number of intersections of the ray with the face in hitsFoundP. It also returns the following arrays, each of size *hitsFoundP: pointPP – array of intersection points in solids kernel coordinate system uvPP – array of (u,v) parameters of intersection points on the surface of the face rayParamPP – array of u parameters of intersection points on the ray

Parameters
[out]pointPParray of intersection points
[out]uvPPis the returned array of intersection u,v parameters on the face
[out]rayParamPPis the returned array of intersection parameters on the line
[out]hitsFoundPis number of intersections of the line with the face
[in]originPis the origin of the line
[in]dirPis the direction of the line
[in]faceis face to intersect the line with
[in]bodyis the body
Remarks
The input origin point, originP, must be in the solids kernel's coordinate system.
Returns
SUCCESS if the intersection operation is successful
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT int mdlSolid_facesFromEdge ( FACE_TAG face1P,
FACE_TAG face2P,
EDGE_TAG  edge 
)

Returns the faces that intersect at the input edge.

For a manifold edge from a solid body there should be two faces containing the edge. For edge from a sheet body there may be one or two faces.

Parameters
[out]face1Pis the first face containing the edge
[out]face2Pis the second face containing the edge (may be NULL)
[in]edgeis the edge to find adjoining faces for
Returns
SUCCESS if two faces are found containing the specified edge. Returns ERROR otherwise.
MSPSOLID_EXPORT int mdlSolid_facesFromId ( TAG_ENTITY_LIST faceListP,
FaceId *  faceIdP,
BODY_TAG  body 
)

Returns the entity list of faces matching the input face ID.

Parameters
[out]faceListPis the list of faces matching the given face ID.
[in]faceIdPis the input face ID.
[in]bodybody to search for the faces with the given face ID.
Returns
SUCCESS if no errors occured.
MSPSOLID_EXPORT int mdlSolid_facetBodiesFromEntity ( TAG_ENTITY_LIST pList,
ENTITY_TAG  entity,
TransformP  pTransform,
double  dChordHeight,
double  dNormalAngle,
double  dSideWidth,
int  maxSides 
)

Facets a solid or sheet body and returns a list of sheet bodies each of which represents a facet.

Typical applications of a faceted representation are in rendered displays and exchange of data with faceted brep modelers.

Parameters
[out]pListlist of sheet bodies that the function returns
[in]entitythe entity that is to be faceted
[in]pTransformoptional input transform that the user wants the facets to be transformed by
[in]dChordHeightcontrols the type of facets produced. It specifies the maximum distance between the chord for the facet and the actual curve. The lower the value the greater the number of facets produced.
[in]dNormalAnglemaximum angle between the actual surface normal and its faceted approximation. The lower the value the more the number of facets produced.
[in]dSideWidthmaximum length of a side of a facet
[in]maxSidesmaximum number of sides in a facet
Returns
SUCCESS if the operation is completed successfully
Note
There is no reason to use this very inefficient function over just returning the facet points and normals. This function should be deprecated.
MSPSOLID_EXPORT StatusInt mdlSolid_facetBody ( DPoint3d **  ppPoints,
long *  pNumVertice,
long **  ppFacets,
long *  pNumFacets,
ENTITY_TAG  bodyTag,
TransformP  pTransform,
int  iMaxSides,
double  dChordHeight,
double  dNormalAngle,
double  dSideWidth 
)

This function is used to polygonize (facet) a body.

The faces of a body are polygonized and the output is in the form of sets of points. The planar polygon produced by joining the sets of points gives an approximate faceted representation of the body. This is only an approximate representation of the body. Typical applications of this function are in rendering, conversion to mesh and exchange of data with faceted brep modelers. The output arrays from this function must be explicitly freed by the user by a call to mdlSolid_freeFacetArray function.

Parameters
[out]ppPointsis the array of points that represents the vertices making up the facets. Pass NULL to this value if not interested in this output.
[out]pNumVerticeis the number of vertices in ppPoints. Pass NULL to this value if not interested in this output.
[out]ppFacetsis an array of indices that represents the vertices of each facet.The value of (*ppFacets)[i] is index+1, where index is the entry in the point array ppPoints corresponding to this vertex of the facet. A value of 0 indicates the end of the list of vertices for a facet. For example, the first (iMaxSides+1) entries in ppFacets correspond to the first facet. The MaxSides+1th entry is 0 to indicate the end of the first facet.
[out]pNumFacetsis the number of facets, or null.
[in]bodyTagis the body to polygonize
[in]pTransformis the transformation, in solids kernel units, that will be applied to the body before faceting. This transform may only contain translation and rotation components; reflections, scales, shears and perspective are not allowed. Do not pass in the transform returned by mdlSolid_elementToBody and similar functions, as this transforms the body into MicroStation coordinates, and the faceter may fail. Typically, you should pass NULL.
[in]iMaxSidesis the maximum number of sides on a facet. For example, a value of three produces only triangular facets.
[in]dChordHeightis the maximum distance, in solids kernel units, between a curve on the body and its facet edges, i.e. upper bound on the distance from the chord to the curve it approximates. This is also the maximum distance between a surface and its facet, i.e. the upper bound on the distance from aposition on a facet to the surface it approximates. To get more accurate facets and hence more number of facets, use a lower tolerance and for a looser set of facets, use a higher value for the tolerance.
[in]dNormalAngleis the maximum angle in radians between a surface and its facet, i.e. the upper bound on the angle deviation between surfaces normals at any two positions under the facet.
[in]dSideWidthis is the maximum width of a facet in solids kernel units.
Returns
SUCCESS/ERROR depending on whether operation is successful or not
MSPSOLID_EXPORT StatusInt mdlSolid_facetBodyWithNormals ( DPoint3d **  ppPoints,
long *  pNumVertex,
long **  ppFacetVertex,
DPoint3dP *  ppNormals,
long *  pNumNormal,
long **  ppFacetNormal,
long *  pNumFacets,
ENTITY_TAG  bodyTag,
TransformP  pTransform,
int  iMaxSides,
double  dChordHeight,
double  dNormalAngle,
double  dSideWidth 
)

Polygonize a body allocating memory for the created arrays of vertex points, normals, and facets.

The caller is responsible for freeing the memory occupied by these arrays. To free the arrays the mdlSolid_freeFacetArray function must be used to make memory allocation and freeing consistent.

Remarks
This function is currently not implemented for ACIS bodies.
Parameters
[out]ppPointspoint list or NULL
[out]pNumVertexnumber of vertices or NULL
[out]ppFacetVertexvertext indices around facet
[out]ppNormalsnormal list or NULL
[out]pNumNormalnumber of normals or NULL
[out]ppFacetNormalnormal indices around facet
[out]pNumFacetsnumber of facets or NULL
[in]bodyTagthe body to mesh
[in]pTransformis the transformation, in solids kernel units, that will be applied to the body before faceting. This transform may only contain translation and rotation components; reflections, scales, shears and perspective are not allowed. Do not pass in the transform returned by mdlSolid_elementToBody and similar functions, as this transforms the body into MicroStation coordinates, and the faceter may fail. Typically, you should pass NULL.
[in]iMaxSidesmaximum number of vertices in each facet
[in]dChordHeightchord height tolerance
[in]dNormalAnglenormal tolerance in radians
[in]dSideWidthfacet size tolerance
Returns
SUCCESS if the operation is completed successfully
MSPSOLID_EXPORT StatusInt mdlSolid_faceToElement ( MSElementDescrH  edPP,
FACE_TAG  face,
bool  wireframe,
int  nIsoparametrics,
MSElementP  templateP,
DgnModelRefP  modelRef 
)

Creates an equivalent MicroStation element for the input face.

Parameters
[out]edPPequivalent MicroStation element for the input face
[in]facethe face to create an element for
[in]wireframeif this parameter is TRUE, the elements created are wireframe elements and if it is FALSE, the elements are surface elements. For example, if the input is a rectangular face and wireframe is TRUE, we get an element that consists of four component line elements. If wireframe is FALSE, a single shape is created as the MicroStation element.
[in]nIsoparametricsthe number of isoparametrics or -1 to use default settings
[in]templatePa template element to use. Pass NULL to use active symbology.
[in]modelRefthe model in which element is to be created
Returns
SUCCESS if element is created successfully, ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_facetToIndices ( FacetCallbackFunc  funcId,
ENTITY_TAG  entity,
double  dNmax,
double  dmax,
double  hmax 
)

Facets a body and provides the output to the calling application through a callback function.

Parameters
[in]funcIdpointer to a function of type DlmFacetCallback where DlmFacetCallback is defined as follows:
typedef int (*DlmFacetCallback)
(
DPoint3dP pointP,
DPoint3dP normalP,
DPoint2dP paramP,
int nPoint,
void* userDataP
);
The callback function takes five parameters, the last of which is unused. It is called for each facet output. The fourth argument of the callback function is the number of vertices in the facet. The first argument is the array of points, the second is the array of normals to the surface at these points and the third the parameter positions of the vertices.
[in]entitythe solid entity that needs to be facetted
[in]dNmaxthe maximum angle between the surface normal and the facet normal (a typical value is 15 degrees (pass in 15/180 * fc_pi)
[in]dmaxthe maximum distance between the surface and the planar facet
[in]hmaxthe maximum allowable length of an edge of the facets
Returns
SUCCESS/ERROR depending on whether facetting is successful or not
MSPSOLID_EXPORT int mdlSolid_faceType ( )

Returns the FACE_TYPE constant that can be used as input to

many functions.

Returns
the constant FACE_TYPE
See also
mdlSolid_bodyType
MSPSOLID_EXPORT StatusInt mdlSolid_findClosestPointOnBody ( DPoint3dP  pPointOut,
ENTITY_TAG pEntityOut,
double *  pDistance,
BODY_TAG  bodyTagIn,
TransformP  pTransformIn,
DPoint3dP  pPointIn 
)

Finds the closest point and the closest entity on the body from the input test point (pPointIn).

The input test point should be in solids kernel units. Optionally, a transformation matix (pTransformIn) can be given. If so, the input point will first be inverse_transformed by this matrix. Pass NULL to use identity transformation.

Parameters
[out]pPointOutis the closest point on the body in solids kernel units.
[out]pEntityOutis the closest entity.
[out]pDistanceis the distance from the input point to the output entity in soilds kernel units.
[in]bodyTagInis the input body.
[in]pTransformInis the transformation matrix.
[in]pPointInis the input point.
Returns
SUCCESS if the closest point is successfully found
See also
mdlSolid_closestPointOnBody
MSPSOLID_EXPORT int mdlSolid_fixBlends ( BODY_TAG pBody)

Makes implicit blend attributes on edges and vertices explicit.

A call to this function should be preceded by a call to a function such as mdlSolid_setConstantRounds that will set implicit blend attributes on the edges/vertices of the body. This function will attempt to create the actual blend faces for blend attributes present on edges/vertices of the body.

Parameters
[in,out]pBodybody in which explicit blend faces need to be created
Returns
SUCCESS if it is able to successfully create faces for the blend attributes placed on the vertices and edges of the body
MSPSOLID_EXPORT int mdlSolid_fixBlendsWithSetback ( BODY_TAG pBody,
TAG_ENTITY_LIST vertexListP,
double  setback 
)

Blends the edges of the specified solid applying the given setback value.

Setback values are used in the case of blends on two or more edges that meet at a vertex. The setback value is used to set back the blend faces of the edges from the vertex by the specified distance.

Parameters
[in]pBodythe body whose edges are to be blended
[in]vertexListPthe list of vertices for which the setback needs to be applied
[in]setbackthe setback value to be applied
Returns
SUCCESS if operation is successful.
MSPSOLID_EXPORT int mdlSolid_free ( void *  v)

Frees memory allocated by the solid kernel when the results are

returned as arrays.

For example, if you use the mdlSolid_getEntities function the returned array of intersection points should be freed with a call to this function. However, to free the memory associated with an entity, the mdlSolid_deleteEntity function must be used.

Parameters
[in]vis a pointer to input argument to be freed.
Returns
always returns SUCCESS
See also
mdlSolid_deleteEntity
MSPSOLID_EXPORT void mdlSolid_freeBody ( BODY_TAG  body)

Frees the memory allocated for the body.

Internally, it simply calls mdlSolid_deleteEntity.

Parameters
[in]bodyis the body to be freed.
Returns
always returns SUCCESS
See also
mdlSolid_deleteEntity
MSPSOLID_EXPORT void mdlSolid_freeFacetArray ( void *  pArray)

Frees memory associated with the specified facet array.

Used with arrays produced by mdlSolid_facetBody and mdlSolid_facetBodyWithNormals.

Parameters
[in]pArraythe array pointer to free
MSPSOLID_EXPORT int mdlSolid_getBodyBox ( DPoint3d *  lo,
DPoint3d *  hi,
BODY_TAG  b 
)

Computes the bounding box of a body.

The box is an axis-aligned rectangular parallelepiped. When two bodies are tested for interaction, the boxes can be used first to filter out obvious disjoint cases.

Parameters
[out]lois the corner of the box with the minimum x, y, z coordinates.
[out]hiis the corner of the box with the maximum x, y, z coordinates.
[in]bis the input body.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_bodyMassProperties
MSPSOLID_EXPORT void mdlSolid_getBoresite ( DPoint3d *  borePointP,
DPoint3d *  boreDirectionP,
DPoint3d *  pointP,
int  view,
DgnModelRefP  modelRef 
)

Takes the input point pointP in the view specified by view, and returns the boresite point and boresite direction in solid kernel units.

Parameters
[out]borePointPis the input point
[out]boreDirectionPis boresite direction vector for the given view. The boresite direction is computed taking into account whether view is a camera view.
[in]pointPinput point
[in]viewinput view
[in]modelRefis used to transform the boresite point by the master to reference transform if modelRef does not equal MASTERFILE.
Returns
SUCCESS if operation successful; ERROR otherwise
See also
mdlSolid_boresiteToFace mdlSolid_boresiteToEdge
MSPSOLID_EXPORT void mdlSolid_getBoresiteFromACS ( DPoint3dP  borePointP,
DPoint3dP  boreDirectionP,
DPoint3dCP  pointP,
int  view,
DgnModelRefP  modelRef,
bool  useACS,
bool  frontClipBorePoint 
)

Returns a bore point and bore direction from the input point, view and ACS.

borepoint and boredirection are returned in solids kernel units so these points can be used in functions such as mdlSolid_boresiteToEdge to shoot rays at body entities to get intersection entities.

Parameters
[out]borePointPis the boresite point returned in solids kernel units
[out]boreDirectionPis the boresite direction returned in solids kernel units
[in]pointPis the input point
[in]viewis the input view
[in]modelRefindicates the model containing the ACS.
[in]useACSif TRUE, the ACS z axis will be used, if FALSE the view z axis
[in]frontClipBorePointis the borepoint on the front clipping plane. useACS must be FALSE.
Returns
This function is of type void and has no return value.
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans mdlSolid_getBoresite mdlSolid_boresiteToEdge mdlSolid_boresiteToFace
MSPSOLID_EXPORT void mdlSolid_getCoEdgeList ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns all coedges of a body.

Parameters
[out]listPis list of coedges.
[in]bodyis the given body.
Returns
SUCCESS if operation is successful
See also
mdlSolid_getEdgeList
MSPSOLID_EXPORT void mdlSolid_getEdgeList ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns all edges of the body.

Parameters
[out]listPis the list of edges.
[in]bodyis the given body.
Returns
SUCCESS if operation is successful
See also
mdlSolid_getVertexList
MSPSOLID_EXPORT int mdlSolid_getEdgeListFromFace ( TAG_ENTITY_LIST edgeListP,
FACE_TAG  face 
)

Returns all the edges that make up the loops of the face.

Parameters
[out]edgeListPis the edge list returned
[in]faceis the given face.
Returns
SUCCESS if operation is successful
See also
mdlSolid_faceData
MSPSOLID_EXPORT int mdlSolid_getEdgeType ( EDGE_TAG  edgeTag)

This function returns the type of the given edge entity.

Parameters
[in]edgeTagis the edge entity whose type will be returned.
Returns
An integer constant indication the edge type. Possible values are: INTCURVE_EDGE, STRAIGHT_EDGE, ELLIPSE_EDGE, UNDEFCURVE_EDGE.
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_getEntities ( TAG_ENTITY_LIST hits,
double **  params,
DPoint3dP  origin,
DPoint3dP  dir,
double  radius,
int  type,
BODY_TAG  b,
DgnModelRefP  modelRef 
)

Fires an infinite length ray of radius 'radius' from the input starting point, along the ray direction and returns the entities on the input body that the ray intersects with.

The parameter values on the ray at the points of intersection and the actual points of intersection are returned as the results. Only the entities of type 'type' are returned. The entity types can be determined using the function mdlSolid_faceType, mdlSolid_edgeType and mdlSolid_vertexType functions.

Parameters
[out]hitsis the list of entities found
[out]paramsis the array of intersection parameters
[in]originis the input ray origin.
[in]diris the input ray direction.
[in]radiusis the ray radius.
[in]typeis the type of entity wanted.
[in]bis the input body.
[in]modelRefmodel in which the body is present (or the smartelement from which body is extracted is present)
Returns
SUCCESS if operation is successful
See also
mdlSolid_entityArea
MSPSOLID_EXPORT int mdlSolid_getEntityBox ( DPoint3d *  lo,
DPoint3d *  hi,
ENTITY_TAG  en 
)

Computes the bounding box of an entity.

The box is an axis-aligned rectangular parallelepiped. When two entities are tested for interaction, the boxes can be used first to filter out obvious disjoint cases.

Parameters
[out]lois the corner of the box with the minimum x, y, z coordinates.
[out]hiis the corner of the box with the maximum x, y, z coordinates.
[in]enis the given entity.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_getBodyBox
MSPSOLID_EXPORT void mdlSolid_getFaceList ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns all faces in the body.

Parameters
[out]listPis the entity list of faces.
[in]bodyis the given body.
Returns
SUCCESS if operation is successful.
See also
mdlSolid_getEdgeList
MSPSOLID_EXPORT int mdlSolid_getFaceType ( FACE_TAG  faceTag)

This function returns the type of the given face.

Parameters
[in]faceTagis the face whose type will be returned.
Returns
An integer constant. Possible values are: PLANAR_FACE, CONICAL_FACE, SPHERE_FACE, TORUS_FACE, SPLINE_FACE, OFFSET_FACE, UNKNOWN_FACE.
See also
mdlSolid_faceData
MSPSOLID_EXPORT void mdlSolid_getLocateBoresite ( DPoint3d *  borePointP,
DPoint3d *  boreDirectionP,
double *  radiusP,
DgnModelRefP  modelRef 
)

Returns a bore point and bore direction from the locate point.

Optionally returns the tolerance used for locating. Bore point is in solid kernel units.

Parameters
[out]borePointPis the boresite point (in solids kernel units).
[out]boreDirectionPis the boresite direction.
[out]radiusPis the locate tolerance (in solids kernel units) or NULL.
[in]modelRefindicates the model to get the borepoint from.
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans mdlSolid_getBoresite mdlSolid_boresiteToEdge mdlSolid_boresiteToFace
MSPSOLID_EXPORT void mdlSolid_getLoopList ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns all loops in the body.

Parameters
[out]listPis list of loops in the body.
[in]bodyis the given body.
Returns
SUCCESS if operation is succesful.
See also
mdlSolid_getEdgeList
MSPSOLID_EXPORT void mdlSolid_getNewSharedEdges ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns a list of edges that are newly created and have no node

ids attached.

It works by extracting the faces of the body that share the edge and then determining whether the faces have node and entity ids attached.

Parameters
[out]listPis the entity list returned.
[in]bodyis the input body.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_getEdgeListFromFace
MSPSOLID_EXPORT double mdlSolid_getParasolidScale ( DgnModelRefP  modelRef)

Returns the scale factor to convert from solid modeling kernel

units to Units of Resolution(UORs).

Unlike V7, this value is not fixed and depends on the model. This is also the scale of the transformation matrix pushed on the stack when mdlSolid_beginCurrTrans is called.

Parameters
[in]modelRefthe model whose solid modeling scale is required
Returns
The conversion factor used to convert from the solids modeling kernel's units to Units of Resolution, as a double.
See also
mdlSolid_beginCurrTrans mdlSolid_endCurrTrans
MSPSOLID_EXPORT void mdlSolid_getSmoothEdgeList ( TAG_ENTITY_LIST listP,
FACE_TAG  edge,
SmoothEdgeType  smoothEdges 
)

This function adds an edge to a list of edges.

It will also add only smoothly connectd edges to the list if addSmoothEdges is TRUE.

Remarks
Two edges are considered smooth if they meet at a vertex and are tangent continuous at the vertex. This function recursively returns edges which are smoothly connected to edgeP and to other smoothly connected edges.
Parameters
[out]listPis the list of edges
[in]edgeis the input edge to add to the list, and to find the smooth edge sequence for
[in]smoothEdgesif TRUE, determines that only smoothly connected edges are added to the list
See also
mdlSolid_getSmoothFaceList
MSPSOLID_EXPORT void mdlSolid_getSmoothFaceList ( TAG_ENTITY_LIST listP,
FACE_TAG  face,
bool  addSmoothFaces,
int  allowedFaceTypeMask 
)

This function adds a face to the list of faces, and also adds a face

smoothly connected to the faces in the list.

If addSmoothFaces is TRUE, only smoothly connected (i.e. tangent continuous) faces are added to the list. allowedFaceTypeMask is used to identify the types of faces that need to be added to the list. allowed facetypeMask need to be computed by performing a bitwise shift operation of 1 by the surface type and then doing a bit wise or operation for the different surface types. For example if planar faces alone are needed then allowedFaceTypeMask = (1 << PLANAR_FACE) If conical and spherical faces are needed then allowedFaceTypeMask = (1 << CONE_FACE) | (1 << SPHERE_FACE)

Parameters
[in,out]listPis the list to which the face will be added.
[in]faceis the face to be added to the list.
[in]addSmoothFacesdetermines whether only smooth faces will be added. If TRUE, only a face that is tangent continuous will be added.
[in]allowedFaceTypeMaskdetermines whether only a face of the same type as faceP will be added to the list.
See also
mdlSolid_faceType mdlSolid_getFaceType
MSPSOLID_EXPORT StatusInt mdlSolid_getSurfaceElements ( MSElementDescrH  outEdPP,
MSElementDescrP  inEdP,
DgnModelRefP  modelRef 
)

Creates an equivalent surface element for the input element.

A smart element is a cell that consists of two portions. The brep portion that is used for the manipulation and element portion that is used for display. There are two ways in which the display portion is represented, as surfaces or as curves. A cube for instance can be represented as six trimmed lines or six shapes. This function converts a smart element to a set of surfaces. If the input is a simple element and not a smart element it is first converted to a brep and then to surfaces.

Parameters
[out]outEdPPoutput surface elements
[in]inEdPinput element (wireframe, surface or smart element)
[in]modelRefthe model containing the input element
Returns
SUCCESS if the operation is successful
MSPSOLID_EXPORT void mdlSolid_getVertexList ( TAG_ENTITY_LIST listP,
BODY_TAG  body 
)

Returns all vertices of a body.

Parameters
[out]listPis list of vertices in the body.
[in]bodyis the given body.
Returns
SUCCESS if operation is successful
See also
mdlSolid_getEdgeList
MSPSOLID_EXPORT int mdlSolid_getVertexListFromFace ( TAG_ENTITY_LIST vertexListP,
FACE_TAG  face 
)

Returns all the vertices that belong to a face.

Parameters
[out]vertexListPis the list of face belonging to the face.
[in]faceis the face to extract vertices from.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_hollowBody ( BODY_TAG  body,
TAG_ENTITY_LIST oldFaceListP,
TAG_ENTITY_LIST newFaceListP,
double  offset,
TAG_ENTITY_LIST noOffsetFaceListP,
TAG_ENTITY_LIST offsetFaceListP,
double *  offsetValuesP 
)

Offsets faces of the input body by the offset distance provided to created a thin shell body.

Optionally, faces of the body can also be completely removed.

Parameters
[in,out]bodyinput/output body to be shelled
[out]oldFaceListPold faces that were offset
[out]newFaceListPnew faces corresponding to ones in oldFaceListP that are obtained after offsetting the faces in oldFaceListP
[in]offsetdefault offset value or shell thickness
[in]noOffsetFaceListPlist of faces that need to be deleted
[in]offsetFaceListPlist of faces that need to be offset by distances other than the default distance
[in]offsetValuesPlist of offset values corresponding to faces in the offsetFaceListP
Returns
returns SUCCESS if the operation is successful.
MSPSOLID_EXPORT int mdlSolid_idFromEdge ( EdgeId *  edgeIdP,
EDGE_TAG  edge,
bool  useHighest 
)

Get the edge id of an edge.

The edge id consists of face ids of its adjacent faces. When a face is split into two or more faces, sub-ids are assigned to each new face. So a face may have a list of id attributes attached. Set useHighest to TRUE to get the highest face ids for the adjacent faces of the edge. Otherwise, the lowest ids are returned. The highest will be the most recently generated.

Parameters
[out]edgeIdPis a pointer to the edge id returned.
[in]edgeis the given edge.
[in]useHighestis TRUE if the highest id is requested.
Returns
SUCCESS/ERROR depending on whether operation is successfully completed or not
See also
mdlSolid_idFromFace mdlSolid_idFromVertex
MSPSOLID_EXPORT int mdlSolid_idFromEntity ( FaceId *  faceIdP,
ENTITY_TAG  ent,
bool  useHighestId 
)

Get the faceID (node-ID, entity-ID) pair of the input entity.

If useHighestId is tru, the faceID with the highest node-ID is returned. If the node-IDs of all the faceIDs on the entity are the same, then the faceID with the highest entity-ID is returned.

Parameters
[out]faceIdPis the returned faceID pair.
[in]entis the entity for which the faceID is returned.
[in]useHighestIddetermines whether the highest entity ID is returned.
Returns
SUCCESS/ERROR depending on whether operation is successfully completed or not
See also
mdlSolid_extractId mdlSolid_idFromFace mdlSolid_idFromEdge mdlSolid_idFromVertex
MSPSOLID_EXPORT int mdlSolid_idFromFace ( FaceId *  faceIdP,
FACE_TAG  face,
bool  useHighest 
)

Get the face id of a face.

When a face is split into two or more faces, sub-ids are assigned to each new face. Thus, a face may have a list of id attributes attached. Set useHighest to TRUE to get the highest face ids. Otherwise, the lowest ids are retuned. The highest will be the most recently generated.

Parameters
[out]faceIdPis a pointer to the face id returned.
[in]faceis the given face.
[in]useHighestis TRUE if the highest face id is requested.
Returns
SUCCESS/ERROR depending on whether operation is successfully completed or not
See also
mdlSolid_idFromEdge mdlSolid_idFromVertex
MSPSOLID_EXPORT int mdlSolid_idFromVertex ( VertexId *  vertexIdP,
VERTEX_TAG  vertex,
bool  useHighest 
)

Get the vertex id of a vertex.

The vertex id consists of face ids of its surrounding faces. When a face is split into two or more faces, sub-ids are assigned to each new face. So a face may have a list of id attributes attached. Set useHighest to TRUE to get the highest face ids for all the surrounding faces of the vertex. Otherwise, the lowest ids are returned. The highest will be the most recently generated. The partNodeIdP points to the id of the part to which the given vertex belongs.

Parameters
[out]vertexIdPis a pointer to the vertex id returned.
[in]vertexis the given vertex to get id from.
[in]useHighestis TRUE if the highest id is requested.
Returns
SUCCESS/ERROR depending on whether operation is successfully completed or not
See also
mdlSolid_idFromFace mdlSolid_idFromVertex
MSPSOLID_EXPORT StatusInt mdlSolid_imprintBodies ( TAG_ENTITY_LIST pTargetEdges,
TAG_ENTITY_LIST pToolEdges,
BODY_TAG  target,
BODY_TAG  tool,
double  tolerance,
bool  imprintTool 
)

Intersects the two input bodies and imprints their intersection

on one, or both, by adding new edges and faces.

Parameters
[out]pTargetEdgesis a list of the new edges imprinted on the target body, or NULL if no edges are imprinted.
[out]pToolEdgesis a list of the new edges imprinted on the tool body, or NULL if no edges are imprinted.
[in,out]targetis the target body
[in,out]toolis the tool body
[in]toleranceis the tolerance value for imprinting.
[in]imprintToolis a boolean that determines whether the tool body is imprinted with new faces and edges. Set this value to FALSE to prevent the tool body from being imprinted.
Returns
SUCCESS if the operation is successful
See also
mdlSolid_intersect
MSPSOLID_EXPORT StatusInt mdlSolid_imprintCurveNormal ( TAG_ENTITY_LIST pImprintList,
BODY_TAG  body,
TAG_ENTITY_LIST pEdgeList,
double  tolerance 
)

This function takes as input a body and a list of edges and tries to imprint the edges on to the body.

The imprinted edges (new edges on the body) are returned in the output imprintList. The curves (of the supplied edges) are projected down the face normals of the body for the purposes of imprinting. The 'tolerance' parameter is used to resolve resolution problems and also for calculating any parametric space curves needed.

Parameters
[out]pImprintListoutput imprinted edges on the body (can be NULL)
[in]bodyinput body on which curves are to be imprinted
[in]pEdgeListinput list of curves to imprint
[in]tolerancetolerance to be used for resolving resolution problems and for computation of parametric space curve approximations. The recommended value is 1E-5.
Returns
success OUT SUCCESS if operation is successful; ERROR otherwise.
See also
mdlSolid_imprintCurveNormal
MSPSOLID_EXPORT StatusInt mdlSolid_imprintCurveVector ( TAG_ENTITY_LIST pImprintList,
BODY_TAG  body,
TAG_ENTITY_LIST pEdgeList,
DPoint3d *  pVector,
double  tolerance 
)

This function is similar to the mdlSolid_imprintCurveNormal except that instead of projecting curves along face normals, it takes an explicit vector along which the curves are projected.

Parameters
[out]pImprintListoutput imprinted edges on the body (can be NULL)
[in]bodyinput body on which curves are to be imprinted
[in]pEdgeListinput list of curves to imprint
[in]pVectorvector to project curve along
[in]tolerancetolerance to be used for resolving resolution problems and for computation of parametric space curve approximations. The recommended value is 1E-05.
Returns
success SUCCESS if operation is successful and ERROR otherwise
See also
mdlSolid_imprintCurveVector
MSPSOLID_EXPORT int mdlSolid_intersect ( BODY_TAG  b2,
BODY_TAG  b1 
)

Intersects the two input bodies and leaves the result in b2.

b1 is deleted and should not be used henceforth. If the two bodies do not intersect, b2 is returned unchanged and b1 is deleted.

Parameters
[in,out]b2second body
[in]b1first body
Returns
SUCCESS/ERROR depending on whether intersection is successful or not
See also
mdlSolid_faceFaceIntersect usmrhmdlSolid_edgeFaceIntersectionC
MSPSOLID_EXPORT bool mdlSolid_isAnalyticBody ( BODY_TAG  bodyTag)

Determines whether the surfaces underlying the faces

in a body are analytic (non b-spline) surfaces.

Parameters
[in]bodyTagis the input body to be tested.
Returns
TRUE if all surfaces are analytic, FALSE otherwise.
See also
mdlSolid_isGeneralBody
MSPSOLID_EXPORT bool mdlSolid_isBody ( ENTITY_TAG  entityTag)

Checks whether input entity is a body or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if entity is body; FALSE otherwise
See also
mdlSolid_isLump mdlSolid_isShell
MSPSOLID_EXPORT bool mdlSolid_isCoEdge ( ENTITY_TAG  entityTag)

Checks if input entity is COEDGE or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if entity is COEDGE; FALSE otherwise
See also
mdlSolid_isEdge
MSPSOLID_EXPORT bool mdlSolid_isEdge ( ENTITY_TAG  entityTag)

Checks if input entity is EDGE or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if input entity is EDGE; FALSE otherwise
See also
mdlSolid_isCoEdge
MSPSOLID_EXPORT bool mdlSolid_isFace ( ENTITY_TAG  entityTag)

Checks if entity is FACE or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE is entity is face; FALSE otherwise
See also
mdlSolid_isBody
MSPSOLID_EXPORT bool mdlSolid_isGeneralBody ( BODY_TAG  bodyTag)

This function determines whether the input body is a general

(non-manifold) body.

A non-manifold body is one that can never be created in the real world. An example of a non-manifold body is one in which more than two faces intersect along an edge. A mixed-dimension body is also a general body.

Parameters
[in]bodyTagis the input body to be tested.
Returns
TRUE if the body is a general body, FALSE otherwise.
MSPSOLID_EXPORT bool mdlSolid_isLoop ( ENTITY_TAG  entityTag)

Checks if input entity is loop or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if entity is loop; FALSE otherwise
See also
mdlSolid_isBody
MSPSOLID_EXPORT bool mdlSolid_isLump ( ENTITY_TAG  entityTag)

Checks if the input entity is a lump or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if entity is LUMP; error otherwise
See also
mdlSolid_isBody
MSPSOLID_EXPORT bool mdlSolid_isMinimalBody ( BODY_TAG  bodyTag)

Tests whether the given body is the simplest type of manifold

body, a minimum (or minimal) body, sometimes called an "acorn".

A minimal body does not even have a length.

Parameters
[in]bodyTagis the body to be tested
Returns
TRUE if the given body is of type minimal.
MSPSOLID_EXPORT bool mdlSolid_isModelerElement ( MSElementDescrP  edP)

Tests whether the element is a modeler element (has a node

linkage attached to it)

Parameters
[in]edPis the element to be tested.
Returns
TRUE if the element has a Node linkage attached to it.
See also
mdlSolid_isSmartSolidElement mdlSolid_isSolidElement
MSPSOLID_EXPORT bool mdlSolid_isSheetBody ( BODY_TAG  bodyTag)

Determines whether the input body is a sheet body.

A sheet body is a topologically two dimensional body which does not have a volume but only an area. The walls of a sheet body are infinitely thin.

Parameters
[in]bodyTagis the input body.
Returns
TRUE if the input is a sheet body, FALSE otherwise.
See also
mdlSolid_isWireBody mdlSolid_isSolidBody
MSPSOLID_EXPORT bool mdlSolid_isSheetElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is an element

that can be represented as a sheet body.

For the purpose of this test, a sheet element is one of the following:

  • returns TRUE to mdlElmdscr_isClosed(edP)
  • BSPLINE_CURVE_ELM (not closed)
  • returns TRUE to mdlElmdscr_isGroupedHole(edP)
  • SURFACE_ELM
  • CONE_ELM (surface element)
  • smartsheet element (see mdlSolid_isSmartSheetElement)
Parameters
[in]edPis the element to be tested
[in]modelRefis the model containing the element
Returns
TRUE if the element is a sheet element
See also
mdlSolid_isSmartSheetElement
MSPSOLID_EXPORT bool mdlSolid_isSheetOrSolidElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is a sheet or solid element.

Parameters
[in]edPis the element to be tested.
[in]modelRefis the model containing the element.
Returns
TRUE if the element is a sheet or solid element.
See also
mdlSolid_isSheetElement mdlSolid_isSolidElement
MSPSOLID_EXPORT bool mdlSolid_isShell ( ENTITY_TAG  entityTag)

Checks if entity is SHELL or not.

Parameters
[in]entityTagis a pointer to the entity to check.
Returns
TRUE if entity is shell; FALSE otherwise
See also
mdlSolid_isBody
MSPSOLID_EXPORT bool mdlSolid_isSmartElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is a smartsolid

or smartsheet.

Parameters
[in]edPis the element to test.
[in]modelRefis the model containing the element.
Returns
TRUE if the element is either a smartsolid or a smartsheet.
See also
mdlSolid_isSmartSolidElement mdlSolid_isSmartSheetElement
MSPSOLID_EXPORT bool mdlSolid_isSmartSheetElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is a smartsheet

element.

A smartsheet element is one which has an embedded brep linkage attached to it from which a sheet body can be obtained.

Parameters
[in]edPis the element to be tested.
[in]modelRefis the model that contains the element to test.
Returns
TRUE if the element is a smartsheet.
See also
mdlSolid_isSmartSolidElement mdlSolid_isSmartElement
MSPSOLID_EXPORT bool mdlSolid_isSmartSolidElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is a smartsolid element.

A smartsolid element is one which has an embedded brep linkage attached to it and where the underlying brep represents a kernel solid.

Parameters
[in]edPis the element to be tested.
[in]modelRefis the model that the element is in.
Returns
TRUE if the element is a smartsolid
See also
mdlSolid_isSmartSheetElement mdlSolid_isSmartElement
MSPSOLID_EXPORT bool mdlSolid_isSmoothEdge ( EDGE_TAG  edge)

Checks whether the two adjacent faces of the given edge are

connected with tangent continuity.

For example, when a constant round is added to an edge of a solid cube, a new face between the two faces that shared the edge is created. The two straight edges that bound the new blend face are smooth edges since the adjacent faces of the edge meet at tangential continuity.

Parameters
[in]edgeis the edge to test.
Returns
returns TRUE if edge is smooth; FALSE otherwise
See also
mdlSolid_isEdge
MSPSOLID_EXPORT bool mdlSolid_isSolidBody ( BODY_TAG  bodyTag)

Determines whether the input body is a solid body.

A solid body is a topologically three dimensional body that has a finite non-zero volume.

Parameters
[in]bodyTagis the input body to be tested.
Returns
TRUE if the input body is a solid body, FALSE otherwise.
See also
mdlSolid_isWireBody mdlSolid_isSheetBody
MSPSOLID_EXPORT bool mdlSolid_isSolidElement ( MSElementDescrP  edP,
DgnModelRefP  modelRef 
)

Determines whether the input element is a solid element.

For the purpose of this test, a solid is one of the following:

  • SOLID_ELM
  • CONE_ELM (a solid only, not a surface)
  • will return TRUE to mdlElmdscr_isSphere(NULL, NULL, NULL, edP)
  • BSPLINE_SURFACE_ELM (closed only)
  • a smartsolid element (see mdlSolid_isSmartSolidElement)
Parameters
[in]edPis the element to test.
[in]modelRefis the model containing the element.
Returns
TRUE if the element is a solid.
See also
mdlSolid_isSmartElement
MSPSOLID_EXPORT bool mdlSolid_isVertex ( ENTITY_TAG  entityTag)

Tests whether input entity is vertex or not.

Parameters
[in]entityTagis the entity to test.
Returns
TRUE if the entity is a vertex; FALSE otherwise
See also
mdlSolid_vertexType
MSPSOLID_EXPORT bool mdlSolid_isWireBody ( BODY_TAG  bodyTag)

This function determines whether the input body is a wire body.

A wire body is a topologically unidimensional body which neither has an area nor a volume but just a finite non-zero length. An example of a wire body is a body formed from a trimmed line.

Parameters
[in]bodyTagis the input body to be tested.
Returns
TRUE if the input body is a wire body, FALSE otherwise.
See also
mdlSolid_isSheetBody mdlSolid_isSolidBody
MSPSOLID_EXPORT int mdlSolid_listAdd ( TAG_ENTITY_LIST lP,
ENTITY_TAG  ent 
)

Appends an entity to the end of the entity list.

Parameters
[in]lPis a pointer to the entity list.
[in]entis the entity to add to the list.
Returns
SUCCESS if the entry was added.
See also
mdlSolid_listCreate mdlSolid_listCount
MSPSOLID_EXPORT int mdlSolid_listAddList ( TAG_ENTITY_LIST lDP,
TAG_ENTITY_LIST lSP 
)

Adds the contents of list lSP to an existing list lDP.

Parameters
[in,out]lDPis a list of entities to which the input list is added.
[in]lSPis a list of entities which are added to an existing list.
Returns
SUCCESS if operation is successful and ERROR otherwise
See also
mdlSolid_listCreate mdlSolid_listEmpty
MSPSOLID_EXPORT int mdlSolid_listCount ( int *  count,
TAG_ENTITY_LIST lP 
)

Returns the number of entries in an entity list.

Parameters
[out]countentry count
[in]lPinput entity list
Returns
SUCCESS if the list was valid.
See also
mdlSolid_listAdd mdlSolid_listDelete
MSPSOLID_EXPORT int mdlSolid_listCreate ( TAG_ENTITY_LIST **  lP)

Creates an empty entity list.

The user needs to free the memory allocated for the entity list by calling mdlSolid_listDelete.

Parameters
[in,out]lPentity list
Returns
SUCCESS if the list was created.
See also
mdlSolid_listDelete
MSPSOLID_EXPORT int mdlSolid_listDelete ( TAG_ENTITY_LIST **  lP)

Frees the memory allocated for the entity list.

Does not free the memory associated with the list entries. entities.

Parameters
[in,out]lPentity list
Returns
SUCCESS if the list was valid.
See also
mdlSolid_listCreate
MSPSOLID_EXPORT int mdlSolid_listEmpty ( TAG_ENTITY_LIST lP)

Removes all entries from an entity list.

The entities that were referenced by the entity list are not deleted.

Parameters
[in]lPis the list of entities to be emptied.
Returns
SUCCESS if the operation completes successfully.
See also
mdlSolid_listRemove
MSPSOLID_EXPORT int mdlSolid_listLookup ( int *  nth,
TAG_ENTITY_LIST lP,
ENTITY_TAG  ent 
)

Searches for a given entity and returns its zero based index in the list.

If entity is not in the list, an index of -1 is returned for nth.

Parameters
[out]nthindex of the entity
[in]lPinput entity list.
[in]ententity to look up
Returns
SUCCESS if entity is found and ERROR otherwise
See also
mdlSolid_listNthEl
MSPSOLID_EXPORT int mdlSolid_listNthEl ( ENTITY_TAG entP,
TAG_ENTITY_LIST lP,
int  nth 
)

Returns the entity at a given index in an entity list.

Parameters
[out]entPentity returned
[in]lPinput entity list
[in]nthinput zero based index. A value of 0 fetches the first entity in list and a value of count-1 returns the last entity in the list
Returns
SUCCESS if list is valid and index is between 0 and count-1.
See also
mdlSolid_listLookup
Remarks
Required Library: mpsolid.lib
MSPSOLID_EXPORT int mdlSolid_listRemove ( TAG_ENTITY_LIST lP,
ENTITY_TAG  ent 
)

Removes an entity from an entity list.

The entity is not deleted.

Parameters
[in,out]lPis the entity list from which the input entity will be removed.
[in]entis the entity to be removed from the given list.
Returns
SUCCESS if the operation is successful.
See also
mdlSolid_listLookup mdlSolid_listNthEl
MSPSOLID_EXPORT StatusInt mdlSolid_listRemoveByIndex ( TAG_ENTITY_LIST listP,
int  index 
)

Removes the entry at a supplied index from an entity list.

The entity at the specificed index is not deleted.

Parameters
[in,out]listPis the entity list to modify
[in]indexis the index of the entry to remove.
Returns
SUCCESS if the operation is successful.
Note
Changes the indices of all entities following removed index.
See also
mdlSolid_listRemove mdlSolid_listEmpty
MSPSOLID_EXPORT bool mdlSolid_locateBodyList ( FACE_TAG faceP,
EDGE_TAG edgeP,
DPoint3dP  outPointP,
int *  bodyIndexP,
TAG_ENTITY_LIST bodyListP,
NON_ENTITY_LIST transformListP,
DPoint3dP  inPointP,
double  locateTolerance,
int  view,
DgnModelRefP  modelRef 
)

Given a datapoint and a view, this function can be used to get the closest face and edge among a list of bodies.

Based on the view, the model and the data point, it caclulates a bore point and a bore direction. It uses this information to create a ray, which is fired onto the bodies. The closest face and edge along this ray are returned to the user.

Parameters
[out]facePthe closest face
[out]edgePthe closest edge
[out]outPointPThis returns the point at which the edge intersects the ray if at least one edge is found. If not, it intersects the point at which the ray hits the returned face if at least one face is hit
[in]bodyIndexPthis returns the index into the input body list to which the edge belongs or in case there is no edge returned, the body to which the face belongs to
[in]bodyListPinput list of bodies to find the closest face and edge from
[in]transformListPTransforms for the bodies that are input
[in]inPointPinput datapoint
[in]locateTolerancea locate tolerance value
[in]viewthe index of the view displaying the body
[in]modelRefthe model that contains the body
Returns
SUCCESS if the operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_loopData ( FACE_TAG face,
COEDGE_TAG coedge,
LOOP_TAG next,
LOOP_TAG  l 
)

Returns the face containing the loop, the first coedge in the loop, and

the next loop in the face.

Parameters
[out]faceis the containing face that owns the loop.
[out]coedgethe first coedge in the loop.
[out]nextthe next loop in the face or NULL if input loop is last loop in face.
[in]lis the input loop
Returns
SUCCESS if operation is successful
See also
mdlSolid_bodyData mdlSolid_loopType
MSPSOLID_EXPORT int mdlSolid_loopExternal ( int *  isExternal,
LOOP_TAG  l 
)

Determines if a loop is an internal or external loop of a face.

External loops of a face go around the face in the anticlockwise direction.

Parameters
[out]isExternalhas value TRUE if the loopP is external.
[in]lis a pointer to the loop to test.
Returns
SUCCESS if operation is successful
See also
mdlSolid_lumpData mdlSolid_loopType
MSPSOLID_EXPORT int mdlSolid_loopFromCoedge ( LOOP_TAG loopP,
COEDGE_TAG  coedge 
)

Returns the loop that owns the coedge.

Parameters
[out]loopPis the loop returned.
[in]coedgeis the given coedge.
Returns
SUCCESS if operation is successful
See also
mdlSolid_coedgesFromEdge mdlSolid_coedgeType
MSPSOLID_EXPORT int mdlSolid_loopType ( )

Returns the LOOP_TYPE constant that can be used as input to

many functions.

Returns
the constant LOOP_TYPE
See also
mdlSolid_bodyType mdlSolid_loopData
MSPSOLID_EXPORT int mdlSolid_lowestUniqueIdFromEdge ( EdgeId *  edgeIdP,
EDGE_TAG  edge 
)

Returns the lowest edge ID on the edge.

The edge ID is unique within a body.

Parameters
[out]edgeIdPis the edge ID
[in]edgeis the edge
Returns
SUCCESS/ERROR depending on whether an edge ID is extracted successfully or not
MSPSOLID_EXPORT int mdlSolid_lumpData ( SHELL_TAG shell,
LUMP_TAG next,
LUMP_TAG  l 
)

Returns the first shell data and the next lump pointed to by

the given lump.

Parameters
[out]shellis the first shell of the lump.
[out]nextis the next lump in the body or NULL, if input is the last lump.
[in]lis the input lump.
Returns
SUCCESS if the operation is successful; ERROR otherwise
See also
mdlSolid_lumpType
MSPSOLID_EXPORT int mdlSolid_lumpType ( )

Returns the LUMP_TYPE constant that can be used as input to

many functions.

Returns
the constant LUMP_TYPE
See also
mdlSolid_lumpData
MSPSOLID_EXPORT int mdlSolid_makeCone ( BODY_TAG coneP,
double  height,
double  base,
double  top 
)

Creates a solid conical body with the input parameters.

The point on the cone's axis halfway from the bottom to the top is 0,0,0.

Parameters
[out]conePis a cylinder
[in]heightis the height (in kernel units) of the cylinder
[in]baseis the base radius (in kernel units)
[in]topis the top radius (in kernel units)
Returns
SUCCESS if cone is created successfully.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_makeCuboid ( BODY_TAG cuboidP,
double  dx,
double  dy,
double  dz 
)

Creates a solid cuboidal (rectangular box) body centered at 0,0,0 and aligned with x, y, z axes.

The length, width, and height must all be greater than zero.

Parameters
[out]cuboidPoutput cuboid body created.
[in]dxis the length (in kernel units) in the x-axis direction.
[in]dyis the width (in kernel units) in the y-axis direction.
[in]dzis the height (in kernel units) in the z-axis direction.
Returns
SUCCESS if cuboid is created successfully.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT StatusInt mdlSolid_makeLineCurve ( CURVE_TAG pCurveTagOut,
DPoint3dP  pStartPointIn,
DPoint3dP  pEndPointIn 
)

Creates a finite kernel line entity given the start and end points of the line.

Parameters
[out]pCurveTagOutoutput CURVE_TAG
[in]pStartPointInis the start point (in kernel units) of the line
[in]pEndPointInis the endpoint (in kernel units) of the line
Returns
SUCCESS if the operation is successful.
MSPSOLID_EXPORT int mdlSolid_makePlane ( BODY_TAG bodyP,
DPoint3dP  pointP,
DPoint3dP  normalP,
DPoint3dP  refDirP,
double *  intervalP 
)

Creates a finite planar rectangular sheet body.

The parametrization for the plane depends on the input parameters which include a point on the plane, normal to the plane and a reference direction. The interval input defines the boundary of the sheet.

Parameters
[out]bodyPis the planar sheet body.
[in]pointPis the origin of the plane (in kernel units); if NULL, 0,0,0 is used.
[in]normalPis the z-axis of the plane; if NULL, 0,0,1 is used.
[in]refDirPis the x-axis of plane; if NULL 1,0,0 is used.
[in]intervalPis the u,v range box (array of 4 doubles: umin, vmin, umax, vmax) of the plane; if NULL, 0,0 to 1,1 is used.
Returns
SUCCESS if the operation is successful.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_makePrism ( BODY_TAG prismP,
double  height,
double  radius,
int  nSides 
)

Creates a solid circular prism of the given height, radius, and number of sides.

The center of the prism is at 0,0,0. The first face is perpendicular to the positive x-axis. The radius defines the circle circumscribing the prism cross-section. The number of the sides should be greater than two.

Parameters
[out]prismPoutput circular prism body
[in]heightis the height (in kernel units) of the prism.
[in]radiusis the radius (in kernel units) of the circle circumscribing the prism cross-section.
[in]nSidesis the number of the sides of the prism.
Returns
SUCCESS if prism is created successfully.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_makeSheetBody ( BODY_TAG bodyP,
SURFACE_TAG  surfTag,
double *  intervalP 
)

Given a surface and parameter boundaries, it creates a sheet body representing the surface within the rectangular parametric box.

Parameters
[out]bodyPis the sheet body created from the surface
[in]surfTagis the surface to be used in sheet body creation
[in]intervalPis the range box (array of 4 doubles: umin, vmin, umax, vmax) of the surface. If included, the surface is parameterized in the specified range box. If NULL, the surface is parameterized in the default range box (0,0) to (1,1).
Returns
SUCCESS if the operation is successful
MSPSOLID_EXPORT int mdlSolid_makeSphere ( BODY_TAG sphereP,
double  radius 
)

Creates a solid spherical body with the input radius and center at 0,0,0.

Parameters
[out]spherePsphere created
[in]radiusis the radius (in kernel units) of the sphere.
Returns
SUCCESS if sphere is successfully created.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_makeTorus ( BODY_TAG bodyP,
double  primaryRadius,
double  secondaryRadius,
double  angle 
)

Creates a solid torus with input major and minor radii.

The torus is centered at 0,0,0 and its major radius aligned with the x-axis.

Parameters
[out]bodyPtorus created.
[in]primaryRadiusis the primary radius (in kernel units).
[in]secondaryRadiusis the secondary radius (in kernel units).
[in]angleinput torus sweep angle (in degrees)
Returns
SUCCESS if torus is successfully created.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_makeWedge ( BODY_TAG bodyP,
double  radius,
double  height,
double  angle 
)

Creates a pie-shaped solid (wedge) from the supplied input parameters.

The point on the wedge's axis of revolution haflway from the bottom to the top is 0,0,0.

Parameters
[out]bodyPis the wedge body
[in]radiusis the input radius (in kernel units) of the wedge (distance from circular edge to center)
[in]heightis the input height (in kernel units) of the wedge
[in]angleis the input sweep angle (in degrees) of the wedge
Returns
SUCCESS if wedge is successfully created.
Remarks
To convert a value given in UORs to kernel units, use this code:
mdlCurrTrans_invScaleDoubleArray (&valueInKernelUnits, &valueInUORs, 1);
MSPSOLID_EXPORT int mdlSolid_minimumDistanceBetweenEntities ( DPoint3dP  pPoint1,
DPoint3dP  pPoint2,
double *  pDistance,
ENTITY_TAG  entity1,
ENTITY_TAG  entity2 
)

Compute minimum distance between two entities.

Parameters
[out]pPoint1is the point on the first entity where the minimum distance is achieved.
[out]pPoint2is the point on the second entity where the minimum distance is achieved.
[out]pDistanceis minimum distance value.
[in]entity1is the first entity.
[in]entity2is the second entity.
Returns
success OUT SUCCESS if operation is successful
See also
mdlSolid_closestPointOnBody
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToCurve ( CURVE_TAG curveP,
MSBsplineCurve msbCurveP 
)

Creates a curve in the solid kernel from a b-spline curve definition.

Parameters
[out]curvePoutput kernel curve
[in]msbCurvePinput MicroStation b-spline curve to convert
Returns
SUCCESS if operation is successful
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToCurve2d ( CURVE_TAG curveP,
MSBsplineCurve msbCurveP 
)

Creates a planar curve in the solid kernel from a b-spline curve definition.

Any non-zero z component of the input b-spline curve will be disregarded.

Parameters
[out]curvePis the 2d curve.
[in]msbCurvePinput MicroStation b-spline curve to convert
Returns
SUCCESS if operation is successful
See also
mdlSolid_msBsplineToCurve
MSPSOLID_EXPORT StatusInt mdlSolid_msBsplineToSurface ( SURFACE_TAG surfaceP,
MSBsplineSurface msbSurfP 
)

Creates a surface in the solid kernel from a b-spline surface definition.

The new surface entity can be used to create a sheet body for use in sheet modeling operations.

Parameters
[out]surfacePoutput kernel surface entity
[in]msbSurfPinput MicroStation b-spline surface element to be converted
Returns
SUCCESS if the operation is successful
MSPSOLID_EXPORT int mdlSolid_offsetFaces ( TAG_ENTITY_LIST pFaceList,
double *  pOffset,
double  tolerance,
bool  faceFaceCheck 
)

Offsets an input set of faces by the provided offset distances.

All faces must belong to the same body.

Parameters
[in]pFaceListlist of faces to be offset
[in]pOffsetarray of offset distances for each face
[in]tolerancetolerance to be used while recalculating offset geometry
[in]faceFaceCheckif this is true, the resultant body is checked for face face intersection errors.
Returns
success OUT returns SUCCESS if the operation is successful.
MSPSOLID_EXPORT int mdlSolid_offsetWire ( TAG_ENTITY_LIST pOffsetList,
BODY_TAG  wireBody,
EDGE_TAG  refEdge,
DPoint3d *  pNormal,
double  distance,
double  tolerance,
int  gapFill,
bool  localCheck 
)

Returns a list of edges that are the offset edges of the input wire body.

Parameters
[out]pOffsetListlist of offset edges
[in]wireBodyinput wire body
[in]refEdgean edge of the wire body. Use mdlSolid_bodyAskFirstEdge to obtain one
[in]pNormalnormal direction of the plane in which the wire body lies
[in]distanceoffset distance
[in]tolerancetolerance for converting general curves to B-spline curves before offset
[in]gapFill0 for arc fill, 1 for tangent extension fill, 2 for curve extension fill
[in]localCheckTRUE for performing local check. FALSE otherwise.
Returns
success OUT SUCCESS if operation is successful and ERROR otherwise.
See also
mdlSolid_thickenSheetBody
MSPSOLID_EXPORT int mdlSolid_planarFaceData ( DPoint3d *  rootPointP,
DPoint3d *  normalP,
FACE_TAG  face 
)

Finds a point on the face and computes the normal direction of the face.

The normal direction always points to the outside of the enclosed body no matter what the sense of the face is. It only works on planar faces and returns an ERROR if the face is not a planar face

Parameters
[out]rootPointPis a point on the face.
[out]normalPis the normal direction of the face.
[in]faceis the given face.
Returns
SUCCESS if the face is planar; ERROR otherwise
See also
mdlSolid_faceData
MSPSOLID_EXPORT StatusInt mdlSolid_planarFaceToElement ( MSElementDescrH  edPP,
FACE_TAG  face,
DgnModelRefP  modelRef 
)

Creates an equivalent MicroStation element for the input planar face.

Parameters
[out]edPPoutput MicroStation element.
[in]faceis the planar face.
[in]modelRefthe model in which the element is created
Returns
SUCCESS if the element is created successfully.
See also
mdlSolid_bodyToElement
MSPSOLID_EXPORT int mdlSolid_pointFromVertex ( DPoint3d *  point,
VERTEX_TAG  vertex 
)

Returns the global coordinates of the point underlying the vertex.

Parameters
[out]pointis the coordinates of a vertex.
[in]vertexis the input vertex.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_edgeData
MSPSOLID_EXPORT int mdlSolid_pointInBody ( int *  inBody,
DPoint3d *  loc,
BODY_TAG  body 
)

The mdlSolid_pointInBody function tests whether a point lies inside,

outside or on the boundary of a given body.

The possible returned values for inBody are POINT_UNKNOWN, POINT_INSIDE, POINT_BOUNDARY and POINT_OUTSIDE.

Parameters
[out]inBodyis the returned containment information.
[in]locis a the test point.
[in]bodyis the input body.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_rayTestBody ( ENTITY_TAG **  entities,
double **  params,
int *  hitsFound,
DPoint3d *  origin,
DPoint3d *  dir,
BODY_TAG  b,
int  hitsWanted,
bool  backupRayOrigin,
DgnModelRefP  modelRef 
)

Fires a ray from origin along dir and finds all entities in the input body that intersect with the ray.

Unlike the mdlSolid_getEntities function, it finds all the entities in its path upto a maximum of hitsWanted entities. The parameter values along the fire ray are returned along with the points of intersection. To return all the hits, set hitsWanted to 0. The priorities for returning different entity types are in the order of vertex, edge and face.

Parameters
[out]entitieslist of entities found
[out]paramsparameters along the ray
[out]hitsFoundis the number of entities found.
[in]originis the ray origin.
[in]diris the ray direction vector.
[in]bis the input body.
[in]hitsWantedis the total number of entities requested.
[in]backupRayOriginstart ray outside of body. If this is TRUE and the starting origin is inside the body, then the origin is moved in a direction opposite to the direction of the ray until it is outside the body and then the ray fired.
[in]modelRefmodel in which the body is present (or the smartelement from which body is extracted is present)
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_rayTestFace ( DPoint3dP *  pointPP,
DPoint2d **  uvPP,
double **  rayParamPP,
int *  hitsFoundP,
DPoint3dCP  originP,
DVec3dCP  dirP,
FACE_TAG  face,
double  minRayDistance,
double  maxRayDistance 
)

Fires a ray from origin and along dir and the points of intersection between the ray and the face.

The two paraeters minRayDistance and maxRayDistance determine the portion of the line where the intersections are considered. Only intersection points between distances of minRayDistance and maxRayDistance from the input origin are returned.

Parameters
[out]pointPPthe points at which the line intersects the face
[out]uvPPthe paraetric coordinates of the face surface at which the line intersects the face
[out]rayParamPPthe parameters of the ray line at which the line intersects the face
[out]hitsFoundPthe nuber of intersections between the line and the face
[in]originPthe origin of the ray
[in]dirPthe direction of the ray that is fired
[in]facethe face at which the ray is fired
[in]minRayDistanceminimum distance at which points of intersection are needed A value of 0.0 indicates all points of intersection from origin to maxRayDistance
[in]maxRayDistancemaximum distance beyond which intersections are not needed
Returns
SUCCESS if operation is successful and ERROR otherwise
MSPSOLID_EXPORT int mdlSolid_recursiveSewSheetsToElement ( MSElementDescrH  ppEdP,
TAG_ENTITY_LIST pSheetList,
MSElementP  templateP,
DgnModelRefP  modelRef,
double  maxTol 
)

The function takes as input a list of sheet bodies and tries to stitch them into a single sheet body.

Then, it creates a MicroStation element for the bodies and returns the element to the user. The returned elements can be further used for display or other purposes as deemed necessary by the calling application.

Parameters
[out]ppEdPoutput element descriptor
[in]pSheetListinput list of bodies. The bodies are consumed.
[in]templatePtemplate element used for creation of the output elements
[in]modelRefmodelref of the model that the elements to be created for
[in]maxTolthe maximum gap between edges that needd to be considered as coincident
Returns
success OUT returns SUCCESS if the operation is successful
See also
mdlSolid_recursiveSewSheetsToElement
MSPSOLID_EXPORT int mdlSolid_regulariseEntity ( ENTITY_TAG  entity)

The mdlSolid_regulariseEntity function removes all faces,

edges and vertices which are unnecessary for supporting the topology of the given entity.

Double sided faces are removed. An edge is not needed if the surfaces defining the two faces of the edge are the same. Vertices and edges are handled in the same manner. This function only handles the edges or vertices associated with body, lump, shell, face, edge or vertex. For other actions, no action takes place.

Parameters
[in,out]entityis the entity to be regularized.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT StatusInt mdlSolid_removeBlends ( double  blendRadius,
BODY_TAG  bodyTag 
)

The mdlSolid_removeBlends function removes blend faces from its 

owning body.

Parameters
blendRadiusIN is the blend radius. If a blend face's radius is less than or equal to this value, it will be removed.
bodyTagIN is the solid entity that needs to be operated on.
Returns
SUCCESS if the removal is successful
MSPSOLID_EXPORT int mdlSolid_removeFace ( FACE_TAG  f)

The mdlSolid_removeFace function removes a face from its owning

body.

When edges and vertices are no longer needed to support the face, they are removed as well. This differs from mdlSolid_uncoverFace function.

Parameters
[in,out]fis a pointer to the face to be removed.
Returns
SUCCESS if operation is successful
See also
mdlSolid_uncoverFace
MSPSOLID_EXPORT int mdlSolid_removeFaces2 ( TAG_ENTITY_LIST bodyListP,
TAG_ENTITY_LIST faceListP,
int  healOption,
bool  healLoop 
)

Removes the set of input faces from their owning body.

All the faces input in this list must belong to the same body. The function also takes in parameters to try and heal any wounds that are created due to the removal operation. Wounds are defects in the body that are a result of the face removal operation. An attempt to cure these wounds can be made by passing in the right flags for the third and fourth options. The healOption argument specifies the method to attempt curing. It can take the following values: HEAL_Cap - Cap the wound with a new surface HEAL_Child - Grow the side faces of the child (body after wound) to cure the wound HEAL_Parent - Grow the adjacent faces of the parent (before the wound) to cure the wound HEAL_No - Leave wound as it is. healLoop - This option if set to TRUE makes the loops to be healded independently

Parameters
[out]bodyListPlist of resultant bodies. It is possible that the original body is broken into more than one body.
[in]faceListPlist of faces to be removed
[in]healOptionheal option (one of HEAL_Cap, HEAL_Child, HEAL_Parent or HEAL_No)
[in]healLoopTRUE to heal loops independently and FALSE to do otherwise
Returns
success OUT returns SUCCESS if operation is successful and ERROR otherwise
See also
mdlSolid_removeFaces2
MSPSOLID_EXPORT StatusInt mdlSolid_removeFeatures ( double  blendRadius,
double  holeRadius,
double  tinyArea,
BODY_TAG  bodyTag 
)

The mdlSolid_removeFeatures function removes small features from its 

owning body.

Parameters
blendRadiusIN is the blend radius. If a blend face's radius is less than or equal to this value, it will be removed.
holeRadiusIN is the hole radius. If a hole's radius is less than or equal to this value, it will be removed.
tinyAreaIN is the tiny area. If a face's area is less than or equal to this value,it will be removed.
bodyTagIN is the solid entity that needs to be operated on.
Returns
SUCCESS if one of the three kind of removals is successful
MSPSOLID_EXPORT StatusInt mdlSolid_removeHoles ( double  holeRadius,
BODY_TAG  bodyTag 
)

The mdlSolid_removeHoles function removes holes from its 

owning body.

Parameters
holeRadiusIN is the hole radius. If a hole's radius is less than or equal to this value, it will be removed.
bodyTagIN is the solid entity that needs to be operated on.
Returns
SUCCESS if the removal is successful
MSPSOLID_EXPORT StatusInt mdlSolid_removeTinyFaces ( double  tinyArea,
BODY_TAG  bodyTag 
)

The mdlSolid_removeTinyFaces function removes tiny faces from its 

owning body.

Parameters
tinyAreaIN is the tiny area. If a face's area is less than or equal to this value,it will be removed.
bodyTagIN is the solid entity that needs to be operated on.
Returns
SUCCESS if the removal is successful
MSPSOLID_EXPORT void mdlSolid_removeUnfixedBlends ( BODY_TAG  body)

Removes the implicit blend attributes from all edges in the body.

This function can be used to removed implicit blend attributes from edges when a call to mdlSolid_fixBlends fails.

Parameters
[in]bodythe body from which to remove the unfixed edge blends
MSPSOLID_EXPORT int mdlSolid_reverseBody ( BODY_TAG  body)

Reverses the orientations all faces of the body.

Parameters
[in,out]bodyis the body to be reversed and the reversed body.
Returns
SUCCESS if operation is successful; ERROR otherwise
MSPSOLID_EXPORT double mdlSolid_samePointTolerance ( )

Returns the tolerance set within a .dgn file that

determines whether two points are the same (i.e.

half a UOR) in solids kernel units.

Returns
The tolerance value as a double.
See also
mdlSolid_getScale
MSPSOLID_EXPORT int mdlSolid_setConstantChamfers ( TAG_ENTITY_LIST list,
double  leftRange,
double  rightRange,
double  startSetback,
double  endSetback 
)

Attaches implicit chamfers as attributes to each edge in the list.

The ranges and the setback values are in the local coordinates of the body. The startSetback and the endSetback parameters are either positive or zero. They determine the approximate distance from the blended vertex to where the vertex blend ends. Setbacks are ignored if there are no blended vertices. The sense of left and right is taken from the sequence of entities in the list. Entities whose sense is reversed compared to the list have left and right interchanged. If the list forms a closed sequence, the sense of left and right is taken from the first edge in the list.

Parameters
[in,out]listis a pointer to the entity list to attach chamfer attributes.
[in]leftRangeis the left chamfer range.
[in]rightRangeis the right chamfer range.
[in]startSetbackis the starting setback value.
[in]endSetbackis the ending setback value.
Returns
SUCCESS if operation is successful.
See also
mdlSolid_setConstantRounds
MSPSOLID_EXPORT int mdlSolid_setConstantRounds ( TAG_ENTITY_LIST list,
double  radius,
double  startSetback,
double  endSetback 
)

Attaches implicit rounds as attributes to each edge in the list.

The radius and the setback values are in the local coordinates of the body. The startSetback and the endSetback parameters are either positive or zero. They determine the approximate distance from the blended vertex to where the vertex blend ends. Setbacks are ignored if there are no blended vertices.

Parameters
[in,out]listis a pointer to the entity list to attach blending attributes.
[in]radiusis the radius for round edge.
[in]startSetbackis the starting setback value.
[in]endSetbackis the ending setback value.
Returns
SUCCESS if operation is successful.
See also
mdlSolid_setConstantChamfers
MSPSOLID_EXPORT StatusInt mdlSolid_sewBodies ( TAG_ENTITY_LIST sewnBodyListP,
TAG_ENTITY_LIST unsewnBodyListP,
TAG_ENTITY_LIST inputBodyListP,
double  gapTolerance 
)

This function sews or stitches a list of sheet bodies and returns two sets of bodies.

The first list contains a list of bodies that are formed by stitching together two or more bodies from the input list. The second list consists of sheet bodies from the original input body list for which the modeler is unable to find even one body to stitch with.

Parameters
[out]sewnBodyListPlist of sewn bodies. Bodies which have been formed by stitching together two or bodies in the original list.
[in]unsewnBodyListPbodies from original input body list which did not have an edge in common with any of the other bodies in the original input list
[in]inputBodyListPinput list of bodies. If the operation is successful, the bodies in the list should not be used henceforth as some of them may have been consumed.
[in]gapTolerancemaximum distance between edges below which two edges are considered to be same during the stitching process
Returns
success OUT SUCCESS if at least two bodies get stitched together.
See also
mdlSolid_sewBodies
MSPSOLID_EXPORT int mdlSolid_sewBodiesRecursively ( TAG_ENTITY_LIST sheetBodyListP,
double  minTol,
double  maxTol,
double  mulTol 
)

The function accepts a list of sheet bodies as input and tries to stitch them all together into one are more bodies.

The resultant bodies are returned in the input/output list. The original bodies are deleted. It works in a recursive fashion. It first attempts to stitch together the bodies with minTol (say 1E-6). Then, if it does not produce a single resultant body, then it tries to use a tolerance of 1E-6*mulTol (say 10). It continues in this manner until either maxTol is reached or it obtains a single body as a result. A good set of values for the three parameters are minTol = 1E-6, maxTol=1E-2 and mulTol = 10.

Parameters
[in,out]sheetBodyListPinput/output body list
[in]minTolminimum tolerance at which stitching needs to be attempted
[in]maxTolmaximum tolerance at which stitching needs to be attempted
[in]mulTolmultiplicity factor between two consecutive attempts at stitching
Returns
success OUT returns SUCCESS in case of successful stitching, ERROR otherwise

alinkjoin mdlSolid_sewBodiesRecursively

MSPSOLID_EXPORT int mdlSolid_sheetFromFace ( BODY_TAG sheetP,
FACE_TAG  face 
)

Creates a sheet body from a single face.

Parameters
[out]sheetPis the sheet body returned
[in]faceis the face from which the sheet body is created.
Returns
SUCCESS if a sheet body could be created
See also
mdlSolid_sheetFromFaces
MSPSOLID_EXPORT int mdlSolid_sheetFromFaces ( BODY_TAG sheetP,
TAG_ENTITY_LIST faceListP 
)

Creates a sheet body by joining together the input faces.

All the faces must come from the same body. This is typically used when a solid body needs to be converted to a sheet body. A call to extract all the faces of the solid body followed by a call to this function will create an equivalent sheet body.

Parameters
[out]sheetPis the sheet body created
[in]faceListPis the input list of faces
Returns
SUCCESS if sheet body is successfully created
MSPSOLID_EXPORT int mdlSolid_shellData ( FACE_TAG face,
SHELL_TAG next,
SHELL_TAG  s 
)

Returns the first face of the input shell and the next shell

in the lump or NULL if this is the last shell in the lump.

Parameters
[out]faceis the first face of the shell.
[out]nextis the next shell in the lump.
[in]sis the input shell to get data for.
Returns
returns SUCCESS if the operation is successful.
See also
mdlSolid_bodyData
MSPSOLID_EXPORT int mdlSolid_shellType ( )

Returns the SHELL_TYPE constant that can be used as input to

many functions.

Returns
the constant SHELL_TYPE
See also
mdlSolid_bodyType
MSPSOLID_EXPORT StatusInt mdlSolid_simplifyBody ( BODY_TAG bodyP,
bool  local 
)

Attempts to simplify bspline curves and surfaces into analytic curves and surfaces wherever possible.

Using analytic surfaces and curves wherever possible decreases model sizes, is more efficient and increases speed of modeling.

Parameters
[in,out]bodyPinput body to be simplified/output simplified body
[in]localflag to indicate whether local simplication needs to be performed. If local is TRUE, then the function will attempt to replace parts of a spline curve or surface. A consequence of this is that edges/faces on the same surface may be on different surfaces/curves after simplification.
Returns
success OUT SUCCESS if simplification is sucessful and ERROR otherwise.
See also
mdlSolid_simplifyBody
MSPSOLID_EXPORT int mdlSolid_slice ( BODY_TAG slice,
BODY_TAG  b1,
BODY_TAG  b2 
)

Intersects the two input bodies and returns the intersection as a wire body.

Each edge in the returned wire body will have two coedges.

Parameters
[out]slicereturns a pointer to the resulting wire body.
[in]b1is a pointer to the first body.
[in]b2is a pointer to the second body.
Returns
SUCCESS/ERROR depending on whether the operation is successful or not
MSPSOLID_EXPORT int mdlSolid_spinFaces ( TAG_ENTITY_LIST faceListP,
DPoint3dP  originP,
DPoint3dP  axisP,
double  angle,
bool  faceFaceCheck 
)

Spins one or more faces belonging to the same solid body around the input axis.

Parameters
[in]faceListPinput list of faces
[in]originPorigin of axis about which the faces need to be swept
[in]axisPdirection of axis
[in]angleangle of sweep
[in]faceFaceCheckflag to indicate whether face-face intersection checks need to be made
See also
mdlSolid_spinFaces
MSPSOLID_EXPORT int mdlSolid_subShellType ( )

Returns the SUBSHELL_TYPE constant that can be used as input to

many functions.

Returns
the constant SUBSHELL_TYPE
See also
mdlSolid_bodyType
MSPSOLID_EXPORT int mdlSolid_subtract ( BODY_TAG  b2,
BODY_TAG  b1 
)

Subtracts b1 from b2 and leaves the result (possibly consisting of a set of disjoint lumps) in b2.

b1 is deleted and should not be used henceforth.

Parameters
[in,out]b2the resulting body
[in]b1body to be subtracted from b2
Returns
SUCCESS/ERROR depending on whether subtraction is successful or not
MSPSOLID_EXPORT int mdlSolid_sweepBodyAxis ( BODY_TAG  body,
DPoint3dP  revolveAxisP,
DPoint3dP  radialAxisP,
double  angle,
double  shell,
double  draftAngle,
bool  closeOpenProfiles 
)

Revolves a wire or sheet body about the axis passing through the point radialAxisP and along revolveAxisP.

A shell thickness can be applied to by inputting a non-zero value for 'shell'.

Parameters
[in,out]bodyis the input wire or sheet body to be revolved. This is also the revolved solid body.
[in]revolveAxisPis the direction of the axis of revolution
[in]radialAxisPis a point on the axis
[in]angleis the revolution angle.
[in]shellis the shell thickness applied to the resulting solid. Pass 0.0 if no shell is required.
[in]draftAngleis not used. This parameter is present for legacy reasons only.
[in]closeOpenProfilesinput TRUE if open wire profiles are to be closed before they are revolved.
Returns
SUCCESS if the operation is successful.
See also
mdlSolid_sweepBodyWire mdlSolid_sweepBodyVector
MSPSOLID_EXPORT int mdlSolid_sweepBodyVector ( BODY_TAG  body,
DPoint3dP  directionP,
double  distance,
double  shell,
double  draft 
)

Sweeps a wire or sheet body a fixed distance along a vector.

An optional shell thickness can also be specified, pass 0.0 for no shell. An optional draft angle can also be specified, pass 0.0 for no draft.

Parameters
[in,out]bodyis the input wire or sheet body which is swept and returned.
[in]directionPis the direction along which bodyP is swept.
[in]distanceis the distance by which bodyP is swept.
[in]shellis the shell thickness of the swept body. Pass 0.0 if shelling is not required.
[in]draftis the draft angle to be applied to the swept body.
Returns
SUCCESS if the operation is completed successfully.
See also
mdlSolid_sweepBodyAxis mdlSolid_sweepBodyWire
MSPSOLID_EXPORT int mdlSolid_sweepBodyWire ( BODY_TAG bodyP,
BODY_TAG  wireBody,
DPoint3d *  pathStartP,
double  shell,
bool  capped,
DgnModelRefP  modelRef 
)

Sweeps an input wire or sheet body along a path represented by wireBodyP.

A shell thickness can also be specified if needed. If capped is TRUE, surfaces that result from sweeping closed profiles are capped and converted to solids.

Remarks
This function has different behaviors in MicroStation/J 7.0 and 7.1. In 7.0, pathStartP is the starting point on the wire body from where the profile body will be swept. In 7.1 pathStartP is not used, instead, the profile is swept along the tangent direction of the first edge of wireBodyP.
Parameters
[in,out]bodyPis the input profile body which is swept along the path.
[in]wireBodyis the path along which bodyPP is swept.
[in]pathStartPis the starting point for the sweep (in MicroStation 7.0 only).
[in]shellis the shell thickness of the swept body. Pass 0.0 if shelling is not required.
[in]cappedif TRUE, will convert surfaces that result from sweeping closed profiles to solids. It should be set to FALSE otherwise.
[in]modelRefmodel in which the body is present (or the smartelement from which body is extracted is present)
Returns
SUCCESS if operation is succesful
See also
mdlSolid_sweepBodyVector mdlSolid_sweepBodyAxis
MSPSOLID_EXPORT int mdlSolid_sweepFaces ( TAG_ENTITY_LIST faceListP,
DPoint3dP  translationP,
bool  faceFaceCheck 
)

Sweeps the set of faces belonging to the same body by the input translation vector.

Parameters
[in]faceListPlist of faces to be swept
[in]translationPsweep to be performed
[in]faceFaceCheckflag to indicate whether face face checks are performed
Returns
SUCCESS if operation is succesful
See also
mdlSolid_sweepFaces
MSPSOLID_EXPORT int mdlSolid_thickenSheetBody ( BODY_TAG  body,
TAG_ENTITY_LIST oldFaceListP,
TAG_ENTITY_LIST newFaceListP,
double  forwardDist,
double  backwardDist 
)

Thickens the input sheet body into a solid body.

The sheet body is thickened by forwardDist in the direction of face normals and backwardDist opposite to the face normals.

Parameters
[in,out]bodyinput sheet body and output solid body
[out]oldFaceListPlist of old faces which were transformed
[out]newFaceListPlist of new faces that were obtained as a result of transformation of old faces. Each nth face in this list corresponds to the nth face returned in oldFaceListP. For example, the third faces in this list has been obtained as a result of transformation of the 3rd face in oldFaceListP.
[in]forwardDistdistance to be thickened along face normals
[in]backwardDistdistance to be thickened opposite to face normals.
Returns
success OUT SUCCESS if operation is successful and ERROR otherwise.
See also
mdlSolid_thickenSheetBody
MSPSOLID_EXPORT int mdlSolid_transformFromSurfaceUV ( TransformP  transformP,
TransformP  inverseTransformP,
FACE_TAG  face,
DPoint2d *  uvP,
DgnModelRefP  modelRef 
)

Creates a transformation matrix from a point on the

given face.

The point on the surface corresponds to the given uvP parameter. The x, y, z axes of the rotation matrix for the transformation are defined by the surface normal, u-partial derivative and v- partial derivative at the location point respectively. The translation is given by the location point. The output is in the world coordinate system of the design file, so a modelRef needs to be input.

Parameters
[out]transformPis the transformation matrix.
[out]inverseTransformPis the inverse transformation matrix.
[in]faceis the given face.
[in]uvPis the given parameter to evaluate at.
[in]modelRefis the model that contains the surface.
Returns
SUCCESS if operation is successful; ERROR otherwise
See also
mdlSolid_evaluateFace
MSPSOLID_EXPORT StatusInt mdlSolid_trimByEdgesAndFaces ( BODY_TAG  body,
TAG_ENTITY_LIST pEdgeList,
TAG_ENTITY_LIST pFaceList,
bool  keep 
)

This function trims a sheet body using a set of supplied edges.

The edges provided must divide the body into at least two sets of faces. The face list provided can be used to delete/keep some of the faces that are obtained due to the trim. If keep is TRUE, all the faces in the input face list will be kept. If keep is FALSE, all the faces in the provided list will be deleted.

Parameters
[in,out]bodyinput/output sheet body
[in]pFaceListinput face list
[in]pEdgeListinput edge list to be used for trimming the sheet
[in]keepflag if TRUE, faces in pFaceList are kept and if FALSE faces in pFaceList are removed
Returns
success OUT returns SUCCESS in case operation is successful and ERROR otherwise
See also
mdlSolid_trimByEdgesAndFaces
MSPSOLID_EXPORT int mdlSolid_uncoverFace ( FACE_TAG  face)

Removes a face from it's owning sheet body.

Uncovering a face that has edges with only one coedge leaves the edges in the body as dangling sheet edges. The volume of the body will not change in general. Note that the owning body should be a sheet body.

Parameters
[in,out]faceface to be uncovered
Returns
SUCCESS if face is successfully uncovered
See also
mdlSolid_uncoverFace
MSPSOLID_EXPORT int mdlSolid_unite ( BODY_TAG  b2,
BODY_TAG  b1 
)

Performs the boolean union operation and leaves the result in b2.

b2 can consist of multiple and possibly disjoint lumps. b1 is deleted and should not be used henceforth.

Parameters
[in,out]b2the union of the two bodies
[in]b1body to be united with b2
Returns
SUCCESS/ERROR depending on whether union is successful or not
MSPSOLID_EXPORT int mdlSolid_updateBodyNodeId ( BODY_TAG  body)

Updates the node ids for the body.

Typically, this needs to be called after a body is manipulated. Consider a solid cube with one blend in it. Now, there are two node in this body. One that represents the creation of the cube and the second that of the blend. Now, when we drill a hole in the solid, there is a new face that is created (the cylindrical face). A call to this function after the drilling operation adds ids (faceId.entityId = 1 and faceId. nodeId = 3) on the cylindrical face.

Parameters
[in]bodythe body to update node ids for
Returns
SUCCESS
MSPSOLID_EXPORT int mdlSolid_vertexData ( DPoint3d *  pointP,
VERTEX_TAG  vertex 
)

Extracts the underlying point from a vertex.

Parameters
[out]pointPis the point returned.
[in]vertexis the vertex.
Returns
SUCCESS if the operation is successful; ERROR otherwise
See also
mdlSolid_vertexType
MSPSOLID_EXPORT int mdlSolid_vertexFromId ( VERTEX_TAG vertexP,
VertexId *  vertexIdP,
BODY_TAG  body 
)

Finds the vertex which has the given vertex id.

Parameters
[out]vertexPreturns a pointer to the vertex.
[in]vertexIdPis a pointer to the given vertex id.
[in]bodyis the body in which to search for the vertex
Returns
SUCCESS/ERROR depending on whether a vertex is found or not
MSPSOLID_EXPORT int mdlSolid_vertexType ( )

Returns the BODY_TYPE constant that can be used as input to

many functions.

Returns
the constant VERTEX_TYPE
See also
mdlSolid_bodyType
MSPSOLID_EXPORT int mdlSolid_wireIsG1 ( BODY_TAG  wire)

This function determines whether the input wire body is

G1 continuous (smooth) across all of its vertices.

A wire is G1 continuos at a vertex if the tangents along the wire on either side of the vertex are same in direction.

Parameters
[in]wireis the wire body to be tested for G1 continuity
Returns
TRUE if the body is G1 continuous, FALSE if it is not
See also
mdlSolid_wireType
MSPSOLID_EXPORT int mdlSolid_wireType ( )

Returns the WIRE_TYPE constant that can be used as input to

many functions.

Returns
the constant WIRE_TYPE
See also
mdlSolid_wireType

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.