Commit Graph

44 Commits

Author SHA1 Message Date
Zheng, Lei
2b206d3b0e FCADLogger: add support for lazy string evaluation 2018-10-10 19:01:25 +08:00
Zheng, Lei
6cff9d111b Fix constraint multiplication 2018-10-08 21:30:57 +08:00
Zheng, Lei
19ef857d84 solver: sync core API change
Fixes #52
2018-09-23 21:10:19 +08:00
Zheng, Lei
af5789c4f8 gui: add QuickSolve command
Related to #118
2018-09-18 21:06:15 +08:00
Zheng, Lei
fc8f2f1a47 constraint: fix constraint multiplication 2018-09-05 20:44:10 +08:00
luz.paz
e9fe377f7b Misc typos and whitespace fixes
Found via `codespell`
2018-08-19 09:46:06 +08:00
Zheng, Lei
e16f2ad36d constraint: fix constraint multiplication 2018-08-18 09:11:04 +08:00
Zheng, Lei
7d4b184394 constraint: optimize constraint multiplication 2018-08-17 19:10:03 +08:00
Zheng, Lei
a27d387e34 solver: fix reporting of failed constraint 2018-08-16 17:20:33 +08:00
Zheng, Lei
ff41f32bd8 solver: default to not report failed constraint 2018-08-11 08:39:55 +08:00
Zheng, Lei
81df569c4d Fix solver fixed part finding 2018-08-02 18:57:52 +08:00
Zheng, Lei
e0939d1ec2 assembly: support for derived assembly
Deriving assembly directly contains all parts from derived assembly.
And all derived parts are added as fixed part. The intention is mostly
for user to customize visibilities of the derived parts as a way of
controling the level of details.
2018-07-30 13:03:55 +08:00
Zheng, Lei
9a3fdec662 constraint: add support for edge/face symmetric constraint 2018-07-30 13:03:54 +08:00
Zheng, Lei
e63118d6b5 assembly: support freezing assembly
New property 'Freeze' added to assembly container to freeze any update
of the assembly.

AsmPartGroup and AsmElement has been change to bind to
Part::FeaturePython instead of App::FeaturePython, in order to be able
to hold its own shape when frozen. The new ChildViewProvider feature in
ViewProviderLink is used to display the native shape.
2018-07-13 11:25:56 +08:00
looooo
9a2e1e17b8 py3: exception has not attr message
assuming e.message is the same as str(e)
2018-07-01 23:08:34 +02:00
Anton Fosselius
6d34ad00e9
Fixed typo in solver log output
- fixed typo in log message
2018-06-12 07:02:20 +02:00
Zheng, Lei
939f571aa8 solver: do not raise error when no assembly is found 2018-06-03 12:39:02 +08:00
Zheng, Lei
4b1a3b9de6 assembly: add support for Origin 2018-06-03 12:37:32 +08:00
Zheng, Lei
31f1f2b849 constraint: support cylindrical plane in AxialAlignment and Colinear 2018-05-21 19:07:47 +08:00
Zheng, Lei
094828561b constraint: extend Angle locking to yaw-pitch-roll
Angle locking applies to PlaneCoincident, PlaneAlignment,
AxialAlignment, and MultiParallel
2018-05-21 19:07:44 +08:00
Zheng, Lei
80bceefcc6 system: auto relax some redundant composit constraints
The order of appearance of the constraints determines how redundancies
are handled.

PlaneCoincident: the second PlaneCoincident of the same pair or parts is
relax to a 2d point horizontal or vertical constraint. The third and
onwards are ignored.  Any PlaneCoincident constraint will be ignored if
there are any existing PlaneCoincident or AxialAlignment.

PlaneAlignment: the second one is relaxed to two PointInPlane or
PointPlaneDistance constraint. The third one is relaxed to one
PointInPlane or PointPlaneDistance. The forth and onwards are ignored.
Any PlaneCoincident constraint will be ignored if there are any existing
PlaneCoincident or AxialAlignment.

