Re-arrange sketch entities

Phenom
Phenom

I have a sketch as an input to my program drawn in a sequence as below:

 

2016_Aug_09_01.png

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.

   

~Tushar

 

3 REPLIES

Re: Re-arrange sketch entities

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Tushar,

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

 

regards

JB
VS2015, SE ST10

Re: Re-arrange sketch entities

Phenom
Phenom

Hi JB:

  

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,

   

~Tushar

 

Re: Re-arrange sketch entities

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I agree!

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!

regards

JB
VS2015, SE ST10