I have one thing that i cannot do and did not found anywhere and would help me a lot if it will be possible.
The thing is to make code which do exactly the thing like knife tool.
I found, that there are cdrtools, but dont have idea of how to use them
For example i have some shape crossed with 2point line and i would like to knife the shape according to 2 point line, so that the shapes will not be closed like if i do this with trim - it will be just divided to two shapes.
If you can do this or point me to solution, i will be very gratefull.
you can use Segment.GetIntersections to find intersect points (shape with line), after this use Segment.AddNodeAt at this points and Node.BreakApart to split node to 2 nodes. Finally you can use Shape.BreakApart to get separated unclosed shapes
Thank you Shark. Seems i understand and it makes sense :)
As i am newbie to VBA, i see it will take much more time for me, but i will try.
If it will be for you not much time consuming, i will be also glad, if you make example code... and let me know where to send you something more than thank you :)
Just thinking - maybe can be easier when i combine line and shape, than i get the interception nodes, but still - how to achieve that the shape will be divided by the line?...
Do you need something like that?
yes, this like thing... i found one possible solution, but as i am newbie, i have new task before me, because another task i have to study :) or maybe it can be done in some easier way?
My half solution is:
1) get position and dimensions of line
2) append everything bellow line
- this is done, and so i get one half of object
This can be enought if i learn how to select shape above the line than copy it, and do append to another side and paste those two pieces back... (how to make something like mouse drag selection :))
Maybe this is some strange workaround, but at this moment only thing i can do to achieve goal. (if i find out how to select remain of appended shape :)