User Tools

Site Tools


wiki:sns:snsscript:restraints

Restraints Specification

boolSuccess = objSnSScript.AddFaceRestraint( GUID, RestraintDescription, FaceIndices, RestraintType)

This function restrains the face(s) specified by the face indices on the object, in the coordinate directions given by the type of restraint. Equivalent to setting a face restraint in SnS.

ParameterDescription
String GUIDRhino ID of the object.
String RestraintDescriptionDescription of this restraint. Equivalent to the Description entered in the text box when editing restraints in SnS. Should be unique.
Array(int) FaceIndicesThe indices of the faces on the solid to apply the restraint to, an array of integers. If only one face is to be restrained, it is not necessary to put the index in an array.
String RestraintTypeA string containing the directions to restrain. For full restraints, use “xyz”. For partial restraints, omit the directions you do not wish to restrain, such as “yz”, “xz”, “xy”. Case insensitive.
Return TypeDescription
BooleanTrue if the restraint was successfully added to the object, False otherwise.

boolSuccess = objSnSScript.AddEdgeRestraint( GUID, RestraintDescription, EdgeIndices, RestraintType)

This function restrains the face(s) specified by the face indices on the object, in the coordinate directions given by the type of restraint. Equivalent to setting a face restraint in SnS.

ParameterDescription
String GUIDRhino ID of the object.
String RestraintDescriptionDescription of this restraint. Equivalent to the Description entered in the text box when editing restraints in SnS. Should be unique.
Array(int) EdgeIndicesThe indices of the edges on the solid to apply the restraint to, an array of integers. If only one edge is to be restrained, it is not necessary to put the index in an array.
String RestraintTypeA string containing the directions to restrain. For full restraints, use “xyz”. For partial restraints, omit the directions you do not wish to restrain, such as “yz”, “xz”, “xy”. Case insensitive.
Return TypeDescription
BooleanTrue if the restraint was successfully added to the object, False otherwise.
wiki/sns/snsscript/restraints.txt · Last modified: 2017/07/14 13:49 by claire