Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Block UI Styler - How to select Polygon Face in advanced simulation application

I need a block can provide the feature to allow users select Polygon Faces in Advanced Simulation Application.

For now, I can select Polygon Edges with the block of "Curve Collector", but I cannot use "Face Collector" to select Polygon Face.

It seems that these selection blocks can be used to select CAD objects such as Body, Face, Edge, Point. They cannot be used to select CAE objects like Polygon Body, Polygon Face, Mesh Point...

 

 

3 REPLIES
Solution
Solution
Accepted by topic author Xiang
‎07-14-2016 01:36 AM

Re: Block UI Styler - How to select Polygon Face in advanced simulation application

You might need an object selector and use your own selection mask to accomplish this.

 

Private selRefHole As NXOpen.BlockStyler.SelectObject' Block type: Selection

Dim oSelectionMask(0) As Selection.MaskTriple

With oSelectionMask(0)
    .Type = UF.UFConstants.UF_machining_geom_type
    .Subtype = UF.UFConstants.UF_mach_geom_feature_subtype
    .SolidBodySubtype = 0
End With

selRefHole.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, oSelectionMask)

The above is just a sample of the used methods, you will have to merge it into your existing UI code.

The NXOpen reference will give you more explanations about how to use this.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Block UI Styler - How to select Polygon Face in advanced simulation application

[ Edited ]

This is correct. For FEM/SIM entities other than nodes or elements (which have their own dedicated selection blocks), you need to use the generic SelectObject block with the appropriate selection filter (MaskTriple).

Most of these are defined in %UGII_BASE_DIR%\UGOPEN\uf_object_types.h. Polygon geometry is of type UF_caegeom_type:

 

#define UF_caegeom_type                          31
#define    UF_caegeom_region_subtype                   8
#define    UF_caegeom_face_subtype                     9
#define    UF_caegeom_edge_subtype                     10
#define    UF_caegeom_vertex_subtype                   11
#define    UF_caegeom_body_subtype                     12
#define    UF_caegeom_volume_subtype                   13


Note that there are some "pseudo" entities defined in %UGII_BASE_DIR%\UGOPEN\uf_ui_types.h. For example, to enable node or element selection in the generic SelectObject block, the MaskTriple is defined by (for NX 10):

 

 

/* Define UF_pseudo_object_type and corresponsing subtypes and detail types:
 * UF_pseudo_object_type is used for selection only and for object types not defined in uf_object_types.h
 */
#define UF_pseudo_object_type   (-1)

/* The subtypes for UF_pseudo_object_type: */

/* For CAE: */
#define UF_pseudo_CAE_subtype   (1)
#define UF_pseudo_CAE_node      (1) /* first CAE detail type */
#define UF_pseudo_CAE_element   (2) /* second CAE detail type */

 

For NX 11, this is expanded to include element faces and edges:

 

/* Define UF_pseudo_object_type and corresponsing subtypes and detail types:
 * UF_pseudo_object_type is used for selection only and for object types not defined in uf_object_types.h
 */
#define UF_pseudo_object_type   (-1)

/* The subtypes for UF_pseudo_object_type: */

/* For CAE: */
#define UF_pseudo_CAE_subtype   (1)
#define UF_pseudo_CAE_node      (1) /* first CAE detail type */
#define UF_pseudo_CAE_element   (2) /* second CAE detail type */
#define UF_pseudo_CAE_elemface  (3) /* third CAE detail type */
#define UF_pseudo_CAE_elemedge  (4) /* fourth CAE detail type */

 

Re: Block UI Styler - How to select Polygon Face in advanced simulation application

Thank you for your replies. I will try it now! Smiley Very Happy