Compare commits

...

78 Commits
0.10 ... master

Author SHA1 Message Date
Zheng, Lei
bc2d5d611f solver: improve redundancy checking of implicit constraints
Related #403
2021-01-11 10:00:10 +08:00
Zheng, Lei
e785510c68 assembly: support drag and drop reordering of constraint and elements 2021-01-10 13:03:25 +08:00
Zheng, Lei
b9c7af40fd assembly: fix 'Flip element' for multiplied constraining element 2021-01-08 20:56:32 +08:00
Zheng, Lei
b590b57793 mover: fix auto recompute on moving linked assembly 2021-01-08 17:24:39 +08:00
Zheng, Lei
6c68f0f901 assembly: support flip part of multiplied constraining elements 2021-01-08 17:22:56 +08:00
Zheng, Lei
caad48e927 assembly: reduce constraint multiplication init placement precision 2021-01-08 16:18:04 +08:00
Zheng, Lei
70d161f336 assembly: fix relation selection highlight when using GoToRelation 2021-01-05 15:25:43 +08:00
Zheng, Lei
c6f6c481d2 assembly: fix stray relations when deleting assembly 2021-01-05 15:25:34 +08:00
Zheng, Lei
fe6a792202 assembly: fix workplane orientation
Fixes #362
2020-12-01 20:40:19 +08:00
Zheng, Lei
da050987f5 assembly: fix constraint multiplication with sub-assembly
Related #341
2020-11-16 20:52:45 +08:00
Zheng, Lei
6fbded4460 assembly: fix freeze toggling behavior
Related #342
2020-11-16 20:50:40 +08:00
Zheng, Lei
6bb16b5550 system: improve auto relax multiple PlaneCoincidence 2020-11-12 20:58:36 +08:00
lilaL
c3380e602d Typo fix 2020-11-12 20:57:48 +08:00
Zheng, Lei
9f4fa40b8f constraint: support cylindrical face in MultiParallel 2020-10-26 20:37:34 +08:00
Zheng, Lei
4edc0fbca6 Gui: fix call of FreeCADGui.Command.isActive() 2020-09-26 16:25:01 +08:00
Zheng, Lei
490da82590 gui: fix command active detection 2020-09-26 09:33:06 +08:00
Zheng, Lei
e44f47073b system: lock angle when convert Attachment to PlaneCoincident 2020-08-04 09:08:55 +08:00
Zheng, Lei
0c1f659fde assembly: fix constraint multiply element update 2020-07-28 18:20:01 +08:00
Zheng, Lei
5da0bd5554 assembly: improve AsmElement fix element 2020-07-28 18:20:01 +08:00
Zheng, Lei
14dffc7b28 assembly: fix ViewProviderAsmElementLink bounding box calculation 2020-07-28 18:20:01 +08:00
Zheng, Lei
652ea7af6c assembly: implement ViewProviderAsmElement(Link).getLinkedViewProvider()
For better support the Std_LinkSelectLinked(Final) command
2020-07-28 18:19:53 +08:00
Zheng, Lei
c8cf0a1e32 gui: fix infinite recursion triggered by auto element visibility 2020-07-04 22:04:08 +08:00
Zheng, Lei
19163afe88 gui: disable transaction in command AsmCmdGotoRelation 2020-07-02 11:23:27 +08:00
Zheng, Lei
0acaa5e9c3 Avoid using getSubObject() to obtain shape 2020-07-02 09:17:24 +08:00
Zheng, Lei
9e34ecd1c0 mover: use SHIFT key to bypass recompute on moving 2020-06-29 17:36:54 +08:00
Zheng, Lei
3bd99b64d2 gui: clear up debug output 2020-06-15 16:46:25 +08:00
Zheng, Lei
9f904ede3f assembly: improve backward compatibility 2020-06-15 16:46:11 +08:00
Zheng, Lei
72f64e9ed5 assembly: fixed AsmPartGroup.getSubObjects() when partial loaded 2020-05-25 09:36:31 +00:00
Zheng, Lei
91c34b2fcb Add tree view context menu action for batch toggling constraints 2020-05-13 12:23:51 +08:00
Zheng, Lei
1cdf1fe5c4 assembly: fix assembly 'freeze'
Fixes #286
2020-05-06 08:19:15 +08:00
Zheng, Lei
edac36d4df gui: improve backward compatibility 2020-04-25 18:30:07 +08:00
Zheng, Lei
06f8edd493 gui: sync command button status 2020-04-08 05:56:57 +08:00
Zheng, Lei
68d31787ce assembly: fix undo handling when multiply constraint 2020-04-07 16:50:10 +08:00
Zheng, Lei
28d2df2c3d assembly: remove Assembly.Group Output status 2020-04-07 16:49:23 +08:00
Zheng, Lei
b74434e74e Increase version to 0.11.0 2020-03-17 17:00:59 +08:00
looooo
3158b79746 add setup.py 2020-03-17 10:47:21 +08:00
Zheng, Lei
b0a168ff2f assembly: improve selection after drag and drop 2020-03-17 10:46:50 +08:00
Zheng, Lei
541b6472ed assembly: fix auto solve 2020-03-06 09:29:09 +08:00
Zheng, Lei
ebd9dd8a68 assembly: fix element offset/flip menu action 2020-03-04 16:36:17 +08:00
Zheng, Lei
c60a7b7f35 gui: enable quick solve button on editing 2020-03-04 16:33:05 +08:00
Zheng, Lei
d144351e35 assembly: enable auto solve without activating workbench 2020-03-04 16:32:39 +08:00
Zheng, Lei
cbe64d76d4 assembly: fix AsmConstraint bounding box calculation 2020-03-04 16:31:45 +08:00
Zheng, Lei
bb23fafaaa assembly: add 'Move part' context menu action for AsmElement(Link) 2020-03-04 16:27:07 +08:00
Zheng, Lei
66d7fbd4fa assembly: add 'Offset' and 'Flip' menu action for AsmElement(Link) 2020-03-03 09:42:24 +08:00
Zheng, Lei
f7c032ed5d gui: enable some commands while editing 2020-03-03 09:40:11 +08:00
Zheng, Lei
e81b1bf7dc assembly: fix log message 2020-02-27 05:52:48 +08:00
Zheng, Lei
3f120aced5 assembly: support auto fix in AsmElement 2020-02-26 12:07:45 +08:00
Zheng, Lei
89700cc1c1 Add AutoFixElement icon 2020-02-26 12:07:34 +08:00
Zheng, Lei
72ff4a98a3 assembly: fix backward compability 2020-02-17 18:14:02 +08:00
Zheng, Lei
357282a1b4 assembly: add toggle detach context menu for AsmElement 2020-02-17 14:50:45 +08:00
Zheng, Lei
63ca9a4ef0 assembly: fix ViewProviderAssembly legacy checking 2020-02-05 20:03:48 +08:00
Zheng, Lei
472a090cea assembly: fix axis node setup in ViewProviderAsmElement 2020-02-05 20:03:48 +08:00
Zheng, Lei
b3d4354687 gui: fix 'ShowSelectionOnTop' detection 2020-02-05 20:03:45 +08:00
Zheng, Lei
c59ad55f68 assembly: improve element auto naming
If a new element is created pointing to a named element, it will
inherit its name. If not, then check to see if the element is pointing
to an origin feature or datum, and inherit its name if so.
2020-02-05 17:52:06 +08:00
Zheng, Lei
9a9cdb8ac5 assembly: fix Python3 compatibility
Closes #284
2020-02-04 17:11:35 +08:00
Zheng, Lei
3b6ba266c4 assembly: use new selection on top core feature 2019-10-28 18:18:29 +08:00
Zheng, Lei
6725da5c91 assembly: fix hasProperty() 2019-10-28 18:18:13 +08:00
Zheng, Lei
f1d1547e8e assembly: replace hasattr() with hasProperty() 2019-10-24 14:35:46 +08:00
looooo
b7da4ecc41 do not block other namespace-packages 2019-10-12 07:20:59 +08:00
Zheng, Lei
62106d16f3 gui: adjust navigation toolbar 2019-10-05 11:04:10 +08:00
Zheng, Lei
9f1006f5b9 assembly: fix error on FC without topo naming 2019-09-22 21:09:20 +08:00
Zheng, Lei
5e6713ac3e utils: change getIcon() 2019-09-03 11:49:24 +08:00
Zheng, Lei
a6690b64af Restucture source tree
Remove all submodules. Prepare for add-on manager inclusion.
2019-08-30 17:36:14 +08:00
Zheng, Lei
142eb5f420 assembly: add comment 2019-08-30 17:29:09 +08:00
Zheng, Lei
a35d058fc4 assembly: rename _LinkRecomputed to _LinkTouched 2019-07-19 12:03:51 +08:00
Zheng, Lei
91970fa3df assembly: handle FC without topo naming 2019-07-15 17:41:55 +08:00
Zheng, Lei
42f3ed25ca Move FUNDING 2019-07-14 06:28:24 +08:00
Zheng, Lei
99f581188f Update slvs submodule
Fixes #255
2019-07-11 08:26:27 +08:00
luz.paz
6a648cf66f Fix source comment typos and whitespace
Found via `codespell -q 3 -S ./slvs -L vertexes,dof`
2019-07-10 12:46:00 +08:00
Zheng, Lei
4a467bf670 assembly: fix part group migration error
Fixes #252
2019-07-03 13:25:00 +08:00
Zheng, Lei
c927d00b4d utils: fix isElement() 2019-07-02 10:43:51 +08:00
Zheng, Lei
56afcb63d8 assembly: trun on 'NoModify' for VisibilityList 2019-07-01 13:27:20 +08:00
Zheng, Lei
75632fee41 assembly: add selection after make assembly 2019-06-30 17:32:31 +08:00
Zheng, Lei
dbc64ebfc4 assembly: fix selection after drop in part group 2019-06-30 17:31:20 +08:00
Zheng, Lei
b536a9d374 constraint: remove planar requirement in Attachment constraint 2019-06-30 17:30:54 +08:00
Ben Gamari
73a8eb684c Fix misspelling of "relative" 2019-06-30 11:10:19 +08:00
Ben Gamari
871010abf0 Fix a few mispellings of "relative" 2019-06-30 11:10:19 +08:00
Zheng, Lei
2979dfea9d mover: fix checkFixedPart() 2019-06-12 07:20:44 +08:00
114 changed files with 1851 additions and 295 deletions

