Home Forums Nazca Generic Bend Reply To: Generic Bend

#5227
Ronald
Keymaster

Dear Douglas,

I’ll have to check how you can add an image. I see I have that option.

As for the syntax, note you never need to use the Node class directly:

# works
xya = nd.diff(bend1.pin['b0'], nd.Node.rotate(bend2.pin['b0'], 180))

# but this is shorter and more direct:
xya = nd.diff(bend1.pin['b0'], bend2.pin['b0'].rot(180))

As for the generic bend. Use it with care as it is a more or less intended as an internal function for the ‘pcurve’ (parametric curve). The mechanism can be reused for other types of parameteric curves.

First a path is created, and that is what you export in your example. However, the path’s discretization is not well defined, e.g. if you send it to a foundry. Therefore, there is a nd.util.polyline2polygon method which takes care of the discretization and creating a polygon first. A tutorial on this topic would be helpful.

Ronald