Use the DivideCurveBuilder, and set the type to:
Record a Journal with your User Interface Journal preferences set to C++ to see the whole process. You will of course have to substitute either curve selection or some other method of your choosing to specify the curves.
are you assuming they are in the same plane, or do you have to check if they are skewed?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
You have to first collect all the lines. Then iterate each line and check itersection with all other lines.
Below is the function to find whether two lines are intersected or not
|tag_t||curve1_id||Input||first curve or edge to intersect|
|tag_t||curve2_id||Input||second curve or edge to intersect|
|int*||num_intersections||Output||number of intersections|
|double* *||data||Output to UF_*free*||It is a one dimensional array whose size is num_intersections 5|
data[5i + 0], data[5i + 1] and data[5i + 2] holds the coordinates of the point
data[5i + 3] holds the parameter of first curve or edge
data[5i + 4] holds the parameter of second curve or edge
After that you can trim those lines or delete as per your requirement.