View File

12
.gitmodules vendored
View File

@ -1,12 +0,0 @@
[submodule "slvs"]
path = slvs
url = https://github.com/realthunder/solvespace.git
[submodule "py_slvs"]
path = py_slvs
url = https://github.com/realthunder/py_slvs.git
[submodule "py_slvs_mac"]
path = py_slvs_mac
url = https://github.com/realthunder/py_slvs_mac.git
[submodule "py3_slvs"]
path = py3_slvs
url = https://github.com/realthunder/py3_slvs.git

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
recursive-include freecad/asm3/Gui *

1
freecad/__init__.py Normal file
View File

@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,754 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg2980"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="Assembly_Assembly_AutoFixElement.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2982">
<linearGradient
id="linearGradient4277">
<stop
id="stop4279"
offset="0"
style="stop-color:#cccccc;stop-opacity:1" />
<stop
id="stop4281"
offset="1"
style="stop-color:#969696;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient3864">
<stop
id="stop3866"
offset="0"
style="stop-color:#71b2f8;stop-opacity:1;" />
<stop
id="stop3868"
offset="1"
style="stop-color:#002795;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3864"
id="radialGradient3850"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.6028459,1.0471639,-1.9794021,1.1395295,127.9588,-74.456907)"
cx="51.328892"
cy="31.074146"
fx="51.328892"
fy="31.074146"
r="19.571428" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective2988" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-6"
id="radialGradient3699"
gradientUnits="userSpaceOnUse"
cx="76.383331"
cy="94.369568"
fx="76.383331"
fy="94.369568"
r="19.467436"
gradientTransform="matrix(0.9818943,0.1894295,-0.4109427,2.1300924,40.163453,-121.11559)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3701"
gradientUnits="userSpaceOnUse"
cx="84.883324"
cy="77.042847"
fx="84.883324"
fy="77.042847"
r="19.467436"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)" />
<linearGradient
id="linearGradient3007">
<stop
id="stop3009"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3011"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="77.042847"
fx="84.883324"
cy="77.042847"
cx="84.883324"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)"
gradientUnits="userSpaceOnUse"
id="radialGradient3017"
xlink:href="#linearGradient3377-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-6"
id="radialGradient3699-2"
gradientUnits="userSpaceOnUse"
cx="76.383331"
cy="94.369568"
fx="76.383331"
fy="94.369568"
r="19.467436"
gradientTransform="matrix(0.9818943,0.1894295,-0.4109427,2.1300924,40.163453,-121.11559)" />
<linearGradient
id="linearGradient3377-6">
<stop
id="stop3379-2"
offset="0"
style="stop-color:#00afff;stop-opacity:1;" />
<stop
id="stop3381-4"
offset="1"
style="stop-color:#0034ff;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="77.042847"
fx="84.883324"
cy="77.042847"
cx="84.883324"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)"
gradientUnits="userSpaceOnUse"
id="radialGradient3017-8"
xlink:href="#linearGradient3377-6"
inkscape:collect="always" />
<linearGradient
id="linearGradient3835">
<stop
id="stop3837"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3839"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="77.042847"
fx="84.883324"
cy="77.042847"
cx="84.883324"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)"
gradientUnits="userSpaceOnUse"
id="radialGradient3844"
xlink:href="#linearGradient3377-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-6"
id="radialGradient3699-7"
gradientUnits="userSpaceOnUse"
cx="76.383331"
cy="94.369568"
fx="76.383331"
fy="94.369568"
r="19.467436"
gradientTransform="matrix(0.9818943,0.1894295,-0.4109427,2.1300924,40.163453,-121.11559)" />
<linearGradient
id="linearGradient3377-2">
<stop
id="stop3379-7"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381-8"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="77.042847"
fx="84.883324"
cy="77.042847"
cx="84.883324"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)"
gradientUnits="userSpaceOnUse"
id="radialGradient3017-6"
xlink:href="#linearGradient3377-2"
inkscape:collect="always" />
<linearGradient
id="linearGradient3835-1">
<stop
id="stop3837-0"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3839-9"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="77.042847"
fx="84.883324"
cy="77.042847"
cx="84.883324"
gradientTransform="matrix(2.8492421,1.2585119,-0.4040415,0.9147407,-125.84131,-100.25805)"
gradientUnits="userSpaceOnUse"
id="radialGradient3844-7"
xlink:href="#linearGradient3377-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032"
id="radialGradient4112"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.19157613,0.46621455,-1.1364164,-0.41904304,156.5648,24.076707)"
cx="86.836884"
cy="90.601151"
fx="86.836884"
fy="90.601151"
r="19.467436" />
<linearGradient
id="linearGradient4032">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4034" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4036" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032"
id="radialGradient4114"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
cx="113.50187"
cy="65.849281"
fx="113.50187"
fy="65.849281"
r="19.467436" />
<linearGradient
id="linearGradient3171">
<stop
style="stop-color:#cccccc;stop-opacity:1"
offset="0"
id="stop3173" />
<stop
style="stop-color:#b4b4b4;stop-opacity:1"
offset="1"
id="stop3175" />
</linearGradient>
<radialGradient
r="19.467436"
fy="65.849281"
fx="113.50187"
cy="65.849281"
cx="113.50187"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
gradientUnits="userSpaceOnUse"
id="radialGradient3180"
xlink:href="#linearGradient4032"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-7"
id="radialGradient4112-9"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.19157613,0.46621455,-1.1364164,-0.41904304,162.99236,26.56694)"
cx="86.836884"
cy="90.601151"
fx="86.836884"
fy="90.601151"
r="19.467436" />
<linearGradient
id="linearGradient4032-7">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4034-3" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4036-6" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-7"
id="radialGradient4114-3"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
cx="113.50187"
cy="65.849281"
fx="113.50187"
fy="65.849281"
r="19.467436" />
<linearGradient
id="linearGradient3171-9">
<stop
style="stop-color:#969696;stop-opacity:1"
offset="0"
id="stop3173-7" />
<stop
style="stop-color:#646464;stop-opacity:1"
offset="1"
id="stop3175-5" />
</linearGradient>
<radialGradient
r="19.467436"
fy="65.849281"
fx="113.50187"
cy="65.849281"
cx="113.50187"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
gradientUnits="userSpaceOnUse"
id="radialGradient3180-6"
xlink:href="#linearGradient4032-7"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-8"
id="radialGradient4112-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.19157613,0.46621455,-1.1364164,-0.41904304,156.5648,24.076707)"
cx="86.836884"
cy="90.601151"
fx="86.836884"
fy="90.601151"
r="19.467436" />
<linearGradient
id="linearGradient4032-8">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4034-4" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4036-3" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-8"
id="radialGradient4114-9"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
cx="113.50187"
cy="65.849281"
fx="113.50187"
fy="65.849281"
r="19.467436" />
<linearGradient
id="linearGradient3171-1">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop3173-0" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop3175-3" />
</linearGradient>
<radialGradient
r="19.467436"
fy="65.849281"
fx="113.50187"
cy="65.849281"
cx="113.50187"
gradientTransform="matrix(0.19036833,-0.61386357,1.99853,-0.19092801,-47.133199,165.45559)"
gradientUnits="userSpaceOnUse"
id="radialGradient3180-9"
xlink:href="#linearGradient4032-8"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-0"
id="linearGradient3822"
x1="154.13527"
y1="33.267025"
x2="165.61629"
y2="46.429642"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4032-0">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4034-37" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4036-1" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032-0"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="132.70454"
cy="90.193245"
fx="132.70454"
fy="90.193245"
r="19.467436"
gradientTransform="matrix(-0.08162339,1.3949072,-1.1572569,-0.26963374,245.22773,-105.44363)" />
<linearGradient
id="linearGradient3284">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop3286" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop3288" />
</linearGradient>
<radialGradient
r="19.467436"
fy="90.193245"
fx="132.70454"
cy="90.193245"
cx="132.70454"
gradientTransform="matrix(-0.08162339,1.3949072,-1.1572569,-0.26963374,245.22773,-105.44363)"
gradientUnits="userSpaceOnUse"
id="radialGradient3294"
xlink:href="#linearGradient4032-0"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4023"
id="linearGradient4029"
x1="45"
y1="34"
x2="50"
y2="59"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4023">
<stop
style="stop-color:#8ae234;stop-opacity:1;"
offset="0"
id="stop4025" />
<stop
style="stop-color:#4e9a06;stop-opacity:1"
offset="1"
id="stop4027" />
</linearGradient>
<linearGradient
gradientTransform="translate(-16,0)"
inkscape:collect="always"
xlink:href="#linearGradient3171-9"
id="linearGradient3783"
x1="60"
y1="58"
x2="50"
y2="38"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="translate(-16,0)"
inkscape:collect="always"
xlink:href="#linearGradient3171"
id="linearGradient3773"
x1="26"
y1="64"
x2="22"
y2="46"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4277"
id="linearGradient3807-3-9"
x1="123.54545"
y1="43.630688"
x2="71.181816"
y2="35.897354"
gradientUnits="userSpaceOnUse"
spreadMethod="reflect"
gradientTransform="matrix(0.45833337,0,0,0.51724135,7.374997,5.432404)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-6"
id="linearGradient3807-3"
x1="110"
y1="35"
x2="40.636368"
y2="28.133339"
gradientUnits="userSpaceOnUse"
spreadMethod="reflect"
gradientTransform="matrix(0.45833337,0,0,0.51724135,-28.625003,1.4482735)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3801-6-1-6"
id="linearGradient3807-3-9-3"
x1="110"
y1="35"
x2="85"
y2="35"
gradientUnits="userSpaceOnUse"
spreadMethod="reflect"
gradientTransform="matrix(0.45833337,0,0,0.51724135,7.374996,33.448275)" />
<linearGradient
inkscape:collect="always"
id="linearGradient3801-6-1-6">
<stop
style="stop-color:#c4a000;stop-opacity:1"
offset="0"
id="stop3803-7-2-7" />
<stop
style="stop-color:#fce94f;stop-opacity:1"
offset="1"
id="stop3805-5-7-5" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="10.513916"
inkscape:cy="-62.479706"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1375"
inkscape:window-height="876"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid3067"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata2985">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>[jmaustpc]</dc:title>
</cc:Agent>
</dc:creator>
<dc:title>Assembly_Assembly_Tree</dc:title>
<dc:date>2013-12-24</dc:date>
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>FreeCAD/src/Mod/Assembly/Gui/Resources/icons/Assembly_Assembly_Tree.svg</dc:identifier>
<dc:rights>
<cc:Agent>
<dc:title>FreeCAD LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title>[agryson] Alexander Gryson</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3760-8"
transform="matrix(0.39800085,0,0,0.49338099,18.710208,-4.5784768)" />
<g
id="g3205">
<path
sodipodi:nodetypes="sscccs"
inkscape:connector-curvature="0"
id="path2994-3-3"
d="m 25.000001,24.86206 c 0,2.28532 -4.924867,4.13794 -11,4.13794 C 7.924868,29 3,27.14738 3,24.86206 l -1e-6,-17.7241305 22.000001,0 z"
style="fill:#729fcf;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
sodipodi:nodetypes="sscccs"
inkscape:connector-curvature="0"
id="path2994-3-6-5"
d="m 23,24 c 0,2.07756 -5.999802,3.01587 -9,3.01587 -3,0 -9,-0.93831 -9,-3.01587 l -1e-6,-15.6551715 18.000001,0 z"
style="fill:url(#linearGradient3807-3);fill-opacity:1;stroke:#4abdf5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
sodipodi:nodetypes="csc"
inkscape:connector-curvature="0"
id="path2994-3-6-9-6"
d="M 23,11.000001 C 21,13 17,13.351648 14,13.351648 11,13.351648 7,13 5,11.000001"
style="fill:none;stroke:#4abdf5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
transform="matrix(0.52380955,0,0,0.59113297,32.333335,-7.640393)"
d="m -14,25 c 0,3.865993 -9.40202,7 -21,7 -11.59798,0 -21,-3.134007 -21,-7 0,-3.865993 9.40202,-7 21,-7 11.59798,0 21,3.134007 21,7 z"
sodipodi:ry="7"
sodipodi:rx="21"
sodipodi:cy="25"
sodipodi:cx="-35"
id="path2994-2"
style="fill:#cccccc;stroke:#0b1521;stroke-width:3.59418702;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:20.4;fill-opacity:1"
sodipodi:type="arc" />
</g>
<g
id="g3199">
<path
sodipodi:nodetypes="sscccs"
inkscape:connector-curvature="0"
id="path2994-3-3-0"
d="m 61.000001,28.84619 c 0,2.28532 -4.924867,4.13794 -11,4.13794 C 43.924868,32.98413 39,31.13151 39,28.84619 l -10e-7,-17.72413 22.000001,0 z"
style="fill:#729fcf;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
sodipodi:nodetypes="sscccs"
inkscape:connector-curvature="0"
id="path2994-3-6-5-9"
d="M 59,27.98413 C 59,30.06169 53.000198,31 50,31 47,31 41,30.06169 41,27.98413 l -10e-7,-15.655171 18.000001,0 z"
style="fill:url(#linearGradient3807-3-9);fill-opacity:1;stroke:#cccccc;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
sodipodi:nodetypes="csc"
inkscape:connector-curvature="0"
id="path2994-3-6-9-6-3"
d="m 59,14.984131 c -2,1.999999 -6,2.351647 -9,2.351647 -3,0 -7,-0.351648 -9,-2.351647"
style="fill:none;stroke:#cccccc;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
<path
transform="matrix(0.52380955,0,0,0.59113297,68.333335,-3.6562625)"
d="m -14,25 c 0,3.865993 -9.40202,7 -21,7 -11.59798,0 -21,-3.134007 -21,-7 0,-3.865993 9.40202,-7 21,-7 11.59798,0 21,3.134007 21,7 z"
sodipodi:ry="7"
sodipodi:rx="21"
sodipodi:cy="25"
sodipodi:cx="-35"
id="path2994-2-6"
style="fill:#cccccc;stroke:#0b1521;stroke-width:3.59418702;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:20.4;fill-opacity:1"
sodipodi:type="arc" />
</g>
<g
id="g3192">
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path2993"
d="M 3,35 21,39 37,35 21,31 z"
style="fill:#cccccc;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;fill-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path2995"
d="m 37,35 0,20 -16,6 0,-22 z"
style="fill:url(#linearGradient3783);fill-opacity:1;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
<path
style="fill:url(#linearGradient3773);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 3,35 21,39 21,61 3,57 z"
id="path3825"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path3765"
d="m 5,37.42772 0.0087,17.919116 14.008671,3.268799 -0.0087,-17.933614 z"
style="fill:none;stroke:#cccccc;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path3775"
d="m 23.01243,40.433833 -0.01226,17.535301 12.001105,-4.300993 3.6e-4,-15.867363 z"
style="fill:none;stroke:#969696;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<path
inkscape:connector-curvature="0"
style="fill:#546f7a;stroke:#383838;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 32.239462,29.057981 4.768064,-3.371932 c 0.334481,-0.236372 0.815094,-0.170698 1.073898,0.146743 l 24.107159,29.589616 c 1.275053,1.565015 0.971546,3.786912 -0.67677,4.952755 -0.824098,0.582875 -1.830835,0.792909 -2.790843,0.661729 -0.960007,-0.13118 -1.87349,-0.603604 -2.511105,-1.386214 L 32.102516,30.060935 c -0.258689,-0.317527 -0.197331,-0.766564 0.136946,-1.002954 z"
id="path3" />
<path
inkscape:connector-curvature="0"
style="fill:#475d63"
d="m 34.583786,30.550636 1.819842,-1.298109 22.288383,27.588946 c 0.578295,0.715784 1.60092,1.698563 2.479502,1.649712 0.472279,-0.0263 0.291134,-0.02996 0.66813,-0.09835 -0.223718,0.422047 -0.482937,0.863123 -0.90734,1.165872 -0.749125,0.534388 -1.339894,0.56846 -2.211642,0.449339 -0.871748,-0.11912 -1.819345,-0.760881 -2.397641,-1.476655 L 34.458404,31.468885 c -0.234623,-0.290399 -0.178445,-0.701518 0.125382,-0.918249 z"
id="path13"
sodipodi:nodetypes="cccscssssc" />
<path
inkscape:connector-curvature="0"
style="fill:#e0e0e0;stroke:#383838;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 33.107218,25.437497 c 1.648378,-1.165546 4.026795,-0.840547 5.302152,0.724514 l 6.453203,7.920768 c 0.258678,0.317616 0.197333,0.766554 -0.137059,1.003029 l -4.768064,3.371931 c -0.167183,0.118144 -0.371062,0.160834 -0.565274,0.134296 -0.194213,-0.02654 -0.379165,-0.12236 -0.508523,-0.281025 l -6.453205,-7.920758 c -1.275013,-1.565303 -0.971417,-3.787086 0.67677,-4.952755 z"
id="path15" />
<path
inkscape:connector-curvature="0"
style="fill:#c6c5ca"
d="m 33.87541,26.091128 c 1.046574,-0.412759 0.861516,-0.262767 1.333777,-0.341487 -0.536793,0.975627 -0.409227,2.148174 0.392402,3.093821 l 6.071704,7.160478 -1.671985,1.194331 c -0.104234,0.09251 -0.270505,0.255146 -0.439888,0.232001 -0.169385,-0.02315 -0.244493,-0.150002 -0.357955,-0.283674 L 33.338189,30.378732 C 32.219931,29.059276 32.43553,26.94732 33.87541,26.091128 Z"
id="path17"
sodipodi:nodetypes="cccccsccc" />
<g
id="g4345"
transform="matrix(1.1672929,0,0,1.1672929,2.7626002,-0.86516693)">
<path
transform="matrix(-0.53036227,0.84777113,-0.84777113,-0.53036227,51.214868,5.9648907)"
inkscape:transform-center-y="0.80192699"
inkscape:transform-center-x="-0.43184571"
d="m 35.634968,28.059014 -8.412731,-1.095962 -5.672134,6.308888 -1.557355,-8.339653 -7.752895,-3.444967 7.450233,-4.058226 0.880581,-8.4379949 6.161852,5.8315309 8.297124,-1.770001 -3.641999,7.662312 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.2163211"
sodipodi:arg1="0.5880026"
sodipodi:r2="6.3877878"
sodipodi:r1="12.775575"
sodipodi:cy="20.972401"
sodipodi:cx="25.005047"
sodipodi:sides="5"
id="path4317"
style="opacity:1;fill:#fdc50d;fill-opacity:1;stroke:#c0822e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:63;stroke-opacity:1"
sodipodi:type="star" />
<path
sodipodi:nodetypes="ccccccccccc"
inkscape:connector-curvature="0"
id="path4317-2"
d="m 32.017391,25.104153 -5.889539,-0.467214 -5.843864,6.660184 -1.213259,-6.344895 -8.348778,-3.834869 8.053709,-4.525015 1.049653,-9.1483998 6.805135,6.3592448 5.850128,-1.407246 -3.477248,7.805495 z"
inkscape:transform-center-y="0.59295265"
inkscape:transform-center-x="-0.31931126"
style="opacity:1;fill:#fce01b;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:63;stroke-opacity:1"
transform="matrix(-0.39215509,0.62685033,-0.62685033,-0.39215509,42.721976,8.5899893)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

