Showing results for 
Search instead for 
Do you mean 
Reply

Selection Block (BlockStyler): Type of filter for CURVES

Hi,

 

I have a SelectionBlock (Block Styler). I need to set the filter to Curves. I use the SetSelectionFilter method with the MaskTriple. However, I did not find the type Curve in the file uf_object_types.h.

 

I found UF_line_type, UF_circle_type, UF_spline_type, etc.,  which are a particular case of a Curve, but I need a type that cover all the types of curves in one shot (so the string "Curve" appears in the selection filter in NX).

 

Please note that I have to use the SelectionBlock. Using the CurveSelector of Block Styler is not an option.

 

Thanks for the help.

 

4 REPLIES

Re: Selection Block (BlockStyler): Type of filter for CURVES

What does UF_OBJ_ask_type_and_subtype() return for any of the curves in question?

There might not be a single curve type and you have to use multiple selection masks, which is supported, since the block needs a mask array.

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: Selection Block (BlockStyler): Type of filter for CURVES

Stefan is correct, there is no single type you can specify that will get all curve types.  You will need to use an array and include the various types that you mentioned.  Have a look at the ...ugopen\uf_object_types.h header file in your NX installation folders to see these.

 

Do you also want edges?  Here is a snippet from an old Open C program that defines the mask array to include edges - note that it omits points, which NX actually also considers to be curves:

 

static int mask_for_curves(UF_UI_selection_p_t select, void *user_data)
{
    UF_UI_mask_t
        mask[5] = { UF_line_type, 0, 0,
                    UF_circle_type, 0, 0,
                    UF_conic_type, 0, UF_all_subtype,
                    UF_spline_type, 0, 0,
                    UF_solid_type, 0, UF_UI_SEL_FEATURE_ANY_EDGE };

    if (UF_CALL(UF_UI_set_sel_mask(select,
        UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, 5, mask)))
        return (UF_UI_SEL_FAILURE);
    else
        return (UF_UI_SEL_SUCCESS);
}

 

The syntax will be different for different languages, but hopefully this helps explain how to mask for various curve types.

Re: Selection Block (BlockStyler): Type of filter for CURVES

What is the reason that you don't like to use the curve selector?

It is designed to be used to select curves Smiley Wink

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: Selection Block (BlockStyler): Type of filter for CURVES

Thank you all for your answers.

 

I need to use Select Block since I want one block for selecting curves and faces.