For all issues regarding the Forums use, please, refer to the Forum Rules.

### Our Solutions

Need professional assistance?
Consider our:

Need to speed up your development?
Have a look at our:

Need some functionality extending standard OCCT capabilities?
Check out our:

# Split edge at mouse position

Forums:

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

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..

Dear DeleDivaneeh.

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

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.

can you give a sample example?

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?

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.