[CONNECT C++] Locate Tool: locate closed curve

I can write a locate tool that enables a user to pick a closed curve (e.g. a DGN shape element).  The user must datapoint a line or curve that defines the perimeter of the shape.

How can I write a tool that enables a user to pick that same closed curve by clicking in its interior?

closed curve

Parents
  • By default, in a wireframe view, only filled shapes will be located by their interior. Someone can choose to set the Locate Interiors preference to Always should they want this behavior (or choose to work in a shaded view).

    A tool *could* save and restore this preference (OnPostInstall/OnCleanup)...in general however it's best to respect the current preferences and not create tools that work differently than every other tool.

    enum class LocateSurfacesPref
    {
    Never = 0, //!< Don't locate interiors of regions, surfaces, and solids even if filled or rendered.
    ByView = 1, //!< Locate interiors according to view attributes for fill display and render mode. (Default)
    Always = 2, //!< Locate interiors of regions, surfaces, and solids even in wireframe and even with fill display off.
    };

    userPrefsP->smartGeomFlags.locateSurfaces // <- Still mentions LOCATE_SURFACES_ defines that no longer exist and I think had 5 values... Disappointed

    HTH

    -B



    Answer Verified By: Jon Summers 

Reply
  • By default, in a wireframe view, only filled shapes will be located by their interior. Someone can choose to set the Locate Interiors preference to Always should they want this behavior (or choose to work in a shaded view).

    A tool *could* save and restore this preference (OnPostInstall/OnCleanup)...in general however it's best to respect the current preferences and not create tools that work differently than every other tool.

    enum class LocateSurfacesPref
    {
    Never = 0, //!< Don't locate interiors of regions, surfaces, and solids even if filled or rendered.
    ByView = 1, //!< Locate interiors according to view attributes for fill display and render mode. (Default)
    Always = 2, //!< Locate interiors of regions, surfaces, and solids even in wireframe and even with fill display off.
    };

    userPrefsP->smartGeomFlags.locateSurfaces // <- Still mentions LOCATE_SURFACES_ defines that no longer exist and I think had 5 values... Disappointed

    HTH

    -B



    Answer Verified By: Jon Summers 

Children
No Data