Functions Introduced:
Superseded Functions:
The function ProXsecParallelCreate() creates a cross section feature parallel to a given plane.
In Creo Parametric 7.0.0.0 the function ProXsecPlanarWithoptionsCreate() is deprecated. Use the function ProXSectionPlanarCreate() instead.
The function
ProXSectionPlanarCreate() creates a cross section feature through a datum plane and also makes the cross section visible. The input arguments are:
|
• |
solid_owner—Specifies the model where the cross section will be created. |
|
• |
xsec_name—Specifies the name of the cross section. |
|
• |
cutting_plane—Specifies the selection of the cutting plane. The cutting plane must belong to the top-level part or assembly. |
|
• |
xsec_type—Specifies the type of object that will be cut by the cross section. It is specified by the enumerated type ProXsecCutobj. |
|
• |
quilt_or_one_part—Specifies the selection of the quilt or component depending on type of object specified by xsec_type. |
|
• |
flip—Specifies the direction in which the cross section will be clipped. The value 1 indicates that the cross section will be
clipped in the direction of the positive normal to the cutting plane. -1 indicates that the cross section will be clipped
in the opposite direction of the positive normal. |
|
• |
excld_incld_opt—Specifies the items to exclude, specified by the input parameter exclude_items from cutting by the cross section and is defined by the enumerated data type ProXsecExcludeModels. |
|
• |
exclude_items—Specifies a ProArray of selected bodies or parts to be included or excludes from the cross section. |
|
• |
data—Reserved for future use. |
Note
|
• |
From Creo Parametric 4.0 F000 onward, when a cross section is created, it is not displayed by default in the model. You must call the function ProXsecMakeVisible() to display the cross section. |
|
• |
While porting Creo TOOLKIT applications, which have used the function ProXsecPlanarWithoptionsCreate() and have been created in releases prior to Creo Parametric 4.0 F000, depending on whether you want the cross section to be displayed, call the function ProXsecMakeVisible() in your applications. ProXsecMakeVisible() displays the cross section in the model. |
|
• |
From Creo Parametric 2.0 onward:
|
○
|
the legacy cross sections, that is, the cross sections created in Pro/ENGINEER, Creo Elements/Pro, and in releases prior to Creo Parametric 2.0 are not supported. |
|
○
|
the functions ProXsecParallelCreate() and ProXsecPlanarWithoptionsCreate() create cross sections as features. |
|
○
|
the functions ProXsecParallelCreate() and ProXsecPlanarWithoptionsCreate() automatically convert the legacy cross sections to new cross section features as defined in Creo Parametric 2.0 before creating any new cross section feature. |
|
The function ProXsecOffsetCreate() is deprecated. Use the function ProXSectionOffsetCreate() instead.
The function
ProXSectionOffsetCreate() creates an offset cross section from a polyline. The polyline lies on a plane and the plane is defined by a local coordinate
system. Offset cross section is created by extruding the polyline perpendicular to the sketching plane. The input arguments
are:
|
• |
solid_owner—Specifies the model where the cross section will be created. |
|
• |
xsec_name—Specifies the name of the cross section. |
|
• |
trf—Specifies the local coordinate system of the plane which contains the polyline. |
|
• |
ent_arr—Specifies a ProArray of Pro2dEntdef structure. The structure contains information about the entities of the polyline. |
|
• |
side—Specifies the side to which the cross section must be extended. The cross section is extended normal to the polyline plane.
The side is specified using the enumerated data type ProXsecOffsetSide. The valid values are:
|
○
|
PRO_XSEC_OFFSET_BOTH_SIDES—Extends the cross section to both sides of polyline plane. |
|
○
|
PRO_XSEC_OFFSET_SIDE_1—Extends the cross section to the positive normal of polyline plane. |
|
○
|
PRO_XSEC_OFFSET_SIDE_2—Extends the cross section to the negative normal of polyline plane. |
|
|
• |
flip—Specifies the direction in which the cross section will be clipped. The value False indicates that the material on the right side of the polyline plane is retained. When the argument side is set to PRO_XSEC_OFFSET_SIDE_1 or PRO_XSEC_OFFSET_SIDE_2 then the material is retained from positive or negative side of polyline plane respectively.When the value is set to True the above area is removed. The remaining material is retained.
Note
If the polyline from which the cross section has been created is closed, then flip works a little different.
Polyline Direction
|
Flip Value
|
Description
|
Closed polyline created clockwise
|
False
|
The material inside of the closed polyline is retained.
When the argument side is set to PRO_XSEC_OFFSET_SIDE_1 or PRO_XSEC_OFFSET_SIDE_2 then the material is retained from positive or negative side of polyline plane respectively.
|
Closed polyline created clockwise
|
True
|
The material described in above case is removed. The remaining material is retained.
|
Closed polyline created counter clockwise
|
True
|
The material inside of the closed polyline is retained.
When the argument side is set to PRO_XSEC_OFFSET_SIDE_1 or PRO_XSEC_OFFSET_SIDE_2 then the material is retained from positive or negative side of polyline plane respectively.
|
Closed polyline created counter clockwise
|
False
|
The material described in above case is removed. The remaining material is retained.
|
|
|
• |
excld_incld_opt—Specifies the items to be excluded from cutting by the cross section and is defined by the enumerated data type ProXsecExcludeModels. The items to be excluded are specified by the input parameter exclude_items. |
|
• |
exclude_items—Specifies a ProArray of selected bodies or parts to include or exclude from the cross section. |
|
• |
data—This option is specified using the data structure ProXSectionCreateData and is used to set quilt cross section type as PRO_XSECTYPE_QUILTS or PRO_XSECTYPE_MODELQUILTS for offset cross section. . This input argument is optional. If you do not want to offset cross section to cut quilts, set
this as Null. |
The functions ProXSectionPlanarCreate() and ProXSectionOffsetCreate() return an error PRO_TK_LINE_TOO_LONG, when the xsec_name is longer than PRO_NAME_SIZE.
The function ProXSectionCreateDataAlloc() allocates memory for the ProXSectionCreateData data structure.
Use the function ProXSectionCreateDataFree() to free the ProXSectionCreateData data structure memory.
The data structure ProXSectionCreateData is defined as follows:
Use the function ProXSectionCreateDataQuiltSelGet() to retrieve the quilt selection data. The output argument r_quilt_sel is the address of the quilt selection pointer given through the ProSelection object.
The function ProXSectionCreateDataQuiltSelSet() sets the quilt selection data using the structure ProXSectionCreateData.
The function ProXSectionCreateDataQuiltTypeGet() gets the quilt cross section type using the structure ProXSectionCreateData. The output argument r_xsec_type is defined by the enumerated data type ProXsecCutobj. The valid values can be PRO_XSECTYPE_QUILTS or PRO_XSECTYPE_MODELQUILTS.
Use the function ProXSectionCreateDataQuiltTypeSet() to set the quilt cross section type using the structure ProXSectionCreateData.
The function ProXsecMakeVisible() displays the specified cross section in the model. Use the function ProXsecIsVisible() to check if the specified cross section is displayed in the model.
The function ProXsecActiveSet() sets the specified cross section as active in the current view. Use the function ProXsecActiveGet() to retrieve the cross section, which is active in the current view.
Use the function ProXsecCanCreateAsFeature() to check if new cross section features can be created in the specified model. The function returns PRO_B_FALSE if the specified model has legacy cross sections.
The function ProXsecOldToNewConvert() converts the legacy cross sections to new cross section features as defined in Creo Parametric 2.0 for the specified model.
Use the function ProXsecIsFeature() to check whether the cross section is a feature.
The function ProXsecFeatureGet() returns a pointer to the cross section feature. The function returns the error type PRO_TK_BAD_CONTEXT for legacy cross sections.
The function ProXsecDelete() deletes a given cross section from a part or assembly.