Add normal= for 2D shapes #1065
sergei9838
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hi Sergei, in principle this is an already available functionality, except one needs to use it after instantiation of the object. from vedo import *
circle = Circle()
print(circle.transform)
circle.reorient([0,0,1], [1,1,1])
print(circle.transform)
show(circle, axes=1) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, Marco,
It would be nice to be able to create 2D shapes with a given orientation like it is now with Plane, so that the shape is on the plane with a given normal vector. It does not require much: just to re-use your transformation code in Plane. For instance, Circle class may look like this:
I added 10 lines after
super()
, argumentnormal
and propertytransform
Usage:
Not to repeat the same code, perhaps, it would be better to have a function like
align_with_normal
which would apply the above transformIf you think it might break many codes,
Oriented_
subclasses can be created:Hopefully, it will be useful
Cheers,
Sergei
Beta Was this translation helpful? Give feedback.
All reactions