Split edge at mouse position

hi all,
i try to split a selected edge at mouse position. Can anybody help me?
thanks frank

DeleDivaneeh's picture

Is there a solution?

I also want to cut an edge.Think that we have an edge composed of 2 points:

*---------------* like that

and I want to cut this edge equally,after cut operation,I want my edge composed of -for instance- 5 point.

*-----*-----*-----*-----* like that..

Evgeny Lodyzhehsky's picture

Dear DeleDivaneeh.

In order to equally split a curve of an edge try ti use the class
GCPnts_QuasiUniformAbscissa.

Evgeny Lodyzhehsky's picture

Dear Frank Conrad.

Splitting an edge by point is not very hard task.

You will have to analyse each edge Ei( i=1,2...nE )from your wire Wx:
So for each edge Ei:
1. make a vertex Vx from your point Px //use class BRep_Builder
2. compute parameter Tx of the vertex Vx for the edge Ei // use something like IntTools_Context::ComputeVE(...);
3. Split the edge by Vx, Tx // use smth like void BOPTools_Tools::MakeSplitEdge(...);

Of corse, there can be some smart cases,
but I hope you'll can manage them yourself.

DeleDivaneeh's picture

can you give a sample example?

DeleDivaneeh's picture

Dear Lodyzhensky Evgeny Nicolaich,

First of all,thank you for your explanations,but there are some points that I can not understand.

How does BOPTools_Tools::MakeSplitEdge method exactly work?I read the explanation of this method from the documentation of OpenCascade but there is not a good explanation..

It only says that :

MakeSplitEdge (const TopoDS_Edge &aE1, const TopoDS_Vertex &aV1, const Standard_Real aP1, const TopoDS_Vertex &aV2, const Standard_Real aP2, TopoDS_Edge &aNewEdge)

Make the edge from base edge and two vertices
at parameters

What is the parameters here?What are aP1 and aP2?

Thanks in advance..

Evgeny Lodyzhehsky's picture

Dear DeleDivaneeh.

I've adviced you to have a look in C++ code of BOPTools_Tools::MakeSplitEdge() in order to clarify how to split an edge /as an example/, but not for directly usage this method.
I hope that you'll can write suitable code for your own purposes.

DeleDivaneeh's picture

Ok,thank you for your help..