int cvxCompEditPart ( int idComp /* I: id of component in active file */ ) /* DESCRIPTION: Activate the part instanced by the specified component for editing. It is assumed the component (idComp) resides in the active assembly. Use cvxPartExit() to exit the part to its parent assembly part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompExtract ( int idShape, /* I: id of shape to extract */ svxMatrix *Frame, /* I: local coordinate frame to map shape into part space */ vxName Name, /* I: name of new part/component */ int NewFile, /* I: 1 to put new part in a new file; 0 for active file */ evxResponse Overwrite, /* I: response to "overwrite existing part?" query */ int *idComp /* O: id of new component (NULL to ignore) */ ) /* DESCRIPTION: Extracts a shape from the active part into a new part that is instanced back into the active part as a component (i.e. converts a shape into a component). If the shape was merged from a pre-existing component, "Frame" and "Name" are ignored and the shape is extracted to the original component using its local frame and name. If "Frame" is input as NULL, the identity matrix is used. If "Name" is input as NULL, a default name is assigned to the component. If "idComp" is not NULL, the id of the new component is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompFind ( evxFaceTrim Trim, /* I: face trim option */ svxAxis *Ray, /* I: ray defined by a point and a direction */ double Dist, /* I: distance from start of ray along direction of ray */ int SkipBlank, /* I; 1 to skip blanked components; else 0 */ int *Count, /* O: number of components */ int **Comps /* O: list of component id's */ ) /* DESCRIPTION: Outputs a list of indices of the components that belong the active part and are intersected by the specified ray. Only intersections within "Dist" of the ray's start point (Ray->Pnt) are considered. The "Trim" option is used to determine what portions of the component faces are checked against the ray. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompInqPart ( int idComp, /* I: id of component in active file */ vxName File, /* O: name of the file instanced by the component */ vxName Part /* O: name of the part instanced by the component */ ) /* DESCRIPTION: Gets the names of the file and part referenced by the specified component. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompIns ( svxCompData *Comp, /* I: component data */ int *idComp /* O: id of new component */ ) /* DESCRIPTION: Inserts a new component int the active part. If "idComp" is not NULL, the id of the new component is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompMerge ( evxBoolType Combine, /* I: combination method */ int idComp, /* I: component id (0 for last feature) */ int *idShape /* O: shape id (pass in NULL to ignore) */ ) /* DESCRIPTION: Merges a component with the active part using the specified combination method. Only the component's top-level geometry is merged. Sub-components of the component are not merged. Use cvxCompShift() to merge the component and its sub-components. If "idShape" is not NULL, the id of the last shape created by merging the component is output. "isShape=0" is output if no shape was created by the merge. Note that merging a component could add multiple shapes, or other types of geometry, to the active part. If there is a possibility that the merge created more than a single shape, use cvxEntNewList() to retrieve the new entities created by the merge. This function can be overloaded to force merging of component dimensions by inputting the component id with a negative sign. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompRegenSet ( int idComp, /* I: component entity id */ int Regen /* I: 1 to enable component regen; 0 to disable it */ ) /* DESCRIPTION: Flags the input component to regen (Regen=1) or not regen (Regen=0) the part it instances when the it's parent part is regenerated. The specified component (idComp) should belong to the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxCompShift ( int idComp /* I: component id */ ) /* DESCRIPTION: Moves sub-components of a selected component up to the active part. Also merges top-level geometry and/or alignments associated with the specified component (idComp) into the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartAlign ( svxAlign *Align /* I: alignment constraint */ ) /* DESCRIPTION: Creates an alignment constraint between two shapes or components. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartAnchor ( int idEntity /* I: component or shape id in active part */ ) /* DESCRIPTION: Anchors the specified component or shape so that it does not move when alignment constraints are created between it and another component/shape. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartArc3pt ( svxPoint *Start, /* I: start point */ svxPoint *End, /* I: end point */ svxPoint *Mid, /* I: mid (i.e. through) point */ int *idEnt /* O: id of new 3D arc entity */ ) /* DESCRIPTION: Adds a 3D arc to the active part. If "idEnt" is not NULL, the id of the new arc entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartArcRad ( svxMatrix *Plane, /* I: insertion plane */ double Radius, /* I: radius (mm) */ double Start, /* I: start angle (deg) */ double End, /* I: end angle (deg) */ int *idEnt /* O: id of new 2D circle entity */ ) /* DESCRIPTION: Adds a 3D arc to the active part. The arc lies on the specified plane with its center at the plane's origin and its start/end angles measured CCW from the plane's X axis. If "idEnt" is not NULL, the id of the new entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartAtGet ( vxName Name, /* I: name of part in active file */ svxPartAttribute *At /* I: part attribute data */ ) /* DESCRIPTION: Retrieves attribute data from the specified part in the active file. If "Name" is NULL or an empty string, the active target part is used. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartAtSet ( vxName Name, /* I: name of part in active file */ svxPartAttribute *At /* I: part attribute data */ ) /* DESCRIPTION: Assigns the specified part attribute data to the specified part. If "Name" is NULL or an empty string, the active target part is used. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartBackup(void) /* DESCRIPTION: Inserts a "Backup" operation in the active part's history. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartBool ( evxBoolType Type, /* I: boolean combination method */ int idBase, /* I: id of base shape */ int Count, /* I: no. of shapes to combine with "idBase" */ int *Shapes, /* I: list of id's of shapes to combine with "idBase" */ int Keep /* I: 1 to keep "Shapes"; 0 to delete them */ ) /* DESCRIPTION: Combines one or more shapes with a base shape using a boolean operation. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartBox ( svxBoxData *Box, /* I: box definition */ int *idShape /* O: id of new shape */ ) /* DESCRIPTION: Creates a box shape and adds it to the active part using the specified combination method. If "idShape" is not NULL and "Box->Combine = V_BOOL_NONE", the id of the shape created by this function is output via "idShape". Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartChamAng ( int Count, /* I: number of edges to chamfer */ int *Edges, /* I: pointer to list of edge id's */ int idFace, /* I: id of face on first side of chamfer */ double Setback, /* I: setback (mm) on first side of chamfer */ double Angle /* I: angle of chamfer (deg) */ ) /* DESCRIPTION: Adds chamfers to the specified edges. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartChamAsym ( int Count, /* I: number of edges to chamfer */ int *Edges, /* I: pointer to list of edge id's */ int idFace, /* I: id of face on first side of chamfer */ double Setback1, /* I: setback (mm) on first side of chamfer */ double Setback2 /* I: setback (mm) on second side of chamfer */ ) /* DESCRIPTION: Adds chamfers to the specified edges. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartChamConst ( int Count, /* I: number of edges to chamfer */ int *Edges, /* I: pointer to list of edge id's */ double Setback /* I: setback (mm) */ ) /* DESCRIPTION: Adds chamfers to the specified edges. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCir3pt ( svxPoint *P1, /* I: first point on circle */ svxPoint *P2, /* I: second point on circle */ svxPoint *P3, /* I: third point on circle */ int *idEnt /* O: id of new 3D circle entity */ ) /* DESCRIPTION: Adds a 3D circle to the active part. If "idEnt" is not NULL, the id of the new circle entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCirRad ( svxMatrix *Plane, /* I: insertion plane */ double Radius, /* I: radius (mm) */ int *idEnt /* O: id of new 2D circle entity */ ) /* DESCRIPTION: Adds a 3D circle to the active part. The circle lies on the specified plane with its center at the plane's origin. If "idEnt" is not NULL, the id of the new entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCopyPntToPnt ( int idEntity, /* I: id of geometry entity to copy */ svxAxis *Start, /* I: start point and direction */ svxAxis *End, /* I: end point and direction */ int *idCopy /* O: id of copied entity (NULL to ignore) */ ) /* DESCRIPTION: Copies the specified geometry within the active part from one point "Start->Pnt" to another "End->Pnt". It also changes the orientation of the part based on "Start->Dir" and "End->Dir". If the directions are same, the orientation of the geometry is not changed -- it is simply translated. If "idCopy" is not NULL, the id of the new copy is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCrvInt ( svxCrvIntData *Crv, /* I: input data interpolated curve */ int *idEnt /* O: id of new 3D interpolated curve entity */ ) /* DESCRIPTION: Adds a 3D curve interpolated through through the input points with the specified degree to the active part. If "idEnt" is not NULL, the id of the new curve entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCrvList ( int Count, /* I: number of curves in curve-list */ int *Curves, /* I: pointer to list of 3D curve id's */ int *idEnt /* O: id of new curve-list entity */ ) /* DESCRIPTION: Adds a 3D curve-list entity which groups the specified curves. Features like Sweep, Revolve and Extrude may be applied to 3D curve-lists as well as 2D sketches. If "idEnt" is not NULL, the id of the new entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCurve ( svxCurve *Crv, /* I: curve data */ int *idEnt /* O: id of new curve entity */ ) /* DESCRIPTION: Adds a curve to the active part. If "idEnt" is not NULL, the id of the new curve entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartCyl ( svxCylData *Cyl, /* I: cylinder definition */ int *idShape /* O: id of new shape */ ) /* DESCRIPTION: Creates a cylinder shape and adds it to the active part using the specified combination method. If "idShape" is not NULL and "Cyl->Combine = V_BOOL_NONE", the id of the shape created by this function is output via "idShape". Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartDatum ( svxMatrix *Frame, /* I: transformation matrix */ int *idDatum /* O: id of new datum */ ) /* DESCRIPTION: Adds a datum plane to the active part, aligned with the specified local coordinate frame. If "idDatum" is not NULL, the id of the new datum is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartEncapsulate(void) /* DESCRIPTION: Encapsulates the active part's history. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartErase ( int Count, /* I: number of entities */ int *idEnts /* I: list of entity id's */ ) /* DESCRIPTION: Erase specified entities. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxPartExit (void) /* DESCRIPTION: Exits the active part to its parent part if it was activated from within an assembly, to its parent CAM plan if it was activated from within a CAM plan, to its parent drawing sheet if it was activated from a drawing sheet view, or to the root object level of its parent file, if it was activated from the level of the root object list. */ ________________________________________________________________________________ int cvxPartExtrude ( svxExtrudeData *Ext, /* I: extrusion input data */ int *idShape /* O: id of new shape */ ) /* DESCRIPTION: Creates an extruded shape and adds it to the active part using the specified combination method. If "idShape" is not NULL and "Ext->Combine = V_BOOL_NONE", the id of the shape created by this function is output via "idShape". If multiple shapes could be created, use cvxEntNewList() to get their id's. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartFace ( svxSurface *Srf, /* I: NURB surface geometry */ int NumCurves, /* I: number of trim curves */ svxCurve *TrimCurves, /* I: list of 2D NURB UV trim curves */ int Code, /* I: non-zero integer code for labeling the face */ int Sew, /* I: 1 to sew face to adjacent faces, else 0 */ double Tol, /* I: 3D proximity tolerance (mm) (0.0 for default) */ int *idFace /* O: database id of new face entity (or NULL) */ ) /* DESCRIPTION: Adds a face to the active part using the specified surface and trim curves. The face is sewn to adjacent faces with matching edges. It is assumed the trim curves are 2D NURB curves defined in the UV space of the specified surface. If no trim curves are input (NumCurves=0), trim curves are automatically created around the "rectangular" surface boundary. The input 3D proximity tolerance (Tol) is used to match the endpoints of trim curves when they are sorted into loops, and to match edges of the new face to edges to existing faces if the "Sew" option is enabled. If "Tol" is input as 0.0, the active part's default proximity tolerance is used. If "idFace" is not NULL, the database id of the new face entity is output. This function copies data passed to it. The calling procedure is responsible for deallocating memory referenced by the input data structures. Note that faces will not add successfully to the active part unless there is an active feature (i.e. history operation) for them to link to. This is accomplished by putting your code inside the callback function associated with a command-template-defined custom history operation (see cvxTplInit). When the history is regenerated, VX will expect the input parameters defined by the command template to provide sufficient input to the callback function to re-create (i.e. regenerate) the original geometry. The other option is to start your code with cvxPartHistStart(), which defines a "static" feature (i.e. history operation) for program-generated geometry (e.g. faces) to attach to. When you are done adding geometry, call cvxPartHistEnd(). This function will cause all existing part geometry and history to be bundled into a single static "StartData" history operation. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartFillet ( int Count, /* I: number of edges to fillet */ int *Edges, /* I: pointer to list of edge id's */ double Radius /* I: fillet radius */ ) /* DESCRIPTION: Adds fillets to the specified edges. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxPartFreeHoles ( int Count, /* I: number of holes */ svxHoleData **Holes /* I/O: list of holes */ ) /* DESCRIPTION: Frees memory associated with the input hole list. The input memory pointer (*Holes) is set to NULL. */ ________________________________________________________________________________ int cvxPartGeomExport ( svxGeomExport *Data /* I: data that defines geometry to be exported */ ) /* DESCRIPTION: Exports the specified geometry from the active target part to an external part. If the destination part does not exist, it is created. If the destination part already exists, the geometry is added to it. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHistDel ( int Count, /* I: number of history operations to delete */ int *Operations /* I: list of history operation id's */ ) /* DESCRIPTION: Deletes the specified operations from the history of the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHistEnd ( void ) /* DESCRIPTION: Used in conjunction with cvxPartHistStart() to bundle all existing part geometry and history to be bundled into a single static "StartData" history operation. It is the equivalent of cvxPartEncapsulate(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHistGroup ( int idFirst, /* I: id of first history operation */ int idLast, /* I: id of last history operation */ vxName Name, /* I: group name (input NULL for default name) */ int Close /* I: 1 to close new group, else 0 */ ) /* DESCRIPTION: Group the specified history operations. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHistRename ( int idOp, /* I: id of history operation (i.e. feature) */ vxName Name, /* I: new operation name */ char *Descript /* I: new description (NULL if undefined) */ ) /* DESCRIPTION: Renames an operation in the history of the active part and assigns the specified description to it (if defined). Passing in a blank string for "Descript" will clear the description currently assigned to "idOp". Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHistStart ( vxName Name /* I: history operation (i.e. feature) name */ ) /* DESCRIPTION: Defines a "static" feature (i.e. history operation) for program-generated geometry (e.g. faces) to attach to. When you are done adding geometry, call cvxPartHistEnd(). This function will cause all existing part geometry and history to be bundled into a single static "StartData" history operation. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartHole ( svxHoleData *Hole, /* I: component data */ int *idOp /* O: id of feature operation that created hole */ ) /* DESCRIPTION: Adds the specified hole(s) to the active part and outputs the id of the corresponding history operation. Pass in NULL for "idOp" if the output is not required. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqComps ( vxName File, /* I: part file name (File[0]=0 or NULL for active file) */ vxName Part, /* I: part name (Part[0]=0 or NULL for active part) */ int *Count, /* O: number of components */ int **Comps /* O: list of component id's */ ) /* DESCRIPTION: Outputs a list of indices of the components that belong to the specified part. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqCurve ( int idEntity, /* I: id of curvilinear entity (includes edges) */ int Nurb, /* I: 1=get NURB data for all curve types; else 0 */ svxCurve *Crv /* O: curve data */ ) /* DESCRIPTION: Gets curve geometry for the specified curvilinear entity, including face edges. If "Nurb" is input as 1, NURB data is output for analytic curve types (e.g. line, arc, circle). NURB data is output via "Crv" using memory allocated by this function. The memory MUST be deallocated by the calling procedure using cvxCurveFree(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqCurves ( int *Count, /* O: number of shapes */ int **Curves /* O: list of curve id's */ ) /* DESCRIPTION: Outputs a list of indices of the curves that belong to the active part. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEdgeCrv ( int idEdge, /* I: edge id */ int idFace, /* I: optional face id for retrieving UV geometry (else 0) */ svxCurve *Crv /* O: edge's curve geometry */ ) /* DESCRIPTION: Outputs the NURB curve geometry of the specified edge. If "idFace > 0", the UV definition of the edge on the specified face is output. Otherwise, the 3D definition of the edge is output. The calling procedure is responsible for deallocating the memory assigned by this function to the "Crv" structure using cvxCurveFree(). The direction of UV curves output by this function follow the direction of their parent loops. 3D curves are not given a specific orientation. Outer loops proceed counterclockwise relative to the natural normal of the parent surface. Inner loops are clockwise. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEdgeFaces ( int idEdge, /* I: edge id */ int *Count, /* O: number of faces */ int **Faces /* O: list of face id's */ ) /* DESCRIPTION: Outputs a list of indices of the faces connected to an edge in the active file. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEntByLabel ( int *Label, /* I: persistent label as null-terminated array of integers */ int Exact, /* I: 1 for exact match; 0 if partial match is okay */ int *idEntity /* O: entity id (0 is output if no entity is found) */ ) /* DESCRIPTION: Searches the active part for an entity with the specified label. Returns 1 if function fails or entity is not found; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEntFtr ( int idEntity, /* I: entity id */ int *idFeature /* O: parent feature id (0 if undefined) */ ) /* DESCRIPTION: Outputs the id of the parent feature of the specified entity in the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEntLabel ( int idEntity, /* I: entity id */ int **Label /* O: persistent label as null-terminated array of integers */ ) /* DESCRIPTION: Outputs the persistent label of the specified entity in the active part. The label is a null-terminated list of integers. The calling procedure is responsible for deallocating the memory out via "Label". Example: int *Label=NULL; int idEntity = 99; cvxPartInqEntLabel(idEntity, &Label); cvxMemFree((void**)&Label); See also cvxLabelSame() and cvxPartInqEntByLabel(). Returns 1 if function fails or entity does not have a label; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqEntShape ( int idEntity, /* I: entity id (in active file) */ int *idShape /* O: shape id (0 if undefined) */ ) /* DESCRIPTION: Outputs the id of the shape that the specified face or edge (idEntity) belongs to. It is assumed the entity resides in the active object. If "idShape = 0" is output, the entity could not be located or didn't belong to a faceset. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceAt ( int idFace, /* I: face id */ svxFaceAt *At /* O: face display attributes */ ) /* DESCRIPTION: Outputs display attributes of the specified face. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceBox ( int idFace, /* I: face id */ svxBndBox *Box /* O: face bounding box */ ) /* DESCRIPTION: Gets the bounding box of the specified face in the active file. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceCrvs ( int idFace, /* I: face id */ int *Count, /* O: number of trim curves */ svxCurve **TrimCurves /* O: list of trim curves */ ) /* DESCRIPTION: Outputs a list of the trim curves that bound a face in the active file. The calling application must sort these curves into inner and outer loops as desired. To get the them in sorted order, you must traverse the face and its loops using cvxPartInqFaceLoops(), cvxPartInqLoopEdges() and cvxPartInqEdgeCrv(). The calling procedure MUST deallocate the output list using cvxMemFree((void**)TrimCurves). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceEdges ( int idFace, /* I: face id */ int *Count, /* O: number of edges */ int **Edges /* O: list of edge id's */ ) /* DESCRIPTION: Outputs a list of indices of the edges that bound a face in the active file. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceFacets ( int idFace, /* I: face id */ int *Count, /* O: number of triangular facets */ svxTriangle **Facets /* O: list of triangular facets */ ) /* DESCRIPTION: Outputs a list of the triangular facets used to display the specified face. Memory for "Facets" is allocated by this function. It MUST be deallocated by the calling procedure. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceLoops ( int idFace, /* I: face id */ int Inner, /* I: 1 to include inner loops; 0 for just the outer loops */ int *Count, /* O: number of loops */ int **Loops /* O: list of loop id's */ ) /* DESCRIPTION: Outputs a list of indices of the loops (outer and inner) that belong to a face in the active file. Outer loops proceed counterclockwise relative to the natural normal of the parent surface. Inner loops are clockwise. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceSh ( int idFace, /* I: face id */ svxShaderAt *Sh /* O: face shader attributes */ ) /* DESCRIPTION: Outputs shader attributes of the specified face. "Sh->name[0]" is set to "0" (i.e. empty string) if no shader is defined for the face. Checkerboard Shader: Sh->name = "Checker" Sh->color[0] = first checkerboard square color Sh->color[1] = second checkerboard square color Sh->param[0] = scale factor for checkerboard squares Chrome Shader: Sh->name = "Chrome" Sh->image = optional image file reflected on chrome finish Sh->param[0] = reflectance (0.0 - 1.0) Granite Shader: Sh->name = "Granite" Sh->param[0] = scale factor (0.0 - 2.0) Sh->param[1] = noise (0.0 - 10.0) Marble Shader: Sh->name = "Marble" Sh->color[0] = marble base color Sh->color[1] = marble vein color Sh->param[0] = scale factor (0.0 - 200.0) Wood Shader: Sh->name = "Wood" Sh->color[0] = light wood color Sh->color[1] = dark wood color Sh->param[0] = frequency of wood rings (0.0 - 10.0) Sh->param[1] = overall noisiness of wood grain (0.0 - 6.0) Sh->param[2] = noise in X direction (0.0 - 1.0) Sh->param[3] = noise in Y direction (0.0 - 1.0) Sh->param[4] = noise in Z direction (0.0 - 1.0) Sh->param[5] = scale factor (0.0 - 4.0) Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceShape ( int idFace, /* I: face id */ int *idShape /* O: id out face's parent shape */ ) /* DESCRIPTION: Gets the id of the specified face's parent shape (within the active file). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceSrf ( int idFace, /* I: face id */ svxSurface *Srf /* O: face's untrimmed NURB surface geometry */ ) /* DESCRIPTION: Outputs the untrimmed NURB surface geometry of the specified face. The calling procedure is responsible for deallocating the memory assigned by this function to the "Srf" structure using cvxSurfaceFree(). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFaceTx ( int idFace, /* I: face id */ svxTextureAt *Tx /* O: face texture attributes */ ) /* DESCRIPTION: Outputs texture attributes of the specified face. If a texture image file is embedded in a VX file, it is automatically extracted to a "temp" sub-folder in the VX runtime folder. The path the temp file is output via "Tx->file". Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFtrData ( int idFeature, /* I: feature id */ int iNoEval, /* I: 1 to get unevaluated data; else 0 */ int *idData /* O: id of feature data container */ ) /* DESCRIPTION: Outputs the id of a copy of the specified feature's data container. The calling procedure MUST deallocate "idData" using cvxDataFree() after it is done querying "idData" with the cvxDataXXX() functions. The data associated with a feature is stored in a "persistent" format. Entity references in the data are stored in a format that uses entity labels that were current at the time the feature operation was executed. Before the data can be queried for current entity id's, it must be re-evaluated. This can fail if it references entities that no longer exist. Point selections that reference entities (e.g. entity endpoint) can also fail to re-evaluate if the referenced entities no longer exist. Re-evaluation of the feature data is done without rolling the history back to the specified feature. For this reason, the success or failure of this function is very sensitive to whether the current state of the model contains all of the geometry that existed at the time that the feature was originally executed. If you know that the feature data will not re-evaluate based on the current state of the model, you can get the last evaluated state of point and numeric inputs by calling this function with "iNoEval=1". In this case, you will not be able to successfully query any entity data fields in "idData". Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFtrTemplate ( int idFeature, /* I: feature id */ vxName Template /* O: feature command template name */ ) /* DESCRIPTION: Outputs the name of the command template that defines the input parameters of the specified feature. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqFtrVersion ( int idFeature, /* I: feature id */ int *Version /* O: feature version number */ ) /* DESCRIPTION: Outputs the product version number associated with the specified feature. If "idFeature < 1", outputs the version number of the "active" feature (i.e. the feature currently regenerating). Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqHoles ( vxName File, /* I: part file name (File[0]=0 or NULL for active file) */ vxName Part, /* I: part name (Part[0]=0 or NULL for active part) */ int *Count, /* O: number of holes */ svxHoleData **Holes /* O: list of holes */ ) /* DESCRIPTION: Outputs a list of holes that belong to the specified part. The calling procedure MUST deallocate the output list using cvxPartFreeHoles(Count, Holes); The "idInsFace" and "idUntilFace" fields of the "svxHoleData" structure are not currently supported. They are always output as zero. "ThreadType" is always output as VX_THREAD_CUSTOM. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqLoopEdges ( int idLoop, /* I: loop id */ int *Count, /* O: number of edges */ int **Edges /* O: list of edge id's */ ) /* DESCRIPTION: Outputs a list of indices of the edges that belong to a loop on a face in the active file. The calling procedure MUST deallocate the output list. Outer loops proceed counterclockwise relative to the natural normal of the parent surface. Inner loops are clockwise relative to the natural surface normal. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapeBox ( int idShape, /* I: shape id */ svxMatrix *Mat, /* I: optional local frame (or NULL) */ svxBndBox *Box /* O: shape bounding box */ ) /* DESCRIPTION: Gets the bounding box of the specified shape in the active file. If "*Mat = NULL", the bounding box coordinates are given relative to the global frame of the parent part. If "*Mat" is not NULL, "idShape" must belong to the active part and, a bounding box relative to the specified local coordinate frame is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapeComp ( int idShape, /* I: shape id (in active file) */ int *idComp /* O: shape's parent component (0 if undefined) */ ) /* DESCRIPTION: Outputs the id of the component from which the specified shape was merged. Outputs "idComp = 0" if the shape was not merged from a component. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapeEdges ( int idShape, /* I: shape id */ int *Count, /* O: number of edges */ int **Edges /* O: list of edge id's */ ) /* DESCRIPTION: Outputs a list of indices of the edges that belong to the specified shape in the active file. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapeFaces ( int idShape, /* I: shape id */ int *Count, /* O: number of faces */ int **Faces /* O: list of face id's */ ) /* DESCRIPTION: Outputs a list of indices of the faces that belong to the specified shape in the active file. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapeMass ( int idShape, /* I: id of shape in active part */ double Density, /* I: density (kg/mm^3) */ svxMassProp *Prop /* O: mass properties for specified shape */ ) /* DESCRIPTION: Calculates mass properties for the specified shape in the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqShapes ( vxName File, /* I: part file name (File[0]=0 or NULL for active file) */ vxName Part, /* I: part name (Part[0]=0 or NULL for active part) */ int *Count, /* O: number of shapes */ int **Shapes /* O: list of shape id's */ ) /* DESCRIPTION: Outputs a list of indices of the shapes that belong to the specified part. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartInqVars ( vxName File, /* I: part file name (File[0]=0 or NULL for active file) */ vxName Part, /* I: part name (Part[0]=0 or NULL for active part) */ int *Count, /* O: number of variables */ svxVariable **Variables /* O: list of variables */ ) /* DESCRIPTION: Outputs a list of variables that belong to the specified part. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartLine2pt ( svxPoint *Start, /* I: start point */ svxPoint *End, /* I: end point */ int *idEnt /* O: id of new 3D line entity */ ) /* DESCRIPTION: Adds a 3D line to the active part. If "idEnt" is not NULL, the id of the new line entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartMassProp(void) /* DESCRIPTION: Appends an operation to the history of the active part to calculate mass properties for the part, assigning the results to the variables named Part_Area, Part_Volume and Part_Mass. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPartMovePntToPnt ( int idEntity, /* I: id of geometry entity to move */ svxAxis *Start, /* I: start point and direction */ svxAxis *End /* I: end point and direction */ ) /* DESCRIPTION: Moves the specified geometry within the active part from one point "Start->Pnt" to another "End->Pnt". It also changes the orientation of the part based on "Start->Dir" and "End->Dir". If the directions are same, the orientation of the geometry is not changed -- it is simply translated. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartNameLastOp ( vxName NewName /* I: new name for last history operation */ ) /* DESCRIPTION: If history regen is not active, the input name is assigned to the last operation in the active part's history. The name is forced to be unique within the active history by appending an id to it if necessary. The seed name should be short enough that a 4 character id can be appended to it without making the name longer than 31 single-byte characters. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartPlnCrv ( int idCrv, /* I: id of curve entity */ svxPoint *Origin, /* I: point at or near plane origin on curve */ svxPoint *Xaxis, /* I: point lying on plane of new datum's X axis (or NULL) */ int *idPln /* O: id of new datum plane (or NULL) */ ) /* DESCRIPTION: Adds a datum plane to the active part that is normal to the specified curve "idCrv", with its origin located at the point on "idCrv" that lies closest to the input "Origin" point. If the reference point "Xaxis" is specified (i.e. not NULL), the new datum plane is oriented so that its X axis lies in the plane that contains "Xaxis" and the new datum's Z axis. That is, the point "Xaxis" specifies the XZ plane of the new datum. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartPlnSrf ( int idFace, /* I: id of face entity */ svxPoint *Origin, /* I: point at or near plane origin on face */ int *idPln /* O: id of new datum plane (or NULL) */ ) /* DESCRIPTION: Adds a datum plane to the active part that is tangent to the surface of the specified face "idFace", with its origin located at the point on "idFace" that lies closest to the input "Origin" point. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartPnt ( svxPoint *Point, /* I: point coordinates */ int *idEnt /* O: id of new point entity */ ) /* DESCRIPTION: Adds a 3D point entity to the active part. If "idEnt" is not NULL, the id of the new line entity is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartPnts ( int Count, /* I: number of points */ svxPoint *Points /* I: list of points */ ) /* DESCRIPTION: Adds a list 3D point entities to the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartRevolve ( svxRevolveData *Rev, /* I: input data */ int *idShape /* O: id of new shape */ ) /* DESCRIPTION: Creates a revolved shape and adds it to the active part using the specified combination method. If "idShape" is not NULL and "Ext->Combine = V_BOOL_NONE", the id of the shape created by this function is output via "idShape". If multiple shapes could be created, use cvxEntNewList() to get their id's. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartSew ( double Tol, /* I: 3D proximity tolerance (mm) (0.0 for default) */ int *OpenEdges, /* O: number of unmatched/open edges after sew (or NULL) */ double *MaxGap /* O: maximum gap between all unmatched edges (or NULL) */ ) /* DESCRIPTION: Matches and sews free edges in the active part using the input proximity tolerance. If "Tol" is input as 0.0, the active part's default proximity tolerance is used. Input NULL for "OpenEdges" and/or "MaxGap" if you are not interested in the information returned via those variables. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartSewForce ( double Tol /* I: 3D proximity tolerance (mm) (0.0 for default) */ ) /* DESCRIPTION: Matches and sews free edges in the active part using the input proximity tolerance. If "Tol" is input as 0.0, the active part's default proximity tolerance is used. Unlike cvxPartSew(), this function attempts to "force" open edges to sew to adjacent edges that are "close" but not within tolerance. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxPartShowAll(void) /* DESCRIPTION: */ ________________________________________________________________________________ void cvxPartShowTarg(void) /* DESCRIPTION: */ ________________________________________________________________________________ int cvxPartSkIns ( vxName File, /* I: name of VX file that contains the sketch as root object */ vxName Name, /* I: name of sketch root object */ svxMatrix *Plane, /* I: sketch insertion plane */ int *idEnt /* O: id of new sketch */ ) /* DESCRIPTION: Inserts a copy of the specified sketch in the active part on the specified insertion plane. It is assumed that "File" resides in one of the default search directorie. If "idEnt" is not NULL, the id of the new sketch is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartSkNew ( svxMatrix *Plane, /* I: sketch insertion plane */ int *idEnt /* O: id of new sketch */ ) /* DESCRIPTION: Adds a new sketch to the active part, aligned with the specified insertion plane. The sketch is activated for editing. Exit the sketch edit mode (back to editing the parent part) using cvxRootExit(). If "idEnt" is not NULL, the id of the new sketch is output. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartSweep ( svxSweepData *Swp, /* I: sweep input data */ void *Options, /* I: data pointer reserved for future use (input NULL) */ int *idShape /* O: id of new shape (NULL to ignore) */ ) /* DESCRIPTION: Creates a swept shape and adds it to the active part using the specified combination method. If "idShape" is not NULL and "Ext->Combine = V_BOOL_NONE", the id of the shape created by this function is output via "idShape". If multiple shapes could be created, use cvxEntNewList() to get their id's. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartVarAdd ( svxVariable *Variable /* I: definition of a variable */ ) /* DESCRIPTION: Adds the specified variable to the active part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartVarGet ( svxVariable *Variable /* I/O: variable data */ ) /* DESCRIPTION: Searches the active part for the variable named "Variable->Name". The value of the specified variable is output via "Variable->Value" in database units (mm, deg). If "Variable->Name" is a string variable, the associated text is output via "Variable->Expression". Strings longer than 256 bytes are truncated. NOTE that "Variable->Expression" is not used to output the expression that defines a variable. It is used to output text associated with a "string" variable. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxPartVarSet ( int Count, /* I; number of variables */ svxVariable *Variables, /* I: list of variables */ int Working /* I: 1 to display "Working..." message, else 0 */ ) /* DESCRIPTION: Updates the part variables (e.g. dimensions, parameters) specified by "Variables" and regenerates the active part with the modified values. You can disable the object regeneration normally performed by this function by inputing "Working = -1". See the description of "cvxRootVarSet()" for the names used to identify various part parameters and attributes. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxSubPartFlag ( vxName File, /* I: part file name (File[0]=0 or NULL for active file) */ vxName Part, /* I: part name (Part[0]=0 or NULL for active part) */ int isSubPart /* I: 1=sub-part; 0=ordinary part */ ) /* DESCRIPTION: Is "isSubPart" is non-zero, the specified part is flagged as a sub-part so that it is not displayed in the root object list. Otherwise, it is flagged as an ordinary part (not a sub-part). This function should not be used to change the status of a genuine sub-part, but may be used to suppress/unsuppress display of a regular part in the root object list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ int cvxSubPartIns ( vxName Name, /* I: sub-part name */ int AutoRegen, /* I: 1 to tag sub-part for automatic regeneration, else 0 */ int MergeDimen /* I: 1 to merge sub-part dimensions, else 0 */ ) /* DESCRIPTION: Inserts and activates a sub-part in the active part. If "Name" is a blank string, a default name is assigned to the new sub-part. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________