Commit Graph

40 Commits

Author SHA1 Message Date
Zheng, Lei
35385866aa gui: add command to lock mover for fixed parts 2018-06-03 13:14:58 +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
fe7a1757cb constraint: add OffsetX and offsetY to PlaneCoincident 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
8cf3c3f48b constraint: fix negative distance in composite constraints 2018-03-21 15:43:48 +08:00
Zheng, Lei
55ba2c2b3c constraint: tolerate empty lock constraint 2018-03-21 15:43:28 +08:00
Zheng, Lei
827d2c0f96 constraint: revert SketchPlane id 2018-03-06 10:57:22 +08:00
Zheng, Lei
0e7e94941a constraint: fix line plane parallel and perpendicular 2018-02-18 12:50:45 +08:00
Zheng, Lei
1856a368d7 constraint: add colinear constraint 2018-02-06 17:39:08 +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
1e2cfc6447 constraint: improve draft circle handling 2018-01-29 17:16:21 +08:00
Zheng, Lei
a2d639200f constraint: init constraint parameter
Add init() api to calculate the some of the constraints' parameter
(e.g. angle, distance, length, etc.) based on the existing elements.
This can reduce excessive movement when auto recompute is on.
2018-01-29 17:16:15 +08:00
Zheng, Lei
ac5194a013 constraint: auto label constraint object with type name 2018-01-28 06:14:17 +08:00
Zheng, Lei
363a8cfeba Fix constraint toolbar active checking 2018-01-24 18:08:20 +08:00
Zheng, Lei
21e8c4dd84 Support sketch plane in various horizontal/vertical constraint 2018-01-24 13:50:22 +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
06403848e2 constraint: added more icons 2018-01-19 14:01:10 +08:00
Zheng, Lei
76f3ed40d1 solver: fix sympy solver 2018-01-08 11:53:30 +08:00
Zheng, Lei
8f21c72f4c constraint: fix circle/arc related constraints 2017-12-15 08:14:02 +08:00
Zheng, Lei
c2662d8cfd constraint: add LockAngle option
LockAngle option is available to the following constraints,

* PlaneCoincident
* PlaneAlignment
* AxialAlignment
* MultiParallel
2017-12-09 13:27:38 +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
15babab61d Drop usage of future and past module
FC Windows distribution doesn't have these modules
2017-11-22 01:13:42 +08:00
Zheng, Lei
333d4f8824 Refactor checkable command, improve command checkActive() 2017-11-16 18:31:08 +08:00
Zheng, Lei
fbb5b10240 Fixed points(line) horizontal(vertical) constraint 2017-11-11 03:34:43 +08:00
Zheng, Lei
2274fec363 Complete support for drag and drop 2017-11-11 03:34:38 +08: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
990e5a2ef3 Refactor FCAD command management 2017-10-31 04:08:23 +08:00
Zheng, Lei
65abe89d1d Improved FCAD command management 2017-10-31 04:08:23 +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