functions to help select and move multiple points on a surface
All  1  2

Previous
 From:  Michael Gibson
12082.2 In reply to 12082.1 
Hi Hadri1,

re:
> is there a way to select all the point of a given U iso line from a single
> point selection ? (same for V iso)

This is possible now with some script methods added in v5, see
"Update surface control point scripting." at
http://moi3d.com/forum/index.php?webtag=MOI&msg=11970.1

For expanding from a single selected point of a surface to the entire U row, paste this as the "Command" part of a shortcut key:

code:
script: /* For any selected edit points on a surface, expand selection to entire U direction row */
var objectpicker = moi.ui.createObjectPicker();
objectpicker.allowEditPoints();
objectpicker.done();
var objects = objectpicker.objects;

for ( var i = 0; i < objects.length; ++i )
{
	var obj = objects.item(i);
	if ( obj.isSingleFaceBRep && obj.hasSelectedEditPoints )
	{
		var face = obj.getFaces().item(0);
		
		var numu = face.numControlPointsU;
		var numv = face.numControlPointsV;

		var flag = [];
		flag.length = numv;

		for ( var v = 0; v < numv; ++v )
		{
			for ( var u = 0; u < numu; ++u )
			{
				var index = face.uvToEditPointIndex( u, v );
				if ( obj.getEditPointSelected( index ) )
				{
					flag[v] = true;
					break;
				}
			}
		}

		for ( var v = 0; v < numv; ++v )
		{
			if ( flag[v] )
			{
				for ( var u = 0; u < numu; ++u )
				{
					index = face.uvToEditPointIndex( u, v );
					obj.setEditPointSelected( index, true );
				}
			}
		}
	}
}


This one for V:

code:
script: /* For any selected edit points on a surface, expand selection to entire V direction column */
var objectpicker = moi.ui.createObjectPicker();
objectpicker.allowEditPoints();
objectpicker.done();
var objects = objectpicker.objects;

for ( var i = 0; i < objects.length; ++i )
{
	var obj = objects.item(i);
	if ( obj.isSingleFaceBRep && obj.hasSelectedEditPoints )
	{
		var face = obj.getFaces().item(0);
		
		var numu = face.numControlPointsU;
		var numv = face.numControlPointsV;

		var flag = [];
		flag.length = numu;

		for ( var u = 0; u < numu; ++u )
		{
			for ( var v = 0; v < numv; ++v )
			{
				var index = face.uvToEditPointIndex( u, v );
				if ( obj.getEditPointSelected( index ) )
				{
					flag[u] = true;
					break;
				}
			}
		}

		for ( var u = 0; u < numu; ++u )
		{
			if ( flag[u] )
			{
				for ( var v = 0; v < numv; ++v )
				{
					index = face.uvToEditPointIndex( u, v );
					obj.setEditPointSelected( index, true );
				}
			}
		}
	}
}


re:
> one all the point of an iso curve are selected, is there a way to move them
> in the U V or N direction ?

Sorry no, not currently.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2