Pick invisible point

How can I pick points with visible set to false through setNodePointVisibility, but not other lines or faces with visible set to false

This should be possible although admittedly, my response is nuanced.

You can use different parameters for the PickConfig object to allow for only points to be selected while not visible:

var om = hwv.operatorManager;
var operatorPoint = om.getOperator(Communicator.OperatorId.Select);

var pickConfig = operatorPoint.getPickConfig();
pickConfig.allowPoints=true;
pickConfig.allowLines=false;
pickConfig.allowFaces=false;
pickConfig.respectVisibility=false;

operatorPoint.setPickConfig(pickConfig);

However, there is a confimed bug with the option pickConfig.allowFaces=false still allowing faces to be selected for the operator.

So for the time being, while the bug is still being resolved, picking only invisible points cannot be done.

But this set will affect visible on the surface of the line selection, think through similar pickconfig forceEffectiveVisibilityMask = point this to implement, but have no effect.

Perhaps I misunderstood your question. For the initial state, what is the visibility of each of the following:

  • point = false
  • line = true?
  • face = true?

Visible points, lines and surfaces can all be picked, while invisible points, lines and surfaces can only be picked at points

Perhaps we can try setting pickConfig.respectVisibility=false when you set your visibility. Then in a selection callback, you can filter the out the selectionItem:

hwv.setCallbacks({
  selectionArray: async function (selections) {
      if (selections.length > 0) {
          for (const selectionEvent of selections) {
            var selectionItem = selectionEvent.getSelection();
			var nodeid = selectionItem.getNodeId();
            if (selectionItem.isPointSelection() == false){
				hwv.selectionManager.remove(selectionItem);
			}
		}
      }
  },
});

Feel free to add more conditions on the selectionItem object to suit your needs.