## Sketcher Angle Constraints

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

### Sketcher Angle Constraints

I have testet all possibilities of blue angle constraints
and I get some values greater than 360°
Is this a bug?

having an angle between -180° and 180° would be the best.
bp_473.png (29.22 KiB) Viewed 995 times
testcase:

Code: Select all

import numpy as np

App.newDocument("Unnamed")
App.setActiveDocument("Unnamed")
App.ActiveDocument=App.getDocument("Unnamed")
Gui.ActiveDocument=Gui.getDocument("Unnamed")

App.ActiveDocument.recompute()
App.ActiveDocument.recompute()

sk.toggleDriving(d)
sk.toggleDriving(d)
sk.toggleDriving(d)
sk.toggleDriving(d)

sk.toggleDriving(d)
sk.toggleDriving(d)
sk.toggleDriving(d)
# sk.toggleDriving(d)
DeepSOIC
Posts: 7762
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

### Re: Sketcher Angle Constraints

Hi!
Blue constraints are powered by the same code as red constraints, so values 30 and 30+n*360 have the same meaning.
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

### Re: Sketcher Angle Constraints

DeepSOIC wrote:Hi!
Blue constraints are powered by the same code as red constraints, so values 30 and 30+n*360 have the same meaning.
Thats true, but if I use the angle to configure another shape (example a helix there is a difference between 30 and 390)
At the moment I cannot use expressions like

int(Constraint.MyAngle/pi*180)%360
abdullah
Posts: 3530
Joined: Sun May 04, 2014 3:16 pm

### Re: Sketcher Angle Constraints

microelly2 wrote:I have testet all possibilities of blue angle constraints
and I get some values greater than 360°
Is this a bug?

having an angle between -180° and 180° would be the best.