![]() |
PK_BODY_set_type |
PK_ERROR_code_t PK_BODY_set_type ( --- received arguments --- PK_BODY_t body, --- body to have its type changed PK_BODY_type_t new_type, --- type to change to (if possible) const PK_BODY_set_type_o_t *options --- options structure ) This function tries to change the type of the body (e.g. from General to Solid). If the change is not possible, either a mild error is returned and the body is unchanged, or in specific cases a serious error is returned. Specific Errors: PK_ERROR_bad_orientation Unable to set the body type to Solid because the faces have inconsistent orientation. (SERIOUS) PK_ERROR_bad_type Either the user passed in PK_BODY_type_unspecified_c as 'new_type', or asked for a conversion that is not supported (e.g. Sheet to Wire). (MILD) PK_ERROR_laminar_edge The supplied body has at least one laminar edge and thus cannot become a solid. (MILD) PK_ERROR_unsuitable_topology The conversion is not possible due to topological reasons (e.g. mixed dimension of a general body). (MILD) This function tries to change the type of the body (e.g. from General to Solid) to the type specified by 'new_type'. If the change is not possible, an error is returned and the body is not changed, except when trying to change a body to Solid. In that case the body may have changed during the conversion attempt, if it was indeed changed a serious error is returned. In all other cases if an error is returned it is mild. The following type conversions are supported currently (provided they make sense topologically): a) General -> Solid/Sheet/Wire/Acorn/Minimum b) Solid/Sheet/Wire/Acorn/Minimum -> General c) Solid -> Sheet d) Sheet -> Solid Conversion to the General type should always work. At present no attempt is made to correct any faults/peculiarities in the body which may prevent the type change. Notably, the orientations of faces are not changed by this function. This means that converting a Sheet (or General) body to a Solid will fail when the faces appear to form a sensible solid body, if one or more of them are incorrectly oriented. See here for more information. If the change is from Sheet to Solid or vice versa, the region(s) that must become solid/void are changed appropriately, no other change to the topology is performed (apart from setting the body type). The supplied type must be a valid and specific Parasolid body type, PK_BODY_type_unspecified_c is not allowed. Other Parasolid APIs exist that can be used to convert a model from one type to another or derive a model of a different type from pre-existing models. These APIs include: - PK_BODY_make_manifold_bodies - PK_REGION_make_solid - PK_REGION_make_void - PK_EDGE_make_wire_body - PK_REGION_combine_bodiesGenerated on: Fri, 04 Oct 2024 12:17:11 GMT