Reply

Direction of arcs and circles

[ Edited ]

Is there a way to toggle the direction an arc is created with .net? I have noticed that mine are being created counter clockwise and I really have a need to go the other way.

 

Bob

 

Posted by: Bob Reinkemeyer
Post date: 12/2/2005 1:24:23 AM

5 REPLIES

RE: Direction of arcs and circles

[ Edited ]

Bob,

 

Post some code and I'll take a looksy at it .

 

Posted by: Jason Newell
Post date: 12/2/2005 2:39:58 AM

Re: RE: Direction of arcs and circles

Jason,

 

  Here is some code.

 

Dim oApp As SolidEdgeFramework.Application = Marshal.GetActiveObject("SolidEdge.Application")
Dim oDoc As SolidEdgeDraft.DraftDocument = oApp.ActiveDocument
Dim oSheet As SolidEdgeDraft.Sheet = oDoc.ActiveSheet

Dim oArc As SolidEdgeFrameworkSupport.Arc2d
Dim xCen As Double = 0, yCen As Double = 0

'Dim xStart As Double = 0.1, yStart As Double = 0
'Dim xEnd As Double = 0, yEnd As Double = 0.1

Dim xStart As Double = 0, yStart As Double = 0.1
Dim xEnd As Double = 0.1, yEnd As Double = 0

oArc = oSheet.Arcs2d.AddByCenterStartEnd(xCen, yCen, xStart, yStart, xEnd, yEnd)

Two blocks of values are provided for the arc parameters, need to comment one and un-comment the other.

One set creates the arc and other creates its complimentary arc.

 

What is required by both me and Bob is: creating an arc going clockwise from the start to end about the center.

The API always creates an anti-clockwise arc. This is known and accepted.

If only there is a way, trick or tweak to create a clockwise arc - this would solve many issues in several design automation processes.

 

Regards,

Tushar Suradkar

 

Re: RE: Direction of arcs and circles

Hello Tushar,

you can change the Orientation property after creating the arc.

 

regards JB

regards

JB
VS2015, SE ST10

Re: RE: Direction of arcs and circles

JB,

 

  Thanks for the suggestion.

  Changing the Orientation property results in a complimentary arc again.

  This is same as swapping the start and end points.

  I still want the arc to go in a fashion in the image above with the given start and end points.

 

Regards,

Tushar Suradkar

 

Re: RE: Direction of arcs and circles

JB, I think I have been able to make use of your suggestion - it was a great suggestion, though I was not able to make use of it to solve my issue initially.

 

What I have found is for a given arc, before changing the Orientation, swap the start and end points which prevents creation of a complementary arc.

 

This results in the arc going just the other way around.

 

The original issue asked by Dylan where the solutions is used is here.

 

Thanks again.

~Tushar Suradkar

http://surfandcode.blogspot.in/

 

Does Bob Reinkemeyer who asked the original question know that a solution has been found.

Only God knows.