AxialAlignment: ignored if there are any existing PlaneAlignment or
PlaneCoincident constraints
2018-03-24 12:12:22 +08:00
Zheng, Lei
6917d3897e constraint: impove sketch plane handling
Sketch plane is now implicitly added to any constraints that accepts an
optional workplane, i.e. those supports 2D constraint
2018-01-29 17:16:21 +08:00
Zheng, Lei
cc412bdc22 Add SketchPlane constraint for easy 2D sketch
The SketchPlane expects the first element to be a planar face/edge to
define a work plane for any following draft wire/circle/arc elements.
The 2D constrainted elements can either be inside the defining
SketchPlane constraint, or other constrains following the SketchPlane
in the constraint group.

Add a new SketchPlane to define a new work plane for any following
draft elements. Add an empty SketchPlane to undefine the work plane,
effectively making any following draft elements free in 3D space.
2018-01-23 17:32:20 +08:00
Zheng, Lei
c56a9d85d7 Add mover support for draft wire and circle
* Draft wire points can be dragged individually.
* Draft wire individual edge can be moved and rotated.
* Draft circle/arc can be moved and rotated by dragging edge or face.
* Draft circle/arc radius can be changed by dragging vertex
* Draft arc first/last angle can be changed by dragging end points
2018-01-21 10:07:38 +08:00
Zheng, Lei
b087200e50 Add support for draft circle/arc
When added to an assembly, a normal part object has six degrees of
freedom, three positional and three rotational. A draft circle has one
additional dof, its radius. And a draft arc has three additional dof,
radius, first angle and last angle.
2018-01-20 16:36:51 +08:00
Zheng, Lei
05595e3f41 Add support for draft wire
Special treatment for non-closed-or-subdivided draft wire object
directly added into part group.  Instead of constraining on the object
placement, we shall constraint on individual points. In other word,
instead of making the draft wire's placement as free parameters, we
make the cooridnates of indvidual points as free parameters.
2018-01-20 16:36:38 +08:00
Zheng, Lei
92b42d2f71 assembly: improve autoSolve function 2018-01-08 11:53:41 +08:00
Zheng, Lei
76f3ed40d1 solver: fix sympy solver 2018-01-08 11:53:30 +08:00
Zheng, Lei
fb9ad1609d gui: fix assembly solve command
Fix selection detection, and undo/redo setup
2018-01-07 19:05:29 +08:00
Zheng, Lei
882faf9d53 assembly: improve auto recompute 2018-01-03 12:01:44 +08:00
Zheng, Lei
d2f88b969d assembly: change fixed part move behavior 2017-12-25 13:00:05 +08:00
Zheng, Lei
eb6519ff8c Refactor undo/redo with FreeCAD.setActiveTransaction() 2017-12-24 18:43:34 +08:00
Zheng, Lei
176817a635 Migrate to new style FC module 2017-12-07 03:14:13 +08:00
Zheng, Lei
eb06ef8fbd solver: solver rollback on failure while dragging 2017-12-04 20:25:35 +08:00
Zheng, Lei
61491fddca solver: fix solving linked part 2017-12-04 11:55:16 +08:00
Zheng, Lei
bd6635207b solver: ensure recompute before solving 2017-12-03 18:20:54 +08:00
luzpaz
9ae710b154 misc. trivial typos
Decided to quickly run `codespell` on the repo.
2017-11-19 19:11:56 -05:00
Zheng, Lei
398b1fad86 Add support for locking part on vertex or edge 2017-10-31 04:09:14 +08:00
Zheng, Lei
cc16b178bb FCADLogger: add hierarchy log level support
Each module now has their own logger, and can be controlled separately
2017-10-31 04:09:10 +08:00
Zheng, Lei
caca713d8d Create workbench 2017-10-31 04:08:23 +08:00
Zheng, Lei
59c2c7a35d Code refactor to prepare for multiple backend solvers 2017-10-31 04:08:16 +08:00
Zheng, Lei
9402201a5e More constraints working, and a few new ones
Working constraints:

PointPlaneDistance
PointInPlane
Angle
Perpendicular
Parallel

New constraints, which are composite of slvs native constraints:

PlaneCoincident
PlaneAlignment
AxialAlignment
MultiParallel
2017-10-31 04:06:36 +08:00
Zheng, Lei
d26b6286e2 Added icons, SameOrientation constraint working 2017-10-31 04:06:36 +08:00
Zheng, Lei
b5a91ec889 Basic function working
Tested PointsCoincident constraint
2017-10-31 04:05:01 +08:00