Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Advanced Constraints

See original GitHub issue

Create constraints that allow more freedom of placement.

Implementation: non-linear Optimisation scipy offers a range of optimisation methods.

Optimisation methods could be defaulted, then optionally fine-tuned by advanced users, all through one common interface (scipy).

Inspiration for constraints… naming observed from official OnShape and Solidworks tutorials:


  • angle, coincident, concentric, distance, lock, parallel, perpendicular, and tangent mates
  • limit, linear/linear coupler, path, symmetry, and width
  • cam-follower, gear, hinge, rack and pinion, screw, and universal joint


  • Fastened
  • Revolute
  • Slider
  • Planar
  • Cylindrical
  • Pin Slot
  • Ball

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

everlanescommented, Oct 6, 2019

Hi, I have a proof of concept for a flexible solver using the scipy least square root solver. It is working quite nicely and I can apply multiple constriants to any part.

For now I have to following constraints working:

  • Origin: constrains origin and direction of a part to a CoordinateSystem()
  • OriginDir: constrains only the orientation of a part to a CoordinateSystem()
  • Position: constrains position and direction of two mates
  • Direction: constrains only the direction of two mates
  • Plane: constrains one mates position to be located in a plane parall to the seconds mate plane

Next steps would be to clean it up and integrate it into the cqparts code. This would mean to replace the current solver.solve method the function and to add new constraint classes.

My questions:

  1. is it desired that I work on this?
  2. is anyone else currently working on this?
  3. can I modify the function or is anyone else currently working on this?
  4. which branch should I fork to minimize merge conflicts?
everlanescommented, Oct 11, 2019

I have uploaded a first draft for a numeric solver with flexible constraints in #158

All tests are passing in my development environment, but sadly not with AppVeyor - OCC dependency is missing and scipy dependency should be added. I’m just not sure, where to add these dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced constraints — Calliope 0.6.8 documentation
Group constraints are applied to named sets of locations and techs, called “constraint groups”, specified through a top-level group_constraints key (sitting ...
Read more >
Capabilities, constraints, and settings - Web APIs | MDN
So-called advanced constraints are created by adding an advanced property to the constraint set; this property's value is an array of additional ...
Read more >
Advanced Table Constraints - BorisTheBrave.Com
Advanced Table Constraints ... concerned with generalized arc consistency, i.e. dealing with constraints that cover more than two variables.
Read more >
Constraints - Advanced - Agi
Advanced Constraints ; Grazing Angle, Describes how high one object appears above the edge of the Earth (or limb) relative to the satellite....
Read more >
Creating Constraints Using the Advanced Constraint Template
The Advanced Constraint template is similar to the Assisted Advanced Constraint Template. You can create constraints using Rule Assembly Language with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found