Hi Peer,
re:
> Is there a way to create a straight snap at a specific angle in a script?
Just with pointpicker.addStraightSnapAngle() as you mention.
> What I need to do is more like adding a straight snap at just 90 degrees without
> additional snaps being added at 0, 180, and 270.
Doing pointpicker.disableStraightSnapAngle( 0 ), pointpicker.disableStraightSnapAngle( 180 ), and pointpicker.disableStraightSnapAngle( 270 ) is the only way set up to do that.
Maybe instead of using straight snap you could set up a custom snapping function. That would be by calling pointpicker.addSnapFunc( YourFunc ); the function you pass will get the pointpicker object passed to it and if you want a snap to be triggered you call pointpicker.setSnapFuncPoint( point, 'label' );
Something like this:
function SnapFunc( pointpicker )
{
Look at pointpicker.pt or pointpicker.screenpt
and if you want it to snap somewhere do pointpicker.setSnapFuncPoint( point, 'label' );
}
- Michael
|