1
freecad/asm3/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__ = "0.11.0"

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,10 @@
from collections import namedtuple
import FreeCAD, FreeCADGui, Part
from . import utils, gui
from .deps import with_metaclass
try:
from six import with_metaclass
except ImportError:
from .deps import with_metaclass
from .utils import objName,cstrlogger as logger, guilogger
from .proxy import ProxyType, PropertyInfo, propGet, propGetValue
@ -242,17 +245,21 @@ def _lw(solver,partInfo,subname,shape,retAll=False):
'return a handle for either a line or a plane depending on the shape'
_ = retAll
if not solver:
if utils.isLinearEdge(shape) or utils.isPlanar(shape):
if utils.isLinearEdge(shape) or \
utils.isPlanar(shape) or \
utils.isCylindricalPlane(shape):
return
return 'a linear edge or edge/face with planar surface'
return 'a linear edge or edge/face with planar or cylindrical surface'
if utils.isLinearEdge(shape):
return _l(solver,partInfo,subname,shape,False)
if utils.isCylindricalPlane(shape):
return _n(solver,partInfo,subname,shape,False)
return _wa(solver,partInfo,subname,shape)
def _w(solver,partInfo,subname,shape,retAll=False):
def _w(solver,partInfo,subname,shape,retAll=False,noCheck=False):
'return a handle of a transformed plane/workplane from "shape"'
if not solver:
if utils.isPlanar(shape):
if noCheck or utils.isPlanar(shape):
return
return 'an edge/face with a planar surface'
@ -274,6 +281,10 @@ def _wa(solver,partInfo,subname,shape,retAll=False):
_ = retAll
return _w(solver,partInfo,subname,shape,True)
def _wa_no_check(solver,partInfo,subname,shape,retAll=False):
_ = retAll
return _w(solver,partInfo,subname,shape,True,True)
def _c(solver,partInfo,subname,shape,requireArc=False,retAll=False):
'return a handle of a transformed circle/arc derived from "shape"'
if not solver:
@ -282,7 +293,7 @@ def _c(solver,partInfo,subname,shape,requireArc=False,retAll=False):
if requireArc and not isinstance(r,tuple):
return 'an arc edge'
return
return 'a cicular edge'
return 'a circular edge'
if requireArc:
key = subname+'.a'
else:
@ -349,7 +360,7 @@ def _c(solver,partInfo,subname,shape,requireArc=False,retAll=False):
pln = _w(solver,partInfo,subname,shape,True)
r = utils.getElementCircular(shape)
if not r:
raise RuntimeError('shape is not cicular')
raise RuntimeError('shape is not circular')
system.NameTag = nameTag + '.r'
hr = system.addDistanceV(r)
if requireArc or isinstance(r,(list,tuple)):
@ -629,7 +640,8 @@ class Constraint(ProxyType):
# part that are fixed
continue
handled.add(obj)
if rollback is not False:
handled.add(obj)
for info0,info in zip(firstInfo,infos):
if info.Part in ret:
@ -645,7 +657,8 @@ class Constraint(ProxyType):
utils.getElementPlacement(info0.Shape))
pla = pla0.multiply(
utils.getElementPlacement(info.Shape).inverse())
if not utils.isSamePlacement(pla,info.Placement):
if rollback is not False and \
not utils.isSamePlacement(pla,info.Placement):
solver.touched = True
solver.system.log('attaching "{}" -> "{}"',
info.PartName, info0.PartName)
@ -703,6 +716,11 @@ class Constraint(ProxyType):
else:
obj.setExpression('.Label2', None)
@classmethod
def isAttachment(mcs, obj):
cstr = mcs.getProxy(obj)
return isinstance(cstr, Attachment)
def _makeProp(name,tp,doc='',getter=propGet,internal=False,default=None):
return PropertyInfo(Constraint,name,tp,doc,getter=getter,duplicate=True,
@ -1157,7 +1175,8 @@ class BaseMulti(Base):
e = cls._entityDef[0](
solver,partInfo,info.Subname,info.Shape)
params = props + [e0,e]
solver.system.checkRedundancy(obj,partInfo0,partInfo)
solver.system.checkRedundancy(
obj,partInfo0,partInfo,info0.SubnameRef,info.SubnameRef)
h = func(*params,group=solver.group)
if isinstance(h,(list,tuple)):
ret += list(h)
@ -1210,16 +1229,19 @@ class BaseMulti(Base):
if i==idx0:
e0 = cls._entityDef[idx0](
solver,partInfo,info.Subname,info.Shape)
subname0 = info.SubnameRef
info0 = partInfo
else:
e = cls._entityDef[0](solver,partInfo,info.Subname,info.Shape)
if e0 and e:
if idx0:
params = props + [e,e0]
solver.system.checkRedundancy(obj,partInfo,info0)
solver.system.checkRedundancy(
obj,partInfo,info0,info.SubnameRef,subname0)
else:
params = props + [e0,e]
solver.system.checkRedundancy(obj,info0,partInfo)
solver.system.checkRedundancy(
obj,info0,partInfo,subname0,info.SubnameRef)
h = func(*params,group=solver.group)
if isinstance(h,(list,tuple)):
ret += list(h)
@ -1252,7 +1274,8 @@ class BaseCascade(BaseMulti):
params = props + [e1,e2]
else:
params = props + [e2,e1]
solver.system.checkRedundancy(obj,prevInfo,partInfo)
solver.system.checkRedundancy(
obj,prevInfo,partInfo,prev.SubnameRef,info.SubnameRef)
h = func(*params,group=solver.group)
if isinstance(h,(list,tuple)):
ret += list(h)
@ -1278,7 +1301,7 @@ class PlaneCoincident(BaseCascade):
_iconName = 'Assembly_ConstraintCoincidence.svg'
_props = ['Multiply','Cascade','Offset','OffsetX','OffsetY'] + _AngleProps
_tooltip = \
'Add a "{}" constraint to conincide planar faces of two or more parts.\n'\
'Add a "{}" constraint to coincide planar faces of two or more parts.\n'\
'The faces are coincided at their centers with an optional distance.'
@ -1288,8 +1311,9 @@ class Attachment(BaseCascade):
_props = ['Multiply', 'Cascade']
_tooltip = \
'Add a "{}" constraint to attach two parts by the selected geometry\n'\
'elements. This constraint completely fixes the parts realtive to each\n'\
'elements. This constraint completely fixes the parts relative to each\n'\
'other.'
_entityDef = (_wa_no_check,)
class AxialAlignment(BaseMulti):
@ -1373,7 +1397,7 @@ class PointsCoincident(Base):
_entityDef = (_p,_p)
_workplane = True
_iconName = 'Assembly_ConstraintPointCoincident.svg'
_tooltips = 'Add a "{}" constraint to conincide two points in 2D or 3D'
_tooltips = 'Add a "{}" constraint to coincide two points in 2D or 3D'
class PointInPlane(BaseMulti):
@ -1658,10 +1682,10 @@ class SketchPlane(BaseSketch):
# if there is any child element in this constraint, we expect the first
# one to be a planar face or edge to define the work plane. The rest of
# entities must be from some draft wire or circle/arc
# entities must be from some draft wire or circle/arc
#
# Base.prepare() will call system.addSketchPlane() with all contained
# element below. However, the default implementation,
# element below. However, the default implementation,
# SystemExtension.addSketchPlane(), only really uses the first one,
# i.e. the one obtained by _wa(), i.e. a tuple of entities
# (workplane,base,normal).
@ -1779,7 +1803,7 @@ class MidPoint(BaseSketch):
if not func:
return
params = cls.getPropertyValues(obj) + cls.getEntities(obj,solver)
# temparary fix of slvs.addMidPoint(), which should have made wrkpln
# temporary fix of slvs.addMidPoint(), which should have made wrkpln
# argument optional and defaults to 0
if len(params)==2:
params.append(0)

Some files were not shown because too many files have changed in this diff Show More