Commit Graph

40 Commits

Author SHA1 Message Date
Zheng, Lei
b1ff90e093 Simplify object name log output 2019-01-01 08:57:01 +08:00
Zheng, Lei
2b206d3b0e FCADLogger: add support for lazy string evaluation 2018-10-10 19:01:25 +08:00
Zheng, Lei
1fa9fc673a assembly: more optimization for constraint multiplication 2018-10-10 18:19:14 +08:00
Zheng, Lei
9aa489942d constraint: int Distance/Angle with current value
Closes #111
2018-09-21 19:53:21 +08:00
Zheng, Lei
f8dfcd6615 utils: fix getElementRotation
Fixes #123
2018-09-19 07:43:17 +08:00
Zheng, Lei
e6816fb551 utils: fix getElementPos
Fixes #122
2018-09-19 07:42:59 +08:00
Zheng, Lei
dda56db7a5 utils: relax hasCenter()
Fixes #51
2018-09-06 06:58:54 +08:00
Zheng, Lei
dcef9f3c4b utils: ignore App::Plane/Line shape returned from Part.getShape 2018-09-03 14:43:24 +08:00
Zheng, Lei
ed14946534 Change icon cache name 2018-08-28 07:48:46 +08:00
Zheng, Lei
46165f73d4 utils: use new 'Rotation' attribute of geometry 2018-08-17 11:59:18 +08:00
Zheng, Lei
a9dc71978b utils: handle exception in objName() 2018-07-30 13:03:54 +08:00
Zheng, Lei
ad35683c87 Add support for constraint multiplication 2018-07-30 13:03:54 +08:00
Zheng, Lei
7a7b9b49e1 utils: imporve element checking performance 2018-07-13 11:25:56 +08:00
Zheng, Lei
8f7a92634c utils: fix axis construction in getElementRotation()
Closes #16. Thanks to @Ultran1.
2018-07-13 11:25:56 +08:00
looooo
7fb8cf48ad py3-fixes:
- use six.with_metaclas(metaclass, baseclass)
- some imports must be handled in a different way if py_solve is a external package (conda)
2018-07-01 20:42:59 +02:00
Zheng, Lei
61466dce67 util: optimize getElementShape() 2018-04-23 12:55:18 +08:00
Zheng, Lei
6b98f8c7b6 utils: fix getElementShape()
The mover can now support whole object selection
2018-03-26 15:35:51 +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
458022bba4 assembly: enhance workplane function
New toolbar command to create workplane in XZ and ZY direction. Allow
workplane to be created based on all type of elements. The same
AsmWorkplane object can now also represent a line or a point.
2018-02-07 17:39:00 +08:00
Zheng, Lei
ac483c686b utils: refine draft wire identification 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
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
d76902b215 Add support of origin and datum feature 2017-12-10 18:49:06 +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
luzpaz
9ae710b154 misc. trivial typos
Decided to quickly run `codespell` on the repo.
2017-11-19 19:11:56 -05: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
8d8f910efd utils.getElementPos now returns center for all shapes 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
f681cc2035 utils: add getElementRotation() 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