diff --git a/CHANGELOG.md b/CHANGELOG.md index c828b14..a0beb5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ New sketch features: boolean operation, to increase performance. * Translate and rotate groups can create n-dimensional arrays using the "difference" and "assembly" boolean operations. + * Irrelevant points (e.g. arc center point) are not counted when estimating + the bounding box used to compute chord tolerance. New export/import features: * Three.js: allow configuring projection for exported model, and initially diff --git a/src/request.cpp b/src/request.cpp index c0065ef..bfef176 100644 --- a/src/request.cpp +++ b/src/request.cpp @@ -108,6 +108,11 @@ void Request::Generate(IdList *entity, p.h = h.entity(i+((et != (Entity::Type)0) ? 1 : 0)); p.group = group; p.style = style; + if(type == Request::Type::ARC_OF_CIRCLE && i == 0) { + // mark arc center point as construction, since it shouldn't be included + // in bounding box calculation + p.construction = true; + } if(workplane.v == Entity::FREE_IN_3D.v) { p.type = Entity::Type::POINT_IN_3D; diff --git a/src/solvespace.cpp b/src/solvespace.cpp index 587ccaa..e4dc720 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -859,34 +859,49 @@ void Sketch::Clear() { BBox Sketch::CalculateEntityBBox(bool includingInvisible) { BBox box = {}; bool first = true; - for(int i = 0; i < entity.n; i++) { - Entity *e = (Entity *)&entity.elem[i]; - if(!(e->IsVisible() || includingInvisible)) continue; - - Vector point; - double r = 0.0; - if(e->IsPoint()) { - point = e->PointGetNum(); - } else { - switch(e->type) { - case Entity::Type::ARC_OF_CIRCLE: - case Entity::Type::CIRCLE: - r = e->CircleGetRadiusNum(); - point = GetEntity(e->point[0])->PointGetNum(); - break; - default: continue; - } - } + auto includePoint = [&](const Vector &point) { if(first) { box.minp = point; box.maxp = point; - box.Include(point, r); first = false; } else { - box.Include(point, r); + box.Include(point); + } + }; + + for(const Entity &e : entity) { + if(e.construction) continue; + if(!(includingInvisible || e.IsVisible())) continue; + + if(e.IsPoint()) { + includePoint(e.PointGetNum()); + continue; + } + + switch(e.type) { + // Circles and arcs are special cases. We calculate their bounds + // based on Bezier curve bounds. This is not exact for arcs, + // but the implementation is rather simple. + case Entity::Type::CIRCLE: + case Entity::Type::ARC_OF_CIRCLE: { + SBezierList sbl = {}; + e.GenerateBezierCurves(&sbl); + + for(const SBezier &sb : sbl.l) { + for(int j = 0; j <= sb.deg; j++) { + includePoint(sb.ctrl[j]); + } + } + sbl.Clear(); + continue; + } + + default: + continue; } } + return box; } diff --git a/test/constraint/arc_line_tangent/normal.slvs b/test/constraint/arc_line_tangent/normal.slvs index 86a7d82..2f92e3b 100644 --- a/test/constraint/arc_line_tangent/normal.slvs +++ b/test/constraint/arc_line_tangent/normal.slvs @@ -294,7 +294,7 @@ AddEntity Entity.h.v=00040001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=-5.00000000000000000000 Entity.actPoint.y=10.00000000000000000000 diff --git a/test/constraint/curve_curve_tangent/arc_arc.slvs b/test/constraint/curve_curve_tangent/arc_arc.slvs index 995d11e..c18c342 100644 --- a/test/constraint/curve_curve_tangent/arc_arc.slvs +++ b/test/constraint/curve_curve_tangent/arc_arc.slvs @@ -279,7 +279,7 @@ AddEntity Entity.h.v=00040001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=-5.00000000000000000000 Entity.actPoint.y=15.00000000000000000000 @@ -326,7 +326,7 @@ AddEntity Entity.h.v=00050001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=-25.00000000000000000000 Entity.actPoint.y=15.00000000000000000000 diff --git a/test/constraint/curve_curve_tangent/arc_cubic.slvs b/test/constraint/curve_curve_tangent/arc_cubic.slvs index 554b38a..47ff668 100644 --- a/test/constraint/curve_curve_tangent/arc_cubic.slvs +++ b/test/constraint/curve_curve_tangent/arc_cubic.slvs @@ -314,7 +314,7 @@ AddEntity Entity.h.v=00040001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=-5.00000000000000000000 Entity.actPoint.y=10.00000000000000000000 @@ -405,7 +405,7 @@ AddEntity Entity.h.v=00060001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=10.00000000000000000000 Entity.actPoint.y=-5.00000000000000000000 diff --git a/test/constraint/equal_line_arc_len/normal.slvs b/test/constraint/equal_line_arc_len/normal.slvs index 733864b..c53cbc7 100644 --- a/test/constraint/equal_line_arc_len/normal.slvs +++ b/test/constraint/equal_line_arc_len/normal.slvs @@ -115,31 +115,31 @@ Param.val=-0.50000000000000000000 AddParam Param.h.v.=00040010 -Param.val=-4.99993226121819220000 +Param.val=-4.99993226121819223096 AddParam Param.h.v.=00040011 -Param.val=10.00006773878180900000 +Param.val=10.00006773878180865722 AddParam Param.h.v.=00040013 -Param.val=-9.99975209012342430000 +Param.val=-9.99975209012342425297 AddParam Param.h.v.=00040014 -Param.val=9.99968435134161740000 +Param.val=9.99968435134161737210 AddParam Param.h.v.=00040016 -Param.val=-5.00031564865838440000 +Param.val=-5.00031564865838440426 AddParam Param.h.v.=00040017 -Param.val=5.00024790987657660000 +Param.val=5.00024790987657663521 AddParam Param.h.v.=00050010 -Param.val=4.99990506249655910000 +Param.val=4.99990506249655908277 AddParam Param.h.v.=00050011 @@ -147,7 +147,7 @@ Param.val=5.00000000000000000000 AddParam Param.h.v.=00050013 -Param.val=12.85283693258537800000 +Param.val=12.85283693258537773829 AddParam Param.h.v.=00050014 @@ -271,10 +271,10 @@ AddEntity Entity.h.v=00040001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 -Entity.actPoint.x=-4.99993226121819220000 -Entity.actPoint.y=10.00006773878180900000 +Entity.actPoint.x=-4.99993226121819223096 +Entity.actPoint.y=10.00006773878180865722 Entity.actVisible=1 AddEntity @@ -282,8 +282,8 @@ Entity.h.v=00040002 Entity.type=2001 Entity.construction=0 Entity.workplane.v=80020000 -Entity.actPoint.x=-9.99975209012342430000 -Entity.actPoint.y=9.99968435134161740000 +Entity.actPoint.x=-9.99975209012342425297 +Entity.actPoint.y=9.99968435134161737210 Entity.actVisible=1 AddEntity @@ -291,8 +291,8 @@ Entity.h.v=00040003 Entity.type=2001 Entity.construction=0 Entity.workplane.v=80020000 -Entity.actPoint.x=-5.00031564865838440000 -Entity.actPoint.y=5.00024790987657660000 +Entity.actPoint.x=-5.00031564865838440426 +Entity.actPoint.y=5.00024790987657663521 Entity.actVisible=1 AddEntity @@ -318,7 +318,7 @@ Entity.h.v=00050001 Entity.type=2001 Entity.construction=0 Entity.workplane.v=80020000 -Entity.actPoint.x=4.99990506249655910000 +Entity.actPoint.x=4.99990506249655908277 Entity.actPoint.y=5.00000000000000000000 Entity.actVisible=1 AddEntity @@ -327,7 +327,7 @@ Entity.h.v=00050002 Entity.type=2001 Entity.construction=0 Entity.workplane.v=80020000 -Entity.actPoint.x=12.85283693258537800000 +Entity.actPoint.x=12.85283693258537773829 Entity.actPoint.y=5.00000000000000000000 Entity.actVisible=1 AddEntity diff --git a/test/constraint/pt_face_distance/normal.png b/test/constraint/pt_face_distance/normal.png index 7379577..7173202 100644 Binary files a/test/constraint/pt_face_distance/normal.png and b/test/constraint/pt_face_distance/normal.png differ diff --git a/test/constraint/pt_face_distance/normal.slvs b/test/constraint/pt_face_distance/normal.slvs index 2e4195e..07f96ed 100644 --- a/test/constraint/pt_face_distance/normal.slvs +++ b/test/constraint/pt_face_distance/normal.slvs @@ -581,7 +581,9 @@ CCtrl 1 0.00000000000000000000 5.00000000000000000000 5.00000000000000000000 Wei CCtrl 2 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 5.00000000000000000000 0.00000000000000000000 CurvePt 0 0.00000000000000000000 4.64894150531215188948 1.84047354780936389673 +CurvePt 0 0.00000000000000000000 4.18497755609325672310 2.73604876692571252761 CurvePt 0 0.00000000000000000000 3.53553390593273775266 3.53553390593273775266 +CurvePt 0 0.00000000000000000000 2.73604876692571252761 4.18497755609325672310 CurvePt 0 0.00000000000000000000 1.84047354780936411878 4.64894150531215188948 CurvePt 1 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 AddCurve @@ -591,7 +593,9 @@ CCtrl 1 10.00000000000000000000 5.00000000000000000000 5.00000000000000000000 We CCtrl 2 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 5.00000000000000000000 0.00000000000000000000 CurvePt 0 10.00000000000000000000 4.64894150531215188948 1.84047354780936389673 +CurvePt 0 10.00000000000000000000 4.18497755609325672310 2.73604876692571252761 CurvePt 0 10.00000000000000000000 3.53553390593273775266 3.53553390593273775266 +CurvePt 0 10.00000000000000000000 2.73604876692571252761 4.18497755609325672310 CurvePt 0 10.00000000000000000000 1.84047354780936411878 4.64894150531215188948 CurvePt 1 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 AddCurve @@ -607,7 +611,9 @@ CCtrl 1 0.00000000000000000000 -4.99999999999999911182 5.00000000000000000000 We CCtrl 2 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 CurvePt 0 0.00000000000000000000 -1.84047354780936323060 4.64894150531215188948 +CurvePt 0 0.00000000000000000000 -2.73604876692571208352 4.18497755609325672310 CurvePt 0 0.00000000000000000000 -3.53553390593273775266 3.53553390593273775266 +CurvePt 0 0.00000000000000000000 -4.18497755609325672310 2.73604876692571297170 CurvePt 0 0.00000000000000000000 -4.64894150531215188948 1.84047354780936434082 CurvePt 1 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 AddCurve @@ -617,7 +623,9 @@ CCtrl 1 10.00000000000000000000 -4.99999999999999911182 5.00000000000000000000 W CCtrl 2 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 CurvePt 0 10.00000000000000000000 -1.84047354780936323060 4.64894150531215188948 +CurvePt 0 10.00000000000000000000 -2.73604876692571208352 4.18497755609325672310 CurvePt 0 10.00000000000000000000 -3.53553390593273775266 3.53553390593273775266 +CurvePt 0 10.00000000000000000000 -4.18497755609325672310 2.73604876692571297170 CurvePt 0 10.00000000000000000000 -4.64894150531215188948 1.84047354780936434082 CurvePt 1 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 AddCurve @@ -633,7 +641,9 @@ CCtrl 1 0.00000000000000000000 -5.00000000000000088818 -4.99999999999999911182 W CCtrl 2 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 CurvePt 0 0.00000000000000000000 -4.64894150531215188948 -1.84047354780936300855 +CurvePt 0 0.00000000000000000000 -4.18497755609325672310 -2.73604876692571208352 CurvePt 0 0.00000000000000000000 -3.53553390593273864084 -3.53553390593273730858 +CurvePt 0 0.00000000000000000000 -2.73604876692571297170 -4.18497755609325672310 CurvePt 0 0.00000000000000000000 -1.84047354780936478491 -4.64894150531215188948 CurvePt 1 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 AddCurve @@ -643,7 +653,9 @@ CCtrl 1 10.00000000000000000000 -5.00000000000000088818 -4.99999999999999911182 CCtrl 2 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 CurvePt 0 10.00000000000000000000 -4.64894150531215188948 -1.84047354780936300855 +CurvePt 0 10.00000000000000000000 -4.18497755609325672310 -2.73604876692571208352 CurvePt 0 10.00000000000000000000 -3.53553390593273864084 -3.53553390593273730858 +CurvePt 0 10.00000000000000000000 -2.73604876692571297170 -4.18497755609325672310 CurvePt 0 10.00000000000000000000 -1.84047354780936478491 -4.64894150531215188948 CurvePt 1 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 AddCurve @@ -659,7 +671,9 @@ CCtrl 1 0.00000000000000000000 4.99999999999999911182 -5.00000000000000088818 We CCtrl 2 0.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 CurvePt 0 0.00000000000000000000 1.84047354780936300855 -4.64894150531215188948 +CurvePt 0 0.00000000000000000000 2.73604876692571163943 -4.18497755609325672310 CurvePt 0 0.00000000000000000000 3.53553390593273730858 -3.53553390593273864084 +CurvePt 0 0.00000000000000000000 4.18497755609325583492 -2.73604876692571297170 CurvePt 0 0.00000000000000000000 4.64894150531215188948 -1.84047354780936500696 CurvePt 1 0.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 AddCurve @@ -669,7 +683,9 @@ CCtrl 1 10.00000000000000000000 4.99999999999999911182 -5.00000000000000088818 W CCtrl 2 10.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 CurvePt 0 10.00000000000000000000 1.84047354780936300855 -4.64894150531215188948 +CurvePt 0 10.00000000000000000000 2.73604876692571163943 -4.18497755609325672310 CurvePt 0 10.00000000000000000000 3.53553390593273730858 -3.53553390593273864084 +CurvePt 0 10.00000000000000000000 4.18497755609325583492 -2.73604876692571297170 CurvePt 0 10.00000000000000000000 4.64894150531215188948 -1.84047354780936500696 CurvePt 1 10.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 AddCurve diff --git a/test/constraint/pt_face_distance/reference.png b/test/constraint/pt_face_distance/reference.png index 8b06408..4b813f8 100644 Binary files a/test/constraint/pt_face_distance/reference.png and b/test/constraint/pt_face_distance/reference.png differ diff --git a/test/constraint/pt_face_distance/reference.slvs b/test/constraint/pt_face_distance/reference.slvs index a57b808..f3b046c 100644 --- a/test/constraint/pt_face_distance/reference.slvs +++ b/test/constraint/pt_face_distance/reference.slvs @@ -581,7 +581,9 @@ CCtrl 1 0.00000000000000000000 5.00000000000000000000 5.00000000000000000000 Wei CCtrl 2 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 5.00000000000000000000 0.00000000000000000000 CurvePt 0 0.00000000000000000000 4.64894150531215188948 1.84047354780936389673 +CurvePt 0 0.00000000000000000000 4.18497755609325672310 2.73604876692571252761 CurvePt 0 0.00000000000000000000 3.53553390593273775266 3.53553390593273775266 +CurvePt 0 0.00000000000000000000 2.73604876692571252761 4.18497755609325672310 CurvePt 0 0.00000000000000000000 1.84047354780936411878 4.64894150531215188948 CurvePt 1 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 AddCurve @@ -591,7 +593,9 @@ CCtrl 1 10.00000000000000000000 5.00000000000000000000 5.00000000000000000000 We CCtrl 2 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 5.00000000000000000000 0.00000000000000000000 CurvePt 0 10.00000000000000000000 4.64894150531215188948 1.84047354780936389673 +CurvePt 0 10.00000000000000000000 4.18497755609325672310 2.73604876692571252761 CurvePt 0 10.00000000000000000000 3.53553390593273775266 3.53553390593273775266 +CurvePt 0 10.00000000000000000000 2.73604876692571252761 4.18497755609325672310 CurvePt 0 10.00000000000000000000 1.84047354780936411878 4.64894150531215188948 CurvePt 1 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 AddCurve @@ -607,7 +611,9 @@ CCtrl 1 0.00000000000000000000 -4.99999999999999911182 5.00000000000000000000 We CCtrl 2 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 0.00000000000000030616 5.00000000000000000000 CurvePt 0 0.00000000000000000000 -1.84047354780936323060 4.64894150531215188948 +CurvePt 0 0.00000000000000000000 -2.73604876692571208352 4.18497755609325672310 CurvePt 0 0.00000000000000000000 -3.53553390593273775266 3.53553390593273775266 +CurvePt 0 0.00000000000000000000 -4.18497755609325672310 2.73604876692571297170 CurvePt 0 0.00000000000000000000 -4.64894150531215188948 1.84047354780936434082 CurvePt 1 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 AddCurve @@ -617,7 +623,9 @@ CCtrl 1 10.00000000000000000000 -4.99999999999999911182 5.00000000000000000000 W CCtrl 2 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 0.00000000000000030616 5.00000000000000000000 CurvePt 0 10.00000000000000000000 -1.84047354780936323060 4.64894150531215188948 +CurvePt 0 10.00000000000000000000 -2.73604876692571208352 4.18497755609325672310 CurvePt 0 10.00000000000000000000 -3.53553390593273775266 3.53553390593273775266 +CurvePt 0 10.00000000000000000000 -4.18497755609325672310 2.73604876692571297170 CurvePt 0 10.00000000000000000000 -4.64894150531215188948 1.84047354780936434082 CurvePt 1 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 AddCurve @@ -633,7 +641,9 @@ CCtrl 1 0.00000000000000000000 -5.00000000000000088818 -4.99999999999999911182 W CCtrl 2 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 CurvePt 0 0.00000000000000000000 -4.64894150531215188948 -1.84047354780936300855 +CurvePt 0 0.00000000000000000000 -4.18497755609325672310 -2.73604876692571208352 CurvePt 0 0.00000000000000000000 -3.53553390593273864084 -3.53553390593273730858 +CurvePt 0 0.00000000000000000000 -2.73604876692571297170 -4.18497755609325672310 CurvePt 0 0.00000000000000000000 -1.84047354780936478491 -4.64894150531215188948 CurvePt 1 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 AddCurve @@ -643,7 +653,9 @@ CCtrl 1 10.00000000000000000000 -5.00000000000000088818 -4.99999999999999911182 CCtrl 2 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 -5.00000000000000000000 0.00000000000000061232 CurvePt 0 10.00000000000000000000 -4.64894150531215188948 -1.84047354780936300855 +CurvePt 0 10.00000000000000000000 -4.18497755609325672310 -2.73604876692571208352 CurvePt 0 10.00000000000000000000 -3.53553390593273864084 -3.53553390593273730858 +CurvePt 0 10.00000000000000000000 -2.73604876692571297170 -4.18497755609325672310 CurvePt 0 10.00000000000000000000 -1.84047354780936478491 -4.64894150531215188948 CurvePt 1 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 AddCurve @@ -659,7 +671,9 @@ CCtrl 1 0.00000000000000000000 4.99999999999999911182 -5.00000000000000088818 We CCtrl 2 0.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 CurvePt 0 0.00000000000000000000 1.84047354780936300855 -4.64894150531215188948 +CurvePt 0 0.00000000000000000000 2.73604876692571163943 -4.18497755609325672310 CurvePt 0 0.00000000000000000000 3.53553390593273730858 -3.53553390593273864084 +CurvePt 0 0.00000000000000000000 4.18497755609325583492 -2.73604876692571297170 CurvePt 0 0.00000000000000000000 4.64894150531215188948 -1.84047354780936500696 CurvePt 1 0.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 AddCurve @@ -669,7 +683,9 @@ CCtrl 1 10.00000000000000000000 4.99999999999999911182 -5.00000000000000088818 W CCtrl 2 10.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 Weight 1.00000000000000000000 CurvePt 1 10.00000000000000000000 -0.00000000000000091849 -5.00000000000000000000 CurvePt 0 10.00000000000000000000 1.84047354780936300855 -4.64894150531215188948 +CurvePt 0 10.00000000000000000000 2.73604876692571163943 -4.18497755609325672310 CurvePt 0 10.00000000000000000000 3.53553390593273730858 -3.53553390593273864084 +CurvePt 0 10.00000000000000000000 4.18497755609325583492 -2.73604876692571297170 CurvePt 0 10.00000000000000000000 4.64894150531215188948 -1.84047354780936500696 CurvePt 1 10.00000000000000000000 5.00000000000000000000 -0.00000000000000122465 AddCurve diff --git a/test/constraint/pt_on_face/normal.png b/test/constraint/pt_on_face/normal.png index 4722a97..1258dca 100644 Binary files a/test/constraint/pt_on_face/normal.png and b/test/constraint/pt_on_face/normal.png differ diff --git a/test/constraint/pt_on_face/normal.slvs b/test/constraint/pt_on_face/normal.slvs index 03ee428..499b14f 100644 --- a/test/constraint/pt_on_face/normal.slvs +++ b/test/constraint/pt_on_face/normal.slvs @@ -570,11 +570,13 @@ CCtrl 0 5.00000000000000000000 0.00000000000000000000 -10.00000000000000000000 W CCtrl 1 5.00000000000000000000 5.00000000000000000000 -10.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 0.00000000000000030616 5.00000000000000000000 -10.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 5.00000000000000000000 0.00000000000000000000 -10.00000000000000000000 +CurvePt 0 4.91652684208287205081 0.90981526206072360630 -10.00000000000000000000 CurvePt 0 4.64894150531215188948 1.84047354780936389673 -10.00000000000000000000 CurvePt 0 4.18497755609325672310 2.73604876692571252761 -10.00000000000000000000 CurvePt 0 3.53553390593273775266 3.53553390593273775266 -10.00000000000000000000 CurvePt 0 2.73604876692571252761 4.18497755609325672310 -10.00000000000000000000 CurvePt 0 1.84047354780936411878 4.64894150531215188948 -10.00000000000000000000 +CurvePt 0 0.90981526206072382834 4.91652684208287205081 -10.00000000000000000000 CurvePt 1 0.00000000000000030616 5.00000000000000000000 -10.00000000000000000000 AddCurve Curve 00000002 1 2 00000002 00000003 @@ -582,11 +584,13 @@ CCtrl 0 5.00000000000000000000 0.00000000000000000000 0.00000000000000000000 Wei CCtrl 1 5.00000000000000000000 5.00000000000000000000 0.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 0.00000000000000030616 5.00000000000000000000 0.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 5.00000000000000000000 0.00000000000000000000 0.00000000000000000000 +CurvePt 0 4.91652684208287205081 0.90981526206072360630 0.00000000000000000000 CurvePt 0 4.64894150531215188948 1.84047354780936389673 0.00000000000000000000 CurvePt 0 4.18497755609325672310 2.73604876692571252761 0.00000000000000000000 CurvePt 0 3.53553390593273775266 3.53553390593273775266 0.00000000000000000000 CurvePt 0 2.73604876692571252761 4.18497755609325672310 0.00000000000000000000 CurvePt 0 1.84047354780936411878 4.64894150531215188948 0.00000000000000000000 +CurvePt 0 0.90981526206072382834 4.91652684208287205081 0.00000000000000000000 CurvePt 1 0.00000000000000030616 5.00000000000000000000 0.00000000000000000000 AddCurve Curve 00000003 1 1 00000003 00000004 @@ -600,11 +604,13 @@ CCtrl 0 0.00000000000000030616 5.00000000000000000000 -10.00000000000000000000 W CCtrl 1 -4.99999999999999911182 5.00000000000000000000 -10.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 -5.00000000000000000000 0.00000000000000061232 -10.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000030616 5.00000000000000000000 -10.00000000000000000000 +CurvePt 0 -0.90981526206072327323 4.91652684208287205081 -10.00000000000000000000 CurvePt 0 -1.84047354780936323060 4.64894150531215188948 -10.00000000000000000000 CurvePt 0 -2.73604876692571208352 4.18497755609325672310 -10.00000000000000000000 CurvePt 0 -3.53553390593273775266 3.53553390593273775266 -10.00000000000000000000 CurvePt 0 -4.18497755609325672310 2.73604876692571297170 -10.00000000000000000000 CurvePt 0 -4.64894150531215188948 1.84047354780936434082 -10.00000000000000000000 +CurvePt 0 -4.91652684208287205081 0.90981526206072405039 -10.00000000000000000000 CurvePt 1 -5.00000000000000000000 0.00000000000000061232 -10.00000000000000000000 AddCurve Curve 00000005 1 2 00000002 00000004 @@ -612,11 +618,13 @@ CCtrl 0 0.00000000000000030616 5.00000000000000000000 0.00000000000000000000 Wei CCtrl 1 -4.99999999999999911182 5.00000000000000000000 0.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 -5.00000000000000000000 0.00000000000000061232 0.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 0.00000000000000030616 5.00000000000000000000 0.00000000000000000000 +CurvePt 0 -0.90981526206072327323 4.91652684208287205081 0.00000000000000000000 CurvePt 0 -1.84047354780936323060 4.64894150531215188948 0.00000000000000000000 CurvePt 0 -2.73604876692571208352 4.18497755609325672310 0.00000000000000000000 CurvePt 0 -3.53553390593273775266 3.53553390593273775266 0.00000000000000000000 CurvePt 0 -4.18497755609325672310 2.73604876692571297170 0.00000000000000000000 CurvePt 0 -4.64894150531215188948 1.84047354780936434082 0.00000000000000000000 +CurvePt 0 -4.91652684208287205081 0.90981526206072405039 0.00000000000000000000 CurvePt 1 -5.00000000000000000000 0.00000000000000061232 0.00000000000000000000 AddCurve Curve 00000006 1 1 00000004 00000005 @@ -630,11 +638,13 @@ CCtrl 0 -5.00000000000000000000 0.00000000000000061232 -10.00000000000000000000 CCtrl 1 -5.00000000000000088818 -4.99999999999999911182 -10.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 -0.00000000000000091849 -5.00000000000000000000 -10.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 -5.00000000000000000000 0.00000000000000061232 -10.00000000000000000000 +CurvePt 0 -4.91652684208287205081 -0.90981526206072305119 -10.00000000000000000000 CurvePt 0 -4.64894150531215188948 -1.84047354780936300855 -10.00000000000000000000 CurvePt 0 -4.18497755609325672310 -2.73604876692571208352 -10.00000000000000000000 CurvePt 0 -3.53553390593273864084 -3.53553390593273730858 -10.00000000000000000000 CurvePt 0 -2.73604876692571297170 -4.18497755609325672310 -10.00000000000000000000 CurvePt 0 -1.84047354780936478491 -4.64894150531215188948 -10.00000000000000000000 +CurvePt 0 -0.90981526206072438345 -4.91652684208287205081 -10.00000000000000000000 CurvePt 1 -0.00000000000000091849 -5.00000000000000000000 -10.00000000000000000000 AddCurve Curve 00000008 1 2 00000002 00000005 @@ -642,11 +652,13 @@ CCtrl 0 -5.00000000000000000000 0.00000000000000061232 0.00000000000000000000 We CCtrl 1 -5.00000000000000088818 -4.99999999999999911182 0.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 -0.00000000000000091849 -5.00000000000000000000 0.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 -5.00000000000000000000 0.00000000000000061232 0.00000000000000000000 +CurvePt 0 -4.91652684208287205081 -0.90981526206072305119 0.00000000000000000000 CurvePt 0 -4.64894150531215188948 -1.84047354780936300855 0.00000000000000000000 CurvePt 0 -4.18497755609325672310 -2.73604876692571208352 0.00000000000000000000 CurvePt 0 -3.53553390593273864084 -3.53553390593273730858 0.00000000000000000000 CurvePt 0 -2.73604876692571297170 -4.18497755609325672310 0.00000000000000000000 CurvePt 0 -1.84047354780936478491 -4.64894150531215188948 0.00000000000000000000 +CurvePt 0 -0.90981526206072438345 -4.91652684208287205081 0.00000000000000000000 CurvePt 1 -0.00000000000000091849 -5.00000000000000000000 0.00000000000000000000 AddCurve Curve 00000009 1 1 00000005 00000006 @@ -660,11 +672,13 @@ CCtrl 0 -0.00000000000000091849 -5.00000000000000000000 -10.00000000000000000000 CCtrl 1 4.99999999999999911182 -5.00000000000000088818 -10.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 5.00000000000000000000 -0.00000000000000122465 -10.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 -0.00000000000000091849 -5.00000000000000000000 -10.00000000000000000000 +CurvePt 0 0.90981526206072282914 -4.91652684208287205081 -10.00000000000000000000 CurvePt 0 1.84047354780936300855 -4.64894150531215188948 -10.00000000000000000000 CurvePt 0 2.73604876692571163943 -4.18497755609325672310 -10.00000000000000000000 CurvePt 0 3.53553390593273730858 -3.53553390593273864084 -10.00000000000000000000 CurvePt 0 4.18497755609325583492 -2.73604876692571297170 -10.00000000000000000000 CurvePt 0 4.64894150531215188948 -1.84047354780936500696 -10.00000000000000000000 +CurvePt 0 4.91652684208287205081 -0.90981526206072471652 -10.00000000000000000000 CurvePt 1 5.00000000000000000000 -0.00000000000000122465 -10.00000000000000000000 AddCurve Curve 0000000b 1 2 00000002 00000006 @@ -672,11 +686,13 @@ CCtrl 0 -0.00000000000000091849 -5.00000000000000000000 0.00000000000000000000 W CCtrl 1 4.99999999999999911182 -5.00000000000000088818 0.00000000000000000000 Weight 0.70710678118654757274 CCtrl 2 5.00000000000000000000 -0.00000000000000122465 0.00000000000000000000 Weight 1.00000000000000000000 CurvePt 1 -0.00000000000000091849 -5.00000000000000000000 0.00000000000000000000 +CurvePt 0 0.90981526206072282914 -4.91652684208287205081 0.00000000000000000000 CurvePt 0 1.84047354780936300855 -4.64894150531215188948 0.00000000000000000000 CurvePt 0 2.73604876692571163943 -4.18497755609325672310 0.00000000000000000000 CurvePt 0 3.53553390593273730858 -3.53553390593273864084 0.00000000000000000000 CurvePt 0 4.18497755609325583492 -2.73604876692571297170 0.00000000000000000000 CurvePt 0 4.64894150531215188948 -1.84047354780936500696 0.00000000000000000000 +CurvePt 0 4.91652684208287205081 -0.90981526206072471652 0.00000000000000000000 CurvePt 1 5.00000000000000000000 -0.00000000000000122465 0.00000000000000000000 AddCurve Curve 0000000c 1 1 00000006 00000003 diff --git a/test/request/arc_of_circle/normal.slvs b/test/request/arc_of_circle/normal.slvs index 6f92e0e..c2ca334 100644 --- a/test/request/arc_of_circle/normal.slvs +++ b/test/request/arc_of_circle/normal.slvs @@ -248,7 +248,7 @@ AddEntity Entity.h.v=00040001 Entity.type=2001 -Entity.construction=0 +Entity.construction=1 Entity.workplane.v=80020000 Entity.actPoint.x=-5.00000000000000000000 Entity.actPoint.y=5.00000000000000000000