And fix the convenience functions and example, to specify a normal

with the arc of a circle.

[git-p4: depot-paths = "//depot/solvespace/": change = 2113]
solver
Jonathan Westhues 2010-01-22 22:40:10 -08:00
parent c440a6b687
commit c95e5c1614
2 changed files with 3 additions and 1 deletions

View File

@ -139,7 +139,7 @@ void Example2d(void)
// And arc, centered at point 303, starting at point 304, ending at
// point 305.
sys.entity[sys.entities++] = Slvs_MakeArcOfCircle(401, g, 200,
sys.entity[sys.entities++] = Slvs_MakeArcOfCircle(401, g, 200, 102,
303, 304, 305);
// Now one more point, and a distance

View File

@ -311,6 +311,7 @@ static Slvs_Entity Slvs_MakeCubic(Slvs_hEntity h, Slvs_hGroup group,
}
static Slvs_Entity Slvs_MakeArcOfCircle(Slvs_hEntity h, Slvs_hGroup group,
Slvs_hEntity wrkpl,
Slvs_hEntity normal,
Slvs_hEntity center,
Slvs_hEntity start, Slvs_hEntity end)
{
@ -320,6 +321,7 @@ static Slvs_Entity Slvs_MakeArcOfCircle(Slvs_hEntity h, Slvs_hGroup group,
r.group = group;
r.type = SLVS_E_ARC_OF_CIRCLE;
r.wrkpl = wrkpl;
r.normal = normal;
r.point[0] = center;
r.point[1] = start;
r.point[2] = end;