It looks like you're new here. If you want to get involved, click one of these buttons!
Trying to run .rb script:
trans = Trans::new(Trans::R270, false, 0, 0)
returns error "no implicit conversion for RBA::Trans into Integer (Class TyperError)"
Klayout version = 0.25.5
Ruby interpreter 2.4.0-p0 (x64-mingw32)
Has anyone come across this error before?
Comments
The rotation is expressed in units of 90 degrees (see doc), so in Python this works:
which means that in Ruby this should work:
Cheers, Erwin
Hi Erwin,
thanks for answering, and I'm a bit sorry I have to correct you ...
By "in units of 90 degree" I meant that 0 = 0, 1 = 90, 2 = 180 and 3 = 270. Maybe the description is kind of misleading.
So 270 degree are actually:
It gets a bit more confusing when you switch to complex transformations with an arbitrary angle. For those it's really degree, so the equivalent of 270 degree as integer-to-integer complex transformations is:
The error above actually happens only because
Trans.R270
already is aTrans
object representing a 270 degree rotation. So the answer simply is:or in Ruby:
Kind regards,
Matthias
Hi Matthias, thanks for the correction. Best regards, Erwin