3 point select to line
Good morning
I need help again and I'm back.
Not different
When I select three vertices of a spline or poly
I want to implement a script that will create lines to that length
This is a difficult code I am wandering
I can ask you for help.
Attachment | Size |
---|---|
3_point_line.jpg | 229.35 KB |
Comments
.
This one creates a copy of your splineshape and delete all knots that are preceed and those that go after the selected ones. Idea is clear and simple. You need to modify it to work with multi-spline shapes.
upd I just realized that it works incorrectly if spline is closed and the middle vert is first one ;)
I guess it is not the only bug
Poly verts indexes are not ordered so you can't tell which selected vert is the middle one. And because of that you'll get three valid variants of spline: 1-2 + 2-3, 2-3 + 3-1, 3-1 + 1-2
thank you about good reply
Thank you
I use closed spline common
I will try your code
But in poly
If i dont use vertex ,
How about 3 edges ?
Is that imposble also ?
.
same absolute story. I'll have to define mid vert/edge index in order to get right subSpline
thank you for good advice
https://www.flyingcfx.com/?page_id=7
I seen select border there
So i thought idea~~
.
0. get edge by vert index
1. get open edges polyop.getBorderFromEdge <Poly poly> <int edge>
2. sort edge indexes (the most complicated part)
3. toggle between two edge groups to select the one you need (or select shortest one if edge groups have different edge count)
thank you for good answer
Thank you fast ansewr
That is not my area
I thought that is simple
But as your advice , that is difficult to me
~~