User Tools

Site Tools


How to create a Driver Sketch

Using Expressions it is possible to create and use a simplified sketch to drive a more complex sketch The idea is to map the blue constraints of the driver to some red constraints in the driven sketch.

The driver is created as a hexagon (red)

The driven sketch is a shoe rib sketch from the Nurbs Workbench project (yellow).

import nurbswb
import nurbswb.createshoerib

The mapping between the constraints is donme by related name lists


		'p0X', 'p0Y',  
		'p2X', 'p2Y',
		'p4X', 'p4Y',
		'p8X', 'p8Y',
		'p12X', 'p12Y',
		'p14X', 'p14Y',

The expression can be done by script this way

rc=target.setExpression('Constraints.'+outputs[i], source.Name+".Constraints."+inputs[i])

blog/how_to_create_a_driver_sketch.txt · Last modified: 2017/04/18 20:20 by freek