I have a sketch as an input to my program drawn in a sequence as below:
If I use this sketch to create a Contour Flange interactively, the flange is created. However if I use this for the AddBaseContourFlange function, it fails with a topology error.
This function does not accept Lines2D which are:
1. Not in a sequence connected one after another.
2. EndPoint of first line is connected to EndPoint of next (meaning EndPoint of first line should be connected to StartPoint of the next one).
It is evident that, Solid Edge internally arranges them in the required order, since I found this to be so when checking the Profile of the resultant Contour Flange. The lines are in proper sequence.
Do you know which API exists to re-arrange lines or sketch objects in a proper sequence so that they becomes usable in theAddBaseContourFlange call.
I looked at OrderedGeometry but it does not have any related methods.
Solved! Go to Solution.
I do not know any function in the API to do that for you.
I fear you have to order the lines within your code and, if necessary, reorient (switch start and end position).
Thank you for the reply.
This only confirms my faith that there isn't one that has been exposed but is used internally.
This is exactly what perplex me.
We have been spending precious time replicating what Solid Edge does internally and no one from development bothers to respond. What a pity,
If there is such a restriction to the input parameter, it should a least be documented in the API help.
This would save a lot of time for the developer!