Compare commits
3 commits
master
...
159-roboss
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bafa332cac | ||
![]() |
ba6a8e9d08 | ||
![]() |
ec2d5cae0a |
6
.gitignore
vendored
|
@ -112,8 +112,4 @@ install_plugin_cad.sh
|
||||||
*#
|
*#
|
||||||
.#*
|
.#*
|
||||||
\#*\#
|
\#*\#
|
||||||
out/
|
out/
|
||||||
|
|
||||||
#freecad_workbench
|
|
||||||
freecad_workbench/freecad/update_workbench.sh
|
|
||||||
*.FCBak
|
|
8
.gitmodules
vendored
|
@ -1,9 +1,3 @@
|
||||||
[submodule "rcg_pipeline"]
|
|
||||||
path = rcg_pipeline
|
|
||||||
url = https://gitlab.com/robossembler/rcg-pipeline.git
|
|
||||||
[submodule "freecad_workbench"]
|
|
||||||
path = freecad_workbench
|
|
||||||
url = https://gitlab.com/robossembler/robossembler-freecad-workbench.git
|
|
||||||
[submodule "simulation/insertion_vector_predicate/assembly"]
|
[submodule "simulation/insertion_vector_predicate/assembly"]
|
||||||
path = simulation/insertion_vector_predicate/assembly
|
path = insertion_vector_predicate/assembly
|
||||||
url = https://github.com/yunshengtian/Assemble-Them-All
|
url = https://github.com/yunshengtian/Assemble-Them-All
|
||||||
|
|
674
LICENSE
|
@ -1,674 +0,0 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) 2024 Igor Brylev
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) 2024 Igor Brylev
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
|
@ -1,15 +0,0 @@
|
||||||
## Скрипт генерации датасета
|
|
||||||
|
|
||||||
Скрипт используется в составе web-сервиса для генерации датасетов с использованием заданной пользователем конфигурации.
|
|
||||||
Должен быть установлен пакет [BlenderProc](https://github.com/DLR-RM/BlenderProc).
|
|
||||||
|
|
||||||
Команда для вызова:
|
|
||||||
```bash
|
|
||||||
blenderproc run renderBOPdataset.py --cfg CFG
|
|
||||||
|
|
||||||
options:
|
|
||||||
--cfg CFG строка json с параметрами конфигурации датасета / путь к json-файлу с конфигурацией
|
|
||||||
```
|
|
||||||
|
|
||||||
[Пример файла конфигурации датасета.](dataset_cfg.json)
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
"dataSetObjects": ["fork"],
|
|
||||||
"datasetType": "Object Detection - YOLOv8",
|
|
||||||
"name": "123123e",
|
|
||||||
"formBuilder": {
|
|
||||||
"output": {
|
|
||||||
"typedataset": "ObjectDetection",
|
|
||||||
"dataset_path": "eqwfeadszxz",
|
|
||||||
"models": [{"id": 1, "name": "fork"}],
|
|
||||||
"models_randomization": { "loc_range_low": [-1, -1, 0.0], "loc_range_high": [1, 1, 2] },
|
|
||||||
"scene": {
|
|
||||||
"objects": [
|
|
||||||
{"name": "floor", "collision_shape": "BOX", "loc_xyz":[0,0,0], "rot_euler":[0, 0, 0],
|
|
||||||
"material_randomization": {"specular":[0,1], "roughness":[0,1], "metallic":[0,1], "base_color":[[0,0,0,1],[1,1,1,1]]}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"lights": [
|
|
||||||
{"id": 1, "type": "POINT", "loc_xyz":[5,5,5], "rot_euler":[-0.06, 0.61, -0.19],
|
|
||||||
"color_range_low":[0.5, 0.5, 0.5], "color_range_high":[1, 1, 1],
|
|
||||||
"energy_range":[400,900]
|
|
||||||
},
|
|
||||||
{"id": 2, "type": "SUN", "loc_xyz":[0,0,0], "rot_euler":[-0.01, 0.01, -0.01],
|
|
||||||
"color_range_low":[1, 1, 1], "color_range_high":[1, 1, 1],
|
|
||||||
"energy_range":[2,9]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"camera_position": { "center_shell": [0, 0, 0], "radius_range": [0.4, 1.4], "elevation_range": [10, 90] },
|
|
||||||
"generation": {
|
|
||||||
"n_cam_pose": 3,
|
|
||||||
"n_sample_on_pose": 1,
|
|
||||||
"n_series": 3,
|
|
||||||
"image_format": "JPEG",
|
|
||||||
"image_size_wh": [640, 480]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"processStatus": "exec",
|
|
||||||
"local_path": "/home/user/5f4e161b-82d1-41fa-a11c-15d485b01600",
|
|
||||||
"projectId": "660aaddbf98957a186f9c546"
|
|
||||||
}
|
|
|
@ -1,361 +0,0 @@
|
||||||
import blenderproc as bproc
|
|
||||||
"""
|
|
||||||
renderBOPdataset
|
|
||||||
Общая задача: common pipeline
|
|
||||||
Реализуемая функция: создание датасета в формате BOP с заданными параметрами рандомизации
|
|
||||||
Используется модуль blenderproc
|
|
||||||
|
|
||||||
26.04.2024 @shalenikol release 0.1
|
|
||||||
"""
|
|
||||||
import numpy as np
|
|
||||||
import argparse
|
|
||||||
import random
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import json
|
|
||||||
|
|
||||||
VHACD_PATH = "blenderproc_resources/vhacd"
|
|
||||||
DIR_MODELS = "models"
|
|
||||||
FILE_LOG_SCENE = "res.txt"
|
|
||||||
FILE_RBS_INFO = "rbs_info.json"
|
|
||||||
FILE_GT_COCO = "scene_gt_coco.json"
|
|
||||||
|
|
||||||
Not_Categories_Name = True # наименование категории в COCO-аннотации отсутствует
|
|
||||||
|
|
||||||
def _get_path_model(name_model: str) -> str:
|
|
||||||
# TODO on name_model find path for mesh (model.fbx)
|
|
||||||
# local_path/assets/mesh/
|
|
||||||
return os.path.join(rnd_par.output_dir, "assets/mesh/"+name_model+".fbx")
|
|
||||||
|
|
||||||
def _get_path_object(name_obj: str) -> str:
|
|
||||||
# TODO on name_obj find path for scene object (object.fbx)
|
|
||||||
return os.path.join(rnd_par.output_dir, "assets/mesh/"+name_obj+".fbx")
|
|
||||||
|
|
||||||
def convert2relative(height, width, bbox):
|
|
||||||
"""
|
|
||||||
YOLO format use relative coordinates for annotation
|
|
||||||
"""
|
|
||||||
x, y, w, h = bbox
|
|
||||||
x += w/2
|
|
||||||
y += h/2
|
|
||||||
return x/width, y/height, w/width, h/height
|
|
||||||
|
|
||||||
def render() -> int:
|
|
||||||
for obj in all_meshs:
|
|
||||||
# Make the object actively participate in the physics simulation
|
|
||||||
obj.enable_rigidbody(active=True, collision_shape="COMPOUND")
|
|
||||||
# Also use convex decomposition as collision shapes
|
|
||||||
obj.build_convex_decomposition_collision_shape(VHACD_PATH)
|
|
||||||
|
|
||||||
objs = all_meshs + rnd_par.scene.objs
|
|
||||||
|
|
||||||
log_txt = os.path.join(rnd_par.output_dir, FILE_LOG_SCENE)
|
|
||||||
with open(log_txt, "w") as fh:
|
|
||||||
for i,o in enumerate(objs):
|
|
||||||
loc = o.get_location()
|
|
||||||
euler = o.get_rotation_euler()
|
|
||||||
fh.write(f"{i} : {o.get_name()} {loc} {euler} category_id = {o.get_cp('category_id')}\n")
|
|
||||||
|
|
||||||
# define a light and set its location and energy level
|
|
||||||
ls = []
|
|
||||||
for l in rnd_par.scene.light_data:
|
|
||||||
light = bproc.types.Light(name=f"l{l['id']}")
|
|
||||||
light.set_type(l["type"])
|
|
||||||
light.set_location(l["loc_xyz"]) #[5, -5, 5])
|
|
||||||
light.set_rotation_euler(l["rot_euler"]) #[-0.063, 0.6177, -0.1985])
|
|
||||||
ls += [light]
|
|
||||||
|
|
||||||
# define the camera intrinsics
|
|
||||||
bproc.camera.set_intrinsics_from_blender_params(1,
|
|
||||||
rnd_par.image_size_wh[0],
|
|
||||||
rnd_par.image_size_wh[1],
|
|
||||||
lens_unit="FOV")
|
|
||||||
|
|
||||||
# add segmentation masks (per class and per instance)
|
|
||||||
bproc.renderer.enable_segmentation_output(map_by=["category_id", "instance", "name"])
|
|
||||||
|
|
||||||
# activate depth rendering
|
|
||||||
bproc.renderer.enable_depth_output(activate_antialiasing=False)
|
|
||||||
|
|
||||||
res_dir = os.path.join(rnd_par.output_dir, rnd_par.ds_name)
|
|
||||||
if os.path.isdir(res_dir):
|
|
||||||
shutil.rmtree(res_dir)
|
|
||||||
# Цикл рендеринга
|
|
||||||
# Do multiple times: Position the shapenet objects using the physics simulator and render X images with random camera poses
|
|
||||||
for r in range(rnd_par.n_series):
|
|
||||||
# один случайный объект в кадре / все заданные объекты
|
|
||||||
random_obj = random.choice(range(rnd_par.scene.n_obj))
|
|
||||||
meshs = []
|
|
||||||
for i,o in enumerate(all_meshs): #objs
|
|
||||||
if rnd_par.single_object and i != random_obj:
|
|
||||||
continue
|
|
||||||
meshs += [o]
|
|
||||||
rnd_mat = rnd_par.scene.obj_data[i]["material_randomization"]
|
|
||||||
mats = o.get_materials() #[0]
|
|
||||||
for mat in mats:
|
|
||||||
val = rnd_mat["specular"]
|
|
||||||
mat.set_principled_shader_value("Specular", random.uniform(val[0], val[1]))
|
|
||||||
val = rnd_mat["roughness"]
|
|
||||||
mat.set_principled_shader_value("Roughness", random.uniform(val[0], val[1]))
|
|
||||||
val = rnd_mat["base_color"]
|
|
||||||
mat.set_principled_shader_value("Base Color", np.random.uniform(val[0], val[1]))
|
|
||||||
val = rnd_mat["metallic"]
|
|
||||||
mat.set_principled_shader_value("Metallic", random.uniform(val[0], val[1]))
|
|
||||||
|
|
||||||
# Randomly set the color and energy
|
|
||||||
for i,l in enumerate(ls):
|
|
||||||
current = rnd_par.scene.light_data[i]
|
|
||||||
l.set_color(np.random.uniform(current["color_range_low"], current["color_range_high"]))
|
|
||||||
energy = current["energy_range"]
|
|
||||||
l.set_energy(random.uniform(energy[0], energy[1]))
|
|
||||||
|
|
||||||
# Clear all key frames from the previous run
|
|
||||||
bproc.utility.reset_keyframes()
|
|
||||||
|
|
||||||
# Define a function that samples 6-DoF poses
|
|
||||||
def sample_pose(obj: bproc.types.MeshObject):
|
|
||||||
obj.set_location(np.random.uniform(rnd_par.loc_range_low, rnd_par.loc_range_high)) #[-1, -1, 0], [1, 1, 2]))
|
|
||||||
obj.set_rotation_euler(bproc.sampler.uniformSO3())
|
|
||||||
|
|
||||||
# Sample the poses of all shapenet objects above the ground without any collisions in-between
|
|
||||||
bproc.object.sample_poses(meshs,
|
|
||||||
objects_to_check_collisions = meshs + rnd_par.scene.collision_objects,
|
|
||||||
sample_pose_func = sample_pose)
|
|
||||||
|
|
||||||
# Run the simulation and fix the poses of the shapenet objects at the end
|
|
||||||
bproc.object.simulate_physics_and_fix_final_poses(min_simulation_time=4, max_simulation_time=20, check_object_interval=1)
|
|
||||||
|
|
||||||
# Find point of interest, all cam poses should look towards it
|
|
||||||
poi = bproc.object.compute_poi(meshs)
|
|
||||||
|
|
||||||
coord_max = [0.1, 0.1, 0.1]
|
|
||||||
coord_min = [0., 0., 0.]
|
|
||||||
|
|
||||||
with open(log_txt, "a") as fh:
|
|
||||||
fh.write("*****************\n")
|
|
||||||
fh.write(f"{r}) poi = {poi}\n")
|
|
||||||
i = 0
|
|
||||||
for o in meshs:
|
|
||||||
i += 1
|
|
||||||
loc = o.get_location()
|
|
||||||
euler = o.get_rotation_euler()
|
|
||||||
fh.write(f" {i} : {o.get_name()} {loc} {euler}\n")
|
|
||||||
for j in range(3):
|
|
||||||
if loc[j] < coord_min[j]:
|
|
||||||
coord_min[j] = loc[j]
|
|
||||||
if loc[j] > coord_max[j]:
|
|
||||||
coord_max[j] = loc[j]
|
|
||||||
|
|
||||||
# Sample up to X camera poses
|
|
||||||
#an = np.random.uniform(0.78, 1.2) #1. #0.35
|
|
||||||
for i in range(rnd_par.n_cam_pose):
|
|
||||||
# Sample location
|
|
||||||
location = bproc.sampler.shell(center=rnd_par.center_shell,
|
|
||||||
radius_min=rnd_par.radius_range[0],
|
|
||||||
radius_max=rnd_par.radius_range[1],
|
|
||||||
elevation_min=rnd_par.elevation_range[0],
|
|
||||||
elevation_max=rnd_par.elevation_range[1])
|
|
||||||
# координата, по которой будем сэмплировать положение камеры
|
|
||||||
j = random.randint(0, 2)
|
|
||||||
# разовый сдвиг по случайной координате
|
|
||||||
d = (coord_max[j] - coord_min[j]) / rnd_par.n_sample_on_pose
|
|
||||||
if location[j] < 0:
|
|
||||||
d = -d
|
|
||||||
for _ in range(rnd_par.n_sample_on_pose):
|
|
||||||
# Compute rotation based on vector going from location towards poi
|
|
||||||
rotation_matrix = bproc.camera.rotation_from_forward_vec(poi - location, inplane_rot=np.random.uniform(-0.7854, 0.7854))
|
|
||||||
# Add homog cam pose based on location an rotation
|
|
||||||
cam2world_matrix = bproc.math.build_transformation_mat(location, rotation_matrix)
|
|
||||||
bproc.camera.add_camera_pose(cam2world_matrix)
|
|
||||||
location[j] -= d
|
|
||||||
# render the whole pipeline
|
|
||||||
data = bproc.renderer.render()
|
|
||||||
# Write data to bop format
|
|
||||||
bproc.writer.write_bop(res_dir,
|
|
||||||
target_objects = all_meshs, # Optional[List[MeshObject]] = None
|
|
||||||
depths = data["depth"],
|
|
||||||
depth_scale = 1.0,
|
|
||||||
colors = data["colors"],
|
|
||||||
color_file_format=rnd_par.image_format,
|
|
||||||
append_to_existing_output = (r>0),
|
|
||||||
save_world2cam = False) # world coords are arbitrary in most real BOP datasets
|
|
||||||
# dataset="robo_ds",
|
|
||||||
|
|
||||||
models_dir = os.path.join(res_dir, DIR_MODELS)
|
|
||||||
os.mkdir(models_dir)
|
|
||||||
|
|
||||||
data = []
|
|
||||||
for i,objn in enumerate(rnd_par.models.names):
|
|
||||||
rec = {}
|
|
||||||
rec["id"] = i+1
|
|
||||||
rec["name"] = objn
|
|
||||||
rec["model"] = os.path.join(DIR_MODELS, os.path.split(rnd_par.models.filenames[i])[1]) # путь относительный
|
|
||||||
t = [obj.get_bound_box(local_coords=True).tolist() for obj in all_meshs if obj.get_name() == objn]
|
|
||||||
rec["cuboid"] = t[0]
|
|
||||||
data.append(rec)
|
|
||||||
shutil.copy2(rnd_par.models.filenames[i], models_dir)
|
|
||||||
f = (os.path.splitext(rnd_par.models.filenames[i]))[0] + ".mtl" # файл материала
|
|
||||||
if os.path.isfile(f):
|
|
||||||
shutil.copy2(f, models_dir)
|
|
||||||
|
|
||||||
with open(os.path.join(res_dir, FILE_RBS_INFO), "w") as fh:
|
|
||||||
json.dump(data, fh, indent=2)
|
|
||||||
|
|
||||||
"""
|
|
||||||
!!! categories -> name берётся из category_id !!!
|
|
||||||
см.ниже
|
|
||||||
blenderproc.python.writer : BopWriterUtility.py
|
|
||||||
class _BopWriterUtility
|
|
||||||
def calc_gt_coco
|
|
||||||
...
|
|
||||||
CATEGORIES = [{'id': obj.get_cp('category_id'), 'name': str(obj.get_cp('category_id')), 'supercategory':
|
|
||||||
dataset_name} for obj in dataset_objects]
|
|
||||||
|
|
||||||
поэтому заменим наименование категории в аннотации
|
|
||||||
"""
|
|
||||||
def change_categories_name(dir: str):
|
|
||||||
coco_file = os.path.join(dir,FILE_GT_COCO)
|
|
||||||
with open(coco_file, "r") as fh:
|
|
||||||
data = json.load(fh)
|
|
||||||
cats = data["categories"]
|
|
||||||
|
|
||||||
for i,cat in enumerate(cats):
|
|
||||||
cat["name"] = rnd_par.models.names[i] #obj_names[i]
|
|
||||||
|
|
||||||
with open(coco_file, "w") as fh:
|
|
||||||
json.dump(data, fh, indent=0)
|
|
||||||
|
|
||||||
def explore(path: str):
|
|
||||||
if not os.path.isdir(path):
|
|
||||||
return
|
|
||||||
folders = [
|
|
||||||
os.path.join(path, o)
|
|
||||||
for o in os.listdir(path)
|
|
||||||
if os.path.isdir(os.path.join(path, o))
|
|
||||||
]
|
|
||||||
for path_entry in folders:
|
|
||||||
print(path_entry)
|
|
||||||
if os.path.isfile(os.path.join(path_entry,FILE_GT_COCO)):
|
|
||||||
change_categories_name(path_entry)
|
|
||||||
else:
|
|
||||||
explore(path_entry)
|
|
||||||
|
|
||||||
if Not_Categories_Name:
|
|
||||||
explore(res_dir)
|
|
||||||
return 0 # success
|
|
||||||
|
|
||||||
def _get_models(par, data) -> int:
|
|
||||||
global all_meshs
|
|
||||||
|
|
||||||
par.models = lambda: None
|
|
||||||
par.models.n_item = len(data)
|
|
||||||
if par.models.n_item == 0:
|
|
||||||
return 0 # no models
|
|
||||||
|
|
||||||
# загрузим объекты
|
|
||||||
par.models.names = [] # obj_names
|
|
||||||
par.models.filenames = [] # obj_filenames
|
|
||||||
i = 1
|
|
||||||
for f in data:
|
|
||||||
nam = f
|
|
||||||
par.models.names.append(nam)
|
|
||||||
ff = _get_path_model(nam)
|
|
||||||
par.models.filenames.append(ff)
|
|
||||||
if not os.path.isfile(ff):
|
|
||||||
print(f"Error: no such file '{ff}'")
|
|
||||||
return -1
|
|
||||||
obj = bproc.loader.load_obj(ff)
|
|
||||||
all_meshs += obj
|
|
||||||
obj[0].set_cp("category_id", i) # начиная с 1
|
|
||||||
i += 1
|
|
||||||
return par.models.n_item
|
|
||||||
|
|
||||||
def _get_scene(par, data) -> int:
|
|
||||||
# load scene
|
|
||||||
par.scene = lambda: None
|
|
||||||
objs = data["objects"]
|
|
||||||
par.scene.n_obj = len(objs)
|
|
||||||
if par.scene.n_obj == 0:
|
|
||||||
return 0 # empty scene
|
|
||||||
lights = data["lights"]
|
|
||||||
par.scene.n_light = len(lights)
|
|
||||||
if par.scene.n_light == 0:
|
|
||||||
return 0 # no lighting
|
|
||||||
|
|
||||||
par.scene.objs = []
|
|
||||||
par.scene.collision_objects = []
|
|
||||||
for f in objs:
|
|
||||||
ff = _get_path_object(f["name"])
|
|
||||||
if not os.path.isfile(ff):
|
|
||||||
print(f"Error: no such file '{ff}'")
|
|
||||||
return -1
|
|
||||||
obj = bproc.loader.load_obj(ff)
|
|
||||||
obj[0].set_cp("category_id", 999)
|
|
||||||
coll = f["collision_shape"]
|
|
||||||
if len(coll) > 0:
|
|
||||||
obj[0].enable_rigidbody(False, collision_shape=coll)
|
|
||||||
par.scene.collision_objects += obj
|
|
||||||
par.scene.objs += obj
|
|
||||||
|
|
||||||
if not par.scene.collision_objects:
|
|
||||||
print("Collision objects not found in the scene")
|
|
||||||
return 0
|
|
||||||
par.scene.obj_data = objs
|
|
||||||
par.scene.light_data = lights
|
|
||||||
return par.scene.n_obj
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("--cfg", required=True, help="Json-string with dataset parameters")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if args.cfg[-5:] == ".json":
|
|
||||||
if not os.path.isfile(args.cfg):
|
|
||||||
print(f"Error: no such file '{args.cfg}'")
|
|
||||||
exit(-1)
|
|
||||||
with open(args.cfg, "r") as f:
|
|
||||||
j_data = f.read()
|
|
||||||
else:
|
|
||||||
j_data = args.cfg
|
|
||||||
try:
|
|
||||||
cfg = json.loads(j_data)
|
|
||||||
except json.JSONDecodeError as e:
|
|
||||||
print(f"JSon error: {e}")
|
|
||||||
exit(-2)
|
|
||||||
|
|
||||||
ds_cfg = cfg["formBuilder"]["output"] # dataset config
|
|
||||||
generation = ds_cfg["generation"]
|
|
||||||
cam_pos = ds_cfg["camera_position"]
|
|
||||||
models_randomization = ds_cfg["models_randomization"]
|
|
||||||
|
|
||||||
rnd_par = lambda: None
|
|
||||||
rnd_par.single_object = True
|
|
||||||
rnd_par.ds_name = cfg["name"]
|
|
||||||
rnd_par.output_dir = cfg["local_path"]
|
|
||||||
rnd_par.dataset_objs = cfg["dataSetObjects"]
|
|
||||||
rnd_par.n_cam_pose = generation["n_cam_pose"]
|
|
||||||
rnd_par.n_sample_on_pose = generation["n_sample_on_pose"]
|
|
||||||
rnd_par.n_series = generation["n_series"]
|
|
||||||
rnd_par.image_format = generation["image_format"]
|
|
||||||
rnd_par.image_size_wh = generation["image_size_wh"]
|
|
||||||
rnd_par.center_shell = cam_pos["center_shell"]
|
|
||||||
rnd_par.radius_range = cam_pos["radius_range"]
|
|
||||||
rnd_par.elevation_range = cam_pos["elevation_range"]
|
|
||||||
rnd_par.loc_range_low = models_randomization["loc_range_low"]
|
|
||||||
rnd_par.loc_range_high = models_randomization["loc_range_high"]
|
|
||||||
|
|
||||||
if not os.path.isdir(rnd_par.output_dir):
|
|
||||||
print(f"Error: invalid path '{rnd_par.output_dir}'")
|
|
||||||
exit(-3)
|
|
||||||
|
|
||||||
bproc.init()
|
|
||||||
|
|
||||||
all_meshs = []
|
|
||||||
ret = _get_models(rnd_par, rnd_par.dataset_objs)
|
|
||||||
if ret <= 0:
|
|
||||||
print("Error: no models in config")
|
|
||||||
exit(-4)
|
|
||||||
if _get_scene(rnd_par, ds_cfg["scene"]) == 0:
|
|
||||||
print("Error: empty scene in config")
|
|
||||||
exit(-5)
|
|
||||||
exit(render())
|
|
|
@ -1,412 +0,0 @@
|
||||||
import blenderproc as bproc
|
|
||||||
"""
|
|
||||||
renderBOPdataset2
|
|
||||||
Общая задача: common pipeline
|
|
||||||
Реализуемая функция: создание датасета в формате BOP с заданными параметрами рандомизации
|
|
||||||
Используется модуль blenderproc
|
|
||||||
|
|
||||||
02.05.2024 @shalenikol release 0.1
|
|
||||||
02.07.2024 @shalenikol release 0.2
|
|
||||||
28.10.2024 @shalenikol release 0.3
|
|
||||||
"""
|
|
||||||
import numpy as np
|
|
||||||
import argparse
|
|
||||||
import random
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import bpy
|
|
||||||
|
|
||||||
VHACD_PATH = "blenderproc_resources/vhacd"
|
|
||||||
DIR_MODELS = "models"
|
|
||||||
DIR_MESH = "assets/libs/objects/"
|
|
||||||
FILE_LOG_SCENE = "res.txt"
|
|
||||||
FILE_RBS_INFO = "rbs_info.json"
|
|
||||||
FILE_GT_COCO = "scene_gt_coco.json"
|
|
||||||
EXT_MODELS = ".fbx"
|
|
||||||
TEXTURE_TMPL = "*.jpg"
|
|
||||||
|
|
||||||
Not_Categories_Name = True # наименование категории в COCO-аннотации отсутствует
|
|
||||||
|
|
||||||
def _get_list_texture(rel_path: str) -> list:
|
|
||||||
# local_path/texture/
|
|
||||||
loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))
|
|
||||||
path = os.path.join(loc, rel_path)
|
|
||||||
return list(Path(path).absolute().rglob(TEXTURE_TMPL))
|
|
||||||
|
|
||||||
# def _get_path_model(name_model: str) -> str:
|
|
||||||
# # TODO on name_model find path for mesh (model.fbx)
|
|
||||||
# # local_path/assets/libs/objects # assets/mesh/
|
|
||||||
# loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))
|
|
||||||
# return os.path.join(loc, DIR_MESH + name_model + EXT_MODELS)
|
|
||||||
|
|
||||||
def _get_path_object(name_obj: str) -> str:
|
|
||||||
# TODO on name_obj find path for scene object (object.fbx)
|
|
||||||
# loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))
|
|
||||||
# return os.path.join(loc, DIR_MESH + name_obj + EXT_MODELS)
|
|
||||||
return os.path.join(rnd_par.details_dir, name_obj + EXT_MODELS)
|
|
||||||
|
|
||||||
def convert2relative(height, width, bbox):
|
|
||||||
"""
|
|
||||||
YOLO format use relative coordinates for annotation
|
|
||||||
"""
|
|
||||||
x, y, w, h = bbox
|
|
||||||
x += w/2
|
|
||||||
y += h/2
|
|
||||||
return x/width, y/height, w/width, h/height
|
|
||||||
|
|
||||||
def render() -> int:
|
|
||||||
i = 0
|
|
||||||
for obj in all_meshs:
|
|
||||||
# Make the object actively participate in the physics simulation
|
|
||||||
obj.enable_rigidbody(active=True, collision_shape="COMPOUND")
|
|
||||||
# Also use convex decomposition as collision shapes
|
|
||||||
obj.build_convex_decomposition_collision_shape(VHACD_PATH)
|
|
||||||
i += 1
|
|
||||||
# print(f"{i} : {obj.get_name()}")
|
|
||||||
|
|
||||||
objs = all_meshs + rnd_par.scene.objs
|
|
||||||
|
|
||||||
log_txt = os.path.join(os.path.dirname(rnd_par.output_dir), FILE_LOG_SCENE)
|
|
||||||
with open(log_txt, "w") as fh:
|
|
||||||
for i,o in enumerate(objs):
|
|
||||||
loc = o.get_location()
|
|
||||||
euler = o.get_rotation_euler()
|
|
||||||
fh.write(f"{i} : {o.get_name()} {loc} {euler} category_id = {o.get_cp('category_id')}\n")
|
|
||||||
|
|
||||||
# define a light and set its location and energy level
|
|
||||||
ls = []
|
|
||||||
for l in rnd_par.scene.light_data:
|
|
||||||
light = bproc.types.Light(name=f"l{l['id']}")
|
|
||||||
light.set_type(l["type"])
|
|
||||||
light.set_location(l["loc_xyz"]) #[5, -5, 5])
|
|
||||||
light.set_rotation_euler(l["rot_euler"]) #[-0.063, 0.6177, -0.1985])
|
|
||||||
ls += [light]
|
|
||||||
|
|
||||||
# define the camera intrinsics
|
|
||||||
bproc.camera.set_intrinsics_from_blender_params(1,
|
|
||||||
rnd_par.image_size_wh[0],
|
|
||||||
rnd_par.image_size_wh[1],
|
|
||||||
lens_unit="FOV")
|
|
||||||
|
|
||||||
# add segmentation masks (per class and per instance)
|
|
||||||
bproc.renderer.enable_segmentation_output(map_by=["category_id", "instance", "name"])
|
|
||||||
|
|
||||||
# activate depth rendering
|
|
||||||
bproc.renderer.enable_depth_output(activate_antialiasing=False)
|
|
||||||
|
|
||||||
# res_dir = os.path.join(rnd_par.output_dir, rnd_par.ds_name)
|
|
||||||
res_dir = rnd_par.output_dir
|
|
||||||
if os.path.isdir(res_dir):
|
|
||||||
shutil.rmtree(res_dir)
|
|
||||||
# Цикл рендеринга
|
|
||||||
# Do multiple times: Position the shapenet objects using the physics simulator and render X images with random camera poses
|
|
||||||
for r in range(rnd_par.n_series):
|
|
||||||
print(f"********** Series : {r+1}")
|
|
||||||
is_texture = True if "texture_path" in rnd_par.models_randomization else False
|
|
||||||
if is_texture:
|
|
||||||
val = rnd_par.models_randomization["texture_path"]
|
|
||||||
l_texture = _get_list_texture(val)
|
|
||||||
image = bpy.data.images.load(filepath=str(l_texture[r % len(l_texture)]))
|
|
||||||
# один случайный объект в кадре / все заданные объекты
|
|
||||||
random_obj = random.choice(range(rnd_par.models.n_item))
|
|
||||||
meshs = []
|
|
||||||
for i,o in enumerate(all_meshs): # активные модели
|
|
||||||
if rnd_par.single_object and i != random_obj:
|
|
||||||
continue
|
|
||||||
meshs += [o]
|
|
||||||
if is_texture:
|
|
||||||
mats = o.get_materials()
|
|
||||||
for mat in mats:
|
|
||||||
# image = bpy.data.images.load(filepath=str(random.choice(l_texture)))
|
|
||||||
mat.set_principled_shader_value("Base Color", image)
|
|
||||||
|
|
||||||
for i,o in enumerate(rnd_par.scene.objs): # объекты сцены
|
|
||||||
rnd_mat = rnd_par.scene.obj_data[i]["material_randomization"]
|
|
||||||
mats = o.get_materials() #[0]
|
|
||||||
for mat in mats:
|
|
||||||
val = rnd_mat["specular"]
|
|
||||||
mat.set_principled_shader_value("Specular", random.uniform(val[0], val[1]))
|
|
||||||
val = rnd_mat["roughness"]
|
|
||||||
mat.set_principled_shader_value("Roughness", random.uniform(val[0], val[1]))
|
|
||||||
val = rnd_mat["metallic"]
|
|
||||||
mat.set_principled_shader_value("Metallic", random.uniform(val[0], val[1]))
|
|
||||||
if "texture_path" in rnd_mat: # путь к текстурам (*.jpg)
|
|
||||||
val = rnd_mat["texture_path"]
|
|
||||||
val = _get_list_texture(val)
|
|
||||||
image = bpy.data.images.load(filepath=str(random.choice(val)))
|
|
||||||
mat.set_principled_shader_value("Base Color", image)
|
|
||||||
else:
|
|
||||||
val = rnd_mat["base_color"]
|
|
||||||
mat.set_principled_shader_value("Base Color", np.random.uniform(val[0], val[1]))
|
|
||||||
# mat.set_principled_shader_value("Base Color", image)
|
|
||||||
|
|
||||||
# Randomly set the color and energy
|
|
||||||
for i,l in enumerate(ls):
|
|
||||||
current = rnd_par.scene.light_data[i]
|
|
||||||
l.set_color(np.random.uniform(current["color_range_low"], current["color_range_high"]))
|
|
||||||
energy = current["energy_range"]
|
|
||||||
l.set_energy(random.uniform(energy[0], energy[1]))
|
|
||||||
|
|
||||||
# Clear all key frames from the previous run
|
|
||||||
bproc.utility.reset_keyframes()
|
|
||||||
|
|
||||||
# Define a function that samples 6-DoF poses
|
|
||||||
def sample_pose(obj: bproc.types.MeshObject):
|
|
||||||
obj.set_location(np.random.uniform(rnd_par.loc_range_low, rnd_par.loc_range_high)) #[-1, -1, 0], [1, 1, 2]))
|
|
||||||
obj.set_rotation_euler(bproc.sampler.uniformSO3())
|
|
||||||
|
|
||||||
# Sample the poses of all shapenet objects above the ground without any collisions in-between
|
|
||||||
bproc.object.sample_poses(meshs,
|
|
||||||
objects_to_check_collisions = meshs + rnd_par.scene.collision_objects,
|
|
||||||
sample_pose_func = sample_pose)
|
|
||||||
|
|
||||||
# Run the simulation and fix the poses of the shapenet objects at the end
|
|
||||||
bproc.object.simulate_physics_and_fix_final_poses(min_simulation_time=4, max_simulation_time=20, check_object_interval=1)
|
|
||||||
|
|
||||||
# Find point of interest, all cam poses should look towards it
|
|
||||||
poi = bproc.object.compute_poi(meshs)
|
|
||||||
|
|
||||||
coord_max = [0.1, 0.1, 0.1]
|
|
||||||
coord_min = [0., 0., 0.]
|
|
||||||
|
|
||||||
with open(log_txt, "a") as fh:
|
|
||||||
fh.write("*****************\n")
|
|
||||||
fh.write(f"{r}) poi = {poi}\n")
|
|
||||||
i = 0
|
|
||||||
for o in meshs:
|
|
||||||
i += 1
|
|
||||||
loc = o.get_location()
|
|
||||||
euler = o.get_rotation_euler()
|
|
||||||
fh.write(f" {i} : {o.get_name()} {loc} {euler}\n")
|
|
||||||
for j in range(3):
|
|
||||||
if loc[j] < coord_min[j]:
|
|
||||||
coord_min[j] = loc[j]
|
|
||||||
if loc[j] > coord_max[j]:
|
|
||||||
coord_max[j] = loc[j]
|
|
||||||
|
|
||||||
# Sample up to X camera poses
|
|
||||||
#an = np.random.uniform(0.78, 1.2) #1. #0.35
|
|
||||||
for i in range(rnd_par.n_cam_pose):
|
|
||||||
# Sample location
|
|
||||||
location = bproc.sampler.shell(center=rnd_par.center_shell,
|
|
||||||
radius_min=rnd_par.radius_range[0],
|
|
||||||
radius_max=rnd_par.radius_range[1],
|
|
||||||
elevation_min=rnd_par.elevation_range[0],
|
|
||||||
elevation_max=rnd_par.elevation_range[1])
|
|
||||||
# координата, по которой будем сэмплировать положение камеры
|
|
||||||
j = random.randint(0, 2)
|
|
||||||
# разовый сдвиг по случайной координате
|
|
||||||
d = (coord_max[j] - coord_min[j]) / rnd_par.n_sample_on_pose
|
|
||||||
if location[j] < 0:
|
|
||||||
d = -d
|
|
||||||
for _ in range(rnd_par.n_sample_on_pose):
|
|
||||||
# Compute rotation based on vector going from location towards poi
|
|
||||||
rotation_matrix = bproc.camera.rotation_from_forward_vec(poi - location, inplane_rot=np.random.uniform(-0.7854, 0.7854))
|
|
||||||
# Add homog cam pose based on location an rotation
|
|
||||||
cam2world_matrix = bproc.math.build_transformation_mat(location, rotation_matrix)
|
|
||||||
bproc.camera.add_camera_pose(cam2world_matrix)
|
|
||||||
location[j] -= d
|
|
||||||
# render the whole pipeline
|
|
||||||
data = bproc.renderer.render()
|
|
||||||
# Write data to bop format
|
|
||||||
bproc.writer.write_bop(res_dir,
|
|
||||||
target_objects = all_meshs, # Optional[List[MeshObject]] = None
|
|
||||||
depths = data["depth"],
|
|
||||||
depth_scale = 1.0,
|
|
||||||
colors = data["colors"],
|
|
||||||
color_file_format=rnd_par.image_format,
|
|
||||||
append_to_existing_output = (r>0),
|
|
||||||
save_world2cam = False) # world coords are arbitrary in most real BOP datasets
|
|
||||||
# dataset="robo_ds",
|
|
||||||
|
|
||||||
models_dir = os.path.join(res_dir, DIR_MODELS)
|
|
||||||
os.mkdir(models_dir)
|
|
||||||
|
|
||||||
data = []
|
|
||||||
for i,objn in enumerate(rnd_par.models.names):
|
|
||||||
rec = {}
|
|
||||||
rec["id"] = i+1
|
|
||||||
rec["name"] = objn
|
|
||||||
rec["model"] = os.path.join(DIR_MODELS, os.path.split(rnd_par.models.filenames[i])[1]) # путь относительный
|
|
||||||
t = [obj.get_bound_box(local_coords=True).tolist() for obj in all_meshs if obj.get_name() == objn]
|
|
||||||
rec["cuboid"] = t[0]
|
|
||||||
data.append(rec)
|
|
||||||
shutil.copy2(rnd_par.models.filenames[i], models_dir)
|
|
||||||
f = (os.path.splitext(rnd_par.models.filenames[i]))[0] + ".mtl" # файл материала
|
|
||||||
if os.path.isfile(f):
|
|
||||||
shutil.copy2(f, models_dir)
|
|
||||||
|
|
||||||
with open(os.path.join(res_dir, FILE_RBS_INFO), "w") as fh:
|
|
||||||
json.dump(data, fh, indent=2)
|
|
||||||
|
|
||||||
"""
|
|
||||||
!!! categories -> name берётся из category_id !!!
|
|
||||||
см.ниже
|
|
||||||
blenderproc.python.writer : BopWriterUtility.py
|
|
||||||
class _BopWriterUtility
|
|
||||||
def calc_gt_coco
|
|
||||||
...
|
|
||||||
CATEGORIES = [{'id': obj.get_cp('category_id'), 'name': str(obj.get_cp('category_id')), 'supercategory':
|
|
||||||
dataset_name} for obj in dataset_objects]
|
|
||||||
|
|
||||||
поэтому заменим наименование категории в аннотации
|
|
||||||
"""
|
|
||||||
def change_categories_name(dir: str):
|
|
||||||
coco_file = os.path.join(dir,FILE_GT_COCO)
|
|
||||||
with open(coco_file, "r") as fh:
|
|
||||||
data = json.load(fh)
|
|
||||||
cats = data["categories"]
|
|
||||||
|
|
||||||
for i,cat in enumerate(cats):
|
|
||||||
cat["name"] = rnd_par.models.names[i] #obj_names[i]
|
|
||||||
|
|
||||||
with open(coco_file, "w") as fh:
|
|
||||||
json.dump(data, fh, indent=1)
|
|
||||||
|
|
||||||
def explore(path: str):
|
|
||||||
if not os.path.isdir(path):
|
|
||||||
return
|
|
||||||
folders = [
|
|
||||||
os.path.join(path, o)
|
|
||||||
for o in os.listdir(path)
|
|
||||||
if os.path.isdir(os.path.join(path, o))
|
|
||||||
]
|
|
||||||
for path_entry in folders:
|
|
||||||
print(path_entry)
|
|
||||||
if os.path.isfile(os.path.join(path_entry,FILE_GT_COCO)):
|
|
||||||
change_categories_name(path_entry)
|
|
||||||
else:
|
|
||||||
explore(path_entry)
|
|
||||||
|
|
||||||
if Not_Categories_Name:
|
|
||||||
explore(res_dir)
|
|
||||||
return 0 # success
|
|
||||||
|
|
||||||
def _get_models(par, data) -> int:
|
|
||||||
global all_meshs
|
|
||||||
|
|
||||||
par.models = lambda: None
|
|
||||||
par.models.n_item = len(data)
|
|
||||||
if par.models.n_item == 0:
|
|
||||||
return 0 # no models
|
|
||||||
|
|
||||||
# загрузим объекты
|
|
||||||
par.models.names = [] # obj_names
|
|
||||||
par.models.filenames = [] # obj_filenames
|
|
||||||
i = 1
|
|
||||||
for f in data:
|
|
||||||
nam = f["name"]
|
|
||||||
par.models.names.append(nam)
|
|
||||||
ff = f["fbx"] # _get_path_model(nam)
|
|
||||||
par.models.filenames.append(ff)
|
|
||||||
if not os.path.isfile(ff):
|
|
||||||
print(f"Error: no such file '{ff}'")
|
|
||||||
return -1
|
|
||||||
# !!! dir with meshs
|
|
||||||
par.details_dir = os.path.split(ff)[0]
|
|
||||||
|
|
||||||
obj = bproc.loader.load_obj(ff)
|
|
||||||
all_meshs += obj
|
|
||||||
obj[0].set_cp("category_id", i) # начиная с 1
|
|
||||||
i += 1
|
|
||||||
return par.models.n_item
|
|
||||||
|
|
||||||
def _get_scene(par, data) -> int:
|
|
||||||
# load scene
|
|
||||||
par.scene = lambda: None
|
|
||||||
objs = data["objects"]
|
|
||||||
par.scene.n_obj = len(objs)
|
|
||||||
if par.scene.n_obj == 0:
|
|
||||||
return 0 # empty scene
|
|
||||||
lights = data["lights"]
|
|
||||||
par.scene.n_light = len(lights)
|
|
||||||
if par.scene.n_light == 0:
|
|
||||||
return 0 # no lighting
|
|
||||||
if len(rnd_par.details_dir) == 0:
|
|
||||||
return 0 # no path to details
|
|
||||||
|
|
||||||
par.scene.objs = []
|
|
||||||
par.scene.collision_objects = []
|
|
||||||
for f in objs:
|
|
||||||
ff = _get_path_object(f["name"])
|
|
||||||
if not os.path.isfile(ff):
|
|
||||||
print(f"Error: no such file '{ff}'")
|
|
||||||
return -1
|
|
||||||
obj = bproc.loader.load_obj(ff)
|
|
||||||
obj[0].set_cp("category_id", 999)
|
|
||||||
coll = f["collision_shape"]
|
|
||||||
if len(coll) > 0:
|
|
||||||
obj[0].enable_rigidbody(False, collision_shape=coll)
|
|
||||||
par.scene.collision_objects += obj
|
|
||||||
par.scene.objs += obj
|
|
||||||
|
|
||||||
if not par.scene.collision_objects:
|
|
||||||
print("Collision objects not found in the scene")
|
|
||||||
return 0
|
|
||||||
par.scene.obj_data = objs
|
|
||||||
par.scene.light_data = lights
|
|
||||||
return par.scene.n_obj
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("--form", required=True, help="Json-string with dataset parameters")
|
|
||||||
parser.add_argument("--path", required=True, help="Output path")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if args.form[-5:] == ".json":
|
|
||||||
if not os.path.isfile(args.form):
|
|
||||||
print(f"Error: no such file '{args.form}'")
|
|
||||||
exit(-1)
|
|
||||||
with open(args.form, "r") as f:
|
|
||||||
j_data = f.read()
|
|
||||||
else:
|
|
||||||
j_data = args.form
|
|
||||||
try:
|
|
||||||
cfg = json.loads(j_data)
|
|
||||||
except json.JSONDecodeError as e:
|
|
||||||
print(f"JSon error: {e}")
|
|
||||||
exit(-2)
|
|
||||||
|
|
||||||
# output_dir = args.path
|
|
||||||
|
|
||||||
ds_cfg = cfg["output"] # dataset config
|
|
||||||
generation = ds_cfg["generation"]
|
|
||||||
cam_pos = ds_cfg["camera_position"]
|
|
||||||
models_randomization = ds_cfg["models_randomization"]
|
|
||||||
|
|
||||||
rnd_par = lambda: None
|
|
||||||
rnd_par.output_dir = args.path # cfg["local_path"]
|
|
||||||
|
|
||||||
if not os.path.isdir(rnd_par.output_dir):
|
|
||||||
print(f"Error: invalid path '{rnd_par.output_dir}'")
|
|
||||||
exit(-3)
|
|
||||||
|
|
||||||
rnd_par.single_object = False # True
|
|
||||||
rnd_par.details_dir = ""
|
|
||||||
# rnd_par.ds_name = os.path.split(rnd_par.output_dir)[1] # cfg["name"]
|
|
||||||
rnd_par.dataset_objs = ds_cfg["datasetObjects"]["details"] # ["knight"]
|
|
||||||
rnd_par.n_cam_pose = generation["n_cam_pose"]
|
|
||||||
rnd_par.n_sample_on_pose = generation["n_sample_on_pose"]
|
|
||||||
rnd_par.n_series = generation["n_series"]
|
|
||||||
rnd_par.image_format = generation["image_format"]
|
|
||||||
rnd_par.image_size_wh = generation["image_size_wh"]
|
|
||||||
rnd_par.center_shell = cam_pos["center_shell"]
|
|
||||||
rnd_par.radius_range = cam_pos["radius_range"]
|
|
||||||
rnd_par.elevation_range = cam_pos["elevation_range"]
|
|
||||||
rnd_par.models_randomization = models_randomization
|
|
||||||
rnd_par.loc_range_low = models_randomization["loc_range_low"]
|
|
||||||
rnd_par.loc_range_high = models_randomization["loc_range_high"]
|
|
||||||
|
|
||||||
bproc.init()
|
|
||||||
|
|
||||||
all_meshs = []
|
|
||||||
if _get_models(rnd_par, rnd_par.dataset_objs) <= 0:
|
|
||||||
print("Error: no models in config")
|
|
||||||
exit(-4)
|
|
||||||
if _get_scene(rnd_par, ds_cfg["scene"]) <= 0:
|
|
||||||
print("Error: empty scene in config")
|
|
||||||
exit(-5)
|
|
||||||
exit(render())
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Фреймворк: отладка.
|
|
||||||
|
|
||||||
После того как был отлажен механизм обнаружения объектов на основе метода YoloV4 и в результате его испытаний, нами было принято решение имплементировать более совершенный и современный метод Yolo 8-ой версии ([YoloV8](https://github.com/ultralytics/ultralytics)).
|
|
||||||
На основе предыдущего опыта был взят за основу lifecycle-узел ROS2, который управлялся бы исполнением действий деревьев поведения (Behavior Tree). В ходе работы над этим модулем и дальнейшей отладки выявились преимущества метода YoloV8 в сравнении с YoloV4: файл весов модели 8-й версии по размеру составил около 6 МБ, в 4-й - около 244 МБ. Также на реальных изображениях распечатанных нами моделей улучшилась их точность распознавания (рис.1). В качестве моделей мы использовали набор шахматных фигур, распечатанных на 3D-принтере.
|
|
||||||
|
|
||||||

|
|
||||||
Рис.1
|
|
||||||
|
|
||||||
Когда отлаживался модуль распознавания объектов (Object Detection), выявилась сложность проектирования и отладки этого навыка. Необходимо было кроме основной логики ROS-узла создавать и отлаживать передачу параметров в дереве поведения. И была предложена схема обобщения интерфейса для любых навыков.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
В ней предположено использовать отдельный интерфейсный узел (Interface Node), который будет реализовывать взаимодействие системы исполнения дерева поведения (BT Engine Node) c библиотекой навыков. А сами навыки предложено упаковывать в отдельные ROS-пакеты с json-файлом описания, который позволит декларативно описывать элементы интерфейса, а также схему запуска навыков.
|
|
||||||
|
|
||||||
Такой интерфейсный узел был реализован и позволил упростить как составление и выполнение дерева поведения, так и облегчить создание самой библиотеки навыков.
|
|
||||||
|
|
||||||
Первым навыком, который использовал интерфейсный узел, стала имплементация метода оценки 6D-позы объекта [DOPE](https://github.com/NVlabs/Deep_Object_Pose).
|
|
Before Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 46 KiB |
|
@ -1,123 +0,0 @@
|
||||||
# Рандомизация
|
|
||||||
|
|
||||||
### При обучении робота (Илья Ураев)
|
|
||||||
|
|
||||||
- Гравитация
|
|
||||||
- Положение камеры
|
|
||||||
- Конфигурацию робота (положение джоинтов так называется)
|
|
||||||
- Положение объекта или точки куда надо дотянутся
|
|
||||||
- Текстуру поверхности размещения
|
|
||||||
- Ну и я думаю чтобы с robot_builder смотрелось, то можно рандомизировать число степеней свободы робота.
|
|
||||||
- Можно рандомизировать позиции спавна робота
|
|
||||||
|
|
||||||
### При создании датасета (Александр Шушпанов)
|
|
||||||
|
|
||||||
- Зона локации (спавна) активных объектов
|
|
||||||
- Позиция камеры: радиус сферы размещения и наклон, центр этой сферы
|
|
||||||
- Источники света: количество, тип, локализация в пространстве, цветность, сила света
|
|
||||||
- Свойства материала по отражению света: зеркальность, шероховатость, металлизация, цвет
|
|
||||||
|
|
||||||
Гиперпараметры.
|
|
||||||
- количество серий (спавна активных объектов)
|
|
||||||
- количество позиций камеры на одну серию
|
|
||||||
- количество сдвигов камеры на 1 позу
|
|
||||||
|
|
||||||
### Общий список параметров рандомизации
|
|
||||||
|
|
||||||
- Положение искомого(активного) объекта(-ов) в рабочей зоне
|
|
||||||
- Позиция камеры: радиус сферы размещения и наклон, центр этой сферы
|
|
||||||
- Текстуры повехностей объектов и/или свойства материала по отражению света: зеркальность, шероховатость, металлизация, цвет
|
|
||||||
- Источники света: количество, тип, локализация в пространстве, цветность, сила света
|
|
||||||
- Конфигурация робота (положение джоинтов), число степеней свободы и его начальное расположение
|
|
||||||
- Гравитация
|
|
||||||
|
|
||||||
## Web-сервис для генерации датасетов
|
|
||||||
|
|
||||||
Для реализации пользовательского интерфейса web-сервиса нами была разработана схема описания параметров рандомизации. Её использование позволяет изменять конфигурацию параметров в зависимости от задачи. Предполагается в дальнейшем использовать модуль ввода параметров в том числе и в задачах обучения с подкреплением.
|
|
||||||
|
|
||||||
Пример такой схемы:
|
|
||||||
```
|
|
||||||
ENUM T = "ObjectDetection","PoseEstimation"
|
|
||||||
ENUM C = "","BOX","SPHERE","CAPSULE","CYLINDER","CONE","CONVEX_HULL","MESH","COMPOUND"
|
|
||||||
ENUM L = "POINT","SUN"
|
|
||||||
ENUM F = "JPEG","PNG"
|
|
||||||
|
|
||||||
MODELS = {
|
|
||||||
"id": ${ID:number:1},
|
|
||||||
"name": ${NAME:string:""},
|
|
||||||
"model": ${MODEL:string:"models/1.fbx"}
|
|
||||||
}
|
|
||||||
OBJECTS_SCENE = {
|
|
||||||
"name": ${NAME:string:""},
|
|
||||||
"collision_shape": ${enum:C:"BOX"},
|
|
||||||
"loc_xyz": [${LOC_XYZ_1:number:0}, ${LOC_XYZ_2:number:0}, ${LOC_XYZ_3:number:0}],
|
|
||||||
"rot_euler": [${ROT_EULER_1:number:0}, ${ROT_EULER_2:number:0}, ${ROT_EULER_3:number:0}],
|
|
||||||
"material_randomization": {
|
|
||||||
"specular": [${SPECULAR_1:number:0}, ${SPECULAR_2:number:1}],
|
|
||||||
"roughness": [${ROUGHNESS_1:number:0}, ${ROUGHNESS_2:number:1}],
|
|
||||||
"metallic": [${METALLIC_1:number:0}, ${METALLIC_2:number:1}],
|
|
||||||
"base_color": [
|
|
||||||
[
|
|
||||||
${BASE_COLOR_1:number:0},
|
|
||||||
${BASE_COLOR_2:number:0},
|
|
||||||
${BASE_COLOR_3:number:0},
|
|
||||||
${BASE_COLOR_4:number:1}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
${BASE_COLOR_5:number:1},
|
|
||||||
${BASE_COLOR_6:number:1},
|
|
||||||
${BASE_COLOR_7:number:1},
|
|
||||||
${BASE_COLOR_8:number:1}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LIGHTS = {
|
|
||||||
"id": ${ID:number:1},
|
|
||||||
"type": ${enum:L:"POINT"},
|
|
||||||
"loc_xyz": [${LOC_XYZ_1:number:5}, ${LOC_XYZ_2:number:5}, ${LOC_XYZ_3:number:5}],
|
|
||||||
"rot_euler": [${ROT_EULER_1:number:-0.06}, ${ROT_EULER_2:number:0.61}, ${ROT_EULER_3:number:-0.19}],
|
|
||||||
"color_range_low": [${COLOR_RANGE_LOW_1:number:0.5}, ${COLOR_RANGE_LOW_2:number:0.5}, ${COLOR_RANGE_LOW_3:number:0.5}],
|
|
||||||
"color_range_high":[${COLOR_RANGE_HIGH_1:number:1}, ${COLOR_RANGE_HIGH_2:number:1}, ${COLOR_RANGE_HIGH_3:number:1}],
|
|
||||||
"energy_range":[${ENERGY_RANGE_1:number:400},${ENERGY_RANGE_2:number:900}]
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
"typedataset": ${enum:T:"ObjectDetection"},
|
|
||||||
"dataset_path": ${DATASET_PATH:string},
|
|
||||||
"models":${ARRAY:MODELS:[]},
|
|
||||||
"models_randomization":{
|
|
||||||
"loc_range_low": [${LOC_RANGE_LOW_1:number:-1}, ${LOC_RANGE_LOW_2:number:-1}, ${LOC_RANGE_LOW_3:number:0}],
|
|
||||||
"loc_range_high": [${LOC_RANGE_HIGH_1:number:1}, ${LOC_RANGE_HIGH_2:number:1}, ${LOC_RANGE_HIGH_3:number:2}]
|
|
||||||
},
|
|
||||||
"scene":{
|
|
||||||
"objects": ${ARRAY:OBJECTS_SCENE:[]},
|
|
||||||
"lights": ${ARRAY:LIGHTS:[]},
|
|
||||||
},
|
|
||||||
"camera_position":{
|
|
||||||
"center_shell": [${CENTER_SHELL_1:number:0}, ${CENTER_SHELL_2:number:0}, ${CENTER_SHELL_3:number:0}],
|
|
||||||
"radius_range": [${RADIUS_RANGE_1:number:0.4}, ${RADIUS_RANGE_2:number:1.4}],
|
|
||||||
"elevation_range": [${ELEVATION_RANGE_1:number:10}, ${ELEVATION_RANGE_2:number:90}]
|
|
||||||
},
|
|
||||||
"generation":{
|
|
||||||
"n_cam_pose": ${N_CAM_POSE:number:5},
|
|
||||||
"n_sample_on_pose": ${N_SAMPLE_ON_POSE:number:3},
|
|
||||||
"n_series": ${N_SERIES:number:100},
|
|
||||||
"image_format": ${enum:F:"jpg"},
|
|
||||||
"image_size_wh": [${IMAGE_SIZE_WH_1:number:640}, ${IMAGE_SIZE_WH_2:number:480}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Вначале описываются перечисления - ENUM, которым присваиваются имена и список возможных значений. Затем описываются составные именованные объекты, а затем основной блок описания параметров. Этот блок представляет из себя JSON-словарь параметров, который будет подготовлен на выходе модуля ввода параметров. Каждый ключ этого словаря дополняется мини-схемой описания вводимого значения.
|
|
||||||
Формат:
|
|
||||||
```
|
|
||||||
${<имя_переменной>:<тип>:<значение_по_умолчанию>}
|
|
||||||
```
|
|
||||||
либо массив объектов
|
|
||||||
```
|
|
||||||
${ARRAY:<имя_объекта>:[]}
|
|
||||||
```
|
|
||||||
|
|
||||||
В нашем алгоритме формирования датасета для задач компьютерного зрения (ObjectDetection, PoseEstimation) выбран формат [BOP: Benchmark for 6D Object Pose Estimation](https://bop.felk.cvut.cz/home/), в его [BOP-Classic](https://bop.felk.cvut.cz/datasets/) версии.
|
|
||||||
Он содержит в своей аннотации все необходимые данные (ground truth) для обучения нейросетевых моделей поиску объектов на изображении, а также распознавания поз искомых объектов.
|
|
|
@ -1,377 +1,3 @@
|
||||||
## Мета-модель фреймворка
|
|
||||||
|
|
||||||
## Соответствие Digital Twin Definition Language и мета-модели Robossembler
|
|
||||||
|
|
||||||
Слои абстракции
|
|
||||||
1. DTDL - BASETYPES, COMPLEXTYPES (Array, Map, ...), DT_TYPES
|
|
||||||
2. ROBOSSEMBLER_CONTEXT (Represents)
|
|
||||||
3. USE_CASE_CONTEXT (Entities)
|
|
||||||
4. USE_CASE_INSTANCE (Product)
|
|
||||||
|
|
||||||
## Сравнение мета-моделей Digital Twin Definition Language и ROS 2
|
|
||||||
|
|
||||||
| Сущность | DTDL | ROS | Robonomics |
|
|
||||||
| - | - | - | - |
|
|
||||||
| Описывает всё содержимое двойника, включая ниже приведённые сущности | **Interface** | **Interface Spec** | - |
|
|
||||||
| Передаваемые данные и их тип | **Telemetry** | **Topic** | **Datalog Hash** |
|
|
||||||
| Свойство, описывающее какое-то состояние двойника, может быть read-only или read/write; также описывает синхронизацию состояния между компонентами (например, показание датчика записано в облако) | **Property** | **Parameters** | **Launch Param** |
|
|
||||||
| Функция или операция, которая может быть осуществлена над двойником (например, `reboot`) | **Command** | **Service** / **Action** | **Launch** |
|
|
||||||
| Структура из примитивных типов (Array, Enum, Map, Object) данных для сериализации (в JSON, Avro, Protobuf) | **Schema** | **IDL** | - |
|
|
||||||
| Часть интерфейса (отношение part-of с каким-то другим двойником) | **Component** | - | - |
|
|
||||||
| Связь с другим цифровым двойником. Связи могут представлять различные семантические значения. Например, `contains` ("этаж содержит комнату"), `cools` ("hvac cools room"), `isBilledTo` ("счёт выставляется пользователю") | **Relationship** | - | - |
|
|
||||||
|
|
||||||
|
|
||||||
```json
|
|
||||||
# базовые типы значений (из JSON Schema)
|
|
||||||
"string","number", "boolean", "array", "object";
|
|
||||||
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"REPRESENT": {
|
|
||||||
"type": {
|
|
||||||
"enum": [ "OBJECT_LINK", "KEY", "FILEPATH", "VALUE", "TREE", "ARRAY", "SEQUENCE" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# представления
|
|
||||||
ENUM REPRESENT = "OBJECT_LINK", # строка-ссылка на объект (ENTITY)
|
|
||||||
"KEY", # уникальный ключ в виде строки (используется как идентификатор записи)
|
|
||||||
"FILEPATH", # строка - путь к файлу
|
|
||||||
"VALUE", # непосредственное значение
|
|
||||||
"TREE", # представление в виде дерева
|
|
||||||
"ARRAY", # массив значений
|
|
||||||
"SEQUENCE"; # массив ссылок на объект определённого типа
|
|
||||||
|
|
||||||
# сущности
|
|
||||||
|
|
||||||
ENUM ENTITY = "MESH", "PART", "ASSET", "BTREE", "BTACTION", "SKILL", "DATASET", "INTERFACE", "WEIGHTS", "DEVICE";
|
|
||||||
|
|
||||||
ENUM DEVICE = "ROBOT", "SENSOR";
|
|
||||||
|
|
||||||
type SCENE = {
|
|
||||||
"objects": [ { ref: "1", type: "PART" }; { ref: "2", type: "PART" }; ]
|
|
||||||
};
|
|
||||||
|
|
||||||
type PARAM = {
|
|
||||||
"sid": \${KEY:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
"represent": \${REPRESENT:Enum<REPRESENT>:"VALUE"},
|
|
||||||
"link": \${LINK:Enum<LINK>:"topic"}
|
|
||||||
};
|
|
||||||
|
|
||||||
### тип поверхность детали
|
|
||||||
|
|
||||||
type MESH/SURFACE = {
|
|
||||||
"sid": \${KEY:string:""};
|
|
||||||
"path": { "stl": "PATH/*.stl", "brep": "PATH/*.brep", "fbx": "PATH/*.fbx", }
|
|
||||||
};
|
|
||||||
|
|
||||||
type PART = {
|
|
||||||
"sid": \${NAME:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
"pose6d": { "loc_xyz": \${XYZ:Array<number>3:[0.0,0.0,0.0] }, "rot_xyzw": \${XYZW:Array<number>4:[0.0,0.0,0.0,1.0]} },
|
|
||||||
"attributes": [
|
|
||||||
"Robossembler_NonSolid": True
|
|
||||||
],
|
|
||||||
"surface": { "stl": "PATH/*.stl", "brep": "PATH/*.brep", },
|
|
||||||
"material": "/path/to/robossembler/materials/mmm.FCMat",
|
|
||||||
"unit_scale": \${UNIT_SCALE:number:1.0},
|
|
||||||
"dimensions": \${Array<number>3:[0.0,0.0,0.0]},
|
|
||||||
"assets": { "fbx": "PATH/*.fbx", "blend": "PATH/*.blend", }
|
|
||||||
};
|
|
||||||
|
|
||||||
type DATASET = {
|
|
||||||
"sid": \${NAME:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
"objects": \${SEQUENCE:PART},
|
|
||||||
"environment": \${SEQUENCE:PART},
|
|
||||||
"randomisation": \${FILE}
|
|
||||||
};
|
|
||||||
|
|
||||||
type WEIGHTS = {
|
|
||||||
"sid": \${NAME:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
"file": \${FILE:string:"*.pth"},
|
|
||||||
"epoch": \${EPOCH:number:""},
|
|
||||||
"dataset": \${OBJECT_LINK:DATASET}
|
|
||||||
};
|
|
||||||
|
|
||||||
type TOPIC = {
|
|
||||||
"sid": ...,
|
|
||||||
"name": "topic_name",
|
|
||||||
"msg": "sensor_msgs/Image",
|
|
||||||
};
|
|
||||||
|
|
||||||
DEVICE = {
|
|
||||||
"sid": 1235,
|
|
||||||
"name": "dev",
|
|
||||||
"topics": \${SEQUENCE:TOPIC},
|
|
||||||
}
|
|
||||||
|
|
||||||
// DEVICE -> TOPIC LIST -> {DEVICE: {TOPIC LIST}}
|
|
||||||
|
|
||||||
type POSE_ESTIMATION = {
|
|
||||||
"object_name": \${OBJECT_LINK:PART},
|
|
||||||
"weights": \${OBJECT_LINK:WEIGHTS},
|
|
||||||
"topic_name": \${OBJECT_LINK:TOPIC}
|
|
||||||
};
|
|
||||||
|
|
||||||
type SKILL = {
|
|
||||||
"sid": \${NAME:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
"interface": \${INTERFACE}
|
|
||||||
};
|
|
||||||
|
|
||||||
command_LifeCycle = "run", "stop"
|
|
||||||
|
|
||||||
type ASSEMBLY_SEQUENCE = \{SEQUENCE:TASK};
|
|
||||||
|
|
||||||
# task1 = { source_state = []; target_state = [ p1 ] }
|
|
||||||
# task2 = { source_state = [ p1 ]; target_state = [ p1 p2 ] }
|
|
||||||
# task3 = { source_state = [ p1 p2 ]; target_state = [ p1 p2 p3 ] }
|
|
||||||
|
|
||||||
task = { source_state = \${TREE:PART}; target_state = \${TREE:PART} }
|
|
||||||
|
|
||||||
type TASK = {
|
|
||||||
"sid": ...
|
|
||||||
"action": \${BT_TREE}
|
|
||||||
"source_state": \${TREE:PART} // PART
|
|
||||||
"target_state": \${TREE:PART} // PRODUCT
|
|
||||||
};
|
|
||||||
|
|
||||||
type DOMAIN = {
|
|
||||||
"objects": \{SEQUENCE:PART}
|
|
||||||
"predicates": \{OBJECT_LINK:CONDITION}
|
|
||||||
"actions": \${OBJECT_LINK:BT_ACTION}
|
|
||||||
};
|
|
||||||
|
|
||||||
type BTREE = {
|
|
||||||
"sid": \${NAME:string:""},
|
|
||||||
"name": \${NAME:string:""},
|
|
||||||
};
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Device Package
|
|
||||||
|
|
||||||
### Camera
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"DevicePackage": { "name": "Robossembler", "version": "1.0", "format": "1" },
|
|
||||||
"Module": { "name": "RealSense Dxx", "description": "ROS Wrapper for Intel(R) RealSense(TM) Cameras" },
|
|
||||||
"Launch": { "package": "realsense2_camera", "executable": "rs_launch.py" },
|
|
||||||
"DTwin": [
|
|
||||||
{ "interface": {
|
|
||||||
"input": [
|
|
||||||
{ "name": "camera_namespace", "type": "STRING" }, // -- /robot_drawer/455_1/camera_info
|
|
||||||
{ "name": "camera_name", "type": "STRING" },
|
|
||||||
{ "name": "serial_port", "type": "STRING" },
|
|
||||||
],
|
|
||||||
"output": [
|
|
||||||
{ "name": "camera_info", "type": "TOPIC", "topic_name": "/${camera_namespace}/${camera_name}/camera_info" },
|
|
||||||
{ "name": "pose", "type": "TOPIC", "msg": "Pose" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Settings": [
|
|
||||||
{ "name": "camera_config", "description": "Camera Config", "type":"file", "defaultValue": "{ rgb_camera.profile: 1280x720x15 }" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Robot RBS
|
|
||||||
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"DevicePackage": { "name": "Robossembler", "version": "1.0", "format": "1" },
|
|
||||||
"Module": { "name": "RBS", "description": "Main Robot" },
|
|
||||||
"Launch": { "package": "rbs_bringup", "executable": "single_robot.launch.py" },
|
|
||||||
"DTwin": [
|
|
||||||
{ "interface": {
|
|
||||||
"input": [
|
|
||||||
{ "name": "robot_namespace", "type": "STRING", "defaultValue": "rbs_arm" },
|
|
||||||
{ "name": "dof", "type": "INT", "defaultValue": 6 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Settings": [
|
|
||||||
{ "name": "robot_type", "description": "Type of robot by name", "defaultValue": "rbs_arm" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Robot UR5
|
|
||||||
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"DevicePackage": { "name": "Robossembler", "version": "1.0", "format": "1" },
|
|
||||||
"Module": { "name": "UR", "description": "..." },
|
|
||||||
"Launch": { "package": "ur_package", "executable": "ur5_single_arm.py" },
|
|
||||||
"DTwin": [
|
|
||||||
{ "interface": {
|
|
||||||
"input": [
|
|
||||||
{ "robot_namespace": "robot1" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Settings": [
|
|
||||||
{ "name": "", "description": "Config", "type":"file", "defaultValue": "{}" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"SkillPackage": { "name": "Robossembler", "version": "1.0", "format": "1" },
|
|
||||||
"Module": { "name": "PoseEstimation", "description": "Pose Estimation skill with DOPE" },
|
|
||||||
"Launch": { "package": "rbs_perception", "executable": "pe_dope_lc.py", "name": "lc_dope" },
|
|
||||||
"BTAction": [
|
|
||||||
{ "name": "peConfigure",
|
|
||||||
"type": "run",
|
|
||||||
"interface": {
|
|
||||||
"input": [
|
|
||||||
{ "name": "image_raw", "type": "TOPIC", "msg": "Image" },
|
|
||||||
{ "name": "camera_info", "type": "TOPIC", "msg": "CameraInfo" },
|
|
||||||
{ "name": "object_name", "type": "PART", "msgs": "Part" }, // string
|
|
||||||
{ "name": "weights", "type": "WEIGHTS", "msgs": "" },
|
|
||||||
],
|
|
||||||
"output": [
|
|
||||||
{ "name": "pose_estimation", "type": "TOPIC" },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ "name": "peStop", "type": "stop", "interface": { "input": [], "output": [] } }
|
|
||||||
],
|
|
||||||
"Settings": [
|
|
||||||
{ "name": "publishDelay", "description": "Publish Delay", "type":"float", "defaultValue": 0.5 },
|
|
||||||
{ "name": "tf2_send_pose", "description": "Transform Pose", "type":"int", "defaultValue": 1 },
|
|
||||||
{ "name": "mesh_scale", "description": "Part Mesh Scale", "type":"float", "defaultValue": 0.001 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Атомарные навыки
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<TreeNodesModel>
|
|
||||||
<SubTree ID="GraspObject">
|
|
||||||
<input_port default="false" name="__shared_blackboard"></input_port>
|
|
||||||
<input_port name="pose_vec"/>
|
|
||||||
<input_port name="robot_name"/>
|
|
||||||
</SubTree>
|
|
||||||
<Action ID="GripperAction">
|
|
||||||
<input_port name="action">Open or close</input_port>
|
|
||||||
<input_port name="gripper_name"/>
|
|
||||||
</Action>
|
|
||||||
<SubTree ID="InspectWorkspace">
|
|
||||||
<input_port default="true" name="__shared_blackboard">
|
|
||||||
<input_port name="pose_vec"/>
|
|
||||||
<input_port name="robot_name"/>
|
|
||||||
</SubTree>
|
|
||||||
<Condition ID="IsObjectInWorkspace">
|
|
||||||
<input_port name="topic_name"/>
|
|
||||||
</Condition>
|
|
||||||
<Condition ID="IsObjectVisible"/>
|
|
||||||
<Action ID="MoveToPose">
|
|
||||||
<input_port name="cancel_timeout"/>
|
|
||||||
<input_port name="pose"/>
|
|
||||||
<input_port name="robot_name"/>
|
|
||||||
<input_port name="server_name"/>
|
|
||||||
<input_port name="server_timeout"/>
|
|
||||||
</Action>
|
|
||||||
<Action ID="MoveToPoseArray">
|
|
||||||
<input_port name="cancel_timeout"/>
|
|
||||||
<input_port name="pose_vec_in"/>
|
|
||||||
<output_port name="pose_vec_out"/>
|
|
||||||
<input_port name="robot_name"/>
|
|
||||||
<input_port name="server_name"/>
|
|
||||||
<input_port name="server_timeout"/>
|
|
||||||
</Action>
|
|
||||||
<SubTree ID="PlaceObject">
|
|
||||||
<input_port default="true" name="__shared_blackboard"></input_port>
|
|
||||||
<input_port name="pose_vec"/>
|
|
||||||
<input_port name="robot_name"/>
|
|
||||||
</SubTree>
|
|
||||||
<Action ID="PoseEstimationCleanup"/>
|
|
||||||
<Action ID="PoseEstimationConfigure">
|
|
||||||
<input_port name="object_name"/>
|
|
||||||
<output_port name="topic_name"/>
|
|
||||||
<input_port name="weight_file"/>
|
|
||||||
</Action>
|
|
||||||
<Action ID="RbsBtAction">
|
|
||||||
<input_port name="command"/>
|
|
||||||
<input_port name="do"/>
|
|
||||||
<input_port name="server_name"/>
|
|
||||||
<input_port name="server_timeout"/>
|
|
||||||
</Action>
|
|
||||||
</TreeNodesModel>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Пример интерфейса в DTDL
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"@context": "...;3",
|
|
||||||
"@id": "robossember_assembly;1",
|
|
||||||
"@type": "Interface",
|
|
||||||
"displayName": "Bolt",
|
|
||||||
"contents": [
|
|
||||||
{
|
|
||||||
"@type": "Property",
|
|
||||||
"name": "Label",
|
|
||||||
"schema": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@type": "Property",
|
|
||||||
"name": "mesh",
|
|
||||||
"writable": true,
|
|
||||||
"schema": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@type": "Telemetry",
|
|
||||||
"name": "Pose6D",
|
|
||||||
"writable": true,
|
|
||||||
"schema": {
|
|
||||||
"@type": "Object",
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"name": "x",
|
|
||||||
"schema": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "y",
|
|
||||||
"schema": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "z",
|
|
||||||
"schema": "double"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@type": "Relationship",
|
|
||||||
"name": "contains",
|
|
||||||
"target": "dtmi:com:robossember_assembly:Bolt;1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@type": "Component",
|
|
||||||
"name": "frontCamera",
|
|
||||||
"schema": "dtmi:com:example:Camera;3"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Пример файла описания сцены из Blender
|
## Пример файла описания сцены из Blender
|
||||||
|
|
||||||
TODO: рассписать потребность в основных элементах, что и для чего
|
TODO: рассписать потребность в основных элементах, что и для чего
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 08db6583ce94895103c94b1b70b4846ef581e624
|
|
110
freecad_workbench/BoMList.py
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
from helper.is_solid import is_object_solid
|
||||||
|
import FreeCAD as App
|
||||||
|
import Spreadsheet
|
||||||
|
|
||||||
|
|
||||||
|
def createSpreadsheet():
|
||||||
|
|
||||||
|
if App.ActiveDocument.getObject("BoM_List") == None:
|
||||||
|
|
||||||
|
sheet = App.activeDocument().addObject('Spreadsheet::Sheet', 'BoM_List')
|
||||||
|
sheet.set('A1', 'п.п.')
|
||||||
|
sheet.set('B1', 'Наименование детали')
|
||||||
|
sheet.set('C1', 'Количество')
|
||||||
|
else:
|
||||||
|
|
||||||
|
sheet = App.ActiveDocument.getObject("BoM_List")
|
||||||
|
App.ActiveDocument.BoM_List.clear('A1:ZZ16384')
|
||||||
|
sheet.set('A1', 'п.п.')
|
||||||
|
sheet.set('B1', 'Наименование детали')
|
||||||
|
sheet.set('C1', 'Количество')
|
||||||
|
|
||||||
|
return (sheet)
|
||||||
|
|
||||||
|
|
||||||
|
class SolidBodiesParcer:
|
||||||
|
_asmThere = []
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
if (self._asmThere.__len__() == 0):
|
||||||
|
|
||||||
|
self.initParse()
|
||||||
|
pass
|
||||||
|
|
||||||
|
def initParse(self):
|
||||||
|
for el in App.ActiveDocument.RootObjects:
|
||||||
|
if (is_object_solid(el) and hasattr(el, 'Group')):
|
||||||
|
self.getSubPartsLink(el.Group, el.Label)
|
||||||
|
|
||||||
|
def getSubPartsLink(self, group, label):
|
||||||
|
groupLink = {label: []}
|
||||||
|
for el in group:
|
||||||
|
if (is_object_solid(el)):
|
||||||
|
groupLink[label].append(
|
||||||
|
{'label': el.Label, 'isGroup': hasattr(el, 'Group'), 'solid': el})
|
||||||
|
|
||||||
|
for el in groupLink[label]:
|
||||||
|
if ('isGroup' in el):
|
||||||
|
if (el['isGroup'] == False):
|
||||||
|
self._asmThere.append(el['solid'].Label)
|
||||||
|
if (el['isGroup']):
|
||||||
|
self.getSubPartsLink(el['solid'].Group, el['label']),
|
||||||
|
|
||||||
|
return groupLink
|
||||||
|
|
||||||
|
|
||||||
|
def uniquePartsSort(labelParts):
|
||||||
|
|
||||||
|
uniquePartsLabels = {}
|
||||||
|
|
||||||
|
for el in labelParts:
|
||||||
|
for k in labelParts:
|
||||||
|
if (App.ActiveDocument.getObjectsByLabel(str(el))[0].Shape.isPartner(App.ActiveDocument.getObjectsByLabel(str(k))[0].Shape)):
|
||||||
|
|
||||||
|
if uniquePartsLabels.get(el) == None:
|
||||||
|
uniquePartsLabels[el] = k
|
||||||
|
|
||||||
|
sortedParts = {}
|
||||||
|
|
||||||
|
for k, v in uniquePartsLabels.items():
|
||||||
|
|
||||||
|
if sortedParts.get(v) == None:
|
||||||
|
sortedParts[v] = [k]
|
||||||
|
else:
|
||||||
|
sortedParts[v].append(k)
|
||||||
|
|
||||||
|
return sortedParts
|
||||||
|
|
||||||
|
|
||||||
|
def countForUniques(sortedParts):
|
||||||
|
countedParts = {}
|
||||||
|
for k in sortedParts:
|
||||||
|
countedParts[k] = len(sortedParts[k])
|
||||||
|
return countedParts
|
||||||
|
|
||||||
|
|
||||||
|
def fillInBoMList(sheet, countedParts):
|
||||||
|
|
||||||
|
a = 1
|
||||||
|
|
||||||
|
for label, count in countedParts.items():
|
||||||
|
a += 1
|
||||||
|
b = label
|
||||||
|
c = count
|
||||||
|
sheet.set('A' + str(a), str(a-1))
|
||||||
|
sheet.set('B' + str(a), str(b))
|
||||||
|
sheet.set('C' + str(a), str(c))
|
||||||
|
|
||||||
|
total_count = sum(countedParts.values())
|
||||||
|
sheet.set('B'+str(a+1), 'Итого')
|
||||||
|
|
||||||
|
sheet.set('C' + str(a+1), str(total_count))
|
||||||
|
|
||||||
|
|
||||||
|
def run_BoM_list():
|
||||||
|
createSpreadsheet()
|
||||||
|
sheet = App.ActiveDocument.getObject("BoM_List")
|
||||||
|
labelParts = SolidBodiesParcer()._asmThere
|
||||||
|
sortedParts = uniquePartsSort(labelParts)
|
||||||
|
countedParts = countForUniques(sortedParts)
|
||||||
|
fillInBoMList(sheet, countedParts)
|
26
freecad_workbench/Changelog.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
# Change Log
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.1] - Robbossembler FreeCAD Workbench - 2024.04.07
|
||||||
|
|
||||||
|
Верстак для предподготовки CAD-модели изделия к автоматизированному производству.
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Изменена компоновка в директории верстака. Все относящиеся к работе верстака элементы теперь находятся в его директории.
|
||||||
|
- Добавлен инструмент публикации проекта и создания всех необходимых файлов через верстак.
|
||||||
|
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
-
|
||||||
|
## ToDo
|
||||||
|
- Функционал генерации связей между составными частями сборки.
|
||||||
|
- Алгоритм разбиения сборки на сборочные единицы.
|
49
freecad_workbench/DatumCommand.py
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
import FreeCAD
|
||||||
|
import FreeCADGui
|
||||||
|
from PySide import QtGui, QtCore
|
||||||
|
|
||||||
|
class DatumTool:
|
||||||
|
"""
|
||||||
|
A tool for creating datums in existing models
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self.active = False
|
||||||
|
|
||||||
|
def activate(self):
|
||||||
|
self.active = True
|
||||||
|
FreeCAD.Console.PrintMessage("Datum tool activatedn")
|
||||||
|
|
||||||
|
def deactivate(self):
|
||||||
|
self.active = False
|
||||||
|
FreeCAD.Console.PrintMessage("Datum tool deactivatedn")
|
||||||
|
|
||||||
|
def mousePressEvent(self, event):
|
||||||
|
if self.active:
|
||||||
|
# Create a datum at the position of the mouse click
|
||||||
|
pos = FreeCADGui.ActiveDocument.ActiveView.getCursorPos()
|
||||||
|
point = FreeCADGui.ActiveDocument.ActiveView.getPoint(pos)
|
||||||
|
datum = FreeCAD.ActiveDocument.addObject("Part::Datum", "Datum")
|
||||||
|
datum.Placement.Base = point
|
||||||
|
datum.ViewObject.ShapeColor = (0.0, 1.0, 0.0) # Set the color of the datum to green
|
||||||
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
|
class DatumCommand:
|
||||||
|
"""
|
||||||
|
A command for activating and deactivating the datum tool
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self.tool = DatumTool()
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
self.tool.activate()
|
||||||
|
FreeCADGui.ActiveDocument.ActiveView.addEventCallback("SoMouseButtonEvent", self.tool.mousePressEvent)
|
||||||
|
|
||||||
|
def Deactivated(self):
|
||||||
|
self.tool.deactivate()
|
||||||
|
FreeCADGui.ActiveDocument.ActiveView.removeEventCallback("SoMouseButtonEvent", self.tool.mousePressEvent)
|
||||||
|
|
||||||
|
def GetResources(self):
|
||||||
|
return {'Pixmap': 'path/to/icon.png', 'MenuText': 'Datum Tool', 'ToolTip': 'Creates datum elements in existing models'}
|
||||||
|
|
||||||
|
# Add the command to the Draft Workbench
|
||||||
|
FreeCADGui.addCommand('DatumCommand', DatumCommand())
|
840
freecad_workbench/Frames.py
Normal file
|
@ -0,0 +1,840 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2023 by brothermechanic. All Rights Reserved.
|
||||||
|
# Based on ARBench by github/mahaarbo
|
||||||
|
# This library is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation, either
|
||||||
|
# version 3 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
from BoMList import run_BoM_list
|
||||||
|
import pddl.freecad2pddl as freecad2pddl
|
||||||
|
from ImportExportEntities import export_coordinate_systems
|
||||||
|
import FreeCAD
|
||||||
|
import Tools
|
||||||
|
from utils.freecad_processor import process_file
|
||||||
|
from usecases.asm4parser_usecase import Asm4StructureParseUseCase
|
||||||
|
|
||||||
|
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
import FreeCADGui
|
||||||
|
from pivy import coin
|
||||||
|
from PySide import QtCore, QtGui, QtSvg
|
||||||
|
import Part
|
||||||
|
import os
|
||||||
|
|
||||||
|
__title__ = 'Frames'
|
||||||
|
__author__ = 'brothermechanic'
|
||||||
|
__workbenchname__ = 'Frames'
|
||||||
|
__version__ = '0.1'
|
||||||
|
__url__ = ["https://robossembler.org"]
|
||||||
|
__doc__ = """"""
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Frame Objects
|
||||||
|
############################################################
|
||||||
|
class Frame(object):
|
||||||
|
"""Basic freestanding frame"""
|
||||||
|
def __init__(self, obj):
|
||||||
|
obj.addProperty("App::PropertyPlacement",
|
||||||
|
"Placement", "Base",
|
||||||
|
"Placement of the frame")
|
||||||
|
obj.Placement = FreeCAD.Placement()
|
||||||
|
obj.Proxy = self
|
||||||
|
self.obj = obj
|
||||||
|
self.additional_data = {}
|
||||||
|
|
||||||
|
def onChanged(self, fp, prop):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def execute(self, obj):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def __getstate__(self):
|
||||||
|
return None
|
||||||
|
|
||||||
|
def __setstate__(self, state):
|
||||||
|
return None
|
||||||
|
|
||||||
|
def getDict(self):
|
||||||
|
d = {}
|
||||||
|
d["label"] = str(self.obj.Label)
|
||||||
|
d["placement"] = Tools.placement2axisvec(self.obj.Placement)
|
||||||
|
d.update(self.additional_data)
|
||||||
|
return d
|
||||||
|
|
||||||
|
|
||||||
|
class PartFrame(Frame):
|
||||||
|
"""Frame rigidly attached to a part frame.
|
||||||
|
Inherits the base placement from the part's frame, and placement is
|
||||||
|
relative to the part frame.
|
||||||
|
"""
|
||||||
|
def __init__(self, obj, partobj):
|
||||||
|
Frame.__init__(self, obj)
|
||||||
|
obj.addProperty("App::PropertyPlacementLink",
|
||||||
|
"Part", "Parent",
|
||||||
|
"The part to attach to.")
|
||||||
|
obj.Part = partobj
|
||||||
|
obj.setEditorMode("Part", 1)
|
||||||
|
|
||||||
|
def execute(self, obj):
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
obj.ViewObject.Proxy.updateData(obj, "Placement")
|
||||||
|
|
||||||
|
def getDict(self):
|
||||||
|
d = Frame.getDict(self)
|
||||||
|
d["part"] = str(self.obj.Part.Label)
|
||||||
|
return d
|
||||||
|
|
||||||
|
|
||||||
|
class FeatureFrame(PartFrame):
|
||||||
|
"""Frame rigidly attached to a feature.
|
||||||
|
The feature frame is attached to a feature on a part. It gives both the
|
||||||
|
placement of the feature w.r.t. the part, and the placement from the
|
||||||
|
feature."""
|
||||||
|
def __init__(self, obj, partobj, featurePlacement):
|
||||||
|
PartFrame.__init__(self, obj, partobj)
|
||||||
|
obj.addProperty("App::PropertyPlacement",
|
||||||
|
"FeaturePlacement", "Feature",
|
||||||
|
"The frame attached to the feature.")
|
||||||
|
obj.addProperty("App::PropertyString",
|
||||||
|
"PrimitiveType", "Feature",
|
||||||
|
"The primitive type of the feature.")
|
||||||
|
obj.addProperty("App::PropertyString",
|
||||||
|
"ShapeType", "Feature",
|
||||||
|
"The shape type of the feature.")
|
||||||
|
obj.addProperty("App::PropertyString",
|
||||||
|
"Positioning", "Feature",
|
||||||
|
"The type of positioning used during creation.")
|
||||||
|
obj.FeaturePlacement = featurePlacement
|
||||||
|
|
||||||
|
def getDict(self):
|
||||||
|
d = PartFrame.getDict(self)
|
||||||
|
d["featureplacement"] = Tools.placement2axisvec(self.obj.FeaturePlacement)
|
||||||
|
d["shapetype"] = str(self.obj.ShapeType)
|
||||||
|
d["positioning"] = str(self.obj.Positioning)
|
||||||
|
return d
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# ViewProvider to the frames
|
||||||
|
############################################################
|
||||||
|
class ViewProviderFrame(object):
|
||||||
|
"""ViewProvider for the basic frame.
|
||||||
|
Uses the SOAxiscrosskit to create axises with constant length regardless
|
||||||
|
of zoom. Updates position when placement is changed.
|
||||||
|
"""
|
||||||
|
def __init__(self, vobj):
|
||||||
|
vobj.addProperty("App::PropertyFloat", "Scale")
|
||||||
|
vobj.Scale = 0.12
|
||||||
|
vobj.addProperty("App::PropertyFloat", "HeadSize")
|
||||||
|
vobj.HeadSize = 3.0
|
||||||
|
vobj.addProperty("App::PropertyFloat", "LineWidth")
|
||||||
|
vobj.LineWidth = 2.0
|
||||||
|
vobj.Proxy = self
|
||||||
|
|
||||||
|
def attach(self, vobj):
|
||||||
|
# We only have a shaded visual group
|
||||||
|
self.shaded = coin.SoGroup()
|
||||||
|
|
||||||
|
# Takes heavily from SoAxisCrosskit.h,
|
||||||
|
# and Toggle_DH_Frames by galou_breizh on the forums
|
||||||
|
self.vframe = coin.SoType.fromName("SoShapeScale").createInstance()
|
||||||
|
self.vframe.setPart("shape", coin.SoType.fromName("SoAxisCrossKit").createInstance())
|
||||||
|
self.vframe.scaleFactor.setValue(0.2)
|
||||||
|
ax = self.vframe.getPart("shape", 0)
|
||||||
|
cone = ax.getPart("xHead.shape", 0)
|
||||||
|
cone.bottomRadius.setValue(vobj.HeadSize)
|
||||||
|
cone = ax.getPart("yHead.shape", 0)
|
||||||
|
cone.bottomRadius.setValue(vobj.HeadSize)
|
||||||
|
cone = ax.getPart("zHead.shape", 0)
|
||||||
|
cone.bottomRadius.setValue(vobj.HeadSize)
|
||||||
|
lwstring = "lineWidth {0}".format(vobj.LineWidth)
|
||||||
|
ax.set("xAxis.appearance.drawStyle", lwstring)
|
||||||
|
ax.set("yAxis.appearance.drawStyle", lwstring)
|
||||||
|
ax.set("zAxis.appearance.drawStyle", lwstring)
|
||||||
|
ax.set("xAxis.pickStyle", "style SHAPE")
|
||||||
|
ax.set("yAxis.pickStyle", "style SHAPE")
|
||||||
|
ax.set("zAxis.pickStyle", "style SHAPE")
|
||||||
|
|
||||||
|
# Then remember to make it selectable in the viewer
|
||||||
|
selectionNode = coin.SoType.fromName("SoFCSelection").createInstance()
|
||||||
|
selectionNode.documentName.setValue(FreeCAD.ActiveDocument.Name)
|
||||||
|
selectionNode.objectName.setValue(vobj.Object.Name)
|
||||||
|
selectionNode.subElementName.setValue("Frame")
|
||||||
|
selectionNode.addChild(self.vframe)
|
||||||
|
|
||||||
|
# We would like to place it where we want
|
||||||
|
self.transform = coin.SoTransform()
|
||||||
|
self.shaded.addChild(self.transform)
|
||||||
|
self.shaded.addChild(self.vframe)
|
||||||
|
self.shaded.addChild(selectionNode)
|
||||||
|
vobj.addDisplayMode(self.shaded, "Shaded")
|
||||||
|
|
||||||
|
def updateData(self, fp, prop):
|
||||||
|
if prop == "Placement":
|
||||||
|
pl = fp.getPropertyByName("Placement")
|
||||||
|
self.transform.translation = (pl.Base.x,
|
||||||
|
pl.Base.y,
|
||||||
|
pl.Base.z)
|
||||||
|
self.transform.rotation = pl.Rotation.Q
|
||||||
|
|
||||||
|
def getDisplayModes(self, vobj):
|
||||||
|
modes = ["Shaded"]
|
||||||
|
return modes
|
||||||
|
|
||||||
|
def getDefaultDisplayMode(self):
|
||||||
|
return "Shaded"
|
||||||
|
|
||||||
|
def getIcon(self):
|
||||||
|
icondir = os.path.join(FreeCAD.getUserAppDataDir(),
|
||||||
|
"Mod", __workbenchname__, "UI", "icons")
|
||||||
|
return str(os.path.join(icondir, "frame.svg"))
|
||||||
|
|
||||||
|
def onChanged(self, vp, prop):
|
||||||
|
if prop == "Scale":
|
||||||
|
s = vp.getPropertyByName("Scale")
|
||||||
|
self.vframe.scaleFactor.setValue(float(s))
|
||||||
|
elif prop == "HeadSize":
|
||||||
|
hs = vp.getPropertyByName("HeadSize")
|
||||||
|
xcone = self.vframe.getPart("shape", 0).getPart("xHead.shape", 0)
|
||||||
|
xcone.bottomRadius.setValue(float(hs))
|
||||||
|
ycone = self.vframe.getPart("shape", 0).getPart("yHead.shape", 0)
|
||||||
|
ycone.bottomRadius.setValue(float(hs))
|
||||||
|
zcone = self.vframe.getPart("shape", 0).getPart("zHead.shape", 0)
|
||||||
|
zcone.bottomRadius.setValue(float(hs))
|
||||||
|
elif prop == "LineWidth":
|
||||||
|
lw = vp.getPropertyByName("LineWidth")
|
||||||
|
lwstring = "lineWidth {0}".format(lw)
|
||||||
|
ax = self.vframe.getPart("shape", 0)
|
||||||
|
ax.set("xAxis.appearance.drawStyle", lwstring)
|
||||||
|
ax.set("yAxis.appearance.drawStyle", lwstring)
|
||||||
|
ax.set("zAxis.appearance.drawStyle", lwstring)
|
||||||
|
|
||||||
|
def __getstate__(self):
|
||||||
|
return None
|
||||||
|
|
||||||
|
def __setstate__(self, state):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ViewProviderPartFrame(ViewProviderFrame):
|
||||||
|
"""View provider to the part frame."""
|
||||||
|
def updateData(self, fp, prop):
|
||||||
|
if prop == "Placement":
|
||||||
|
parentpl = fp.getPropertyByName("Part").Placement
|
||||||
|
localpl = fp.Placement
|
||||||
|
pl = parentpl.multiply(localpl)
|
||||||
|
self.transform.translation = (pl.Base.x,
|
||||||
|
pl.Base.y,
|
||||||
|
pl.Base.z)
|
||||||
|
self.transform.rotation = pl.Rotation.Q
|
||||||
|
|
||||||
|
|
||||||
|
class ViewProviderFeatureFrame(ViewProviderFrame):
|
||||||
|
"""View provider to the feature frames."""
|
||||||
|
def updateData(self, fp, prop):
|
||||||
|
if prop == "Placement":
|
||||||
|
parentpl = fp.getPropertyByName("Part").Placement
|
||||||
|
featurepl = fp.getPropertyByName("FeaturePlacement")
|
||||||
|
localpl = fp.Placement
|
||||||
|
pl = parentpl.multiply(featurepl.multiply(localpl))
|
||||||
|
self.transform.translation = (pl.Base.x,
|
||||||
|
pl.Base.y,
|
||||||
|
pl.Base.z)
|
||||||
|
self.transform.rotation = pl.Rotation.Q
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Base functions
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
def makeFrame(placement=FreeCAD.Placement()):
|
||||||
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython", "Frame")
|
||||||
|
Frame(obj)
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
ViewProviderFrame(obj.ViewObject)
|
||||||
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
def makePartFrame(part):
|
||||||
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython", "PartFrame")
|
||||||
|
PartFrame(obj, part)
|
||||||
|
#if int(FreeCAD.Version()[1]) > 16:
|
||||||
|
# geo_feature_group = part.getParentGeoFeatureGroup()
|
||||||
|
# geo_feature_group.addObject(obj)
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
ViewProviderPartFrame(obj.ViewObject)
|
||||||
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
def makeFeatureFrame(part, featurepl):
|
||||||
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",
|
||||||
|
"FeatureFrame")
|
||||||
|
FeatureFrame(obj, part, featurepl)
|
||||||
|
# If we're >0.16, add the feature frame to the assembly
|
||||||
|
#if int(FreeCAD.Version()[1]) > 16:
|
||||||
|
# geo_feature_group = part.getParentGeoFeatureGroup()
|
||||||
|
# geo_feature_group.addObject(obj)
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
ViewProviderFeatureFrame(obj.ViewObject)
|
||||||
|
return obj
|
||||||
|
|
||||||
|
def makeSelectedPartFrames():
|
||||||
|
for part in FreeCADGui.Selection.getSelection():
|
||||||
|
if isinstance(part, Part.Feature):
|
||||||
|
pf = makePartFrame(part)
|
||||||
|
pf.Label = "Frame"+str(part.Label)
|
||||||
|
|
||||||
|
def makeAllPartFrames():
|
||||||
|
dc = FreeCAD.activeDocument()
|
||||||
|
for part in dc.Objects:
|
||||||
|
if isinstance(part, Part.Feature):
|
||||||
|
pf = makePartFrame(part)
|
||||||
|
pf.Label = "Frame"+str(part.Label)
|
||||||
|
|
||||||
|
|
||||||
|
def spawnFeatureFrameCreator():
|
||||||
|
ffpanel = FeatureFramePanel()
|
||||||
|
FreeCADGui.Control.showDialog(ffpanel)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# GUI Related
|
||||||
|
###################################################################
|
||||||
|
uidir = os.path.join(FreeCAD.getUserAppDataDir(),
|
||||||
|
"Mod", __workbenchname__, "UI")
|
||||||
|
icondir = os.path.join(uidir, "icons")
|
||||||
|
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("BoMGeneration",
|
||||||
|
run_BoM_list,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "BoMList.svg")),
|
||||||
|
"MenuText": "Generate Bill of Materials",
|
||||||
|
"ToolTip": "Press the button to create big BoM"})
|
||||||
|
Tools.spawnClassCommand("FrameCommand",
|
||||||
|
makeFrame,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "frame.svg")),
|
||||||
|
"MenuText": "Make a free frame",
|
||||||
|
"ToolTip": "Make a freestanding reference frame."})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("ASM4StructureParsing",
|
||||||
|
Tools.RobossemblerFreeCadExportScenario().call,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "assembly4.svg")),
|
||||||
|
"MenuText": "Make a ASM4 parsing",
|
||||||
|
"ToolTip": "Make a ASM4 1"})
|
||||||
|
Tools.spawnClassCommand("SelectedPartFrameCommand",
|
||||||
|
makeSelectedPartFrames,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "partframe.svg")),
|
||||||
|
"MenuText": "selected parts frames",
|
||||||
|
"ToolTip": "Make selected parts frames."})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("AllPartFramesCommand",
|
||||||
|
makeAllPartFrames,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "allpartframes.svg")),
|
||||||
|
"MenuText": "All parts frames",
|
||||||
|
"ToolTip": "Make all parts frames."})
|
||||||
|
Tools.spawnClassCommand("FeatureFrameCommand",
|
||||||
|
spawnFeatureFrameCreator,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "frame on selected primitive",
|
||||||
|
"ToolTip": "Create a frame on selected primitive."})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("PDDL_CreateTypes",
|
||||||
|
freecad2pddl.add_types,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "Types",
|
||||||
|
"ToolTip": "Add Types"})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("PDDL_CreateParameters",
|
||||||
|
freecad2pddl.add_parameters,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "Parameters",
|
||||||
|
"ToolTip": "Add Parameters"})
|
||||||
|
Tools.spawnClassCommand("PDDL_CreateAction",
|
||||||
|
freecad2pddl.add_action,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "Action",
|
||||||
|
"ToolTip": "Add Action"})
|
||||||
|
Tools.spawnClassCommand("PDDL_CreatePredicate",
|
||||||
|
freecad2pddl.add_predicate,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "Predicate",
|
||||||
|
"ToolTip": "Add Predicate"})
|
||||||
|
Tools.spawnClassCommand("PDDL_CreateDurativeAction",
|
||||||
|
freecad2pddl.add_durative_action,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "DurativeAction",
|
||||||
|
"ToolTip": "Add Durative Action"})
|
||||||
|
Tools.spawnClassCommand("PDDL_ExportPDDL",
|
||||||
|
freecad2pddl.export_to_file,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
|
||||||
|
"MenuText": "ExportDomain",
|
||||||
|
"ToolTip": "Create and Export Domain.pddl to File"})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("Export_Entities",
|
||||||
|
export_coordinate_systems,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "BoMList.svg")),
|
||||||
|
"MenuText": "ExportLCS",
|
||||||
|
"ToolTip": "Export all the markups"})
|
||||||
|
|
||||||
|
Tools.spawnClassCommand("Publish_Project",
|
||||||
|
process_file,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "publish.svg")),
|
||||||
|
"MenuText": "Publish Project",
|
||||||
|
"ToolTip": "Save and export project files"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# GUI buttons
|
||||||
|
###################################################################
|
||||||
|
class FeatureFramePanel:
|
||||||
|
"""Spawn panel choices for a feature."""
|
||||||
|
def __init__(self):
|
||||||
|
selected = FreeCADGui.Selection.getSelectionEx()
|
||||||
|
# Check selection
|
||||||
|
if len(selected) == 1:
|
||||||
|
selected = selected[0]
|
||||||
|
self.selected = selected
|
||||||
|
else:
|
||||||
|
FreeCAD.Console.PrintError("Multipart selection not available.")
|
||||||
|
self.reject()
|
||||||
|
|
||||||
|
if not selected.HasSubObjects:
|
||||||
|
FreeCAD.Console.PrintError("Part selected not feature.")
|
||||||
|
self.reject()
|
||||||
|
elif not len(selected.SubObjects) == 1:
|
||||||
|
FreeCAD.Console.PrintError("Multifeature selection not available")
|
||||||
|
self.reject()
|
||||||
|
|
||||||
|
# Choices related to selection
|
||||||
|
so_desc = Tools.describeSubObject(selected.SubObjects[0])
|
||||||
|
self.so_desc = so_desc
|
||||||
|
shape_choices = {
|
||||||
|
"Vertex": [],
|
||||||
|
"Edge": ["PointOnEdge"],
|
||||||
|
"Face": ["PointOnSurface"]
|
||||||
|
}
|
||||||
|
prim_choices = {
|
||||||
|
"ArcOfCircle": ["Center"],
|
||||||
|
"ArcOfEllipse": ["Center"],
|
||||||
|
"ArcOfHyperBola": ["Center"],
|
||||||
|
"ArcOfParabola": ["Center"],
|
||||||
|
"BSplineCurve": ["Center"],
|
||||||
|
"BezierCurve": ["Center"],
|
||||||
|
"Circle": ["Center"],
|
||||||
|
"Ellipse": ["Center"],
|
||||||
|
"Hyperbola": ["Center"],
|
||||||
|
"Parabola": ["Center"],
|
||||||
|
"Line": [],
|
||||||
|
"BSplineSurface": ["Center"],
|
||||||
|
"BezierSurface": ["Center"],
|
||||||
|
"Cylinder": ["PointOnCenterline"],
|
||||||
|
"Plane": ["Center"],
|
||||||
|
"Sphere": ["Center"],
|
||||||
|
"Toroid": ["Center"],
|
||||||
|
"Cone": ["PointOnCenterline"]
|
||||||
|
}
|
||||||
|
self.choices = ["PickedPoint"]
|
||||||
|
self.choices = self.choices + shape_choices[so_desc[1]]
|
||||||
|
self.choices = self.choices + prim_choices[so_desc[0]]
|
||||||
|
# Setting up QT form
|
||||||
|
uiform_path = os.path.join(uidir, "FeatureFrameCreator.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
self.form.ChoicesBox.addItems(self.choices)
|
||||||
|
self.form.PickedTypeLabel.setText(so_desc[0])
|
||||||
|
QtCore.QObject.connect(self.form.ChoicesBox,
|
||||||
|
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
||||||
|
self.choiceChanged)
|
||||||
|
self.scenes = {}
|
||||||
|
for choice in self.choices:
|
||||||
|
sc = QtGui.QGraphicsScene()
|
||||||
|
icon = str(os.path.join(icondir, choice+".svg"))
|
||||||
|
sc.addItem(QtSvg.QGraphicsSvgItem(icon))
|
||||||
|
self.scenes[choice] = sc
|
||||||
|
self.choiceChanged(self.form.ChoicesBox.currentText())
|
||||||
|
|
||||||
|
def choiceChanged(self, choice):
|
||||||
|
if choice in self.scenes.keys():
|
||||||
|
self.form.Preview.setScene(self.scenes[choice])
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
sel_choice = self.form.ChoicesBox.currentText()
|
||||||
|
paneldict = {"PickedPoint": PickedPointPanel,
|
||||||
|
"PointOnEdge": PointOnEdgePanel,
|
||||||
|
"PointOnSurface": PointOnSurfacePanel,
|
||||||
|
"Center": CenterPanel,
|
||||||
|
"PointOnCenterline": PointOnCenterlinePanel}
|
||||||
|
pan = paneldict[sel_choice](self.selected, self.so_desc)
|
||||||
|
FreeCADGui.Control.closeDialog()
|
||||||
|
# The dialog is actually closed after the accept function has
|
||||||
|
# completed. So we need to use a delayed task to open the new dialog:
|
||||||
|
QtCore.QTimer.singleShot(0,
|
||||||
|
lambda: FreeCADGui.Control.showDialog(pan))
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
FreeCADGui.Control.closeDialog()
|
||||||
|
|
||||||
|
|
||||||
|
class BaseFeaturePanel(object):
|
||||||
|
"""Base feature panel to be inherited from."""
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
# Handle selected and FF placement
|
||||||
|
self.selected = selected
|
||||||
|
self.so_desc = so_desc
|
||||||
|
# Connect offset to spinboxes
|
||||||
|
QtCore.QObject.connect(self.form.XBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.YBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.ZBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.RollBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.PitchBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.YawBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.offsetChanged)
|
||||||
|
QtCore.QObject.connect(self.form.ScaleBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.scaleChanged)
|
||||||
|
|
||||||
|
def createFrame(self):
|
||||||
|
self.fframe = makeFeatureFrame(self.selected.Object, self.local_ffpl)
|
||||||
|
self.fframe.PrimitiveType = self.so_desc[0]
|
||||||
|
self.fframe.ShapeType = self.so_desc[1]
|
||||||
|
ad = Tools.getPrimitiveInfo(self.so_desc[0],
|
||||||
|
self.selected.SubObjects[0])
|
||||||
|
self.fframe.Proxy.additional_data.update(ad)
|
||||||
|
|
||||||
|
def scaleChanged(self):
|
||||||
|
scale = self.form.ScaleBox.value()
|
||||||
|
self.fframe.ViewObject.Scale = scale
|
||||||
|
|
||||||
|
def offsetChanged(self):
|
||||||
|
disp = FreeCAD.Vector(self.form.XBox.value(),
|
||||||
|
self.form.YBox.value(),
|
||||||
|
self.form.ZBox.value())
|
||||||
|
rot = FreeCAD.Rotation(self.form.YawBox.value(),
|
||||||
|
self.form.PitchBox.value(),
|
||||||
|
self.form.RollBox.value())
|
||||||
|
offset = FreeCAD.Placement(disp, rot)
|
||||||
|
self.fframe.Placement = offset
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
framelabel = self.form.FrameLabelField.toPlainText()
|
||||||
|
if not len(framelabel) == 0:
|
||||||
|
self.fframe.Label = framelabel
|
||||||
|
FreeCADGui.Control.closeDialog()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
FreeCAD.activeDocument().removeObject(self.fframe.Name)
|
||||||
|
FreeCADGui.Control.closeDialog()
|
||||||
|
|
||||||
|
|
||||||
|
class PickedPointPanel(BaseFeaturePanel):
|
||||||
|
"""Create a feature frame at the picked point."""
|
||||||
|
# Not very clever. It just places the frame with default rotation.
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
uiform_path = os.path.join(uidir, "FramePlacer.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
BaseFeaturePanel.__init__(self, selected, so_desc)
|
||||||
|
parent_pl = selected.Object.Placement
|
||||||
|
abs_pl = FreeCAD.Placement(selected.PickedPoints[0],
|
||||||
|
FreeCAD.Rotation())
|
||||||
|
self.local_ffpl = parent_pl.inverse().multiply(abs_pl)
|
||||||
|
self.createFrame()
|
||||||
|
self.fframe.Positioning = "PickedPoint"
|
||||||
|
|
||||||
|
|
||||||
|
class PointOnEdgePanel(BaseFeaturePanel):
|
||||||
|
"""Create a feature frame on an edge."""
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
uiform_path = os.path.join(uidir, "FramePlacer.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
# Enable the first parameter
|
||||||
|
self.form.VLabel.setEnabled(True)
|
||||||
|
self.form.VLabel.setVisible(True)
|
||||||
|
self.form.VLabel.setText("u")
|
||||||
|
self.form.VBox.setEnabled(True)
|
||||||
|
self.form.VBox.setVisible(True)
|
||||||
|
QtCore.QObject.connect(self.form.VBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.parameterChanged)
|
||||||
|
|
||||||
|
# Enable percentage or param selection
|
||||||
|
self.form.OptionsLabel.setEnabled(True)
|
||||||
|
self.form.OptionsLabel.setVisible(True)
|
||||||
|
self.form.OptionsLabel.setText("Arc param.")
|
||||||
|
self.form.OptionsBox.setEnabled(True)
|
||||||
|
self.form.OptionsBox.setVisible(True)
|
||||||
|
self.form.OptionsBox.addItems(["mm", "%"])
|
||||||
|
QtCore.QObject.connect(self.form.OptionsBox,
|
||||||
|
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
||||||
|
self.choiceChanged)
|
||||||
|
BaseFeaturePanel.__init__(self, selected, so_desc)
|
||||||
|
|
||||||
|
# Place the frame wherever the values are atm
|
||||||
|
self.local_ffpl = FreeCAD.Placement()
|
||||||
|
self.createFrame()
|
||||||
|
self.fframe.Positioning = "PointOnEdge"
|
||||||
|
self.choiceChanged(self.form.OptionsBox.currentText())
|
||||||
|
self.parameterChanged()
|
||||||
|
|
||||||
|
def parameterChanged(self):
|
||||||
|
value = self.form.VBox.value()
|
||||||
|
if self.form.OptionsBox.currentText() == "%":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
edge = self.selected.SubObjects[0]
|
||||||
|
point = edge.valueAt(value)
|
||||||
|
tangentdir = edge.tangentAt(value)
|
||||||
|
rot = FreeCAD.Rotation(FreeCAD.Vector(1, 0, 0),
|
||||||
|
tangentdir)
|
||||||
|
abs_ffpl = FreeCAD.Placement(point, rot)
|
||||||
|
parent_pl = self.selected.Object.Placement
|
||||||
|
self.local_ffpl = parent_pl.inverse().multiply(abs_ffpl)
|
||||||
|
self.fframe.FeaturePlacement = self.local_ffpl
|
||||||
|
# force recompute of placement?
|
||||||
|
self.fframe.Placement = self.fframe.Placement
|
||||||
|
|
||||||
|
def choiceChanged(self, choice):
|
||||||
|
value = self.form.VBox.value()
|
||||||
|
if choice == "mm":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
self.form.VBox.setSuffix("mm")
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
self.form.VBox.setRange(*parameter_range)
|
||||||
|
self.form.VBox.setSingleStep(0.1)
|
||||||
|
elif choice == "%":
|
||||||
|
value = self.mm2p(value)
|
||||||
|
self.form.VBox.setSuffix("%")
|
||||||
|
self.form.VBox.setRange(0, 100.0)
|
||||||
|
self.form.VBox.setSingleStep(1.0)
|
||||||
|
self.form.VBox.setValue(value)
|
||||||
|
|
||||||
|
def p2mm(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
delta = parameter_range[1] - parameter_range[0]
|
||||||
|
return 0.01*value*delta + parameter_range[0]
|
||||||
|
|
||||||
|
def mm2p(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
delta = parameter_range[1] - parameter_range[0]
|
||||||
|
return 100.0*(value - parameter_range[0])/delta
|
||||||
|
|
||||||
|
|
||||||
|
class PointOnSurfacePanel(BaseFeaturePanel):
|
||||||
|
"""Create a feature on a surface."""
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
uiform_path = os.path.join(uidir, "FramePlacer.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
# Enable both parameters
|
||||||
|
self.form.ULabel.setVisible(True)
|
||||||
|
self.form.VLabel.setVisible(True)
|
||||||
|
self.form.UBox.setVisible(True)
|
||||||
|
self.form.VBox.setVisible(True)
|
||||||
|
QtCore.QObject.connect(self.form.VBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.parameterChanged)
|
||||||
|
QtCore.QObject.connect(self.form.UBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.parameterChanged)
|
||||||
|
# Enable percentage or param selection
|
||||||
|
self.form.OptionsLabel.setEnabled(True)
|
||||||
|
self.form.OptionsLabel.setVisible(True)
|
||||||
|
self.form.OptionsLabel.setText("Surf. param.")
|
||||||
|
self.form.OptionsBox.setEnabled(True)
|
||||||
|
self.form.OptionsBox.setVisible(True)
|
||||||
|
self.form.OptionsBox.addItems(["mm", "%"])
|
||||||
|
QtCore.QObject.connect(self.form.OptionsBox,
|
||||||
|
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
||||||
|
self.choiceChanged)
|
||||||
|
BaseFeaturePanel.__init__(self, selected, so_desc)
|
||||||
|
|
||||||
|
# Place the frame wherever the values are atm
|
||||||
|
self.local_ffpl = FreeCAD.Placement()
|
||||||
|
self.createFrame()
|
||||||
|
self.fframe.Positioning = "PointOnSurface"
|
||||||
|
self.choiceChanged(self.form.OptionsBox.currentText())
|
||||||
|
self.parameterChanged()
|
||||||
|
|
||||||
|
def parameterChanged(self):
|
||||||
|
value = (self.form.UBox.value(), self.form.VBox.value())
|
||||||
|
if self.form.OptionsBox.currentText() == "%":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
face = self.selected.SubObjects[0]
|
||||||
|
point = face.valueAt(*value)
|
||||||
|
normaldir = face.normalAt(*value)
|
||||||
|
rotation = FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1),
|
||||||
|
normaldir)
|
||||||
|
abs_ffpl = FreeCAD.Placement(point, rotation)
|
||||||
|
parent_pl = self.selected.Object.Placement
|
||||||
|
self.local_ffpl = parent_pl.inverse().multiply(abs_ffpl)
|
||||||
|
self.fframe.FeaturePlacement = self.local_ffpl
|
||||||
|
# Force recompute of placement
|
||||||
|
self.fframe.Placement = self.fframe.Placement
|
||||||
|
|
||||||
|
def choiceChanged(self, choice):
|
||||||
|
value = (self.form.UBox.value(), self.form.VBox.value())
|
||||||
|
if choice == "mm":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
self.form.UBox.setRange(parameter_range[0], parameter_range[1])
|
||||||
|
self.form.UBox.setSuffix("mm")
|
||||||
|
self.form.UBox.setSingleStep(0.1)
|
||||||
|
self.form.VBox.setRange(parameter_range[2], parameter_range[3])
|
||||||
|
self.form.VBox.setSuffix("mm")
|
||||||
|
self.form.VBox.setSingleStep(0.1)
|
||||||
|
elif choice == "%":
|
||||||
|
value = self.mm2p(value)
|
||||||
|
self.form.UBox.setRange(0.0, 100.0)
|
||||||
|
self.form.UBox.setSuffix("%")
|
||||||
|
self.form.VBox.setRange(0.0, 100.0)
|
||||||
|
self.form.UBox.setSingleStep(1.0)
|
||||||
|
self.form.VBox.setSuffix("%")
|
||||||
|
self.form.VBox.setSingleStep(1.0)
|
||||||
|
self.form.UBox.setValue(value[0])
|
||||||
|
self.form.VBox.setValue(value[1])
|
||||||
|
|
||||||
|
def p2mm(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
delta = [parameter_range[1] - parameter_range[0],
|
||||||
|
parameter_range[3] - parameter_range[2]]
|
||||||
|
u = 0.01*value[0]*delta[0] + parameter_range[0]
|
||||||
|
v = 0.01*value[1]*delta[1] + parameter_range[2]
|
||||||
|
return (u, v)
|
||||||
|
|
||||||
|
def mm2p(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange
|
||||||
|
delta = [parameter_range[1] - parameter_range[0],
|
||||||
|
parameter_range[3] - parameter_range[2]]
|
||||||
|
u = 100.0*(value[0] - parameter_range[0])/delta[0]
|
||||||
|
v = 100.0*(value[1] - parameter_range[2])/delta[1]
|
||||||
|
return (u, v)
|
||||||
|
|
||||||
|
|
||||||
|
class CenterPanel(BaseFeaturePanel):
|
||||||
|
"""Create a feature frame on center."""
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
uiform_path = os.path.join(uidir, "FramePlacer.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
BaseFeaturePanel.__init__(self, selected, so_desc)
|
||||||
|
edge_curve_list = ["ArcOfCircle",
|
||||||
|
"ArcOfEllipse",
|
||||||
|
"ArcOfHyperbola",
|
||||||
|
"ArcOfParabola",
|
||||||
|
"Circle",
|
||||||
|
"Ellipse",
|
||||||
|
"Hyperbola",
|
||||||
|
"Parabola"]
|
||||||
|
face_surf_list = ["Sphere",
|
||||||
|
"Toroid"]
|
||||||
|
if so_desc[0] in edge_curve_list:
|
||||||
|
edge = selected.SubObjects[0]
|
||||||
|
axis = edge.Curve.Axis
|
||||||
|
rotation = FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1),
|
||||||
|
axis)
|
||||||
|
center_point = edge.Curve.Center
|
||||||
|
elif so_desc[0] in face_surf_list:
|
||||||
|
face = selected.SubObjects[0]
|
||||||
|
axis = face.Surface.Axis
|
||||||
|
rotation = FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1),
|
||||||
|
axis)
|
||||||
|
center_point = face.Surface.Center
|
||||||
|
else:
|
||||||
|
rotation = FreeCAD.Rotation()
|
||||||
|
center_point = selected.SubObjects[0].CenterOfMass
|
||||||
|
parent_pl = selected.Object.Placement
|
||||||
|
abs_pl = FreeCAD.Placement(center_point,
|
||||||
|
rotation)
|
||||||
|
self.local_ffpl = parent_pl.inverse().multiply(abs_pl)
|
||||||
|
self.createFrame()
|
||||||
|
self.fframe.Positioning = "Center"
|
||||||
|
|
||||||
|
|
||||||
|
class PointOnCenterlinePanel(BaseFeaturePanel):
|
||||||
|
"""Create a point on centerline of primitive."""
|
||||||
|
def __init__(self, selected, so_desc):
|
||||||
|
uiform_path = os.path.join(uidir, "FramePlacer.ui")
|
||||||
|
self.form = FreeCADGui.PySideUic.loadUi(uiform_path)
|
||||||
|
BaseFeaturePanel.__init__(self, selected, so_desc)
|
||||||
|
# Enable the along line parameter
|
||||||
|
self.form.VLabel.setVisible(True)
|
||||||
|
self.form.VLabel.setText("u")
|
||||||
|
self.form.VBox.setVisible(True)
|
||||||
|
QtCore.QObject.connect(self.form.VBox,
|
||||||
|
QtCore.SIGNAL("valueChanged(double)"),
|
||||||
|
self.parameterChanged)
|
||||||
|
# Enable percentage of param selection
|
||||||
|
self.form.OptionsLabel.setVisible(True)
|
||||||
|
self.form.OptionsLabel.setText("Line param.")
|
||||||
|
self.form.OptionsBox.setVisible(True)
|
||||||
|
self.form.OptionsBox.addItems(["mm", "%"])
|
||||||
|
QtCore.QObject.connect(self.form.OptionsBox,
|
||||||
|
QtCore.SIGNAL("currentIndexChanged(QString)"),
|
||||||
|
self.choiceChanged)
|
||||||
|
# Place the frame wherever the values are atm
|
||||||
|
self.local_ffpl = FreeCAD.Placement()
|
||||||
|
self.createFrame()
|
||||||
|
self.fframe.Positioning = "PointOnCenterline"
|
||||||
|
self.parameterChanged()
|
||||||
|
|
||||||
|
def parameterChanged(self):
|
||||||
|
value = self.form.VBox.value()
|
||||||
|
if self.form.OptionsBox.currentText() == "%":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
displacement_pl = FreeCAD.Placement(FreeCAD.Vector(0, 0, value),
|
||||||
|
FreeCAD.Rotation())
|
||||||
|
# Find the center
|
||||||
|
axis = self.selected.SubObjects[0].Surface.Axis
|
||||||
|
rotation = FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1),
|
||||||
|
axis)
|
||||||
|
center_point = self.selected.SubObjects[0].Surface.Center
|
||||||
|
center_pl = FreeCAD.Placement(center_point, rotation)
|
||||||
|
abs_ffpl = center_pl.multiply(displacement_pl)
|
||||||
|
parent_pl = self.selected.Object.Placement
|
||||||
|
self.local_ffpl = parent_pl.inverse().multiply(abs_ffpl)
|
||||||
|
self.fframe.FeaturePlacement = self.local_ffpl
|
||||||
|
# force recompute of placement
|
||||||
|
self.fframe.Placement = self.fframe.Placement
|
||||||
|
|
||||||
|
def choiceChanged(self, choice):
|
||||||
|
FreeCAD.Console.PrintMessage("choiceChanged\n")
|
||||||
|
value = self.form.VBox.value()
|
||||||
|
FreeCAD.Console.PrintMessage("preval:"+str(value)+"\n")
|
||||||
|
if choice == "mm":
|
||||||
|
value = self.p2mm(value)
|
||||||
|
self.form.VBox.setSuffix("mm")
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange[2:]
|
||||||
|
self.form.VBox.setRange(*parameter_range)
|
||||||
|
self.form.VBox.setSingleStep(0.1)
|
||||||
|
elif choice == "%":
|
||||||
|
value = self.mm2p(value)
|
||||||
|
self.form.VBox.setSuffix("%")
|
||||||
|
self.form.VBox.setRange(0, 100)
|
||||||
|
self.form.VBox.setSingleStep(1.0)
|
||||||
|
self.form.VBox.setValue(value)
|
||||||
|
FreeCAD.Console.PrintMessage("postval:"+str(value)+"\n")
|
||||||
|
|
||||||
|
def p2mm(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange[2:]
|
||||||
|
delta = parameter_range[1] - parameter_range[0]
|
||||||
|
return 0.01*value*delta + parameter_range[0]
|
||||||
|
|
||||||
|
def mm2p(self, value):
|
||||||
|
parameter_range = self.selected.SubObjects[0].ParameterRange[2:]
|
||||||
|
delta = parameter_range[1] - parameter_range[0]
|
||||||
|
return 100.0*(value - parameter_range[0])/delta
|
566
freecad_workbench/GazeboExport.py
Normal file
|
@ -0,0 +1,566 @@
|
||||||
|
import FreeCAD, Mesh, os, numpy as np
|
||||||
|
import yaml
|
||||||
|
import argparse
|
||||||
|
import collada
|
||||||
|
from xml.etree import ElementTree as ET
|
||||||
|
from xml.dom.minidom import parseString
|
||||||
|
from math import radians as _radians
|
||||||
|
import Part
|
||||||
|
|
||||||
|
# Takes subassembly or parts dictionary { part_label: { "obj": <obj>, "mesh": <meshuri> } }
|
||||||
|
# and generate SDF for them
|
||||||
|
|
||||||
|
def export_sdf(objects, export_dir, modelname, configs={}):
|
||||||
|
model_dir = os.path.join(export_dir, modelname)
|
||||||
|
|
||||||
|
scale = configs.get('scale', 0.001)
|
||||||
|
scale_vec = FreeCAD.Vector([scale]*3)
|
||||||
|
density = configs.get('density', 1000)
|
||||||
|
|
||||||
|
shapes = list(map(lambda x: x["obj"].Shape, objects.values()))
|
||||||
|
bounding_box = Part.makeCompound(shapes).BoundBox
|
||||||
|
bounding_box.scale(*scale_vec)
|
||||||
|
global_pose_base = FreeCAD.Vector(bounding_box.XLength/2,
|
||||||
|
bounding_box.YLength/2,
|
||||||
|
bounding_box.ZLength/2)
|
||||||
|
global_pose_base -= bounding_box.Center
|
||||||
|
global_pose = FreeCAD.Placement()
|
||||||
|
global_pose.Base = global_pose_base
|
||||||
|
|
||||||
|
model = Model(name=modelname, pose=global_pose)
|
||||||
|
model.self_collide = False
|
||||||
|
model.sdf_version = '1.5'
|
||||||
|
|
||||||
|
for label in objects.keys():
|
||||||
|
shape = objects[label]["obj"].Shape
|
||||||
|
mass = shape.Mass * scale**3 * density
|
||||||
|
com = shape.CenterOfMass * scale
|
||||||
|
inr = shape.MatrixOfInertia
|
||||||
|
inr.scale(*scale_vec*(scale**4) * density)
|
||||||
|
placement = shape.Placement
|
||||||
|
placement.Base.scale(*scale_vec)
|
||||||
|
pose = placement.copy()
|
||||||
|
pose.Base = com
|
||||||
|
pose_rpy = pose.copy()
|
||||||
|
pose_rpy.Base=(np.zeros(3))
|
||||||
|
inertia = Inertia(inertia=np.array(inr.A)[[0,1,2,5,6,10]])
|
||||||
|
inertial = Inertial(pose=pose_rpy, mass=mass, inertia=inertia)
|
||||||
|
|
||||||
|
mesh_uri = os.path.normpath(os.path.relpath(objects[label]["mesh"], export_dir))
|
||||||
|
visual = Visual(name=label+'_visual', mesh=mesh_uri)
|
||||||
|
collision = Collision(name=label+'_collision', mesh=mesh_uri)
|
||||||
|
|
||||||
|
link = Link(name=label,
|
||||||
|
pose=pose,
|
||||||
|
inertial=inertial,
|
||||||
|
visual=visual,
|
||||||
|
collision=collision)
|
||||||
|
model.links.append(link)
|
||||||
|
|
||||||
|
with open(os.path.join(model_dir, 'model.sdf'), 'w') as sdf_file:
|
||||||
|
sdf_file.write(model.to_xml_string('sdf'))
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Export helpers
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def export_collada(exportList, filename, scale=0.001, quality=1, offset=np.zeros(3)):
|
||||||
|
'''FreeCAD collada exporter
|
||||||
|
exportList - list of objects
|
||||||
|
scale - scaling factor for the mesh
|
||||||
|
quality - mesh tessellation quality
|
||||||
|
offset - offset of the origin of the resulting mesh'''
|
||||||
|
|
||||||
|
colmesh = collada.Collada()
|
||||||
|
colmesh.assetInfo.upaxis = collada.asset.UP_AXIS.Z_UP
|
||||||
|
objind = 0
|
||||||
|
scenenodes = []
|
||||||
|
|
||||||
|
for obj in exportList:
|
||||||
|
bHandled = False
|
||||||
|
if obj.isDerivedFrom("Part::Feature"):
|
||||||
|
bHandled = True
|
||||||
|
m = obj.Shape.tessellate(quality)
|
||||||
|
vindex = []
|
||||||
|
nindex = []
|
||||||
|
findex = []
|
||||||
|
# vertex indices
|
||||||
|
for v in m[0]:
|
||||||
|
vindex.extend([a*scale+b for a, b in zip(v, offset)])
|
||||||
|
# normals
|
||||||
|
for f in obj.Shape.Faces:
|
||||||
|
n = f.normalAt(0,0)
|
||||||
|
for i in range(len(f.tessellate(quality)[1])):
|
||||||
|
nindex.extend([n.x,n.y,n.z])
|
||||||
|
# face indices
|
||||||
|
for i in range(len(m[1])):
|
||||||
|
f = m[1][i]
|
||||||
|
findex.extend([f[0],i,f[1],i,f[2],i])
|
||||||
|
elif obj.isDerivedFrom("Mesh::Feature"):
|
||||||
|
bHandled = True
|
||||||
|
print("exporting mesh ",obj.Name, obj.Mesh)
|
||||||
|
m = obj.Mesh
|
||||||
|
vindex = []
|
||||||
|
nindex = []
|
||||||
|
findex = []
|
||||||
|
# vertex indices
|
||||||
|
for v in m.Topology[0]:
|
||||||
|
vindex.extend([a*scale+b for a, b in zip(v, offset)])
|
||||||
|
# normals
|
||||||
|
for f in m.Facets:
|
||||||
|
n = f.Normal
|
||||||
|
nindex.extend([n.x,n.y,n.z])
|
||||||
|
# face indices
|
||||||
|
for i in range(len(m.Topology[1])):
|
||||||
|
f = m.Topology[1][i]
|
||||||
|
findex.extend([f[0],i,f[1],i,f[2],i])
|
||||||
|
|
||||||
|
if bHandled:
|
||||||
|
vert_src = collada.source.FloatSource("cubeverts-array"+str(objind),
|
||||||
|
np.array(vindex),
|
||||||
|
('X', 'Y', 'Z'))
|
||||||
|
normal_src = collada.source.FloatSource("cubenormals-array"+str(objind),
|
||||||
|
np.array(nindex),
|
||||||
|
('X', 'Y', 'Z'))
|
||||||
|
geom = collada.geometry.Geometry(colmesh,
|
||||||
|
"geometry"+str(objind),
|
||||||
|
obj.Label,
|
||||||
|
[vert_src, normal_src])
|
||||||
|
|
||||||
|
input_list = collada.source.InputList()
|
||||||
|
input_list.addInput(0, 'VERTEX', "#cubeverts-array"+str(objind))
|
||||||
|
input_list.addInput(1, 'NORMAL', "#cubenormals-array"+str(objind))
|
||||||
|
triset = geom.createTriangleSet(np.array(findex),
|
||||||
|
input_list,
|
||||||
|
"materialref")
|
||||||
|
geom.primitives.append(triset)
|
||||||
|
colmesh.geometries.append(geom)
|
||||||
|
|
||||||
|
geomnode = collada.scene.GeometryNode(geom)
|
||||||
|
node = collada.scene.Node("node"+str(objind), children=[geomnode])
|
||||||
|
|
||||||
|
#TODO: Add materials handling
|
||||||
|
scenenodes.append(node)
|
||||||
|
|
||||||
|
objind += 1
|
||||||
|
|
||||||
|
scene = collada.scene.Scene("scene", scenenodes)
|
||||||
|
colmesh.scenes.append(scene)
|
||||||
|
colmesh.scene = scene
|
||||||
|
|
||||||
|
colmesh.write(filename)
|
||||||
|
print("file %s successfully created\n" % filename)
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Conversion Helpers
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
def deg2rad(d):
|
||||||
|
'''Converts degrees to radians'''
|
||||||
|
return _radians(d)
|
||||||
|
|
||||||
|
def flt2str(f):
|
||||||
|
'''Converts floats to formatted string'''
|
||||||
|
return '{:.6f}'.format(f)
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Model Helpers
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
def add_poses(p1, p2):
|
||||||
|
return FreeCAD.Placement(p1.toMatrix() + p2.toMatrix())
|
||||||
|
|
||||||
|
def subtract_poses(p1, p2):
|
||||||
|
return FreeCAD.Placement(p1.toMatrix() + p2.toMatrix().inverse())
|
||||||
|
|
||||||
|
def pose_to_xml(pose, fmt='sdf'):
|
||||||
|
'''Converts a pose/freecad placement/ to xml element
|
||||||
|
with tag "pose" for sdf and "origin" for urdf'''
|
||||||
|
xyz = pose.Base
|
||||||
|
rpy = pose.Rotation.toEuler()
|
||||||
|
|
||||||
|
if fmt == 'urdf':
|
||||||
|
args = {'xyz': ' '.join([flt2str(i) for i in xyz]),
|
||||||
|
'rpy': ' '.join([flt2str(deg2rad(j)) for j in rpy])}
|
||||||
|
return ET.Element('origin', args)
|
||||||
|
|
||||||
|
pose_elem = ET.Element('pose')
|
||||||
|
pose_elem.text = ' '.join([flt2str(i) for i in xyz]
|
||||||
|
+ [flt2str(deg2rad(j)) for j in rpy])
|
||||||
|
|
||||||
|
return pose_elem
|
||||||
|
|
||||||
|
def pose_xyz(pose):
|
||||||
|
'''Returns the xyz/Base portion of a pose as string'''
|
||||||
|
xyz = pose.Base if hasattr(pose, 'Base') else pose
|
||||||
|
return ' '.join([flt2str(i) for i in xyz])
|
||||||
|
|
||||||
|
def config(model_name, sdf, author, email, desc, version):
|
||||||
|
top = ET.Element('model')
|
||||||
|
name = ET.SubElement(top, 'name')
|
||||||
|
name.text = model_name
|
||||||
|
ver = ET.SubElement(top, 'version')
|
||||||
|
ver.text = version
|
||||||
|
sdf_file = ET.SubElement(top, 'sdf')
|
||||||
|
sdf_file.text = sdf
|
||||||
|
sdf_file.set('version', '1.5')
|
||||||
|
|
||||||
|
author_tag = ET.SubElement(top, 'author')
|
||||||
|
author_name = ET.SubElement(author_tag, 'name')
|
||||||
|
author_name.text = author
|
||||||
|
email_address = ET.SubElement(author_tag, 'email')
|
||||||
|
email_address.text = email
|
||||||
|
|
||||||
|
description = ET.SubElement(top, 'description')
|
||||||
|
description.text = desc
|
||||||
|
|
||||||
|
dom = parseString(ET.tostring(top, encoding="unicode"))
|
||||||
|
return dom.toprettyxml(indent=' '*2)
|
||||||
|
|
||||||
|
|
||||||
|
class SpatialEntity(object):
|
||||||
|
'''A base class for sdf/urdf elements containing name, pose and urdf_pose'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.name = kwargs.get('name', '')
|
||||||
|
self.pose = kwargs.get('pose', FreeCAD.Placement())
|
||||||
|
self.global_pose = kwargs.get('global_pose', FreeCAD.Placement())
|
||||||
|
self.urdf_pose = kwargs.get('urdf_pose', FreeCAD.Placement())
|
||||||
|
|
||||||
|
self.formats = ['sdf', 'urdf']
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''Call this to check if a format is supported or not'''
|
||||||
|
if not fmt in self.formats:
|
||||||
|
raise Exception('Invalid export format')
|
||||||
|
|
||||||
|
|
||||||
|
class Model(SpatialEntity):
|
||||||
|
'''A class representing a model/robot'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Model, self).__init__(**kwargs)
|
||||||
|
self.static = kwargs.get('static', False)
|
||||||
|
self.self_collide = kwargs.get('self_collide', False)
|
||||||
|
self.sdf_version = kwargs.get('sdf_version', 1.5)
|
||||||
|
|
||||||
|
self.links = []
|
||||||
|
self.joints = []
|
||||||
|
|
||||||
|
if 'link' in kwargs:
|
||||||
|
self.links.append(kwargs.get('link', Link()))
|
||||||
|
self.links.extend(kwargs.get('links', []))
|
||||||
|
|
||||||
|
if 'joint' in kwargs:
|
||||||
|
self.joints.append(kwargs.get('joint', Joint()))
|
||||||
|
self.joints.extend(kwargs.get('joints', []))
|
||||||
|
|
||||||
|
def get_link(self, link_name):
|
||||||
|
for link in self.links:
|
||||||
|
if link_name == link.name:
|
||||||
|
return link
|
||||||
|
|
||||||
|
def get_joint(self, joint_name):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_root_link(self):
|
||||||
|
root_link = None
|
||||||
|
for link in self.links:
|
||||||
|
if not link.parent_joint:
|
||||||
|
root_link = link
|
||||||
|
return root_link
|
||||||
|
|
||||||
|
def build_tree(self):
|
||||||
|
for joint in self.joints:
|
||||||
|
joint.parent_link = self.get_link(joint.parent)
|
||||||
|
if not joint.parent_link:
|
||||||
|
raise Exception('Parent not found for joint %s' % joint.name)
|
||||||
|
joint.parent_link.child_joints.append(joint)
|
||||||
|
|
||||||
|
joint.child_link = self.get_link(joint.child)
|
||||||
|
if not joint.child_link:
|
||||||
|
raise Exception('Child not found for joint %s' % joint.name)
|
||||||
|
joint.child_link.parent_joint = joint
|
||||||
|
|
||||||
|
def calculate_global_poses(self):
|
||||||
|
for link in self.links:
|
||||||
|
link.global_pose = add_poses(self.pose, link.pose)
|
||||||
|
for joint in self.joints:
|
||||||
|
joint.global_pose = add_poses(joint.child_link.global_pose, joint.pose)
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns xml element of a model/robot'''
|
||||||
|
super(Model, self).to_xml(fmt)
|
||||||
|
|
||||||
|
self.build_tree()
|
||||||
|
self.calculate_global_poses()
|
||||||
|
|
||||||
|
tag = 'robot' if fmt=='urdf' else 'model'
|
||||||
|
model = ET.Element(tag, name=self.name)
|
||||||
|
|
||||||
|
if fmt == 'sdf':
|
||||||
|
model.append(pose_to_xml(self.pose))
|
||||||
|
static = ET.SubElement(model, 'static')
|
||||||
|
static.text = str(self.static).lower()
|
||||||
|
self_collide = ET.SubElement(model, 'self_collide')
|
||||||
|
self_collide.text = str(self.self_collide).lower()
|
||||||
|
else:
|
||||||
|
model.set('static', str(self.static).lower())
|
||||||
|
|
||||||
|
root_link = self.get_root_link()
|
||||||
|
if not root_link:
|
||||||
|
raise Exception("Couldn't find root link")
|
||||||
|
model.append(ET.Element('link', name=root_link.name+'_root'))
|
||||||
|
for link in self.links:
|
||||||
|
model.append(link.to_xml(fmt))
|
||||||
|
|
||||||
|
if fmt=='urdf':
|
||||||
|
root_joint = ET.Element('joint',
|
||||||
|
{"name": root_link.name+'_root',
|
||||||
|
"type": "fixed"})
|
||||||
|
root_joint.append(pose_to_xml(root_link.global_pose, fmt))
|
||||||
|
ET.SubElement(root_joint, 'parent', link= root_link.name+'_root')
|
||||||
|
ET.SubElement(root_joint, 'child', link= root_link.name)
|
||||||
|
model.append(root_joint)
|
||||||
|
|
||||||
|
for joint in self.joints:
|
||||||
|
model.append(joint.to_xml(fmt))
|
||||||
|
|
||||||
|
if fmt == 'sdf':
|
||||||
|
sdf = ET.Element('sdf', version=str(self.sdf_version))
|
||||||
|
sdf.append(model)
|
||||||
|
return sdf
|
||||||
|
|
||||||
|
return model
|
||||||
|
|
||||||
|
def to_xml_string(self, fmt='sdf', header=True):
|
||||||
|
dom = parseString(ET.tostring(self.to_xml(fmt)))
|
||||||
|
return dom.toprettyxml(indent=' '*2)
|
||||||
|
|
||||||
|
|
||||||
|
class Inertia(object):
|
||||||
|
'''A clss representing an inertia element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.ixx = kwargs.get('ixx', 0)
|
||||||
|
self.ixy = kwargs.get('ixy', 0)
|
||||||
|
self.ixz = kwargs.get('ixz', 0)
|
||||||
|
self.iyy = kwargs.get('iyy', 0)
|
||||||
|
self.iyz = kwargs.get('iyz', 0)
|
||||||
|
self.izz = kwargs.get('izz', 0)
|
||||||
|
if 'inertia' in kwargs:
|
||||||
|
self.ixx, self.ixy, self.ixz = kwargs.get('inertia', [0]*6)[:3]
|
||||||
|
self.iyy, self.iyz, self.izz = kwargs.get('inertia', [0]*6)[3:]
|
||||||
|
self.coords = 'ixx', 'ixy', 'ixz', 'iyy', 'iyz', 'izz'
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns inetria xml element'''
|
||||||
|
inertia = ET.Element('inertia')
|
||||||
|
for coord in self.coords:
|
||||||
|
if fmt == 'sdf':
|
||||||
|
elem = ET.SubElement(inertia, coord)
|
||||||
|
elem.text = flt2str(getattr(self, coord, 0))
|
||||||
|
else:
|
||||||
|
inertia.set(coord, flt2str(getattr(self, coord, 0)))
|
||||||
|
return inertia
|
||||||
|
|
||||||
|
|
||||||
|
class Inertial(SpatialEntity):
|
||||||
|
'''A class representing an inertial element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Inertial, self).__init__(**kwargs)
|
||||||
|
self.mass = kwargs.get('mass', 0)
|
||||||
|
self.inertia = kwargs.get('inertia', Inertia())
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns inertial xml element'''
|
||||||
|
super(Inertial, self).to_xml(fmt)
|
||||||
|
inertial = ET.Element('inertial')
|
||||||
|
pose = self.pose if fmt=='sdf' else self.urdf_pose
|
||||||
|
inertial.append(pose_to_xml(pose, fmt=fmt))
|
||||||
|
mass = ET.SubElement(inertial, 'mass')
|
||||||
|
if fmt == 'sdf':
|
||||||
|
mass.text = flt2str(self.mass)
|
||||||
|
else:
|
||||||
|
mass.set('value', flt2str(self.mass))
|
||||||
|
inertial.append(self.inertia.to_xml(fmt=fmt))
|
||||||
|
|
||||||
|
return inertial
|
||||||
|
|
||||||
|
|
||||||
|
class Geom(SpatialEntity):
|
||||||
|
'''A base class for collision and visual classes'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Geom, self).__init__(**kwargs)
|
||||||
|
self.mesh = kwargs.get('mesh', '')
|
||||||
|
self.type = kwargs.get('type', 'visual')
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns visual or collision xml element'''
|
||||||
|
super(Geom, self).to_xml(fmt)
|
||||||
|
elem = ET.Element(self.type, name=self.name)
|
||||||
|
pose = self.pose if fmt=='sdf' else self.urdf_pose
|
||||||
|
elem.append(pose_to_xml(pose, fmt=fmt))
|
||||||
|
geom = ET.SubElement(elem, 'geometry')
|
||||||
|
mesh = ET.SubElement(geom, 'mesh')
|
||||||
|
if fmt=='urdf':
|
||||||
|
mesh.set('filename', 'package://' + self.mesh)
|
||||||
|
else:
|
||||||
|
uri = ET.SubElement(mesh, 'uri')
|
||||||
|
uri.text = 'model://' + self.mesh
|
||||||
|
|
||||||
|
return elem
|
||||||
|
|
||||||
|
|
||||||
|
class Visual(Geom):
|
||||||
|
'''A class representing a visual element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Visual, self).__init__(type='visual', **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class Collision(Geom):
|
||||||
|
'''A class representing a collision element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Collision, self).__init__(type='collision', **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class Link(SpatialEntity):
|
||||||
|
'''A class representing a link element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Link, self).__init__(**kwargs)
|
||||||
|
self.inertial = kwargs.get('inertial', Inertial())
|
||||||
|
self.visuals = []
|
||||||
|
self.collisions = []
|
||||||
|
|
||||||
|
self.parent_joint = None
|
||||||
|
self.child_joints = []
|
||||||
|
|
||||||
|
if 'visual' in kwargs:
|
||||||
|
self.visuals.append(kwargs.get('visual', Visual()))
|
||||||
|
self.visuals.extend(kwargs.get('visuals', []))
|
||||||
|
|
||||||
|
if 'collision' in kwargs:
|
||||||
|
self.visuals.append(kwargs.get('collision', Collision()))
|
||||||
|
self.collisions.extend(kwargs.get('collisions', []))
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns link xml element'''
|
||||||
|
super(Link, self).to_xml(fmt)
|
||||||
|
link = ET.Element('link', name=self.name)
|
||||||
|
|
||||||
|
if self.parent_joint:
|
||||||
|
self.urdf_pose = subtract_poses(self.global_pose,
|
||||||
|
self.parent_joint.global_pose)
|
||||||
|
else:
|
||||||
|
self.urdf_pose = FreeCAD.Placement()
|
||||||
|
|
||||||
|
if fmt == 'sdf':
|
||||||
|
link.append(pose_to_xml(self.pose, fmt=fmt))
|
||||||
|
|
||||||
|
self.inertial.urdf_pose = add_poses(self.inertial.pose, self.urdf_pose)
|
||||||
|
link.append(self.inertial.to_xml(fmt=fmt))
|
||||||
|
|
||||||
|
for visual in self.visuals:
|
||||||
|
visual.urdf_pose = self.urdf_pose.copy()
|
||||||
|
link.append(visual.to_xml(fmt=fmt))
|
||||||
|
for collision in self.collisions:
|
||||||
|
collision.urdf_pose = self.urdf_pose.copy()
|
||||||
|
link.append(collision.to_xml(fmt=fmt))
|
||||||
|
|
||||||
|
return link
|
||||||
|
|
||||||
|
|
||||||
|
class Axis(SpatialEntity):
|
||||||
|
'''A class representing an axis element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Axis, self).__init__(**kwargs)
|
||||||
|
self.lower_limit = kwargs.get('lower_limit', 0)
|
||||||
|
self.upper_limit = kwargs.get('upper_limit', 0)
|
||||||
|
self.effort_limit = kwargs.get('effort_limit', 0)
|
||||||
|
self.velocity_limit = kwargs.get('velocity_limit', 0)
|
||||||
|
self.friction = kwargs.get('friction', 0)
|
||||||
|
self.damping = kwargs.get('damping', 0)
|
||||||
|
self.use_parent_frame = kwargs.get('use_parent_frame', False)
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns an axis xml element for sdf
|
||||||
|
or an array of axis and limit xml elements for urdf'''
|
||||||
|
super(Axis, self).to_xml(fmt)
|
||||||
|
|
||||||
|
axis = ET.Element('axis')
|
||||||
|
if fmt=='sdf':
|
||||||
|
xyz = ET.SubElement(axis, 'xyz')
|
||||||
|
xyz.text = pose_xyz(self.pose)
|
||||||
|
limit = ET.SubElement(axis, 'limit')
|
||||||
|
lower = ET.SubElement(limit, 'lower')
|
||||||
|
lower.text = flt2str(deg2rad(self.lower_limit))
|
||||||
|
upper = ET.SubElement(limit, 'upper')
|
||||||
|
upper.text = flt2str(deg2rad(self.upper_limit))
|
||||||
|
effort = ET.SubElement(limit, 'effort')
|
||||||
|
effort.text = flt2str(self.effort_limit)
|
||||||
|
velocity = ET.SubElement(limit, 'velocity')
|
||||||
|
velocity.text = flt2str(self.velocity_limit)
|
||||||
|
dynamics = ET.SubElement(axis, 'dynamics')
|
||||||
|
friction = ET.SubElement(dynamics, 'friction')
|
||||||
|
friction.text = flt2str(self.friction)
|
||||||
|
damping = ET.SubElement(dynamics, 'damping')
|
||||||
|
damping.text = flt2str(self.damping)
|
||||||
|
use_parent_frame = ET.SubElement(axis, 'use_parent_model_frame')
|
||||||
|
use_parent_frame.text = str(self.use_parent_frame).lower()
|
||||||
|
else:
|
||||||
|
axis.set('xyz', pose_xyz(self.pose))
|
||||||
|
axis.set('use_parent_model_frame', str(self.use_parent_frame).lower())
|
||||||
|
limit = ET.Element('limit')
|
||||||
|
limit.set('lower', flt2str(deg2rad(self.lower_limit)))
|
||||||
|
limit.set('upper', flt2str(deg2rad(self.upper_limit)))
|
||||||
|
limit.set('effort', flt2str(self.effort_limit))
|
||||||
|
limit.set('velocity', flt2str(self.velocity_limit))
|
||||||
|
|
||||||
|
dynamics = ET.Element('dynamics')
|
||||||
|
dynamics.set('friction', flt2str(self.friction))
|
||||||
|
dynamics.set('damping', flt2str(self.damping))
|
||||||
|
|
||||||
|
return [axis, limit, dynamics]
|
||||||
|
return axis
|
||||||
|
|
||||||
|
|
||||||
|
class Joint(SpatialEntity):
|
||||||
|
'''A class representing a joint element'''
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super(Joint, self).__init__(**kwargs)
|
||||||
|
self.parent = kwargs.get('parent', '')
|
||||||
|
self.child = kwargs.get('child', '')
|
||||||
|
self.type = kwargs.get('type', '')
|
||||||
|
self.axis = kwargs.get('axis', Axis())
|
||||||
|
|
||||||
|
self.parent_link = None
|
||||||
|
self.child_link = None
|
||||||
|
|
||||||
|
def to_xml(self, fmt='sdf'):
|
||||||
|
'''returns a joint xml element'''
|
||||||
|
super(Joint, self).to_xml(fmt)
|
||||||
|
|
||||||
|
if self.parent_link.parent_joint:
|
||||||
|
self.urdf_pose = subtract_poses(self.global_pose,
|
||||||
|
self.parent_link.parent_joint.global_pose)
|
||||||
|
else:
|
||||||
|
self.urdf_pose = subtract_poses(self.global_pose, self.parent_link.global_pose)
|
||||||
|
|
||||||
|
joint = ET.Element('joint', {'name': self.name, 'type': self.type})
|
||||||
|
pose = self.pose if fmt=='sdf' else self.urdf_pose
|
||||||
|
joint.append(pose_to_xml(pose, fmt=fmt))
|
||||||
|
|
||||||
|
parent = ET.SubElement(joint, 'parent')
|
||||||
|
child = ET.SubElement(joint, 'child')
|
||||||
|
if fmt == 'sdf':
|
||||||
|
parent.text = self.parent
|
||||||
|
child.text = self.child
|
||||||
|
joint.append(self.axis.to_xml(fmt=fmt))
|
||||||
|
else:
|
||||||
|
parent.set('link', self.parent)
|
||||||
|
child.set('link', self.child)
|
||||||
|
joint.extend(self.axis.to_xml(fmt=fmt))
|
||||||
|
|
||||||
|
return joint
|
||||||
|
|
168
freecad_workbench/GraspPose.py
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
import FreeCAD
|
||||||
|
from FreeCAD import Base, Placement
|
||||||
|
import Part
|
||||||
|
from time import sleep
|
||||||
|
import PySide
|
||||||
|
|
||||||
|
# MACRO 1:
|
||||||
|
# Select part and run it to insert gripper pose (red)
|
||||||
|
# Select gripper body and run it to insert second pose (pre-gripper, blue)
|
||||||
|
# Select pre-gripper body and run it to insert 3D printer table (green)
|
||||||
|
|
||||||
|
# Current gripper
|
||||||
|
# https://gitlab.com/robosphere/robossembler-ros2/-/blob/71938716043c35689a1058b29cefb1997a8bcf0a/rasmt_support/meshes/collision/Grip_Body.STL
|
||||||
|
# https://gitlab.com/robosphere/robossembler-ros2/-/blob/71938716043c35689a1058b29cefb1997a8bcf0a/rasmt_support/meshes/collision/Grip_L.STL
|
||||||
|
# https://gitlab.com/robosphere/robossembler-ros2/-/blob/71938716043c35689a1058b29cefb1997a8bcf0a/rasmt_support/meshes/collision/Grip_R.STL
|
||||||
|
# https://gitlab.com/robosphere/robossembler-ros2/-/blob/71938716043c35689a1058b29cefb1997a8bcf0a/rasmt_support/urdf/tools/rasmt_hand_macro.xacro
|
||||||
|
|
||||||
|
def insert():
|
||||||
|
if len(FreeCAD.Gui.Selection.getSelection())>0:
|
||||||
|
active_body = FreeCAD.Gui.Selection.getSelection()[0]
|
||||||
|
if "IsMainPosition" in active_body.PropertiesList:
|
||||||
|
if active_body.IsMainPosition == False:
|
||||||
|
p = controlled_insert("P")
|
||||||
|
p.addProperty("App::PropertyLink", "PartToPrint", "Parameter", "Part to be printed on this table")
|
||||||
|
p.ViewObject.ShapeColor=(0.0,1.0,0.0,0.0)
|
||||||
|
p.PartToPrint = active_body.PartToHandle
|
||||||
|
p.ViewObject.Transparency = 90
|
||||||
|
p.Placement = active_body.PartToHandle.getGlobalPlacement()
|
||||||
|
p.Label = '3D_printer_table_for_'+p.PartToPrint.Name
|
||||||
|
else:
|
||||||
|
b = grip_helper((0.0,0.0,1.0,0.0))
|
||||||
|
b.addProperty("App::PropertyLink", "MainPosition", "Parameter", "Main position")
|
||||||
|
b.PartToHandle = active_body.PartToHandle
|
||||||
|
b.MainPosition = active_body
|
||||||
|
b.IsMainPosition = False
|
||||||
|
b.GripSize = b.MainPosition.GripSize
|
||||||
|
b.Container.Placement = b.MainPosition.Container.Placement
|
||||||
|
b.Container.Label = 'PreGripper_for_'+b.PartToHandle.Name
|
||||||
|
tempshape = Part.getShape(b.PartToHandle,'',needSubElement=False,refine=False)
|
||||||
|
FreeCAD.ActiveDocument.addObject('Part::Feature','PartToHandle').Shape = tempshape
|
||||||
|
n = FreeCAD.ActiveDocument.ActiveObject
|
||||||
|
n.Label = b.PartToHandle.Label
|
||||||
|
n.ViewObject.ShapeColor = (0.0,0.0,1.0,0.0)
|
||||||
|
n.adjustRelativeLinks(b.Container)
|
||||||
|
b.Container.addObject(n)
|
||||||
|
n.Placement.Base = n.getGlobalPlacement().Base.sub(b.Container.Placement)
|
||||||
|
n.Placement.Rotation.Axis = n.getGlobalPlacement().Rotation.Axis.sub(b.Container.Placement.Rotation.Axis)
|
||||||
|
n.Placement.Rotation.Angle = n.getGlobalPlacement().Rotation.Angle-b.Container.Placement.Rotation.Angle
|
||||||
|
n.ViewObject.ShowInTree = False
|
||||||
|
n.ViewObject.Transparency = 90
|
||||||
|
|
||||||
|
else:
|
||||||
|
b = grip_helper((1.0,0.0,0.0,0.0))
|
||||||
|
b.addProperty("App::PropertyInteger", "OperationPriority", "Parameter", "Priority of the operation")
|
||||||
|
b.addProperty("App::PropertyInteger", "OperationType", "Parameter", "Priority of the operation")
|
||||||
|
b.addProperty("App::PropertyFloat", "OperationParameter1", "Parameter", "Priority of the operation")
|
||||||
|
b.addProperty("App::PropertyFloat", "OperationParameter2", "Parameter", "Priority of the operation")
|
||||||
|
b.addProperty("App::PropertyFloat", "OperationParameter3", "Parameter", "Priority of the operation")
|
||||||
|
b.PartToHandle = active_body
|
||||||
|
b.IsMainPosition = True
|
||||||
|
b.GripSize = active_body.Shape.BoundBox.YLength
|
||||||
|
b.Container.Placement = active_body.getGlobalPlacement()
|
||||||
|
b.Container.Label = 'Gripper_for_'+b.PartToHandle.Name
|
||||||
|
|
||||||
|
|
||||||
|
def controlled_insert(code):
|
||||||
|
a = FreeCAD.ActiveDocument.Objects
|
||||||
|
Part.insert(u"~/.local/share/FreeCAD/Mod/Frames/"+code+".brep",FreeCAD.ActiveDocument.Name)
|
||||||
|
b = FreeCAD.ActiveDocument.Objects
|
||||||
|
return list(set(b) - set(a))[0]
|
||||||
|
|
||||||
|
def grip_helper(color):
|
||||||
|
b = controlled_insert("B")
|
||||||
|
r = controlled_insert("R")
|
||||||
|
l = controlled_insert("L")
|
||||||
|
b.addProperty("App::PropertyFloat", "GripSize", "Parameter", "Size between fingers")
|
||||||
|
b.addProperty("App::PropertyLink", "Container", "Parameter", "Part Container")
|
||||||
|
b.addProperty("App::PropertyBool", "IsMainPosition", "Parameter", "Is it main or supportive position")
|
||||||
|
b.addProperty("App::PropertyLink", "PartToHandle", "Parameter", "Part to be manipulated by this gripper")
|
||||||
|
r.setExpression('.Placement.Base.y', b.Name+'.GripSize / 2')
|
||||||
|
l.setExpression('.Placement.Base.y', '-'+b.Name+'.GripSize / 2')
|
||||||
|
b.ViewObject.ShapeColor = color
|
||||||
|
r.ViewObject.ShapeColor = color
|
||||||
|
l.ViewObject.ShapeColor = color
|
||||||
|
NewPart = FreeCAD.activeDocument().addObject('App::Part','Part')
|
||||||
|
b.adjustRelativeLinks(NewPart)
|
||||||
|
NewPart.addObject(b)
|
||||||
|
r.adjustRelativeLinks(NewPart)
|
||||||
|
NewPart.addObject(r)
|
||||||
|
l.adjustRelativeLinks(NewPart)
|
||||||
|
NewPart.addObject(l)
|
||||||
|
r.ViewObject.ShowInTree = False
|
||||||
|
l.ViewObject.ShowInTree = False
|
||||||
|
b.Container = NewPart
|
||||||
|
b.ViewObject.Transparency = 90
|
||||||
|
r.ViewObject.Transparency = 90
|
||||||
|
l.ViewObject.Transparency = 90
|
||||||
|
return b
|
||||||
|
|
||||||
|
# MACRO 3:
|
||||||
|
# Select pre-gripper body and run it to animate its movement
|
||||||
|
def select_pregripper():
|
||||||
|
apart = FreeCAD.Gui.Selection.getSelection()[0]
|
||||||
|
sp = apart.Container.Placement.Base
|
||||||
|
ep = apart.MainPosition.Container.Placement.Base
|
||||||
|
sa = apart.Container.Placement.Rotation.Angle
|
||||||
|
ea = apart.MainPosition.Container.Placement.Rotation.Angle
|
||||||
|
print (sp,ep)
|
||||||
|
|
||||||
|
i = 0.0
|
||||||
|
def updatePlacement():
|
||||||
|
global timer
|
||||||
|
global i
|
||||||
|
global sp
|
||||||
|
global ep
|
||||||
|
global sa
|
||||||
|
global ea
|
||||||
|
apart.Container.Placement.Base = ep.multiply(i).add(sp.multiply(1.0-i))
|
||||||
|
apart.Container.Placement.Rotation.Angle = (ea*i)+(sa*(1.0-i))
|
||||||
|
i += 0.02
|
||||||
|
if i>=1:
|
||||||
|
#apart.Container.Placement.Base=sp
|
||||||
|
#apart.Container.Placement.Rotation.Angle=sa
|
||||||
|
timer.stop()
|
||||||
|
FreeCAD.Gui.updateGui()
|
||||||
|
|
||||||
|
timer = PySide.QtCore.QTimer()
|
||||||
|
timer.timeout.connect(updatePlacement)
|
||||||
|
timer.start(100)
|
||||||
|
|
||||||
|
# MACRO 4:
|
||||||
|
#Raw advanced version of MACRO 1
|
||||||
|
#Does not work properly yet
|
||||||
|
|
||||||
|
def insert_advanced():
|
||||||
|
if len(FreeCAD.Gui.Selection.getSelection())>0:
|
||||||
|
active_body = FreeCAD.Gui.Selection.getSelection()[0]
|
||||||
|
b = controlled_insert("B")
|
||||||
|
r = controlled_insert("R")
|
||||||
|
l = controlled_insert("L")
|
||||||
|
b.ViewObject.ShapeColor = (1.0,0.0,0.0,0.0)
|
||||||
|
r.ViewObject.ShapeColor = (1.0,0.0,0.0,0.0)
|
||||||
|
l.ViewObject.ShapeColor = (1.0,0.0,0.0,0.0)
|
||||||
|
b.ViewObject.ShowInTree = False
|
||||||
|
r.ViewObject.ShowInTree = False
|
||||||
|
l.ViewObject.ShowInTree = False
|
||||||
|
b.ViewObject.Transparency = 90
|
||||||
|
r.ViewObject.Transparency = 90
|
||||||
|
l.ViewObject.Transparency = 90
|
||||||
|
a = FreeCAD.ActiveDocument.addObject("App::FeaturePython",'Gripper_for_'+active_body.Name)
|
||||||
|
a.addProperty("App::PropertyFloat", "GripSize", "Parameter", "Size between fingers")
|
||||||
|
a.addProperty("App::PropertyLink", "PartToHandle", "Parameter", "Part to be manipulated by this gripper")
|
||||||
|
a.addProperty("App::PropertyLink", "GripperBody", "Parameter", "Body")
|
||||||
|
a.addProperty("App::PropertyLink", "GripperLF", "Parameter", "Body")
|
||||||
|
a.addProperty("App::PropertyLink", "GripperRF", "Parameter", "Body")
|
||||||
|
a.GripperBody = b
|
||||||
|
a.GripperLF = l
|
||||||
|
a.GripperRF = r
|
||||||
|
#r.setExpression('.Placement.Base.y', a.Name+'.GripSize / 2')
|
||||||
|
#l.setExpression('.Placement.Base.y', '-'+a.Name+'.GripSize / 2')
|
||||||
|
a.addProperty("App::PropertyInteger", "OperationPriority", "Parameter", "Priority of the operation")
|
||||||
|
a.addProperty("App::PropertyInteger", "OperationType", "Parameter", "Priority of the operation")
|
||||||
|
a.addProperty("App::PropertyFloat", "OperationParameter1", "Parameter", "Priority of the operation")
|
||||||
|
a.addProperty("App::PropertyFloat", "OperationParameter2", "Parameter", "Priority of the operation")
|
||||||
|
a.addProperty("App::PropertyFloat", "OperationParameter3", "Parameter", "Priority of the operation")
|
||||||
|
a.PartToHandle = active_body
|
||||||
|
a.GripSize = active_body.Shape.BoundBox.YLength
|
||||||
|
|
287
freecad_workbench/GripPoseGenerator.py
Normal file
|
@ -0,0 +1,287 @@
|
||||||
|
import FreeCAD
|
||||||
|
import Part
|
||||||
|
|
||||||
|
doc = FreeCAD.ActiveDocument
|
||||||
|
|
||||||
|
|
||||||
|
def check_capture_positions():
|
||||||
|
# Получаем активный документ
|
||||||
|
doc = FreeCAD.ActiveDocument
|
||||||
|
|
||||||
|
# Список тел без позиций захвата
|
||||||
|
bodies_without_capture_positions = []
|
||||||
|
|
||||||
|
# Перебираем все объекты в документе
|
||||||
|
for obj in doc.Objects:
|
||||||
|
if obj.isDerivedFrom("Part::Feature"):
|
||||||
|
# Проверяем, есть ли атрибут "Placement" у объекта
|
||||||
|
if not hasattr(obj, "Placement"):
|
||||||
|
# Если нет, добавляем его в список
|
||||||
|
bodies_without_capture_positions.append(obj.Label)
|
||||||
|
|
||||||
|
# Проверяем результат
|
||||||
|
if len(bodies_without_capture_positions) > 0:
|
||||||
|
print("Следующие тела не имеют позиции захвата:")
|
||||||
|
for body in bodies_without_capture_positions:
|
||||||
|
print(body)
|
||||||
|
else:
|
||||||
|
print("Все тела имеют позиции захвата.")
|
||||||
|
|
||||||
|
|
||||||
|
check_capture_positions()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import FreeCAD as App
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
def check_capture_positions():
|
||||||
|
bodies_without_grip_pose = []
|
||||||
|
solid_bodies_list = []
|
||||||
|
lcs_list = []
|
||||||
|
bodies_with_grip_pose = []
|
||||||
|
for obj in doc.Objects:
|
||||||
|
if hasattr(obj, 'Shape') and hasattr(obj.Shape, 'Volume') and obj.Shape.Volume:
|
||||||
|
# if obj.Shape and obj.Shape.Volume:
|
||||||
|
solid_bodies_list.append(obj)
|
||||||
|
print(solid_bodies_list)
|
||||||
|
|
||||||
|
for obj in doc.Objects:
|
||||||
|
if obj.TypeId =='PartDesign::CoordinateSystem':
|
||||||
|
lcs_list.append(obj)
|
||||||
|
print(lcs_list)
|
||||||
|
|
||||||
|
for body in solid_bodies_list:
|
||||||
|
checker = 0
|
||||||
|
for lcs in lcs_list:
|
||||||
|
|
||||||
|
print(checker)
|
||||||
|
if lcs.Attachment_ParentObject == body.Label:
|
||||||
|
checker =+1
|
||||||
|
if checker == 0:
|
||||||
|
bodies_without_grip_pose.append(body)
|
||||||
|
print(bodies_without_grip_pose)
|
||||||
|
|
||||||
|
if len(bodies_without_grip_pose) == 0:
|
||||||
|
print('Все тела имеют позиции захвата')
|
||||||
|
else:
|
||||||
|
print('Имеются тела без позиций захвата:')
|
||||||
|
for body in bodies_without_grip_pose:
|
||||||
|
print(body.Label)
|
||||||
|
|
||||||
|
check_capture_positions()
|
||||||
|
|
||||||
|
|
||||||
|
def create_grip_positions(obj, face1, face2):
|
||||||
|
if not (face1 and face2):
|
||||||
|
App.Console.PrintError("Не выбраны обе грани\n")
|
||||||
|
return
|
||||||
|
|
||||||
|
normal1 = face1.normalAt(0, 0)
|
||||||
|
normal2 = face2.normalAt(0, 0)
|
||||||
|
|
||||||
|
if normal1.isParallel(normal2):
|
||||||
|
# Найдите центры граней
|
||||||
|
center1 = face1.CenterOfMass
|
||||||
|
center2 = face2.CenterOfMass
|
||||||
|
|
||||||
|
# Вычислите расстояние между центрами граней
|
||||||
|
distance = center2 - center1
|
||||||
|
distance = distance.Length
|
||||||
|
|
||||||
|
# Создайте вспомогательную систему координат между гранями
|
||||||
|
coordinate_system = App.ActiveDocument.addObject("Part::CoordinateSystem", "CoordinateSystem")
|
||||||
|
coordinate_system.Placement.Base = center1 + 0.5 * distance * normal1
|
||||||
|
coordinate_system.Placement.Rotation = normal1.getRotationTo(App.Vector(0, 0, 1))
|
||||||
|
|
||||||
|
# Выведите информацию о расстоянии
|
||||||
|
App.Console.PrintMessage(f"Расстояние межу гранью 1 и гранью 2: {distance} мм\n")
|
||||||
|
|
||||||
|
# Обновите графический интерфейс FreeCAD
|
||||||
|
App.ActiveDocument.recompute()
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выбранные грани не являются параллельными\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create_grip_positions()
|
||||||
|
|
||||||
|
# Добавление обзервера для касаний
|
||||||
|
v=Gui.activeDocument().activeView()
|
||||||
|
|
||||||
|
#This class logs any mouse button events. As the registered callback function fires twice for 'down' and
|
||||||
|
#'up' events we need a boolean flag to handle this.
|
||||||
|
class ViewObserver:
|
||||||
|
def __init__(self, view):
|
||||||
|
self.view = view
|
||||||
|
|
||||||
|
def logPosition(self, info):
|
||||||
|
down = (info["State"] == "DOWN")
|
||||||
|
pos = info["Position"]
|
||||||
|
if (down):
|
||||||
|
FreeCAD.Console.PrintMessage("Clicked on position: ("+str(pos[0])+", "+str(pos[1])+")\n")
|
||||||
|
pnt = self.view.getPoint(pos)
|
||||||
|
FreeCAD.Console.PrintMessage("World coordinates: " + str(pnt) + "\n")
|
||||||
|
info = self.view.getObjectInfo(pos)
|
||||||
|
FreeCAD.Console.PrintMessage("Object info: " + str(info) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
o = ViewObserver(v)
|
||||||
|
c = v.addEventCallback("SoMouseButtonEvent",o.logPosition)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### getObjectInfo работает
|
||||||
|
import FreeCAD as App
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
def getFaceInfo(face):
|
||||||
|
if face:
|
||||||
|
App.Console.PrintMessage(f"Информация о грани: {face}\n")
|
||||||
|
|
||||||
|
# Получите позицию (Base) и ориентацию (Rotation) грани в глобальных координатах
|
||||||
|
placement = face.Placement
|
||||||
|
position = App.Vector(placement.Base)
|
||||||
|
orientation = App.Rotation(placement.Rotation)
|
||||||
|
|
||||||
|
App.Console.PrintMessage(f"Позиция грани: {position}\n")
|
||||||
|
App.Console.PrintMessage(f"Ориентация грани: {orientation}\n")
|
||||||
|
|
||||||
|
def getObjectInfo():
|
||||||
|
selection = Gui.Selection.getSelectionEx()
|
||||||
|
if selection:
|
||||||
|
selected_object = selection[0].Object
|
||||||
|
if selected_object:
|
||||||
|
subelement_name = selection[0].SubElementNames[0]
|
||||||
|
if "Face" in subelement_name:
|
||||||
|
face = selected_object.Shape.Faces[int(subelement_name.split("Face")[1])]
|
||||||
|
getFaceInfo(face)
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выберите грань, а не тело или другой элемент\n")
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Объект не найден\n")
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Не выбраны объекты\n")
|
||||||
|
|
||||||
|
getObjectInfo()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import FreeCAD as App
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
import Part
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Функция для получения списка всех объектов с заданным свойством
|
||||||
|
def get_objects_with_property(property_name, property_value):
|
||||||
|
result = []
|
||||||
|
for obj in FreeCAD.ActiveDocument.Objects:
|
||||||
|
if hasattr(obj, "PropertiesList") and property_name in obj.PropertiesList:
|
||||||
|
if obj.getPropertyByName(property_name) == property_value:
|
||||||
|
result.append(obj)
|
||||||
|
return result
|
||||||
|
|
||||||
|
# Получение списка всех объектов с названием тела в свойстве
|
||||||
|
bodies = get_objects_with_property("BodyName", "Body")
|
||||||
|
|
||||||
|
# Получение списка всех объектов
|
||||||
|
all_objects = FreeCAD.ActiveDocument.Objects
|
||||||
|
|
||||||
|
# Поиск и вывод тел, у которых нет связанных вспомогательных объектов
|
||||||
|
for body in bodies:
|
||||||
|
linked_objects = []
|
||||||
|
for obj in all_objects:
|
||||||
|
if obj.hasLinkOf(body):
|
||||||
|
linked_objects.append(obj.Name)
|
||||||
|
if not linked_objects:
|
||||||
|
print(f"Тело без связанных объектов: {body.Name}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def create_coordinate_system(surface1, surface2):
|
||||||
|
if surface1 is None or surface2 is None:
|
||||||
|
App.Console.PrintError("Не удалось найти одну из поверхностей\n")
|
||||||
|
return
|
||||||
|
|
||||||
|
# Проверка, являются ли поверхности плоскими
|
||||||
|
if surface1.Shape.Faces[0].Surface.TypeId == "Part::Plane" and surface2.Shape.Faces[0].Surface.TypeId == "Part::Plane":
|
||||||
|
# Проверка, являются ли поверхности параллельными
|
||||||
|
normal1 = surface1.Shape.normalAt(0, 0)
|
||||||
|
normal2 = surface2.Shape.normalAt(0, 0)
|
||||||
|
|
||||||
|
if normal1.isParallel(normal2):
|
||||||
|
# центры поверхностей
|
||||||
|
center1 = surface1.Shape.BoundBox.Center
|
||||||
|
center2 = surface2.Shape.BoundBox.Center
|
||||||
|
|
||||||
|
# Вычисление расстояние между центрами поверхностей
|
||||||
|
distance = center2 - center1
|
||||||
|
distance = distance.Length
|
||||||
|
|
||||||
|
# Создание вспомогательную систему координат между поверхностями
|
||||||
|
coordinate_system = App.ActiveDocument.addObject("Part::CoordinateSystem", "CoordinateSystem")
|
||||||
|
coordinate_system.Placement.Base = center1 + 0.5 * distance * normal1
|
||||||
|
coordinate_system.Placement.Rotation = normal1.getRotationTo(App.Vector(0, 0, 1))
|
||||||
|
|
||||||
|
# Выведите информацию о расстоянии
|
||||||
|
App.Console.PrintMessage(f"Расстояние между поверхностью 1 и поверхностью 2: {distance} мм\n")
|
||||||
|
|
||||||
|
# Обновите графический интерфейс FreeCAD
|
||||||
|
App.ActiveDocument.recompute()
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выбранные поверхности не являются параллельными\n")
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выбранные поверхности не являются плоскими\n")
|
||||||
|
|
||||||
|
# Создайте пользовательский интерфейс кнопки для вызова функции
|
||||||
|
class CoordinateSystemTool:
|
||||||
|
def Activated(self):
|
||||||
|
selection = Gui.Selection.getSelectionEx()
|
||||||
|
if len(selection) == 2:
|
||||||
|
create_coordinate_system(selection[0].Object, selection[1].Object)
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выберите две параллельные плоскости\n")
|
||||||
|
|
||||||
|
def GetResources(self):
|
||||||
|
return {
|
||||||
|
'Pixmap': 'path/to/your/icon.png', # Замените на путь к значку кнопки
|
||||||
|
'MenuText': 'Создать вспомогательную систему координат',
|
||||||
|
'ToolTip': 'Создать вспомогательную систему координат между двумя плоскостями'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Зарегистрируйте пользовательский инструмент
|
||||||
|
Gui.addCommand('My_Coordinate_System_Tool', CoordinateSystemTool())
|
||||||
|
|
||||||
|
|
||||||
|
#### эта штука работает vvv
|
||||||
|
|
||||||
|
# Функция для создания вспомогательного объекта и установки свойства "AttachmentType"
|
||||||
|
def create_helper_object_with_attribute(body, attribute_value):
|
||||||
|
helper_object = FreeCAD.ActiveDocument.addObject("App::FeaturePython", "HelperObject")
|
||||||
|
helper_object.addProperty("App::PropertyString", "AttachmentType").AttachmentType = attribute_value
|
||||||
|
helper_object.addProperty("App::PropertyString", "AttachedObject")
|
||||||
|
helper_object.AttachedObject = body.Label
|
||||||
|
|
||||||
|
|
||||||
|
# Пример использования:
|
||||||
|
# Замените "MyBody" на имя тела, к которому вы хотите привязать вспомогательный объект
|
||||||
|
body_to_attach = FreeCAD.ActiveDocument.getObjectsByLabel("gear_frame_221213")[0]
|
||||||
|
if body_to_attach:
|
||||||
|
create_helper_object_with_attribute(body_to_attach, "Body")
|
||||||
|
else:
|
||||||
|
print("Тело не найдено в активном документе.")
|
||||||
|
|
||||||
|
|
51
freecad_workbench/ImportExportEntities.py
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import FreeCAD
|
||||||
|
import Tools
|
||||||
|
|
||||||
|
def export_coordinate_systems():
|
||||||
|
# Получение активного документа FreeCAD
|
||||||
|
doc = FreeCAD.ActiveDocument
|
||||||
|
if not doc:
|
||||||
|
raise ValueError("Нет активного документа FreeCAD.")
|
||||||
|
|
||||||
|
# Получение имени активного документа
|
||||||
|
doc_name = doc.Name
|
||||||
|
|
||||||
|
|
||||||
|
# Получение пути к папке и имя файла активного документа
|
||||||
|
folder_path, file_name = os.path.split(doc.FileName)
|
||||||
|
|
||||||
|
# Создание папки для экспорта, если она не существует
|
||||||
|
output_folder = os.path.join(folder_path, 'entities')
|
||||||
|
if not os.path.exists(output_folder):
|
||||||
|
os.makedirs(output_folder)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Создание копии активного документа
|
||||||
|
# надо сохраняться, а не копироваться
|
||||||
|
|
||||||
|
doc.save()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Получение списка объектов документа
|
||||||
|
objects = doc.Objects
|
||||||
|
|
||||||
|
# Обход объектов для сохранения локальных систем координат
|
||||||
|
for obj in objects:
|
||||||
|
if obj.TypeId == 'PartDesign::CoordinateSystem':
|
||||||
|
|
||||||
|
partprops = Tools.getLocalPartProps(obj)
|
||||||
|
|
||||||
|
|
||||||
|
output_file_path = os.path.join(output_folder, f"{obj.Label}.json")
|
||||||
|
with open(output_file_path, "w", encoding="utf8") as propfile:
|
||||||
|
json.dump(partprops, propfile, indent=1, separators=(',', ': '))
|
||||||
|
|
||||||
|
|
||||||
|
print("Экспорт обьектов завершен.")
|
||||||
|
|
||||||
|
# export_coordinate_systems()
|
||||||
|
|
2
freecad_workbench/Init.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""FreeCAD init script"""
|
82
freecad_workbench/InitGui.py
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2023 by brothermechanic. All Rights Reserved.
|
||||||
|
# Based on ARBench by github/mahaarbo
|
||||||
|
# This library is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation, either
|
||||||
|
# version 3 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
__title__='Frames Workbench'
|
||||||
|
__author__ = 'brothermechanic'
|
||||||
|
__copyright__ = 'Copyright (c) 2023 brothermechanic'
|
||||||
|
__license__ = 'GPL-2.1'
|
||||||
|
__version__ = "0.1"
|
||||||
|
__email__ = 'brothermechanic@gmail.com'
|
||||||
|
__url__ = ["https://robossembler.org"]
|
||||||
|
__status__ = 'development'
|
||||||
|
|
||||||
|
|
||||||
|
class Frames(Workbench):
|
||||||
|
MenuText = "Frames"
|
||||||
|
ToolTip = "Frames Workbench"
|
||||||
|
Icon = """"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
import os
|
||||||
|
self.Icon = os.path.join(FreeCAD.getUserAppDataDir(), "Mod",
|
||||||
|
__class__.__name__, "UI", "icons", "frame.svg")
|
||||||
|
|
||||||
|
def Initialize(self):
|
||||||
|
"""This function is executed when FreeCAD starts"""
|
||||||
|
import Frames
|
||||||
|
self.framecommands = [
|
||||||
|
"BoMGeneration",
|
||||||
|
"FrameCommand",
|
||||||
|
|
||||||
|
"SelectedPartFrameCommand",
|
||||||
|
"AllPartFramesCommand",
|
||||||
|
"FeatureFrameCommand"
|
||||||
|
|
||||||
|
]
|
||||||
|
self.toolcommands = [
|
||||||
|
"ExportPlacementAndPropertiesCommand",
|
||||||
|
"Export_Entities",
|
||||||
|
"ExportGazeboModels",
|
||||||
|
"InsertGraspPose",
|
||||||
|
"ASM4StructureParsing",
|
||||||
|
"PDDL_CreateTypes",
|
||||||
|
"PDDL_CreateParameters",
|
||||||
|
"PDDL_CreateAction",
|
||||||
|
"PDDL_CreatePredicate",
|
||||||
|
"PDDL_CreateDurativeAction",
|
||||||
|
|
||||||
|
"Publish_Project"
|
||||||
|
]
|
||||||
|
self.appendToolbar(f"{__class__.__name__} Frames", self.framecommands)
|
||||||
|
self.appendToolbar(f"{__class__.__name__} Tools", self.toolcommands)
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
"""This function is executed when the workbench is activated."""
|
||||||
|
#
|
||||||
|
return
|
||||||
|
|
||||||
|
def Deactivated(self):
|
||||||
|
"""This function is executed when the workbench is deactivated."""
|
||||||
|
#
|
||||||
|
return
|
||||||
|
|
||||||
|
def ContextMenu(self, recipient):
|
||||||
|
"""This is execcuted whenever the user right-clicks on screen."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def GetClassName(self):
|
||||||
|
# This function is mandatory if this is a full python workbench
|
||||||
|
return "Gui::PythonWorkbench"
|
||||||
|
|
||||||
|
Gui.addWorkbench(Frames())
|
504
freecad_workbench/LICENSE
Normal file
|
@ -0,0 +1,504 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
|
USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random
|
||||||
|
Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
9
freecad_workbench/README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
## Модули проекта Robossembler для FreeCAD
|
||||||
|
|
||||||
|
Верстак протестирован в FreeCAD версии 21.2
|
||||||
|
|
||||||
|
### Инструкция по установке
|
||||||
|
1. Установить FreeCAD (https://www.freecadweb.org/wiki/Installing)
|
||||||
|
2. Клонировать папку ```freecad_workbench``` в директорию установки верстаков согласно [инструкции по установке верстаков](https://wiki.freecad.org/How_to_install_additional_workbenches)
|
||||||
|
3. Для пользователей Ubuntu - скопировать папку ```freecad_workbench``` в директорию ```~/.local/share/FreeCAD/Mod```
|
||||||
|
|
685
freecad_workbench/Tools.py
Normal file
|
@ -0,0 +1,685 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2023 by brothermechanic. All Rights Reserved.
|
||||||
|
# Based on ARBench by github/mahaarbo
|
||||||
|
# This library is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation, either
|
||||||
|
# version 3 of the License, or (at your option) any later version.
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
import FreeCAD
|
||||||
|
import Part
|
||||||
|
import json # For exporting part infos
|
||||||
|
import os # for safer path handling
|
||||||
|
import GazeboExport
|
||||||
|
import GraspPose
|
||||||
|
from scenarios.robossembler_freecad_export_scenario import RobossemblerFreeCadExportScenario
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
import FreeCADGui
|
||||||
|
from PySide import QtGui
|
||||||
|
import time
|
||||||
|
__title__ = 'Tools'
|
||||||
|
__author__ = 'brothermechanic'
|
||||||
|
__workbenchname__ = 'Frames'
|
||||||
|
__version__ = '0.1'
|
||||||
|
__url__ = ["https://robossembler.org"]
|
||||||
|
__doc__ = """
|
||||||
|
Useful tools for the Annotations for Robotics workbench."""
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Module functions
|
||||||
|
###################################################################
|
||||||
|
def vector2list(vec, scale=1e-3):
|
||||||
|
"""Gives the vector as a list, set scale for scaling factor.
|
||||||
|
default scale = 1e-3 for units in m."""
|
||||||
|
return [vec.x*scale, vec.y*scale, vec.z*scale]
|
||||||
|
|
||||||
|
|
||||||
|
def matrix2list(mat, scale=1e-3):
|
||||||
|
"""Gives the transformation matrix as a list, set scale 1 to get in mm."""
|
||||||
|
return [[mat.A11, mat.A12, mat.A13, mat.A14*scale],
|
||||||
|
[mat.A21, mat.A22, mat.A23, mat.A24*scale],
|
||||||
|
[mat.A31, mat.A32, mat.A33, mat.A34*scale],
|
||||||
|
[mat.A41, mat.A42, mat.A43, mat.A44]]
|
||||||
|
|
||||||
|
def placement2pose(pl, scale=1e-3):
|
||||||
|
"""Gives the placement as an dictionary for geometry_msgs/Pose type."""
|
||||||
|
return {"position": {
|
||||||
|
"x": pl.Base.x*scale,
|
||||||
|
"y": pl.Base.y*scale,
|
||||||
|
"z": pl.Base.z*scale
|
||||||
|
},
|
||||||
|
"orientation": {
|
||||||
|
"x": pl.Rotation.Q[0],
|
||||||
|
"y": pl.Rotation.Q[1],
|
||||||
|
"z": pl.Rotation.Q[2],
|
||||||
|
"w": pl.Rotation.Q[3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def placement2axisvec(pl, scale=1e-3):
|
||||||
|
"""Gives the placement as an dictionary of origin and rotation.
|
||||||
|
origin: [x,y,z], rotation:{axis:[ax,ay,az], angle:ang}"""
|
||||||
|
return {"origin": vector2list(pl.Base, scale),
|
||||||
|
"rotation": {"axis": vector2list(pl.Rotation.Axis, scale=1),
|
||||||
|
"angle": pl.Rotation.Angle}}
|
||||||
|
|
||||||
|
|
||||||
|
def boundingBox2list(bb, scale=1e-3):
|
||||||
|
"""Gives the bounding box as a list in m instead of mm"""
|
||||||
|
return [bb.XMin*scale, bb.XMax*scale,
|
||||||
|
bb.YMin*scale, bb.YMax*scale,
|
||||||
|
bb.ZMin*scale, bb.ZMax*scale]
|
||||||
|
|
||||||
|
|
||||||
|
def principalProperties2dict(pp, scale=1e-3):
|
||||||
|
npp = {}
|
||||||
|
for key, value in pp.items():
|
||||||
|
if type(value) is FreeCAD.Vector:
|
||||||
|
npp[key.lower()] = vector2list(value, scale=1e-3)
|
||||||
|
else:
|
||||||
|
npp[key.lower()] = value
|
||||||
|
return npp
|
||||||
|
|
||||||
|
|
||||||
|
def describeSubObject(subobj):
|
||||||
|
"""Returns PrimitiveType, ShapeType."""
|
||||||
|
if isinstance(subobj, Part.Vertex):
|
||||||
|
return "Vertex", "Vertex"
|
||||||
|
elif isinstance(subobj, Part.Edge):
|
||||||
|
if isinstance(subobj.Curve, Part.Arc):
|
||||||
|
return "Arc", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.ArcOfCircle):
|
||||||
|
return "ArcOfCircle", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.ArcOfEllipse):
|
||||||
|
return "ArcOfEllipse", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.ArcOfHyperbola):
|
||||||
|
return "ArcOfHyperbola", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.ArcOfParabola):
|
||||||
|
return "ArcOfParabola", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.BSplineCurve):
|
||||||
|
return "BSplineCurve", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.BezierCurve):
|
||||||
|
return "BezierCurve", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.Circle):
|
||||||
|
return "Circle", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.Ellipse):
|
||||||
|
return "Ellipse", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.Hyperbola):
|
||||||
|
return "Hyperbola", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.Line):
|
||||||
|
return "Line", "Edge"
|
||||||
|
elif isinstance(subobj.Curve, Part.Parabola):
|
||||||
|
return "Parabola", "Edge"
|
||||||
|
else:
|
||||||
|
FreeCAD.Console.PrintError("Unknown edge type")
|
||||||
|
elif isinstance(subobj, Part.Face):
|
||||||
|
if isinstance(subobj.Surface, Part.BSplineSurface):
|
||||||
|
return "BSplineSurface", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.BezierSurface):
|
||||||
|
return "BezierSurface", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.Cylinder):
|
||||||
|
return "Cylinder", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.Plane):
|
||||||
|
return "Plane", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.Sphere):
|
||||||
|
return "Sphere", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.Toroid):
|
||||||
|
return "Toroid", "Face"
|
||||||
|
elif isinstance(subobj.Surface, Part.Cone):
|
||||||
|
return "Cone", "Face"
|
||||||
|
else:
|
||||||
|
FreeCAD.Console.PrintError("Unknown surface type")
|
||||||
|
# Better strategy desirable for the following:
|
||||||
|
elif isinstance(subobj, Part.Wire):
|
||||||
|
return "Wire", "Wire"
|
||||||
|
elif isinstance(subobj, Part.Shell):
|
||||||
|
return "Shell", "Shell"
|
||||||
|
elif isinstance(subobj, Part.Solid):
|
||||||
|
return "Solid", "Solid"
|
||||||
|
elif isinstance(subobj, Part.Compsolid):
|
||||||
|
return "Compsolid", "Compsolid"
|
||||||
|
elif isinstance(subobj, Part.Compound):
|
||||||
|
return "Compound", "Compound"
|
||||||
|
else:
|
||||||
|
FreeCAD.Console.PrintError("Unable to identify subobject.")
|
||||||
|
|
||||||
|
|
||||||
|
def closeToZero(a, tol=1e-10):
|
||||||
|
return abs(a) < tol
|
||||||
|
|
||||||
|
|
||||||
|
def spawnClassCommand(classname, function, resources):
|
||||||
|
"""
|
||||||
|
Commands, or buttons, are tedious to write. So this function spawns
|
||||||
|
one if the function to be executed takes no arguments.
|
||||||
|
Example usage:
|
||||||
|
spawnClassCommand("testcommand", testfunc,
|
||||||
|
{"Pixmap":"", "MenuText":"menutext","ToolTip":"tooltiptext"})
|
||||||
|
then add "testcommand" to commandlist in InitGui.py
|
||||||
|
"""
|
||||||
|
def Activated(s):
|
||||||
|
function()
|
||||||
|
|
||||||
|
def GetResources(s):
|
||||||
|
return resources
|
||||||
|
CommandClass = type("classname", (object,), {"Activated": Activated,
|
||||||
|
"GetResources": GetResources})
|
||||||
|
FreeCADGui.addCommand(classname, CommandClass())
|
||||||
|
|
||||||
|
|
||||||
|
def getLocalPartProps(obj):
|
||||||
|
old_placement = obj.Placement
|
||||||
|
obj_parent_label = ''
|
||||||
|
if obj.getParentGeoFeatureGroup():
|
||||||
|
obj_parent_label = obj.getParentGeoFeatureGroup().Label
|
||||||
|
# obj.Placement = FreeCAD.Placement()
|
||||||
|
""" Part properties """
|
||||||
|
partprops = {
|
||||||
|
"label": obj.Label,
|
||||||
|
"parent_label": obj_parent_label,
|
||||||
|
"placement": placement2pose(old_placement),
|
||||||
|
# "grip properties": { "grip open": obj.GripOpen, "grip depth": obj.GripDepth, "grip width": obj.GripWidth}
|
||||||
|
# "boundingbox": boundingBox2list(obj.Shape.BoundBox),
|
||||||
|
# "volume": obj.Shape.Volume*1e-9,
|
||||||
|
# "centerofmass": vector2list(obj.Shape.CenterOfMass),
|
||||||
|
# "principalproperties": principalProperties2dict(obj.Shape.PrincipalProperties)
|
||||||
|
}
|
||||||
|
|
||||||
|
if obj.Type == 'grip':
|
||||||
|
partprops["grip properties"] = { "grip open": obj.GripOpen, "grip depth": obj.GripDepth, "grip width": obj.GripWidth}
|
||||||
|
|
||||||
|
elif obj.Type == 'area':
|
||||||
|
partprops["area dim"] = { } #свойства, описывающие размер
|
||||||
|
|
||||||
|
elif obj.Type == 'vol':
|
||||||
|
partprops["vol dim"] = { } #свойства, описывающие размер области
|
||||||
|
|
||||||
|
|
||||||
|
# obj.Placement = old_placement
|
||||||
|
return partprops
|
||||||
|
|
||||||
|
# Longest match for mesh name
|
||||||
|
|
||||||
|
def longest_match(seq1, seq2):
|
||||||
|
from difflib import SequenceMatcher as SM
|
||||||
|
|
||||||
|
sm = SM(lambda c: c in set(' ,'), seq1, seq2)
|
||||||
|
m = sm.find_longest_match(0, len(seq1), 0, len(seq2))
|
||||||
|
return seq1[m.a:m.b]
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Export functions
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
def exportGazeboModels():
|
||||||
|
"""Export packages for Gazebo Simulator."""
|
||||||
|
doc = FreeCAD.activeDocument()
|
||||||
|
selected_objects = FreeCADGui.Selection.getSelection()
|
||||||
|
FreeCADGui.Selection.clearSelection()
|
||||||
|
if len(selected_objects) == 0:
|
||||||
|
FreeCAD.Console.PrintError("No part selected.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
export_dir = QtGui.QFileDialog.getExistingDirectory(None, "Choose Export Directory",
|
||||||
|
os.path.split(doc.FileName)[0])
|
||||||
|
|
||||||
|
# Gather the unique shapes, and clone parts as
|
||||||
|
# dict = { partX : { obj1: <obj>, graspposes: {}, placements : {}, mesh: <mesh_uri> } }
|
||||||
|
unique_objs = []
|
||||||
|
parts = {}
|
||||||
|
num_objs = 0
|
||||||
|
for obj in doc.Objects:
|
||||||
|
new_shape = True
|
||||||
|
model_dir = os.path.join(export_dir, obj.Label)
|
||||||
|
mesh_dir = os.path.join(model_dir, 'meshes')
|
||||||
|
mesh_file = os.path.join(mesh_dir, obj.Label + '.dae')
|
||||||
|
mesh_uri = os.path.normpath(os.path.relpath(mesh_file, export_dir))
|
||||||
|
# Select only Parts, not Grasp Poses or Gripper
|
||||||
|
if obj.TypeId == "Part::Feature" and not "PartToHandle" in obj.PropertiesList and not "Container" in obj.PropertiesList:
|
||||||
|
num_objs += 1
|
||||||
|
for uobj in unique_objs:
|
||||||
|
if uobj.Shape.isPartner(obj.Shape):
|
||||||
|
new_shape = False
|
||||||
|
# parts[obj.Label]["mesh"] += parts[uobj.Label]["mesh"]
|
||||||
|
parts[obj.Label] = {"obj": obj,
|
||||||
|
"graspposes": {},
|
||||||
|
"mesh": parts[uobj.Label]["mesh"]
|
||||||
|
}
|
||||||
|
# if Shape is unique export mesh
|
||||||
|
if new_shape:
|
||||||
|
unique_objs.append(obj)
|
||||||
|
parts[obj.Label] = {"obj": obj, "graspposes": {}, "placements": {}, "mesh": mesh_file}
|
||||||
|
|
||||||
|
for obj in doc.Objects:
|
||||||
|
# Add grasp poses to parts dictionary
|
||||||
|
if "PartToHandle" in obj.PropertiesList:
|
||||||
|
graspposes = { obj.Container.Label: {
|
||||||
|
"placement": placement2pose(obj.Container.Placement),
|
||||||
|
"distance": obj.GripSize*1e-3
|
||||||
|
# "OperationType" : obj.OperationType
|
||||||
|
# "Operation Priority" : obj.OperationPriority
|
||||||
|
# obj.Operation Parameter 1 : obj.OperationParameter1
|
||||||
|
# obj.Operation Parameter 2 : obj.OperationParameter2
|
||||||
|
# obj.Operation Parameter 3 : obj.OperationParameter3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parts[obj.PartToHandle.Label].update({"graspposes" : graspposes})
|
||||||
|
|
||||||
|
# Add part placement position on Plane surface
|
||||||
|
import Frames
|
||||||
|
if hasattr(obj, 'Proxy') and "ShapeType" in obj.PropertiesList:
|
||||||
|
if isinstance(obj.Proxy, Frames.FeatureFrame) and obj.ShapeType == 'Face':
|
||||||
|
parts[obj.Part.Label].update({ "placements": { obj.Label: placement2pose(obj.Placement) } })
|
||||||
|
|
||||||
|
# Create SDF package from Parts or other packages
|
||||||
|
def create_package(name, objects, export_dir):
|
||||||
|
model_dir = os.path.join(export_dir, name)
|
||||||
|
mesh_dir = os.path.join(model_dir, 'meshes')
|
||||||
|
os.makedirs(mesh_dir, exist_ok=True)
|
||||||
|
|
||||||
|
GazeboExport.export_collada(objects, parts[name]["mesh"])
|
||||||
|
GazeboExport.export_sdf({ name: parts[name] }, export_dir, obj.Label)
|
||||||
|
|
||||||
|
with open(os.path.join(model_dir, 'model.config'), 'w') as config_file:
|
||||||
|
config_file.write(GazeboExport.config(name,
|
||||||
|
'model.sdf', 'Author', 'Email', 'Comment', 'Version'))
|
||||||
|
'''
|
||||||
|
with open(os.path.join(model_dir, 'frames.json'), 'w') as frames_file:
|
||||||
|
json.dump({"label": name,
|
||||||
|
"placement": placement2pose(parts[name]["obj"].Placement),
|
||||||
|
"features":
|
||||||
|
{ "graspposes" : parts[name]["graspposes"]
|
||||||
|
, "placements" : parts[name]["placements"]}},
|
||||||
|
frames_file, indent=1, separators=(',', ': '))
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Export assets for parts
|
||||||
|
for obj in selected_objects:
|
||||||
|
create_package(obj.Label, [obj], export_dir)
|
||||||
|
exportPartInfo(obj, os.path.join(export_dir, obj.Label, 'frames.json') )
|
||||||
|
appendFeatureFrames(obj, os.path.join(export_dir, obj.Label, 'frames.json'))
|
||||||
|
|
||||||
|
# Export asset for subassembly
|
||||||
|
# subasm_name = "_".join(list(map(lambda x: x.Label[:8], selected_objects)))
|
||||||
|
# create_package(subasm_name, selected_objects, export_dir)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def exportPartInfo(obj, ofile):
|
||||||
|
"""
|
||||||
|
Exports part info to a new json file.
|
||||||
|
The part info includes:
|
||||||
|
Placement relative to world frame, bounding box, volume, center of mass,
|
||||||
|
principal properties.
|
||||||
|
For more information on principal properties, see TopoShape in OCCT
|
||||||
|
documentation.
|
||||||
|
"""
|
||||||
|
|
||||||
|
partprops = getLocalPartProps(obj)
|
||||||
|
with open(ofile, "w", encoding="utf8") as propfile:
|
||||||
|
json.dump(partprops, propfile, indent=1, separators=(',', ': '))
|
||||||
|
return ofile
|
||||||
|
|
||||||
|
|
||||||
|
def appendPartInfo(obj, ofile):
|
||||||
|
"""Rewrites/appends part info to an existing json file.
|
||||||
|
The part info includes:
|
||||||
|
Placement relative to world frame, bounding box, volume, center of mass,
|
||||||
|
principal properties.
|
||||||
|
For more information on principal properties, see TopoShape in OCCT
|
||||||
|
documentation.
|
||||||
|
"""
|
||||||
|
with open(ofile, "r", encoding="utf8") as propfile:
|
||||||
|
partprops = json.load(propfile)
|
||||||
|
new_props = getLocalPartProps(obj)
|
||||||
|
partprops.update(new_props)
|
||||||
|
with open(ofile, "w", encoding="utf8") as propfile:
|
||||||
|
json.dump(partprops, propfile, indent=1, separators=(',', ': '))
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def exportFeatureFrames(obj, ofile):
|
||||||
|
"""Exports feature frames attached to a part."""
|
||||||
|
# Get the feature frames
|
||||||
|
import Frames
|
||||||
|
ff_check = lambda x: isinstance(x.Proxy, Frames.FeatureFrame) if hasattr(x, 'Proxy') else False
|
||||||
|
ff_list = filter(ff_check, obj.InList)
|
||||||
|
ff_named = { ff.Label: ff.Proxy.getDict() for ff in ff_list }
|
||||||
|
feature_dict = { "features": ff_named }
|
||||||
|
|
||||||
|
with open(ofile, "w", encoding="utf8") as propfile:
|
||||||
|
json.dump(feature_dict, propfile, indent=1, separators=(',', ': '))
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def appendFeatureFrames(obj, ofile):
|
||||||
|
"""Rewrites/appends featureframes attached to a part to an existing json
|
||||||
|
file."""
|
||||||
|
# Get the feature frames
|
||||||
|
import Frames
|
||||||
|
with open(ofile, "r", encoding="utf8") as propfile:
|
||||||
|
partprops = json.load(propfile)
|
||||||
|
ff_check = lambda x: isinstance(x.Proxy, Frames.FeatureFrame) if hasattr(x, 'Proxy') else False
|
||||||
|
# part's children list
|
||||||
|
ff_list = filter(ff_check, obj.InList)
|
||||||
|
ff_named = { ff.Label: {"label": ff.Label, "placement": placement2pose(ff.FeaturePlacement)} for ff in ff_list }
|
||||||
|
feature_dict = { "features": ff_named }
|
||||||
|
if "features" not in partprops.keys():
|
||||||
|
partprops.update(feature_dict)
|
||||||
|
else:
|
||||||
|
partprops["features"].update(feature_dict["features"])
|
||||||
|
with open(ofile, "w", encoding="utf8") as propfile:
|
||||||
|
json.dump(partprops, propfile, indent=1, separators=(',', ': '))
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def exportPartInfoDialogue():
|
||||||
|
"""Spawns a dialogue window for part info exporting"""
|
||||||
|
# Select only true parts
|
||||||
|
s = FreeCADGui.Selection.getSelection()
|
||||||
|
FreeCADGui.Selection.clearSelection()
|
||||||
|
if len(s) == 0:
|
||||||
|
FreeCAD.Console.PrintError("No part selected.")
|
||||||
|
return False
|
||||||
|
unique_selected = []
|
||||||
|
for item in s:
|
||||||
|
if item not in unique_selected and isinstance(item, Part.Feature):
|
||||||
|
# Ensuring that we are parts
|
||||||
|
unique_selected.append(item)
|
||||||
|
FreeCADGui.Selection.addSelection(item)
|
||||||
|
# Fix wording
|
||||||
|
textprompt = "Save the properties of the part"
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
textprompt = textprompt + "s"
|
||||||
|
opts = QtGui.QFileDialog.DontConfirmOverwrite
|
||||||
|
# Create file dialog
|
||||||
|
ofile, filt = QtGui.QFileDialog.getSaveFileName(None, textprompt,
|
||||||
|
os.getenv("HOME"),
|
||||||
|
"*.json", options=opts)
|
||||||
|
if ofile == "":
|
||||||
|
# User cancelled
|
||||||
|
return False
|
||||||
|
if os.path.exists(ofile):
|
||||||
|
msgbox = QtGui.QMessageBox()
|
||||||
|
msgbox.setText("File already exists. We can overwrite the file, or add the information/rewrite only relevant sections.")
|
||||||
|
append_button = msgbox.addButton("Append", QtGui.QMessageBox.YesRole)
|
||||||
|
overwrite_button = msgbox.addButton("Overwrite", QtGui.QMessageBox.NoRole)
|
||||||
|
msgbox.exec_()
|
||||||
|
if msgbox.clickedButton() == append_button:
|
||||||
|
NEWFILE = False
|
||||||
|
elif msgbox.clickedButton() == overwrite_button:
|
||||||
|
NEWFILE = True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
NEWFILE = True
|
||||||
|
if NEWFILE:
|
||||||
|
exportPartInfo(unique_selected[0], ofile)
|
||||||
|
else:
|
||||||
|
appendPartInfo(unique_selected[0], ofile)
|
||||||
|
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
FreeCAD.Console.PrintWarning("Multi-part export not yet supported\n")
|
||||||
|
FreeCAD.Console.PrintMessage("Properties exported to "+str(ofile)+"\n")
|
||||||
|
|
||||||
|
|
||||||
|
def exportFeatureFramesDialogue():
|
||||||
|
"""Spawns a dialogue window for a part's feature frames to be exported."""
|
||||||
|
# Select only true parts
|
||||||
|
import Frames
|
||||||
|
s = FreeCADGui.Selection.getSelection()
|
||||||
|
FreeCADGui.Selection.clearSelection()
|
||||||
|
if len(s) == 0:
|
||||||
|
FreeCAD.Console.PrintError("No part selected.")
|
||||||
|
return False
|
||||||
|
unique_selected = []
|
||||||
|
for item in s:
|
||||||
|
if item not in unique_selected and isinstance(item.Proxy, Frames.FeatureFrame):
|
||||||
|
# Ensuring that we are parts
|
||||||
|
unique_selected.append(item)
|
||||||
|
FreeCADGui.Selection.addSelection(item)
|
||||||
|
# Fix wording
|
||||||
|
textprompt = "Save the feature frames attached to the part"
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
textprompt = textprompt + "s"
|
||||||
|
opts = QtGui.QFileDialog.DontConfirmOverwrite
|
||||||
|
# Create file dialog
|
||||||
|
ofile, filt = QtGui.QFileDialog.getSaveFileName(None, textprompt, os.getenv("HOME"),
|
||||||
|
"*.json", options=opts)
|
||||||
|
if ofile == "":
|
||||||
|
# User cancelled
|
||||||
|
return False
|
||||||
|
if os.path.exists(ofile):
|
||||||
|
msgbox = QtGui.QMessageBox()
|
||||||
|
msgbox.setText("File already exists. We can overwrite the file, or add the information/rewrite only relevant sections.")
|
||||||
|
append_button = msgbox.addButton("Append", QtGui.QMessageBox.YesRole)
|
||||||
|
overwrite_button = msgbox.addButton("Overwrite", QtGui.QMessageBox.NoRole)
|
||||||
|
msgbox.exec_()
|
||||||
|
if msgbox.clickedButton() == append_button:
|
||||||
|
NEWFILE = False
|
||||||
|
elif msgbox.clickedButton() == overwrite_button:
|
||||||
|
NEWFILE = True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
NEWFILE = True
|
||||||
|
if NEWFILE:
|
||||||
|
exportFeatureFrames(unique_selected[0], ofile)
|
||||||
|
else:
|
||||||
|
appendFeatureFrames(unique_selected[0], ofile)
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
FreeCAD.Console.PrintWarning("Multi-part export not yet supported\n")
|
||||||
|
FreeCAD.Console.PrintMessage("Feature frames of " + str(unique_selected[0].Label) + " exported to " + str(ofile) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
def exportPlacementAndProperties():
|
||||||
|
"""Spawns a dialogue window for exporting both."""
|
||||||
|
import Frames
|
||||||
|
s = FreeCADGui.Selection.getSelection()
|
||||||
|
FreeCADGui.Selection.clearSelection()
|
||||||
|
if len(s) == 0:
|
||||||
|
FreeCAD.Console.PrintError("No part selected")
|
||||||
|
return False
|
||||||
|
unique_selected = []
|
||||||
|
for item in s:
|
||||||
|
if item not in unique_selected:
|
||||||
|
# Ensuring that we are parts
|
||||||
|
unique_selected.append(item)
|
||||||
|
FreeCADGui.Selection.addSelection(item)
|
||||||
|
FreeCAD.Console.PrintMessage("Added for export "+str(item.FullName)+"\n")
|
||||||
|
# Fix wording
|
||||||
|
textprompt = "Save the part info and feature frames attached to the part"
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
textprompt = textprompt + "s"
|
||||||
|
opts = QtGui.QFileDialog.DontConfirmOverwrite
|
||||||
|
# Create file dialog
|
||||||
|
ofile, filt = QtGui.QFileDialog.getSaveFileName(None, textprompt,
|
||||||
|
os.getenv("HOME"),
|
||||||
|
"*.json", options=opts)
|
||||||
|
if ofile == "":
|
||||||
|
# User cancelled
|
||||||
|
return False
|
||||||
|
|
||||||
|
# File path stuff
|
||||||
|
odir, of = os.path.split(ofile)
|
||||||
|
if not os.path.exists(odir):
|
||||||
|
os.makedirs(odir)
|
||||||
|
if not of.lower().endswith(".json"):
|
||||||
|
ofile = ofile + ".json"
|
||||||
|
|
||||||
|
if os.path.exists(ofile):
|
||||||
|
msgbox = QtGui.QMessageBox()
|
||||||
|
msgbox.setText("File already exists. We can overwrite the file, or add the information/rewrite only relevant sections.")
|
||||||
|
append_button = msgbox.addButton("Append", QtGui.QMessageBox.YesRole)
|
||||||
|
overwrite_button = msgbox.addButton("Overwrite", QtGui.QMessageBox.NoRole)
|
||||||
|
msgbox.exec_()
|
||||||
|
if msgbox.clickedButton() == append_button:
|
||||||
|
NEWFILE = False
|
||||||
|
elif msgbox.clickedButton() == overwrite_button:
|
||||||
|
NEWFILE = True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
NEWFILE = True
|
||||||
|
if NEWFILE:
|
||||||
|
exportPartInfo(unique_selected[0], ofile)
|
||||||
|
appendFeatureFrames(unique_selected[0], ofile)
|
||||||
|
else:
|
||||||
|
appendPartInfo(unique_selected[0], ofile)
|
||||||
|
appendFeatureFrames(unique_selected[0], ofile)
|
||||||
|
if len(unique_selected) > 1:
|
||||||
|
FreeCAD.Console.PrintWarning("Multi-part export not yet supported.\n")
|
||||||
|
FreeCAD.Console.PrintMessage("Feature frames of "
|
||||||
|
+ str(unique_selected[0].Label)
|
||||||
|
+ " exported to " + str(ofile) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# GUI Commands
|
||||||
|
###################################################################
|
||||||
|
uidir = os.path.join(FreeCAD.getUserAppDataDir(),
|
||||||
|
"Mod", __workbenchname__, "UI")
|
||||||
|
icondir = os.path.join(uidir, "icons")
|
||||||
|
|
||||||
|
spawnClassCommand("ExportPlacementAndPropertiesCommand",
|
||||||
|
exportPlacementAndProperties,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "parttojson.svg")),
|
||||||
|
"MenuText": "Export placement and properties",
|
||||||
|
"ToolTip": "Export object placement and properties and feature frames"})
|
||||||
|
|
||||||
|
spawnClassCommand("ExportGazeboModels",
|
||||||
|
exportGazeboModels,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "gazeboexport.svg")),
|
||||||
|
"MenuText": "Export SDF-models to Gazebo",
|
||||||
|
"ToolTip": "Export SDF-models for all solid parts"})
|
||||||
|
|
||||||
|
spawnClassCommand("InsertGraspPose",
|
||||||
|
GraspPose.insert,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "addgrasppose.svg")),
|
||||||
|
"MenuText": "Insert Grasp Pose",
|
||||||
|
"ToolTip": "Insert Grasp Pose for Selected Part"})
|
||||||
|
|
||||||
|
spawnClassCommand("ASM4StructureParsing",
|
||||||
|
RobossemblerFreeCadExportScenario().call,
|
||||||
|
{"Pixmap": str(os.path.join(icondir, "assembly4.svg")),
|
||||||
|
"MenuText": "Make a ASM4 parsing",
|
||||||
|
"ToolTip": "Make a ASM4 1"})
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Information from primitive type
|
||||||
|
###################################################################
|
||||||
|
def getPrimitiveInfo(prim_type, subobj, scale=1e-3):
|
||||||
|
"""returns a dictionary of the primitive's specific information."""
|
||||||
|
d = {}
|
||||||
|
if prim_type == "ArcOfCircle":
|
||||||
|
d["radius"] = scale*subobj.Curve.Radius
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "ArcOfEllipse":
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["majorradius"] = scale*subobj.Curve.MajorRadius
|
||||||
|
d["minorradius"] = scale*subobj.Curve.MinorRadius
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "ArcOfHyperBola":
|
||||||
|
d["anglexu"] = subobj.Curve.AngleXU
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["majorradius"] = scale*subobj.Curve.MajorRadius
|
||||||
|
d["minorradius"] = scale*subobj.Curve.MinorRadius
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "ArcOfParabola":
|
||||||
|
d["anglexu"] = subobj.Curve.AngleXU
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["focal"] = scale*subobj.Curve.Focal
|
||||||
|
elif prim_type == "BSplineCurve":
|
||||||
|
FreeCAD.Console.PrintWarning("getPrimitiveInfo of BSpline incomplete.")
|
||||||
|
elif prim_type == "BezierCurve":
|
||||||
|
FreeCAD.Console.PrintWarning("getPrimitiveInfo of Bezier incomplete.")
|
||||||
|
elif prim_type == "Circle":
|
||||||
|
d["radius"] = scale*subobj.Curve.Radius
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "Ellipse":
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["majorradius"] = scale*subobj.Curve.MajorRadius
|
||||||
|
d["minorradius"] = scale*subobj.Curve.MinorRadius
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "Hyperbola":
|
||||||
|
d["anglexu"] = subobj.Curve.AngleXU
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["majorradius"] = scale*subobj.Curve.MajorRadius
|
||||||
|
d["minorradius"] = scale*subobj.Curve.MinorRadius
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "Parabola":
|
||||||
|
d["anglexu"] = subobj.Curve.AngleXU
|
||||||
|
d["axis"] = vector2list(subobj.Curve.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Curve.Center, scale)
|
||||||
|
d["focal"] = scale*subobj.Curve.Focal
|
||||||
|
elif prim_type == "Line":
|
||||||
|
if int(FreeCAD.Version()[1]) > 16:
|
||||||
|
sp = subobj.valueAt(subobj.FirstParameter)
|
||||||
|
ep = subobj.valueAt(subobj.LastParameter)
|
||||||
|
d["startpoint"] = vector2list(sp)
|
||||||
|
d["endpoint"] = vector2list
|
||||||
|
else:
|
||||||
|
if not hasattr(subobj.Curve, "Infinite"):
|
||||||
|
d["startpoint"] = vector2list(subobj.Curve.StartPoint)
|
||||||
|
d["endpoint"] = vector2list(subobj.Curve.EndPoint)
|
||||||
|
if hasattr(subobj.Curve, "Infinite"):
|
||||||
|
if subobj.Curve.Infinite:
|
||||||
|
d["infinite"] = subobj.Curve.Infinite
|
||||||
|
else:
|
||||||
|
d["startpoint"] = vector2list(subobj.Curve.StartPoint)
|
||||||
|
d["endpoint"] = vector2list(subobj.Curve.EndPoint)
|
||||||
|
elif prim_type == "BSplineSurface":
|
||||||
|
FreeCAD.Console.PrintWarning("getPrimitiveInfo of BSpline incomplete.")
|
||||||
|
elif prim_type == "BezierSurface":
|
||||||
|
FreeCAD.Console.PrintWarning("getPrimitiveInfo of Bezier incomplete.")
|
||||||
|
elif prim_type == "Cylinder":
|
||||||
|
d["axis"] = vector2list(subobj.Surface.Axis, scale=1)
|
||||||
|
d["radius"] = scale*subobj.Surface.Radius
|
||||||
|
d["center"] = vector2list(subobj.Surface.Center)
|
||||||
|
PR = list(subobj.ParameterRange)
|
||||||
|
PR[2] = PR[2]*scale
|
||||||
|
PR[3] = PR[3]*scale
|
||||||
|
d["parameterrange"] = PR
|
||||||
|
elif prim_type == "Plane":
|
||||||
|
d["axis"] = vector2list(subobj.Surface.Axis, scale=1)
|
||||||
|
d["position"] = vector2list(subobj.Surface.Position, scale)
|
||||||
|
d["parameterrange"] = [scale*i for i in subobj.ParameterRange]
|
||||||
|
elif prim_type == "Sphere":
|
||||||
|
d["axis"] = vector2list(subobj.Surface.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Surface.Center, scale)
|
||||||
|
d["radius"] = scale*subobj.Surface.Radius
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
elif prim_type == "Toroid":
|
||||||
|
d["axis"] = vector2list(subobj.Surface.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Surface.Center, scale)
|
||||||
|
d["majorradius"] = scale*subobj.Surface.MajorRadius
|
||||||
|
d["minorradius"] = scale*subobj.Surface.MinorRadius
|
||||||
|
d["parameterrange"] = subobj.Surface.ParameterRange
|
||||||
|
elif prim_type == "Cone":
|
||||||
|
d["axis"] = vector2list(subobj.Surface.Axis, scale=1)
|
||||||
|
d["center"] = vector2list(subobj.Surface.Center, scale)
|
||||||
|
d["radius"] = scale*subobj.Surface.Radius
|
||||||
|
d["semiangle"] = subobj.Surface.SemiAngle
|
||||||
|
d["parameterrange"] = subobj.ParameterRange
|
||||||
|
FreeCAD.Console.PrintWarning("getPrimitiveInfo of Cone may have wrong ParameterRange.")
|
||||||
|
return d
|
73
freecad_workbench/UI/FeatureFrameCreator.ui
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>FeatureFrameCreator</class>
|
||||||
|
<widget class="QDialog" name="FeatureFrameCreator">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>235</width>
|
||||||
|
<height>238</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>235</width>
|
||||||
|
<height>238</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>235</width>
|
||||||
|
<height>238</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Feature Frame</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QGraphicsView" name="Preview">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>29</y>
|
||||||
|
<width>170</width>
|
||||||
|
<height>151</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="ChoicesBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PickedTypeLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>35</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
520
freecad_workbench/UI/FramePlacer.ui
Normal file
|
@ -0,0 +1,520 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>dialog</class>
|
||||||
|
<widget class="QDialog" name="dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>299</width>
|
||||||
|
<height>292</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>299</width>
|
||||||
|
<height>292</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Part Frame Creator</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QDoubleSpinBox" name="XBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Offset in part frame x direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="YBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>offset in part frame z direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="ZBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>offset in part frame z direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="XLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>x</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>XBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="YLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>y</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>YBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ZLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>z</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>ZBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="RollLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>24</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>roll offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>roll</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>RollBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PitchLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>35</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>pitch offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>pitch</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>PitchBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="YawLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>29</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>yaw offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>yaw</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>YawBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="RollBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>roll offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="PitchBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>pitch offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="YawBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>yaw offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPlainTextEdit" name="FrameLabelField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>94</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>195</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Label of the frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Label of the new frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Label of the new frame, must be unique</string>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="FrameLabelLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>79</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Frame label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="OffsetLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>48</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Define an offset from the part frame if needed</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ScaleLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Axis scale</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="ScaleBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>230</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>60</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>2.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.010000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>0.110000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="OptionsLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>66</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Options</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>OptionsBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="OptionsBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>210</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>78</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="UBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>62</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="VBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>220</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>62</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ULabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>80</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>u</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>UBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="VLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>200</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>v</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>VBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="CoordsLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>256</y>
|
||||||
|
<width>51</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Coords:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
262
freecad_workbench/UI/InsertTaskCreator.ui
Normal file
|
@ -0,0 +1,262 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>323</width>
|
||||||
|
<height>325</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>316</width>
|
||||||
|
<height>325</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="TaskLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Task Label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="SelectButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>150</x>
|
||||||
|
<y>290</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Get from selection</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="TaskLabelField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>211</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hole</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Peg</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HolePartLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Part:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFaceLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Face:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegPartLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Part:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFaceLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Face:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HolePartField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PartLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFaceIDField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>FaceID</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFaceIDField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>FaceID</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegPartField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PartLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFeatureSummary">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Feature Description</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFeatureLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Feature:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFeatureSummary">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Feature Description</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFeatureLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Feature:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="AnimateButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>290</y>
|
||||||
|
<width>131</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Animate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
520
freecad_workbench/UI/PartFrameCreator.ui
Normal file
|
@ -0,0 +1,520 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>dialog</class>
|
||||||
|
<widget class="QDialog" name="dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>299</width>
|
||||||
|
<height>292</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>299</width>
|
||||||
|
<height>292</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Part Frame Creator</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QDoubleSpinBox" name="XBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Offset in part frame x direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="YBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>offset in part frame z direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="ZBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>52</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>103</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>offset in part frame z direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> mm</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="XLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>x</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>XBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="YLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>y</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>YBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ZLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>z</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>ZBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="RollLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>24</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>roll offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>roll</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>RollBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PitchLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>35</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>pitch offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>pitch</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>PitchBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="YawLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>161</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>29</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>yaw offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>yaw</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>YawBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="RollBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>85</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>roll offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="PitchBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>118</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>pitch offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="YawBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>228</x>
|
||||||
|
<y>151</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>yaw offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>°</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPlainTextEdit" name="FrameLabelField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>94</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>195</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Label of the frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Label of the new frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Label of the new frame, must be unique</string>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="FrameLabelLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>79</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Frame label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="OffsetLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>48</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Define an offset from the part frame if needed</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Offset from part frame</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ScaleLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Axis scale</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="ScaleBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>230</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>60</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Scale of the axis arrows</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>2.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.010000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>0.110000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="OptionsLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>66</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Options</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>OptionsBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="OptionsBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>210</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>78</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="UBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>100</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>62</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDoubleSpinBox" name="VBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>220</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>62</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ULabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>80</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>u</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>UBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="VLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>200</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>16</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>v</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>VBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="CoordsLabel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>256</y>
|
||||||
|
<width>51</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Coords:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
239
freecad_workbench/UI/ScrewTaskCreator.ui
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>337</width>
|
||||||
|
<height>322</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>337</width>
|
||||||
|
<height>322</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="HoleLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hole</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegPartLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Part:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFaceLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Face:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegFaceIDField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>FaceID</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="TaskLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Task Label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="TaskLabelField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>211</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="AnimateButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>290</y>
|
||||||
|
<width>131</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Animate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="SelectButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>290</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Get from selection</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFaceIDField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>FaceID</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HolePartLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Part:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HoleFaceLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Face:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Screw</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="HolePartField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PartLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="PegPartField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PartLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ScrewTypeLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>66</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Type:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="ScrewTypeField">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ThreadType</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
72
freecad_workbench/UI/icons/BoMList.svg
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
<?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="32px" height="32px" id="svg3085" version="1.1" inkscape:version="0.92.4 (5da689c313, 2019-01-14)" sodipodi:docname="a2p_PartsList.svg">
|
||||||
|
<defs id="defs3087">
|
||||||
|
<inkscape:path-effect effect="skeletal" id="path-effect3066" is_visible="true" pattern="M 0,0 0,10 10,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0"/>
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient7597">
|
||||||
|
<stop style="stop-color:#000003;stop-opacity:1;" offset="0" id="stop7599"/>
|
||||||
|
<stop style="stop-color:#000003;stop-opacity:0;" offset="1" id="stop7601"/>
|
||||||
|
</linearGradient>
|
||||||
|
<marker inkscape:stockid="Arrow1Lstart" orient="auto" refY="0.0" refX="0.0" id="Arrow1Lstart" style="overflow:visible">
|
||||||
|
<path id="path3995" d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" transform="scale(0.8) translate(12.5,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="Arrow1Send" orient="auto" refY="0.0" refX="0.0" id="Arrow1Send" style="overflow:visible;">
|
||||||
|
<path id="path4010" d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;" transform="scale(0.2) rotate(180) translate(6,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="Arrow1Sstart" orient="auto" refY="0.0" refX="0.0" id="Arrow1Sstart" style="overflow:visible">
|
||||||
|
<path id="path4007" d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" transform="scale(0.2) translate(6,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="Arrow2Sstart" orient="auto" refY="0.0" refX="0.0" id="Arrow2Sstart" style="overflow:visible">
|
||||||
|
<path id="path4025" style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " transform="scale(0.3) translate(-2.3,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="TriangleOutL" orient="auto" refY="0.0" refX="0.0" id="TriangleOutL" style="overflow:visible">
|
||||||
|
<path id="path4137" d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" transform="scale(0.8)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="DiamondLend" orient="auto" refY="0.0" refX="0.0" id="DiamondLend" style="overflow:visible">
|
||||||
|
<path id="path4092" d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" transform="scale(0.8) translate(-7,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="DiamondLstart" orient="auto" refY="0.0" refX="0.0" id="DiamondLstart" style="overflow:visible">
|
||||||
|
<path id="path4083" d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" transform="scale(0.8) translate(7,0)"/>
|
||||||
|
</marker>
|
||||||
|
<marker inkscape:stockid="Arrow1Lend" orient="auto" refY="0.0" refX="0.0" id="Arrow1Lend" style="overflow:visible;">
|
||||||
|
<path id="path3998" d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;" transform="scale(0.8) rotate(180) translate(12.5,0)"/>
|
||||||
|
</marker>
|
||||||
|
<linearGradient id="linearGradient3893">
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop3895"/>
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop3897"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient7597" id="linearGradient7603" x1="15.71482" y1="22.299378" x2="34.136209" y2="22.299378" gradientUnits="userSpaceOnUse"/>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="16" inkscape:cx="17.629635" inkscape:cy="8.4343604" inkscape:current-layer="layer1" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1920" inkscape:window-height="1018" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1"/>
|
||||||
|
<metadata id="metadata3090">
|
||||||
|
<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/>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751000000000;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018" width="1.2970899" height="32.02499" x="0.058561768" y="0.011311022"/>
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751000000000;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018-5" width="1.2970899" height="32.02499" x="30.72147" y="0.021291591"/>
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018-3" width="1.2970899" height="32.02499" x="-0.026408914" y="-32.054981" transform="matrix(0,1,-1,0,0,0)"/>
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018-3-6" width="1.2970899" height="32.02499" x="11.354873" y="-31.978708" transform="matrix(0,1,-1,0,0,0)"/>
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018-3-6-9" width="1.2970899" height="32.02499" x="22.061981" y="-31.934517" transform="matrix(0,1,-1,0,0,0)"/>
|
||||||
|
<rect style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.11415751;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3018-3-6-9-2" width="1.2970899" height="32.02499" x="30.636494" y="-31.934515" transform="matrix(0,1,-1,0,0,0)"/>
|
||||||
|
<g id="g4617">
|
||||||
|
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path3369" d="M 1.4229313,27.000257 V 23.442626 H 16.029106 30.63528 v 3.557631 3.557631 H 16.029106 1.4229313 Z" style="fill:#ffffff;fill-opacity:1"/>
|
||||||
|
<text id="text3100" y="27.713165" x="11.433594" style="font-style:normal;font-weight:bold;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'Sans Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" xml:space="preserve"><tspan style="font-size:8px;line-height:1.25;font-family:sans-serif" y="27.713165" x="11.433594" id="tspan3102" sodipodi:role="line">...</tspan></text>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#ffffff;fill-opacity:1" d="m 6.2842904,5.3724349 0,-0.8007207 0.5237353,0 c 0.5882447,0 0.7620882,0.041783 0.9637654,0.2316391 0.2499922,0.2353392 0.2907934,0.7148274 0.086406,1.0154223 C 7.6895473,6.0668098 7.4826438,6.1358185 6.848381,6.1555803 l -0.5640906,0.017575 0,-0.8007208 z" id="path3375" inkscape:connector-curvature="0"/>
|
||||||
|
<path style="fill:#ffffff;fill-opacity:1" d="M 11.823275,8.4123074 C 11.48911,8.3155617 11.339256,7.8685764 11.550817,7.5996196 11.705969,7.4023768 11.881121,7.3559471 12.470055,7.3559471 l 0.53175,0 -2.48e-4,0.1436311 c -7.16e-4,0.4175365 -0.294436,0.8141335 -0.673669,0.9096255 -0.234672,0.059091 -0.309638,0.059552 -0.504614,0.0031 l 1e-6,0 z" id="path3377" inkscape:connector-curvature="0"/>
|
||||||
|
<g id="g3754">
|
||||||
|
<path inkscape:connector-curvature="0" id="path3373" d="M 1.4229313,6.317384 V 1.345539 H 16.029106 30.63528 v 4.971845 4.971845 H 16.029106 1.4229313 Z" style="fill:#ffffff;fill-opacity:1" sodipodi:nodetypes="ccccccccc"/>
|
||||||
|
<text id="text3013" y="9.2841949" x="4.0273438" style="font-style:normal;font-weight:bold;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'Sans Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" xml:space="preserve"><tspan style="font-size:8px;line-height:1.25;font-family:sans-serif" y="9.2841949" x="4.0273438" id="tspan3015" sodipodi:role="line">Parts</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g id="g4612">
|
||||||
|
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path3371" d="M 1.4229313,17.365927 V 12.747636 H 16.029106 30.63528 v 4.618291 4.618292 H 16.029106 1.4229313 Z" style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"/>
|
||||||
|
<text id="text3017" y="20.221827" x="7.5078125" style="font-style:normal;font-weight:bold;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'Sans Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" xml:space="preserve"><tspan style="font-size:8px;line-height:1.25;font-family:sans-serif" y="20.221827" x="7.5078125" id="tspan3019" sodipodi:role="line">List</tspan></text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 9.4 KiB |
237
freecad_workbench/UI/icons/Center.svg
Normal file
|
@ -0,0 +1,237 @@
|
||||||
|
<?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="svg5642"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="drawing.svg">
|
||||||
|
<defs
|
||||||
|
id="defs5644">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3801"
|
||||||
|
id="linearGradient3807"
|
||||||
|
x1="110"
|
||||||
|
y1="35"
|
||||||
|
x2="85"
|
||||||
|
y2="35"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
spreadMethod="reflect"
|
||||||
|
gradientTransform="translate(-60.636365,31.636364)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3801">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#204a87;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3803" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3805" />
|
||||||
|
</linearGradient>
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath6357">
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:18.81833839;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0"
|
||||||
|
id="rect6359"
|
||||||
|
width="51.845303"
|
||||||
|
height="56.390755"
|
||||||
|
x="6.6228013"
|
||||||
|
y="1.5318987" />
|
||||||
|
</clipPath>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3801"
|
||||||
|
id="linearGradient6363"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(-60.636365,31.636364)"
|
||||||
|
spreadMethod="reflect"
|
||||||
|
x1="110"
|
||||||
|
y1="35"
|
||||||
|
x2="85"
|
||||||
|
y2="35" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.5"
|
||||||
|
inkscape:cx="2.3478057"
|
||||||
|
inkscape:cy="35.001512"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="1375"
|
||||||
|
inkscape:window-height="811"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5647">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<g
|
||||||
|
id="g6337"
|
||||||
|
clip-path="url(#clipPath6357)"
|
||||||
|
transform="matrix(1.1017012,0,0,1.1017012,-3.2190011,-6.7998918)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="sscccs"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2994-3"
|
||||||
|
d="m 56.363636,84.636364 c 0,4.418278 -10.745166,8 -24,8 -13.254833,0 -23.9999985,-3.581722 -23.9999985,-8 l -2e-6,-42 47.9999985,0 z"
|
||||||
|
style="fill:#729fcf;stroke:#0b1521;stroke-width:1.99999988;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"
|
||||||
|
d="m 54.363635,83.363637 c 0,4.016616 -9.84973,7.272727 -22,7.272727 -12.150264,0 -21.999999,-3.256111 -21.999999,-7.272727 l -2e-6,-38 44.000001,0 z"
|
||||||
|
style="fill:url(#linearGradient6363);fill-opacity:1;stroke:#729fcf;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"
|
||||||
|
d="m 54.363635,47.363637 c -2,3.272727 -9.84973,5.272727 -22,5.272727 -12.150264,0 -19,-2 -21.999999,-5.272727"
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.1428571,0,0,1.1428571,72.363636,14.064936)"
|
||||||
|
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"
|
||||||
|
style="fill:#729fcf;stroke:#0b1521;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:20.4"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<g
|
||||||
|
transform="matrix(1.1251249,0,0,1.2288536,-5.1529457,-1.5237155)"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="g4792">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="rect3039-1"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<rect
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
id="rect3039"
|
||||||
|
width="2.271805"
|
||||||
|
height="19.048214"
|
||||||
|
x="31.545361"
|
||||||
|
y="15.941667" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
id="path3043"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
id="rect3039-3"
|
||||||
|
width="2.271805"
|
||||||
|
height="19.048214"
|
||||||
|
x="33.423866"
|
||||||
|
y="-52.183987"
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)"
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
id="path3043-6"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
inkscape:transform-center-x="-0.92685398" />
|
||||||
|
<rect
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
width="2.2567275"
|
||||||
|
height="18.921833"
|
||||||
|
x="-47.582092"
|
||||||
|
y="-7.3576851"
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)"
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
id="path3043-6-5"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
inkscape:transform-center-x="0.0233072" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
id="path4366"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5806"
|
||||||
|
d="m 64.181818,63.636364 -63.99999982,0"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:7.59999943;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 10 KiB |
152
freecad_workbench/UI/icons/PickedPoint.svg
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="64px"
|
||||||
|
height="64px"
|
||||||
|
id="svg6384"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 37">
|
||||||
|
<defs
|
||||||
|
id="defs6386" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.9445436"
|
||||||
|
inkscape:cx="33.122262"
|
||||||
|
inkscape:cy="42.611518"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="472"
|
||||||
|
inkscape:window-height="383"
|
||||||
|
inkscape:window-x="968"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata6389">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<g
|
||||||
|
id="g4792"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(1.3322492,0,0,1.4550733,-13.530887,-8.9206423)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
275
freecad_workbench/UI/icons/PointOnCenterline.svg
Normal file
|
@ -0,0 +1,275 @@
|
||||||
|
<?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="svg4339"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 12">
|
||||||
|
<defs
|
||||||
|
id="defs4341">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3801"
|
||||||
|
id="linearGradient3807"
|
||||||
|
x1="110"
|
||||||
|
y1="35"
|
||||||
|
x2="85"
|
||||||
|
y2="35"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
spreadMethod="reflect"
|
||||||
|
gradientTransform="translate(-61,23.272727)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3801">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#c4a000;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3803" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#fce94f;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3805" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3801-5"
|
||||||
|
id="linearGradient3807-7"
|
||||||
|
x1="110"
|
||||||
|
y1="35"
|
||||||
|
x2="85"
|
||||||
|
y2="35"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
spreadMethod="reflect"
|
||||||
|
gradientTransform="matrix(0.67526107,0,0,0.67526107,-31.705858,16.546964)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3801-5">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#204a87;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3803-9" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3805-2" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3801-5-7"
|
||||||
|
id="linearGradient3807-7-9"
|
||||||
|
x1="110"
|
||||||
|
y1="35"
|
||||||
|
x2="85"
|
||||||
|
y2="35"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
spreadMethod="reflect"
|
||||||
|
gradientTransform="matrix(0.72727273,0,0,0.72727273,-36.272728,10.363637)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3801-5-7">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#204a87;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3803-9-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3805-2-6" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.5"
|
||||||
|
inkscape:cx="13.517284"
|
||||||
|
inkscape:cy="24.468658"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-object-midpoints="false"
|
||||||
|
inkscape:window-width="1375"
|
||||||
|
inkscape:window-height="811"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4344">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;stroke:#0b1521;stroke-width:1.35052204;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4"
|
||||||
|
d="m 47.299687,52.335801 c 0,2.983491 -7.255792,5.402088 -16.206264,5.402088 -8.950473,0 -16.206265,-2.418597 -16.206265,-5.402088 l -10e-7,-28.360965 32.41253,0 z"
|
||||||
|
id="path2994-3"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="sscccs" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.51000001;fill:url(#linearGradient3807-7);fill-opacity:1;stroke:#729fcf;stroke-width:1.35052216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4"
|
||||||
|
d="m 45.949165,51.476378 c 0,2.712264 -6.651139,4.910989 -14.855743,4.910989 -8.2046,0 -14.855743,-2.198725 -14.855743,-4.910989 l -2e-6,-25.659921 29.711488,0 z"
|
||||||
|
id="path2994-3-6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="sscccs" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:#729fcf;stroke:none"
|
||||||
|
id="path2994-8"
|
||||||
|
sodipodi:cx="-35"
|
||||||
|
sodipodi:cy="25"
|
||||||
|
sodipodi:rx="21"
|
||||||
|
sodipodi:ry="7"
|
||||||
|
d="m -14,25 a 21,7 0 1 1 -42,0 21,7 0 1 1 42,0 z"
|
||||||
|
transform="matrix(0.77172691,0,0,0.77172691,58.103864,4.6816635)" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:1.6886189;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.37723797, 3.37723797;stroke-dashoffset:0"
|
||||||
|
d="m 31.284953,15.183043 0,45.389159"
|
||||||
|
id="path5504"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<g
|
||||||
|
id="g4792-2"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(1.236972,0,0,1.3510122,-9.558506,-9.4101622)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-9"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-3"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3-1"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-9"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7-4"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366-8"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:1.35052216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dashoffset:20.4"
|
||||||
|
d="m 45.949165,27.16698 c -1.350522,2.209945 -6.651139,3.560467 -14.855743,3.560467 -8.2046,0 -12.829961,-1.350522 -14.855743,-3.560467"
|
||||||
|
id="path2994-3-6-9"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="csc" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:none;stroke:#0b1521;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.5;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:20.4"
|
||||||
|
id="path2994"
|
||||||
|
sodipodi:cx="-35"
|
||||||
|
sodipodi:cy="25"
|
||||||
|
sodipodi:rx="21"
|
||||||
|
sodipodi:ry="7"
|
||||||
|
d="m -14,25 a 21,7 0 1 1 -42,0 21,7 0 1 1 42,0 z"
|
||||||
|
transform="matrix(0.77172691,0,0,0.77172691,58.103864,4.6816635)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#729fcf;stroke:none"
|
||||||
|
id="rect5584"
|
||||||
|
width="2.8052049"
|
||||||
|
height="2.1262856"
|
||||||
|
x="29.457829"
|
||||||
|
y="17.427979" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 11 KiB |
181
freecad_workbench/UI/icons/PointOnEdge.svg
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="64px"
|
||||||
|
height="64px"
|
||||||
|
id="svg2985"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="frameoncurve.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2987">
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow1Lstart"
|
||||||
|
orient="auto"
|
||||||
|
refY="0.0"
|
||||||
|
refX="0.0"
|
||||||
|
id="Arrow1Lstart"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
id="path3859"
|
||||||
|
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||||
|
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||||
|
transform="scale(0.8) translate(12.5,0)" />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.5"
|
||||||
|
inkscape:cx="6.549462"
|
||||||
|
inkscape:cy="34.388895"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="true"
|
||||||
|
inkscape:snap-page="false"
|
||||||
|
inkscape:snap-midpoints="true"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1266"
|
||||||
|
inkscape:window-height="783"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="false">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4310" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata2990">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:2.88424587;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 4.093678,33.130265 c 0,0 0.670134,7.648668 23.365889,8.028173 C 50.15532,41.537941 50.047635,35.119378 49.356598,25.394822 48.665561,15.670267 35.708619,9.9239398 35.708619,9.9239398"
|
||||||
|
id="path4811"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<g
|
||||||
|
id="g4792"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(1.3322492,0,0,1.4550733,-14.352489,-9.6872132)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 a 2.5909083,2.590909 0 1 1 -5.181816,0 2.5909083,2.590909 0 1 1 5.181816,0 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.1 KiB |
44
freecad_workbench/UI/icons/PointOnSurface.svg
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<?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="svg8779" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="frameonsurface.svg">
|
||||||
|
<defs id="defs8781">
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3855" id="linearGradient3861" x1="38" y1="22" x2="49" y2="42" gradientUnits="userSpaceOnUse" spreadMethod="reflect" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3855">
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="0" id="stop3857" />
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="1" id="stop3859" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient gradientTransform="translate(-0.54545473,3.1818182)" inkscape:collect="always" xlink:href="#linearGradient3845" id="linearGradient3851" x1="18" y1="43" x2="11" y2="24" gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3845">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1;" offset="0" id="stop3847" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3849" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient gradientTransform="translate(-0.54545473,3.1818182)" y2="42" x2="49" y1="22" x1="38" spreadMethod="reflect" gradientUnits="userSpaceOnUse" id="linearGradient9035" xlink:href="#linearGradient3855" inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.5" inkscape:cx="32" inkscape:cy="32" inkscape:current-layer="layer1" showgrid="true" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:window-width="1016" inkscape:window-height="657" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" />
|
||||||
|
<metadata id="metadata8784">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||||
|
<path id="path3846-3" style="color:#000000;fill:url(#linearGradient9035);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:2;stroke-linecap:round;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 2.4545453,24.181818 c 19.9999997,0 31.9999997,22 31.9999997,38 l 26,-20 c 0,-16 -12,-32 -26,-32 z" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" />
|
||||||
|
<path id="path3852-7" style="color:#000000;fill:url(#linearGradient3851);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:2;stroke-linecap:round;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 34.454545,62.181818 c 0,-16 -12,-38 -31.9999997,-38 l 4,14 c 7.9999997,0 13.9999997,8 13.9999997,18 z" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" />
|
||||||
|
<path id="path3852-7-6" style="color:#000000;fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;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 32.454545,59.181818 c 0,-12 -12.4,-33 -27.3999997,-33 l 2.9,10.1 c 5.4999997,-0.1 14.4999997,7.9 14.3999997,18.6 z" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" />
|
||||||
|
<path style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 9.4545453,23.181818 25.3999997,-11 c 12.6,0 22.6,13 23.6,29 l -22.3,17.2 c -0.7,-13.2 -11.7,-32.2 -26.6999997,-35.2 z" id="path3853" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" />
|
||||||
|
<g id="g4792" style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(0.6931302,0.14339095,-0.15661058,0.75703197,2.2598731,-8.4369758)">
|
||||||
|
<path style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z" id="rect3039-1" inkscape:connector-curvature="0" />
|
||||||
|
<rect y="15.941667" x="31.545361" height="19.048214" width="2.271805" id="rect3039" style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)" inkscape:transform-center-y="-0.94840389" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043" style="fill:#729fcf;fill-rule:evenodd;stroke:none" sodipodi:type="star" />
|
||||||
|
<rect transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)" y="-52.183987" x="33.423866" height="19.048214" width="2.271805" id="rect3039-3" style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="-0.92685398" inkscape:transform-center-y="-0.024790177" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6" style="fill:#ef2929;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)" y="-7.3576851" x="-47.582092" height="18.921833" width="2.2567275" id="rect3039-3-7" style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="0.0233072" inkscape:transform-center-y="-0.87140186" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6-5" style="fill:#8ae234;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)" d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z" sodipodi:ry="2.590909" sodipodi:rx="2.5909083" sodipodi:cy="37.590908" sodipodi:cx="35.954548" id="path4366" style="fill:#fce94f;stroke:none" sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 8.2 KiB |
16
freecad_workbench/UI/icons/addgrasppose.svg
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500" height="500" viewBox="0 0 500 500" xml:space="preserve">
|
||||||
|
<desc>Created with Fabric.js 4.6.0</desc>
|
||||||
|
<defs>
|
||||||
|
</defs>
|
||||||
|
<g transform="matrix(1.81 1.81 -1.81 1.81 157.08 195.51)" id="ENBcDxvriCbqvxnFDMXb5" >
|
||||||
|
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(247,47,58); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-40, -40)" d="M 0 0 L 80 80 L 0 80 L 0 0 z" stroke-linecap="round" />
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(-1.79 -1.79 1.79 -1.79 345.03 196.99)" id="zyTA1L_TKItNRJbg9UYKc" >
|
||||||
|
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(247,47,58); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-40, -40)" d="M 0 0 L 80 80 L 0 80 L 0 0 z" stroke-linecap="round" />
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(1.26 0 0 0.42 255.73 403.9)" id="KZAuNuTP6AVzRqOV5xyr0" >
|
||||||
|
<path style="stroke: rgb(31,2,45); stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(17,22,21); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(0, 0)" d="M -111 -63.90669 C -111 -76.39661 -109.36253 -88.37498 -106.44782000000001 -97.20669 C -103.5331 -106.0384 -99.57990000000001 -111 -95.45787000000001 -111 L 95.45785999999998 -111 L 95.45785999999998 -111 C 99.57988999999998 -111 103.53308999999999 -106.0384 106.44780999999998 -97.20669 C 109.36252999999998 -88.37498 110.99998999999997 -76.39661 110.99998999999997 -63.90669 L 110.99998999999997 63.90668000000001 L 110.99998999999997 63.90668000000001 C 110.99998999999997 89.91560000000001 104.04153999999997 110.99999000000001 95.45785999999997 110.99999000000001 L -95.45787000000003 110.99999000000001 L -95.45787000000003 110.99999000000001 C -104.04155000000003 110.99999000000001 -111.00000000000003 89.91560000000001 -111.00000000000003 63.90668000000001 z" stroke-linecap="round" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
60
freecad_workbench/UI/icons/allpartframes.svg
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
<?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="svg8033" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="allpartframes.svg">
|
||||||
|
<defs id="defs8035">
|
||||||
|
<inkscape:path-effect effect="spiro" id="path-effect3076" is_visible="true" />
|
||||||
|
<inkscape:path-effect is_visible="true" id="path-effect3075" effect="spiro" />
|
||||||
|
<inkscape:path-effect is_visible="true" id="path-effect3075-6" effect="spiro" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3767" id="linearGradient3222" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.82352937,0,0,0.77272731,8.529415,13.09486)" x1="22.116516" y1="55.717518" x2="17.328547" y2="21.31134" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3767">
|
||||||
|
<stop style="stop-color:#edd400;stop-opacity:1" offset="0" id="stop3769" />
|
||||||
|
<stop style="stop-color:#fce94f;stop-opacity:1" offset="1" id="stop3771" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3777" id="linearGradient3220" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.79109028,0,0,0.78516507,9.037552,12.345152)" x1="53.896763" y1="51.179787" x2="47.502235" y2="21.83742" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3777">
|
||||||
|
<stop style="stop-color:#c4a000;stop-opacity:1" offset="0" id="stop3779-3" />
|
||||||
|
<stop style="stop-color:#edd400;stop-opacity:1" offset="1" id="stop3781" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.7781746" inkscape:cx="42.12947" inkscape:cy="31.89774" inkscape:current-layer="g8668" showgrid="true" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:snap-object-midpoints="true" inkscape:window-width="1375" inkscape:window-height="811" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" />
|
||||||
|
<metadata id="metadata8038">
|
||||||
|
<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 />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2993" d="m 11.000002,26.231225 28,5 18,-7 -23.84947,-3.421981 z" style="fill:#fce94f;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2995" d="m 57.000002,24.231225 0,28 -18,8 0,-30 z" style="fill:url(#linearGradient3220);fill-opacity:1;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path style="fill:url(#linearGradient3222);fill-opacity:1;fill-rule:evenodd;stroke:#302b00;stroke-width:1.99999988;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 11.000002,26.231225 28,4 0,30.000002 -28,-4.636365 z" id="path3825" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" />
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path3765" d="m 12.993002,28.599479 0.007,25.231746 24,4 -0.007,-25.843 z" style="fill:none;stroke:#fce94f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path3775" d="m 41.000002,31.731225 0,25.6 14,-6.4 0,-23.8 z" style="fill:none;stroke:#edd400;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<g id="g4792" style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(0.67056429,0,0,0.73238565,-6.618908,-4.8414332)">
|
||||||
|
<path style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z" id="rect3039-1" inkscape:connector-curvature="0" />
|
||||||
|
<rect y="15.941667" x="31.545361" height="19.048214" width="2.271805" id="rect3039" style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)" inkscape:transform-center-y="-0.94840389" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043" style="fill:#729fcf;fill-rule:evenodd;stroke:none" sodipodi:type="star" />
|
||||||
|
<rect transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)" y="-52.183987" x="33.423866" height="19.048214" width="2.271805" id="rect3039-3" style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="-0.92685398" inkscape:transform-center-y="-0.024790177" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6" style="fill:#ef2929;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)" y="-7.3576851" x="-47.582092" height="18.921833" width="2.2567275" id="rect3039-3-7" style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="0.0233072" inkscape:transform-center-y="-0.87140186" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6-5" style="fill:#8ae234;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)" d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z" sodipodi:ry="2.590909" sodipodi:rx="2.5909083" sodipodi:cy="37.590908" sodipodi:cx="35.954548" id="path4366" style="fill:#fce94f;stroke:none" sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
<g id="g8668">
|
||||||
|
<g transform="translate(0.3044802,0.12123813)" id="g8732-1" style="fill:none;stroke:#000000;stroke-width:7.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round">
|
||||||
|
<text xml:space="preserve" style="font-size:30.92953299999999928px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;font-family:Sans;stroke-width:7.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round" x="4.7745667" y="44.87561" id="text8146-1" sodipodi:linespacing="125%"><tspan sodipodi:role="line" id="tspan8148-0" x="4.7745667" y="44.87561">ALL</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g id="g8732">
|
||||||
|
<text xml:space="preserve" style="font-size:30.929533px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#34e0e2;fill-opacity:1;stroke:none;font-family:Sans" x="4.7745667" y="44.87561" id="text8146" sodipodi:linespacing="125%"><tspan sodipodi:role="line" id="tspan8148" x="4.7745667" y="44.87561">ALL</tspan></text>
|
||||||
|
</g>
|
||||||
|
<path inkscape:connector-curvature="0" id="path8658" d="M 15.04209,25.301974 10.799449,36.358553" style="fill:none;stroke:#16d0d2;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path8660" d="M 9.9680966,38.989814 7.9667027,44.462459" style="fill:none;stroke:#16d0d2;stroke-width:0.99136168px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path8662" d="m 10.092342,38.608438 10.02806,0.06428" style="fill:#06989a;stroke:#16d0d2;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path8664" d="m 29.423219,44.45814 13.06747,-0.128565" style="fill:none;stroke:#16d0d2;stroke-width:0.99580127px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path8666" d="m 46.669048,44.329575 13.131626,0.06428" style="fill:none;stroke:#16d0d2;stroke-width:0.99581689px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 10 KiB |
141
freecad_workbench/UI/icons/allpartgroups.svg
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
<?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="svg2985" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="New document 2">
|
||||||
|
<defs id="defs2987">
|
||||||
|
<radialGradient inkscape:collect="always" xlink:href="#linearGradient1789" id="radialGradient159" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.015635,0,0.103105,1.000512,0,-0.08369458)" cx="26.106777" cy="38.195114" fx="26.106777" fy="38.195114" r="32.259769" />
|
||||||
|
<linearGradient id="linearGradient1789">
|
||||||
|
<stop style="stop-color:#a0a0a0;stop-opacity:1;" offset="0" id="stop1790" />
|
||||||
|
<stop style="stop-color:#a8a8a8;stop-opacity:1;" offset="1" id="stop1791" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient5048" id="linearGradient5027" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)" x1="302.85715" y1="366.64789" x2="302.85715" y2="609.50507" />
|
||||||
|
<linearGradient id="linearGradient5048">
|
||||||
|
<stop style="stop-color:black;stop-opacity:0;" offset="0" id="stop5050" />
|
||||||
|
<stop id="stop5056" offset="0.5" style="stop-color:black;stop-opacity:1;" />
|
||||||
|
<stop style="stop-color:black;stop-opacity:0;" offset="1" id="stop5052" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient5029" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient5060">
|
||||||
|
<stop style="stop-color:black;stop-opacity:1;" offset="0" id="stop5062" />
|
||||||
|
<stop style="stop-color:black;stop-opacity:0;" offset="1" id="stop5064" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient5031" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient137" id="linearGradient158" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.462696,0,0.06907908,0.683669,7.6420233,9.9623265)" x1="5.2657914" y1="18.725863" x2="8.212224" y2="52.625851" />
|
||||||
|
<linearGradient id="linearGradient137">
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0.70059878;" offset="0.0000000" id="stop138" />
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0.0000000;" offset="1.0000000" id="stop139" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient gradientTransform="translate(7.6420233,9.9623265)" inkscape:collect="always" xlink:href="#linearGradient13842" id="linearGradient13848" x1="22.25" y1="37.625" x2="19.75" y2="14.875" gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient13842">
|
||||||
|
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop13844" />
|
||||||
|
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop13846" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linearGradient259">
|
||||||
|
<stop id="stop260" offset="0.0000000" style="stop-color:#fafafa;stop-opacity:1.0000000;" />
|
||||||
|
<stop style="stop-color:#a8a8a8;stop-opacity:1;" offset="0.5" id="stop8238" />
|
||||||
|
<stop id="stop261" offset="1" style="stop-color:#cdcdcd;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linearGradient269">
|
||||||
|
<stop id="stop270" offset="0.0000000" style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
|
||||||
|
<stop id="stop271" offset="1.0000000" style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient9766" id="linearGradient13162" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,1.022118,59.698963,8.6393005)" x1="22.175976" y1="36.987999" x2="22.065331" y2="32.050499" />
|
||||||
|
<linearGradient id="linearGradient9766">
|
||||||
|
<stop style="stop-color:#6194cb;stop-opacity:1;" offset="0" id="stop9768" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1;" offset="1" id="stop9770" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient148" id="linearGradient156" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.535299,0,0,0.651339,11.093441,12.410326)" x1="14.899379" y1="27.059643" x2="22.715446" y2="41.836895" />
|
||||||
|
<linearGradient id="linearGradient148">
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0.13402061;" offset="0.0000000" id="stop149" />
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0.051546391;" offset="1.0000000" id="stop150" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient335" id="linearGradient155" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.421537,0,0,0.703464,7.6420233,9.9623265)" x1="19.116116" y1="28.946041" x2="19.426924" y2="51.912693" />
|
||||||
|
<linearGradient id="linearGradient335">
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:1.0000000;" offset="0.0000000" id="stop336" />
|
||||||
|
<stop style="stop-color:#ffffff;stop-opacity:0.0000000;" offset="1.0000000" id="stop337" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient r="32.259769" fy="38.195114" fx="26.106777" cy="38.195114" cx="26.106777" gradientTransform="matrix(1.015635,0,0.103105,1.000512,7.6420233,9.8786325)" gradientUnits="userSpaceOnUse" id="radialGradient3407" xlink:href="#linearGradient1789" inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.5" inkscape:cx="32" inkscape:cy="32" inkscape:current-layer="layer1" showgrid="true" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:window-width="809" inkscape:window-height="698" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" />
|
||||||
|
<metadata id="metadata2990">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccssssccc" style="color:#000000;fill:url(#radialGradient3407);fill-opacity:1;fill-rule:nonzero;stroke:#5a5a5a;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" id="path2375" d="m 12.262052,48.613342 c 0.04181,0.420455 0.497385,0.840909 0.911155,0.840909 l 31.136162,0 c 0.41377,0 0.785732,-0.420454 0.743924,-0.840909 L 42.356676,21.494054 C 42.314866,21.0736 41.85929,20.653146 41.445521,20.653146 l -12.723416,0 c -0.590546,0 -1.209083,-0.379552 -1.402861,-0.960335 L 26.216242,16.386935 C 26.04699,15.879657 25.669092,15.65114 24.901769,15.65114 l -14.9373267,0 c -0.413769,0 -0.785731,0.420454 -0.743923,0.840908 l 3.0415327,32.121294 z" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 10.980625,27.495814 31.149859,0" id="path13113" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 12.972176,47.495814 29.987754,0" id="path13160" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13139" d="m 12.972176,45.495814 29.987754,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<g style="display:inline" id="g5022" transform="matrix(0.02165152,0,0,0.01903841,50.057403,46.896047)">
|
||||||
|
<rect y="-150.69685" x="-1559.2523" height="478.35718" width="1339.6335" id="rect4173" style="opacity:0.40206185;color:#000000;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cccc" id="path5058" d="m -219.61876,-150.68038 c 0,0 0,478.33079 0,478.33079 142.874166,0.90045 345.40022,-107.16966 345.40014,-239.196175 0,-132.026537 -159.436816,-239.134595 -345.40014,-239.134615 z" style="opacity:0.40206185;color:#000000;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.40206185;color:#000000;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" d="m -1559.2523,-150.68038 c 0,0 0,478.33079 0,478.33079 -142.8742,0.90045 -345.4002,-107.16966 -345.4002,-239.196175 0,-132.026537 159.4368,-239.134595 345.4002,-239.134615 z" id="path5018" sodipodi:nodetypes="cccc" />
|
||||||
|
</g>
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccsscsscccc" id="path2380" d="m 13.813775,48.381001 c 0.03136,0.310327 -0.154625,0.517212 -0.475404,0.413769 l 0,0 C 13.017592,48.691328 12.789803,48.484443 12.758447,48.174116 L 9.7288813,16.806921 c -0.03136,-0.310328 0.156594,-0.497723 0.4669207,-0.497723 l 14.749752,-0.09145 c 0.531284,-0.0033 0.739429,0.05331 0.879799,0.517212 0,0 1.085374,3.112797 1.246234,3.698104 l -1.555596,-2.917035 c -0.26518,-0.497263 -0.598744,-0.41377 -0.97279,-0.41377 l -13.1294,0 c -0.310327,0 -0.496308,0.206885 -0.464952,0.517212 l 2.978821,30.864968 -0.113895,-0.103442 z" style="color:#000000;fill:url(#linearGradient158);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.17341149;marker:none;visibility:visible;display:block;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13145" d="m 9.9472573,17.495813 14.7837327,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13115" d="m 10.399357,21.495813 30.73888,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<g inkscape:export-ydpi="74.800003" inkscape:export-xdpi="74.800003" inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png" transform="matrix(1.034424,0,0.10452,1.034424,-2.3904566,12.59424)" id="g2381" style="fill:#ffffff;fill-opacity:0.5803109;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4;display:block">
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cscscs" id="path2382" d="m 41.785743,9.0363862 c 0.0096,-0.4745828 0.01519,-0.7245056 -0.423393,-0.7242032 l -12.55582,0.00866 c -0.3,0 -0.324614,-0.1432061 0,0 0.324614,0.1432061 1.247098,0.6582712 2.182697,0.7009947 0,0 10.796477,0.016463 10.796516,0.014551 z" style="stroke:none" />
|
||||||
|
</g>
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13123" d="m 10.804919,25.495814 30.830556,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 12.801495,43.495814 29.987754,0" id="path13121" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13119" d="m 12.507832,41.495814 30.108724,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 12.27566,39.495814 30.16921,0" id="path13135" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13137" d="m 12.104979,37.495814 30.16921,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 11.897695,35.495814 30.205121,0" id="path13143" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13133" d="m 11.665543,33.495814 30.265581,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 11.494862,31.495814 30.265581,0" id="path13117" sodipodi:nodetypes="cc" />
|
||||||
|
<g inkscape:export-ydpi="74.800003" inkscape:export-xdpi="74.800003" inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png" transform="matrix(1.034424,0,0.10452,1.034424,-2.3904566,12.59424)" id="g1853" style="fill:#ffffff;fill-opacity:0.5803109;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4;display:block">
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cscscs" id="path1855" d="m 41.785743,9.0363862 c 0.0096,-0.4745828 0.01519,-0.7245056 -0.423393,-0.7242032 l -12.55582,0.00866 c -0.3,0 -0.324614,-0.1432061 0,0 0.324614,0.1432061 1.247098,0.6582712 2.182697,0.7009947 0,0 10.796477,0.016463 10.796516,0.014551 z" style="stroke:none" />
|
||||||
|
</g>
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 10.606255,23.495814 31.026503,0" id="path13127" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" sodipodi:nodetypes="cc" id="path13125" d="m 11.293442,29.495814 30.295796,0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.11363633;color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 10.166281,19.495814 15.280815,0" id="path13147" sodipodi:nodetypes="cc" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.39204544;color:#000000;fill:url(#linearGradient13848);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible" d="m 42.017023,24.087327 2.625,24.625 -31,0.125 c 0,0 -1.875,-24.75 -1.875,-24.75 0,0 30.375,0 30.25,0 z" id="path13840" sodipodi:nodetypes="cccsc" />
|
||||||
|
<g id="g4526" transform="translate(-31.454545,22.181819)">
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path3150-7" d="m 82.727274,-7.4545432 0,19.9999972 -12.000001,8 0,-19.99999998 z" style="fill:#204a87;stroke:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3930" d="m 70.727273,18.545454 12.000001,-8" style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3932" d="m 80.727271,14.545454 0,-19.999999" style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3934" d="m 82.727274,-5.454545 -12.000001,8" style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3936" d="m 72.72727,-1.454545 0,19.999999" style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3152-1" d="m 70.727273,20.545454 -16.000001,-8 0,-19.9999988 16.000001,7.99999882 z" style="fill:#3465a4;stroke:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3938" d="m 68.72727,0.54545502 0,17.99999898" style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3940" d="m 54.727272,10.545454 16.000001,8" style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3942" d="m 56.727275,12.545454 0,-17.999999" style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path3150" d="m 82.727274,-7.4545448 0,19.9999988 -12.000001,8 0,-19.99999898 z" style="fill:none;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3944" d="m 70.727273,2.545455 -16.000001,-8" style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3152" d="m 70.727273,20.545454 -16.000001,-8 0,-19.9999988 16.000001,7.99999982 z" style="fill:none;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path3156" d="M 82.727274,-7.4545448 70.727273,0.54545502 54.727272,-7.4545448 66.727273,-15.454545 82.727274,-7.4545448" style="fill:#729fcf;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
</g>
|
||||||
|
<g id="g4792-3" style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(0.31467961,0,0,0.34369088,28.536609,10.383837)">
|
||||||
|
<path style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z" id="rect3039-1-6" inkscape:connector-curvature="0" />
|
||||||
|
<rect y="15.941667" x="31.545361" height="19.048214" width="2.271805" id="rect3039-7" style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)" inkscape:transform-center-y="-0.94840389" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-5" style="fill:#729fcf;fill-rule:evenodd;stroke:none" sodipodi:type="star" />
|
||||||
|
<rect transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)" y="-52.183987" x="33.423866" height="19.048214" width="2.271805" id="rect3039-3-3" style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="-0.92685398" inkscape:transform-center-y="-0.024790177" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6-56" style="fill:#ef2929;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)" y="-7.3576851" x="-47.582092" height="18.921833" width="2.2567275" id="rect3039-3-7-2" style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path inkscape:transform-center-x="0.0233072" inkscape:transform-center-y="-0.87140186" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.5707963" sodipodi:arg1="0.52359878" sodipodi:r2="1.9734807" sodipodi:r1="3.9469614" sodipodi:cy="7.6363635" sodipodi:cx="33.727276" sodipodi:sides="3" id="path3043-6-5-9" style="fill:#8ae234;fill-rule:evenodd;stroke:none" sodipodi:type="star" transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)" d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z" sodipodi:ry="2.590909" sodipodi:rx="2.5909083" sodipodi:cy="37.590908" sodipodi:cx="35.954548" id="path4366-1" style="fill:#fce94f;stroke:none" sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
<path inkscape:connector-curvature="0" inkscape:export-ydpi="74.800003" inkscape:export-xdpi="74.800003" inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png" sodipodi:nodetypes="cccsscccscc" id="path2401" d="m 13.420589,49.028324 c 0.103442,0.211469 0.310326,0.422928 0.620652,0.422928 l 33.308452,0 c 0.206892,0 0.521164,-0.126305 0.708174,-0.264351 0.530402,-0.391535 0.65486,-0.612385 0.892782,-0.973467 2.448126,-3.71546 5.805141,-19.276893 5.805141,-19.276893 0.103442,-0.21146 -0.103441,-0.42292 -0.413767,-0.42292 l -34.923642,0 c -0.310326,0 -1.655965,16.10733 -4.862998,19.287023 l -1.238236,1.22768 0.103442,0 z" style="color:#000000;fill:url(#linearGradient13162);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block;overflow:visible" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path323" d="m 20.776499,30.100968 c -0.772747,4.990757 -1.501301,9.009243 -2.71599,13.513864 2.386485,-0.707107 7.116116,-3.204505 17.116116,-3.204505 10,0 16.723573,-9.248699 17.651651,-10.353553 l -32.051777,0.04419 z" style="fill:url(#linearGradient156);fill-opacity:1;fill-rule:evenodd;stroke:none" sodipodi:nodetypes="ccccc" />
|
||||||
|
<path inkscape:connector-curvature="0" style="opacity:0.52272728;color:#000000;fill:none;stroke:url(#linearGradient155);stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" d="m 53.462106,29.649827 -33.158471,0 c 0,0 -2.147748,16.019607 -4.722272,18.240578 8.121077,0 31.571171,-0.04864 31.59099,-0.04864 1.751659,0 4.907641,-12.636194 6.289753,-18.191942 z" id="path324" sodipodi:nodetypes="cccsc" />
|
||||||
|
<g id="g5258" transform="matrix(0.28930544,0,0,0.28930544,12.974584,4.0161761)">
|
||||||
|
<g transform="matrix(1.3322492,0,0,1.4550733,-6.5424305,-12.411736)" style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none" id="g4792">
|
||||||
|
<path inkscape:connector-curvature="0" id="rect3039-1" d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z" style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<rect style="fill:#729fcf;fill-rule:evenodd;stroke:none" id="rect3039" width="2.271805" height="19.048214" x="31.545361" y="15.941667" />
|
||||||
|
<path sodipodi:type="star" style="fill:#729fcf;fill-rule:evenodd;stroke:none" id="path3043" sodipodi:sides="3" sodipodi:cx="33.727276" sodipodi:cy="7.6363635" sodipodi:r1="3.9469614" sodipodi:r2="1.9734807" sodipodi:arg1="0.52359878" sodipodi:arg2="1.5707963" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:transform-center-y="-0.94840389" transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)" />
|
||||||
|
<rect style="fill:#ef2929;fill-rule:evenodd;stroke:none" id="rect3039-3" width="2.271805" height="19.048214" x="33.423866" y="-52.183987" transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)" />
|
||||||
|
<path transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" sodipodi:type="star" style="fill:#ef2929;fill-rule:evenodd;stroke:none" id="path3043-6" sodipodi:sides="3" sodipodi:cx="33.727276" sodipodi:cy="7.6363635" sodipodi:r1="3.9469614" sodipodi:r2="1.9734807" sodipodi:arg1="0.52359878" sodipodi:arg2="1.5707963" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:transform-center-y="-0.024790177" inkscape:transform-center-x="-0.92685398" />
|
||||||
|
<rect style="fill:#8ae234;fill-rule:evenodd;stroke:none" id="rect3039-3-7" width="2.2567275" height="18.921833" x="-47.582092" y="-7.3576851" transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)" />
|
||||||
|
<path transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" sodipodi:type="star" style="fill:#8ae234;fill-rule:evenodd;stroke:none" id="path3043-6-5" sodipodi:sides="3" sodipodi:cx="33.727276" sodipodi:cy="7.6363635" sodipodi:r1="3.9469614" sodipodi:r2="1.9734807" sodipodi:arg1="0.52359878" sodipodi:arg2="1.5707963" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z" inkscape:transform-center-y="-0.87140186" inkscape:transform-center-x="0.0233072" />
|
||||||
|
<path sodipodi:type="arc" style="fill:#fce94f;stroke:none" id="path4366" sodipodi:cx="35.954548" sodipodi:cy="37.590908" sodipodi:rx="2.5909083" sodipodi:ry="2.590909" d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z" transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 31 KiB |
411
freecad_workbench/UI/icons/assembly4.svg
Normal file
|
@ -0,0 +1,411 @@
|
||||||
|
<?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="64"
|
||||||
|
height="64"
|
||||||
|
id="svg3559"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||||
|
sodipodi:docname="Model.svg"
|
||||||
|
viewBox="0 0 64 64">
|
||||||
|
<defs
|
||||||
|
id="defs3561">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4383-1"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<stop
|
||||||
|
id="stop69725"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#c4a000;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop69727"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#fce94f;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4383">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#3465a4;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4385" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4387" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4383-1"
|
||||||
|
id="linearGradient4389"
|
||||||
|
x1="20.243532"
|
||||||
|
y1="37.588112"
|
||||||
|
x2="17.243532"
|
||||||
|
y2="27.588112"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(-1.243533,-2.588112)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient73208"
|
||||||
|
id="linearGradient4399"
|
||||||
|
x1="48.714352"
|
||||||
|
y1="45.585785"
|
||||||
|
x2="44.714352"
|
||||||
|
y2="34.585785"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(1.2856487,1.4142136)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4383-3"
|
||||||
|
id="linearGradient4389-0"
|
||||||
|
x1="27.243532"
|
||||||
|
y1="54.588112"
|
||||||
|
x2="21.243532"
|
||||||
|
y2="30.588112"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(-1.243533,-2.588112)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4383-3">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#3465a4;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4385-1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4387-2" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4393-9"
|
||||||
|
id="linearGradient4399-7"
|
||||||
|
x1="48.714352"
|
||||||
|
y1="45.585785"
|
||||||
|
x2="40.714352"
|
||||||
|
y2="24.585787"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(1.2856487,1.4142136)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4393-9">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#204a87;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4395-8" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#3465a4;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4397-1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient73208"
|
||||||
|
id="linearGradient69042"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(-12.714351,-17.585786)"
|
||||||
|
x1="48.714352"
|
||||||
|
y1="45.585785"
|
||||||
|
x2="44.714352"
|
||||||
|
y2="34.585785" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4383-1"
|
||||||
|
id="linearGradient69056"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(-1.243533,-2.588112)"
|
||||||
|
x1="27.243532"
|
||||||
|
y1="54.588112"
|
||||||
|
x2="22.243532"
|
||||||
|
y2="40.588112" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4383"
|
||||||
|
id="linearGradient69709"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(21.756467,-5.588112)"
|
||||||
|
x1="20.243532"
|
||||||
|
y1="37.588112"
|
||||||
|
x2="17.243532"
|
||||||
|
y2="27.588112" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4383"
|
||||||
|
id="linearGradient69717"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(1.2856487,1.4142136)"
|
||||||
|
x1="50.714352"
|
||||||
|
y1="25.585787"
|
||||||
|
x2="48.714352"
|
||||||
|
y2="20.585787" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient73208">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#c4a000;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop73210" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#edd400;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop73212" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="10"
|
||||||
|
inkscape:cx="8.35"
|
||||||
|
inkscape:cy="27.079831"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="2160"
|
||||||
|
inkscape:window-height="1104"
|
||||||
|
inkscape:window-x="225"
|
||||||
|
inkscape:window-y="66"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="true">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid3007"
|
||||||
|
empspacing="4"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
spacingx="0.5"
|
||||||
|
spacingy="0.5" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata3564">
|
||||||
|
<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>Path-Stock</dc:title>
|
||||||
|
<dc:date>2015-07-04</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/Path/Gui/Resources/icons/Path-Stock.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"
|
||||||
|
style="display:inline">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69052"
|
||||||
|
d="m 9,35 0,-14 14,5 0,14 z"
|
||||||
|
style="fill:url(#linearGradient4389);fill-opacity:1.0;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient69056);fill-opacity:1.0;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 9,49 9,35 37,45 37,59 Z"
|
||||||
|
id="path4381"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient4399);fill-opacity:1.0;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 37,59 37,45 55,28 55,41 Z"
|
||||||
|
id="path4391"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 9,21 29,5 42,10 23,26 Z"
|
||||||
|
id="path4403"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#fce94f;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 11.008035,47.60627 11,38 l 24,8 0.0081,10.184812 z"
|
||||||
|
id="path4381-7"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#edd400;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 39.005041,54.16825 39,46 53,33 l 0.0021,7.176847 z"
|
||||||
|
id="path4391-0"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69038"
|
||||||
|
d="M 23,40 42,23 55,28 37,45 Z"
|
||||||
|
style="fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69040"
|
||||||
|
d="m 23,40 0,-14 8,-7 0,14 z"
|
||||||
|
style="fill:url(#linearGradient69042);fill-opacity:1.0;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69044"
|
||||||
|
d="m 25,36 0,-9 4,-3.5 0,9 z"
|
||||||
|
style="fill:none;stroke:#edd400;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69048"
|
||||||
|
d="M 11.008,33.60627 11,24 l 10,3 0,10 z"
|
||||||
|
style="fill:none;stroke:#fce94f;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient69709);fill-opacity:1.0;fill-rule:nonzero;stroke:#302b00;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="m 31,33 0,-14 13,5 0,14.5 z"
|
||||||
|
id="path69705"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 33,32 0,-10 9,3 0,10.5 z"
|
||||||
|
id="path69707"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69715"
|
||||||
|
d="M 44,38.5 44,24 55,15 55,28 Z"
|
||||||
|
style="fill:url(#linearGradient69717);fill-opacity:1.0;fill-rule:nonzero;stroke:#302b00;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69719"
|
||||||
|
d="m 46,34 0,-9 7,-6 0,8 z"
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69721"
|
||||||
|
d="m 31,19 11,-9 13,5 -11,9 z"
|
||||||
|
style="fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#302b00;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="temporal"
|
||||||
|
style="display:none;opacity:0.58800001"
|
||||||
|
sodipodi:insensitive="true">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path68967"
|
||||||
|
d="M 9,35 9,49"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path68971"
|
||||||
|
d="M 9,35 37,45"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 55,28 0,13"
|
||||||
|
id="path68973"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 37,45 55,28"
|
||||||
|
id="path68977"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path68983"
|
||||||
|
d="M 23,40 23,26"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path68985"
|
||||||
|
d="m 29,5 13,5"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 23,26 42,10"
|
||||||
|
id="path68989"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 19,13 29,5"
|
||||||
|
id="path68993"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 55,15 -9,8"
|
||||||
|
id="path68997"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69030"
|
||||||
|
d="M 42,23 42,10"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 42,23 14,5"
|
||||||
|
id="path69034"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69036"
|
||||||
|
d="M 23,40 42,23"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path69711"
|
||||||
|
d="m 23,10 19,0"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 34,17 0,13"
|
||||||
|
id="path69713"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 15 KiB |
240
freecad_workbench/UI/icons/auxDatum.svg
Normal file
|
@ -0,0 +1,240 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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="svg5821"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="1.0 (1.0+r73+1)"
|
||||||
|
sodipodi:docname="Asm4_Datum.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:export-filename="/home/normand/Images/Icônes/PartDesign_Std_Plane_nc1.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs5823">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient6349">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop6351" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop6353" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3377">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0019a3;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3379" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0069ff;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3381" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3377"
|
||||||
|
id="linearGradient3383"
|
||||||
|
x1="901.1875"
|
||||||
|
y1="1190.875"
|
||||||
|
x2="1267.9062"
|
||||||
|
y2="1190.875"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-1,0,0,1,2199.356,0)" />
|
||||||
|
<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="perspective5829" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient6349"
|
||||||
|
id="radialGradient6355"
|
||||||
|
cx="1103.6399"
|
||||||
|
cy="1424.4465"
|
||||||
|
fx="1103.6399"
|
||||||
|
fy="1424.4465"
|
||||||
|
r="194.40614"
|
||||||
|
gradientTransform="matrix(-1.4307499,-1.3605156e-7,-1.202713e-8,0.1264801,2674.7488,1244.2826)"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3776"
|
||||||
|
id="linearGradient3782"
|
||||||
|
x1="33.052631"
|
||||||
|
y1="73.676765"
|
||||||
|
x2="23.483253"
|
||||||
|
y2="19.131313"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3776">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#cc0000;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3778" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ef2929;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3780" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="8.0773852"
|
||||||
|
inkscape:cx="50.403398"
|
||||||
|
inkscape:cy="46.554586"
|
||||||
|
inkscape:current-layer="g3360-3"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1048"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="32"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-bbox="false"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-global="false"
|
||||||
|
inkscape:document-rotation="0">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid2997"
|
||||||
|
empspacing="2"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5826">
|
||||||
|
<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:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>[wmayer]</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:title>Sketcher_Sketch</dc:title>
|
||||||
|
<dc:date>2011-10-10</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/Sketcher/Gui/Resources/icons/Sketcher_Sketch.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="g3360"
|
||||||
|
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||||
|
inkscape:export-xdpi="3.2478156"
|
||||||
|
inkscape:export-ydpi="3.2478156"
|
||||||
|
transform="matrix(0.1367863,0,0,0.1367863,-119.15519,-134.86962)">
|
||||||
|
<g
|
||||||
|
id="g3360-3"
|
||||||
|
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||||
|
inkscape:export-xdpi="3.2478156"
|
||||||
|
inkscape:export-ydpi="3.2478156"
|
||||||
|
transform="translate(-2.96179e-7,2.9614273e-6)">
|
||||||
|
<g
|
||||||
|
transform="matrix(0.86585328,0,0,1.0022331,158.36626,-5.6554462)"
|
||||||
|
id="g860">
|
||||||
|
<rect
|
||||||
|
transform="matrix(0.86410236,0.50331612,-0.8660254,0.5,0,0)"
|
||||||
|
y="479.03436"
|
||||||
|
x="1745.9357"
|
||||||
|
height="266.99686"
|
||||||
|
width="266.52176"
|
||||||
|
id="rect3860-36-6"
|
||||||
|
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#c1b7bb;stroke-width:36.8974;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
|
||||||
|
<rect
|
||||||
|
ry="2.5860298"
|
||||||
|
transform="matrix(0.8660254,0.5,-0.8660254,0.5,0,0)"
|
||||||
|
y="487.53268"
|
||||||
|
x="1749.7632"
|
||||||
|
height="265.90598"
|
||||||
|
width="267.47815"
|
||||||
|
id="rect3860-3-1"
|
||||||
|
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#999999;fill-opacity:1;stroke:#d6d6d6;stroke-width:15.7117;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
|
||||||
|
<g
|
||||||
|
transform="matrix(1,0,0,-1,15.589571,2441.7923)"
|
||||||
|
id="g4172">
|
||||||
|
<rect
|
||||||
|
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#999999;fill-opacity:0.5;stroke:#403c3d;stroke-width:36.8936;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||||
|
id="rect3860-36"
|
||||||
|
width="266.52176"
|
||||||
|
height="266.99686"
|
||||||
|
x="1138.8126"
|
||||||
|
y="1717.2489"
|
||||||
|
transform="matrix(0.86793573,-0.49667653,0,1,0,0)" />
|
||||||
|
<rect
|
||||||
|
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;stroke:#897e7e;stroke-width:15.7117;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||||
|
id="rect3860-3"
|
||||||
|
width="267.47815"
|
||||||
|
height="265.90598"
|
||||||
|
x="1141.3009"
|
||||||
|
y="1723.0597"
|
||||||
|
transform="matrix(0.8660254,-0.5,0,1,0,0)"
|
||||||
|
ry="2.5860298" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(14.62135,61.744554)"
|
||||||
|
id="g4162">
|
||||||
|
<rect
|
||||||
|
style="fill:#b90720;fill-opacity:1;stroke:#172a04;stroke-width:13.677;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4154"
|
||||||
|
width="289.10248"
|
||||||
|
height="22.203979"
|
||||||
|
x="1130.2279"
|
||||||
|
y="528.82843"
|
||||||
|
ry="10.96601"
|
||||||
|
rx="0"
|
||||||
|
transform="matrix(0.8660254,0.5,0,1,0,0)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 8.6 KiB |
254
freecad_workbench/UI/icons/featureframecreator.svg
Normal file
|
@ -0,0 +1,254 @@
|
||||||
|
<?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="svg7430"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 55">
|
||||||
|
<defs
|
||||||
|
id="defs7432">
|
||||||
|
<radialGradient
|
||||||
|
r="22"
|
||||||
|
fy="91.956673"
|
||||||
|
fx="225.93762"
|
||||||
|
cy="91.956673"
|
||||||
|
cx="225.93762"
|
||||||
|
gradientTransform="matrix(-1.4090915,3.8636359,-0.97565325,-0.35582669,693.7938,-749.33348)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient3061"
|
||||||
|
xlink:href="#linearGradient3084"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3084">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#729fcf;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3086" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#204a87;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3088" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3857"
|
||||||
|
id="radialGradient3863"
|
||||||
|
cx="43.783218"
|
||||||
|
cy="41.446495"
|
||||||
|
fx="43.783218"
|
||||||
|
fy="41.446495"
|
||||||
|
r="12.458333"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.38461542,0.38461546,-0.84615388,0.84615382,61.897077,-11.243146)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3857">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3859" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d3d7cf;stop-opacity:0.4"
|
||||||
|
offset="1"
|
||||||
|
id="stop3861" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="22"
|
||||||
|
fy="91.956673"
|
||||||
|
fx="225.93762"
|
||||||
|
cy="91.956673"
|
||||||
|
cx="225.93762"
|
||||||
|
gradientTransform="matrix(-1.4090915,3.8636359,-0.97565325,-0.35582669,439.26643,-814.94734)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient7462"
|
||||||
|
xlink:href="#linearGradient3084"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.5"
|
||||||
|
inkscape:cx="31.272727"
|
||||||
|
inkscape:cy="32"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="885"
|
||||||
|
inkscape:window-height="635"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7435">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
style="fill:url(#radialGradient7462);fill-opacity:1;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
d="m 34.181818,4.2727238 -21,52.0000072 c 0,8 42,8 42,0 z"
|
||||||
|
id="path3039"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 34.181818,9.2727238 -19,47.0000072 c 3,6 35,6 38,0 z"
|
||||||
|
id="path3817"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<path
|
||||||
|
style="fill:#c17d11;fill-opacity:1;stroke:#271903;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:2.04"
|
||||||
|
d="m 39.181818,26.272729 4,-4 10,10.000013 -4,3.999989 z"
|
||||||
|
id="rect3057"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#e9b96e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 51.081828,32.972732 -10,-9.999997"
|
||||||
|
id="path3865"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<g
|
||||||
|
id="g4792"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(0.62901767,-0.34747949,0.37951469,0.68700873,-3.3397857,6.0535633)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:url(#radialGradient3863);fill-opacity:1;stroke:#2e3436;stroke-width:1.91666663;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:2.04"
|
||||||
|
id="path3055"
|
||||||
|
sodipodi:cx="47.5"
|
||||||
|
sodipodi:cy="44.5"
|
||||||
|
sodipodi:rx="11.5"
|
||||||
|
sodipodi:ry="11.5"
|
||||||
|
d="m 59,44.5 a 11.5,11.5 0 1 1 -23,0 11.5,11.5 0 1 1 23,0 z"
|
||||||
|
transform="matrix(1.0434783,0,0,1.0434783,-16.383402,-30.162054)" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:none;stroke:#d3d7cf;stroke-width:2.29999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:2.04"
|
||||||
|
id="path3055-1"
|
||||||
|
sodipodi:cx="47.5"
|
||||||
|
sodipodi:cy="44.5"
|
||||||
|
sodipodi:rx="11.5"
|
||||||
|
sodipodi:ry="11.5"
|
||||||
|
d="m 59,44.5 a 11.5,11.5 0 1 1 -23,0 11.5,11.5 0 1 1 23,0 z"
|
||||||
|
transform="matrix(0.86956525,0,0,0.86956521,-8.1225322,-22.422923)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 10 KiB |
152
freecad_workbench/UI/icons/frame.svg
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="64px"
|
||||||
|
height="64px"
|
||||||
|
id="svg6384"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 37">
|
||||||
|
<defs
|
||||||
|
id="defs6386" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.9445436"
|
||||||
|
inkscape:cx="33.122262"
|
||||||
|
inkscape:cy="42.611518"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="472"
|
||||||
|
inkscape:window-height="383"
|
||||||
|
inkscape:window-x="968"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata6389">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<g
|
||||||
|
id="g4792"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(1.3322492,0,0,1.4550733,-13.530887,-8.9206423)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
80
freecad_workbench/UI/icons/gazeboexport.svg
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
id="svg6408"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 18">
|
||||||
|
<defs
|
||||||
|
id="defs6410" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.979899"
|
||||||
|
inkscape:cx="170.62581"
|
||||||
|
inkscape:cy="178.84029"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1749"
|
||||||
|
inkscape:window-height="1203"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata6413">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-752.36218)">
|
||||||
|
<g
|
||||||
|
transform="matrix(1.7219458,0,0,1.7219458,-240.52546,490.39612)"
|
||||||
|
id="g6387">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4004"
|
||||||
|
d="m 164.74024,205.99021 1.89902,67.41531 59.81923,38.92997 0.94951,-34.65717 35.13192,-19.46498 z"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
d="m 222.38424,244.55563 2.02975,1.25975 c 0.72813,0.45312 1.55275,0.67775 2.38038,0.67775 0.82574,0 1.65337,-0.22463 2.38337,-0.68113 l 2.03225,-1.26463 20.60538,12.75975 -27.51213,17.13288 c -1.32725,0.82362 -2.13288,2.27775 -2.1265,3.84512 l 0.0805,28.07713 -49.7045,-30.86425 49.8315,-30.94237 z m -54.03223,-33.54926 45.47998,28.23975 -45.47998,28.23825 0,-56.478 z m 125.63548,28.14788 c -0.004,-1.63325 -0.8925,-3.13962 -2.32625,-3.933 -1.43,-0.792 -3.17875,-0.74712 -4.5675,0.11712 l -26.73338,16.648 -20.60312,-12.75887 52.209,-32.51463 c 1.325,-0.82512 2.13125,-2.27537 2.13125,-3.83637 -0.004,-1.55763 -0.8125,-3.00838 -2.1375,-3.82963 l -62.79113,-38.88062 c -1.4575,-0.90375 -3.29824,-0.90125 -4.75487,0.002 l -62.79292,38.99137 c -1.3252,0.82175 -2.13233,2.272 -2.13233,3.83301 0,0.40574 0,72.09862 0,72.50487 0,1.56062 0.80713,3.01025 2.13233,3.8345 l 62.79292,38.98977 c 0.0307,0.019 0.0625,0.0303 0.0929,0.0478 0.0346,0.0186 0.0634,0.0449 0.0991,0.0659 0.0708,0.0376 0.1455,0.0664 0.21963,0.10254 0.0732,0.0376 0.14499,0.0737 0.22224,0.10645 0.11713,0.0474 0.23676,0.0889 0.35638,0.125 0.0709,0.0249 0.13925,0.0513 0.2115,0.0688 0.13425,0.041 0.27187,0.0625 0.40863,0.0884 0.0571,0.0117 0.11724,0.0254 0.17574,0.0288 0.19688,0.0303 0.3955,0.0439 0.59238,0.0439 l 0,0 c 0,0 0.001,0 0.002,0 0.40926,0 0.82188,-0.0576 1.21825,-0.16748 0.004,-0.004 0.006,-0.004 0.006,-0.004 0.15387,-0.041 0.30525,-0.10254 0.45412,-0.16113 0.0449,-0.0186 0.0927,-0.0298 0.13676,-0.0474 0.126,-0.0552 0.24262,-0.12891 0.36225,-0.19532 0.066,-0.0361 0.13574,-0.0649 0.20074,-0.10253 l 0.002,-0.003 c 0.003,0 0.003,0 0.003,0 l 0.12062,-0.0762 62.66538,-38.91018 c 1.33125,-0.82762 2.13625,-2.28175 2.13375,-3.84912 l -0.11,-36.32913"
|
||||||
|
id="path3115"
|
||||||
|
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
d="m 231.20499,280.76812 0.0772,25.623 53.784,-33.398 -0.075,-25.71625 -53.78625,33.49125"
|
||||||
|
id="path3117"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
d="m 172.55274,202.99313 54.23975,33.67824 54.23925,-33.77687 -54.23437,-33.58575 -54.24463,33.68438"
|
||||||
|
id="path3119"
|
||||||
|
style="fill:#f58113;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
BIN
freecad_workbench/UI/icons/github_preview.png
Normal file
After Width: | Height: | Size: 101 KiB |
49
freecad_workbench/UI/icons/inserttask.svg
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?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="svg4339" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="inserttask.svg">
|
||||||
|
<defs id="defs4341">
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3801" id="linearGradient3807" x1="110" y1="35" x2="85" y2="35" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="translate(-61,23.272727)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3801">
|
||||||
|
<stop style="stop-color:#c4a000;stop-opacity:1" offset="0" id="stop3803" />
|
||||||
|
<stop style="stop-color:#fce94f;stop-opacity:1" offset="1" id="stop3805" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3801-5" id="linearGradient3807-7" x1="110" y1="35" x2="85" y2="35" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(0.67526107,0,0,0.67526107,-31.705858,16.546964)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3801-5">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3803-9" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3805-2" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3801-5-7" id="linearGradient3807-7-9" x1="110" y1="35" x2="85" y2="35" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(0.72727273,0,0,0.72727273,-36.272728,10.363637)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3801-5-7">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3803-9-3" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3805-2-6" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3801-5" id="linearGradient9363" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.25185691,0,0,0.33739682,10.761638,12.267711)" spreadMethod="reflect" x1="110" y1="35" x2="85" y2="35" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.8520325" inkscape:cx="27.226073" inkscape:cy="45.767531" inkscape:current-layer="layer1" showgrid="true" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:snap-global="true" inkscape:snap-object-midpoints="false" inkscape:window-width="1375" inkscape:window-height="811" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1">
|
||||||
|
<inkscape:grid type="xygrid" id="grid9407" empspacing="5" visible="true" enabled="true" snapvisiblegridlinesonly="true" spacingx="0.8px" spacingy="0.8px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata id="metadata4344">
|
||||||
|
<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 />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,32 12,0 c 0,0 0,-4 12,-4 12,0 12,4 12,4 l 12,0 4,-8 -48,0 z" id="path9453" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 56,32 0,16 -12,0 c 0,0 0,4 -12,4 C 20,52 20,48 20,48 L 8,48 8,32 20,32 c 0,0 0,4 12,4 12,0 12,-4 12,-4 z" id="path9459" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#ef2929;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0" d="m 20,32 0,16 c 0,0 0,-4 12,-4 12,0 12,4 12,4 l 0,-16 c 0,0 0,-4 -12,-4 -12,0 -12,4 -12,4 z" id="path9461" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.75" d="M 4,56 4,40 8,32 8,48 z" id="path9477" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;opacity:0.75000000000000000" d="m 4,40 0,16 48,0 0,-16 z" id="path9457" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 56,48 4,-8 0,-16 -4,8 z" id="path9465" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;opacity:0.75000000000000000" d="m 8,32 -4,8 48,0 4,-8 -12,0 c 0,0 0,4 -12,4 -12,0 -12,-4 -12,-4 z" id="path9471" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.75" d="m 52,56 4,-8 0,-16 -4,8 z" id="path9475" inkscape:connector-curvature="0" />
|
||||||
|
<g id="g9521" transform="translate(0.59307628,-0.76413336)">
|
||||||
|
<path inkscape:connector-curvature="0" id="path9461-5" d="m 43.268756,23.699378 0,-15.4239998 c 0,0 0,3.8559998 -11.568,3.8559998 -11.568,0 -11.568,-3.8559998 -11.568,-3.8559998 l 0,15.4239998 c 0,0 0,3.856 11.568,3.856 11.568,0 11.568,-3.856 11.568,-3.856 z" style="fill:#ef2929;stroke:#000000;stroke-width:0.96399993;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path9519" d="m 20.132756,8.2753782 c 0,0 0,-3.8559999 11.568,-3.8559999 11.568,0 11.568,3.8559999 11.568,3.8559999 0,0 0,3.8559998 -11.568,3.8559998 -11.568,0 -11.568,-3.8559998 -11.568,-3.8559998 z" style="fill:#729fcf;stroke:#000000;stroke-width:0.96399993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.3 KiB |
384
freecad_workbench/UI/icons/partframe.svg
Normal file
|
@ -0,0 +1,384 @@
|
||||||
|
<?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="svg2860"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="Part_ShapeInfo.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:export-filename="/home/user/Downloads/cad/freecad1_oce/mystuff/stuffchanged/newicons/JimsPartIcons/Part_ShapeInfo64.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs2862">
|
||||||
|
<inkscape:path-effect
|
||||||
|
is_visible="true"
|
||||||
|
id="path-effect3075"
|
||||||
|
effect="spiro" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3775">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#faff2b;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3777" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffaa00;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3779" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect3076"
|
||||||
|
is_visible="true" />
|
||||||
|
<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>
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect3076-2"
|
||||||
|
is_visible="true" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect3808"
|
||||||
|
is_visible="true" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect3076-9"
|
||||||
|
is_visible="true" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3011-6"
|
||||||
|
id="radialGradient3174-3"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-1.4090915,3.8636359,-0.97565325,-0.35582669,355.44592,-815.80833)"
|
||||||
|
cx="225.93762"
|
||||||
|
cy="91.956673"
|
||||||
|
fx="225.93762"
|
||||||
|
fy="91.956673"
|
||||||
|
r="22" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3011-6"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<stop
|
||||||
|
id="stop3013-7"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#fce94f;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop3015-5"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#c4a000;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3777"
|
||||||
|
id="linearGradient3220"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.79109028,0,0,0.78516507,69.03755,5.1139279)"
|
||||||
|
x1="53.896763"
|
||||||
|
y1="51.179787"
|
||||||
|
x2="47.502235"
|
||||||
|
y2="21.83742" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3777">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#c4a000;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3779-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#edd400;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3781" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3767"
|
||||||
|
id="linearGradient3222"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.82352937,0,0,0.77272731,68.529413,5.8636358)"
|
||||||
|
x1="22.116516"
|
||||||
|
y1="55.717518"
|
||||||
|
x2="17.328547"
|
||||||
|
y2="21.31134" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3767">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#edd400;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3769" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#fce94f;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3771" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:path-effect
|
||||||
|
is_visible="true"
|
||||||
|
id="path-effect3075-6"
|
||||||
|
effect="spiro" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="10.672523"
|
||||||
|
inkscape:cx="32.760661"
|
||||||
|
inkscape:cy="34.286167"
|
||||||
|
inkscape:current-layer="g3163"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="1375"
|
||||||
|
inkscape:window-height="811"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-nodes="false">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid3073"
|
||||||
|
empspacing="2"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata2865">
|
||||||
|
<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>[wmayer]</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:title>Part_ShapeInfo</dc:title>
|
||||||
|
<dc:date>2011-10-21</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/Part/Gui/Resources/icons/Part_ShapeInfo.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="g3618"
|
||||||
|
transform="translate(-129.7515,-68.681262)">
|
||||||
|
<g
|
||||||
|
id="g3163"
|
||||||
|
transform="translate(71.7515,76.68126)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2993"
|
||||||
|
d="m 71,19 28,5 18,-7 -23.84947,-3.42198 z"
|
||||||
|
style="fill:#fce94f;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2995"
|
||||||
|
d="m 117,17 0,28 -18,8 0,-30 z"
|
||||||
|
style="fill:url(#linearGradient3220);fill-opacity:1;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient3222);fill-opacity:1;fill-rule:evenodd;stroke:#302b00;stroke-width:1.99999988;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 71,19 28,4 0,30.000002 -28,-4.636365 z"
|
||||||
|
id="path3825"
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3765"
|
||||||
|
d="M 72.993,21.368254 73,46.6 l 24,4 -0.007,-25.843 z"
|
||||||
|
style="fill:none;stroke:#fce94f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3775"
|
||||||
|
d="m 101,24.5 0,25.6 14,-6.4 0,-23.8 z"
|
||||||
|
style="fill:none;stroke:#edd400;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g4792"
|
||||||
|
style="stroke-width:1.60000002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="matrix(0.67056429,0,0,0.73238565,125.13259,64.608603)">
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:#000000;stroke-width:2.34711409;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 32.679504,12.145359 -1.645803,2.84862 -1.645803,2.848621 2.164344,0 0,15.110077 c -0.652792,0.422664 -1.086869,1.135456 -1.127263,1.961007 l -12.219523,6.832562 -0.969446,-1.733943 -1.578167,2.662841 -1.578167,2.642199 3.088698,0.04128 3.088699,0.04128 -0.9469,-1.672017 12.039161,-6.749993 c 0.426007,0.340749 0.967678,0.536697 1.555622,0.536697 0.97078,0 1.798652,-0.551924 2.209435,-1.362384 l 14.6995,0.206422 -0.02255,2.146787 2.863246,-1.610091 2.863246,-1.61009 -2.818155,-1.672016 -2.818156,-1.692659 -0.02255,2.167429 -14.744591,-0.18578 c -0.276375,-0.539009 -0.738838,-0.954624 -1.307625,-1.176604 l 0,-14.883013 2.164344,0 -1.645803,-2.848621 -1.645803,-2.84862 z"
|
||||||
|
id="rect3039-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
y="15.941667"
|
||||||
|
x="31.545361"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,0.26435064,8.6019885)"
|
||||||
|
inkscape:transform-center-y="-0.94840389"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043"
|
||||||
|
style="fill:#729fcf;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.0130695,0.99991459,-0.99991459,-0.0130695,0,0)"
|
||||||
|
y="-52.183987"
|
||||||
|
x="33.423866"
|
||||||
|
height="19.048214"
|
||||||
|
width="2.271805"
|
||||||
|
id="rect3039-3"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-0.92685398"
|
||||||
|
inkscape:transform-center-y="-0.024790177"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6"
|
||||||
|
style="fill:#ef2929;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.01256173,0.96106627,-0.96106627,-0.01256173,59.490575,2.9206132)" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(-0.48864025,-0.87248536,0.87248701,-0.4886373,0,0)"
|
||||||
|
y="-7.3576851"
|
||||||
|
x="-47.582092"
|
||||||
|
height="18.921833"
|
||||||
|
width="2.2567275"
|
||||||
|
id="rect3039-3-7"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="0.0233072"
|
||||||
|
inkscape:transform-center-y="-0.87140186"
|
||||||
|
d="m 37.145445,9.6098442 -3.418169,0 -3.418169,0 1.709084,-2.960221 1.709085,-2.9602211 1.709084,2.960221 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.5707963"
|
||||||
|
sodipodi:arg1="0.52359878"
|
||||||
|
sodipodi:r2="1.9734807"
|
||||||
|
sodipodi:r1="3.9469614"
|
||||||
|
sodipodi:cy="7.6363635"
|
||||||
|
sodipodi:cx="33.727276"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path3043-6-5"
|
||||||
|
style="fill:#8ae234;fill-rule:evenodd;stroke:none"
|
||||||
|
sodipodi:type="star"
|
||||||
|
transform="matrix(-0.44155795,-0.78841815,0.78842129,-0.4415562,26.06505,73.540728)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.96114836,0,0,0.96114836,-1.6579462,-1.0968723)"
|
||||||
|
d="m 38.545456,37.590908 c 0,1.43092 -1.159989,2.590909 -2.590908,2.590909 -1.430919,0 -2.590908,-1.159989 -2.590908,-2.590909 0,-1.430919 1.159989,-2.590909 2.590908,-2.590909 1.430919,0 2.590908,1.15999 2.590908,2.590909 z"
|
||||||
|
sodipodi:ry="2.590909"
|
||||||
|
sodipodi:rx="2.5909083"
|
||||||
|
sodipodi:cy="37.590908"
|
||||||
|
sodipodi:cx="35.954548"
|
||||||
|
id="path4366"
|
||||||
|
style="fill:#fce94f;stroke:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3866"
|
||||||
|
transform="translate(-0.18097,2.2293053)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="csssc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:original-d="m 147.93247,83.778883 c 3.4411,-8.506183 27.00312,1.297037 21.85148,11.450722 -1.85745,3.660955 -8.83783,6.411525 -11.92001,9.448945 -3.48475,3.43417 -1.11244,-2.0533 -1.11244,4.00271 0,3 0,2 0,4"
|
||||||
|
inkscape:path-effect="#path-effect3076"
|
||||||
|
id="path3074"
|
||||||
|
d="m 147.93247,83.778883 c 0.81237,-3.858821 3.51206,-7.273515 7.07935,-8.954275 3.56728,-1.68076 7.91929,-1.588544 11.41217,0.241814 3.49288,1.830359 6.04551,5.356345 6.6937,9.246114 0.64818,3.889769 -0.62313,8.052971 -3.33374,10.917069 -1.75374,1.853043 -4.00899,3.134652 -6.17494,4.482987 -2.16596,1.348338 -4.32985,2.843108 -5.74507,4.965958 -0.39126,0.5869 -0.71613,1.22352 -0.90052,1.90436 -0.18438,0.68083 -0.21192,1.39299 -0.21192,2.09835 l 0,4"
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3011"
|
||||||
|
style="fill:none;stroke:#16d0d2;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 147.93247,84.054862 c 0.6406,-4.041309 3.31501,-7.707217 6.96781,-9.551011 3.65281,-1.843794 8.19051,-1.818285 11.82235,0.06646 3.63184,1.884746 6.26487,5.580491 6.85999,9.628746 0.59512,4.048256 -0.8629,8.345412 -3.79867,11.19564 -1.82858,1.775297 -4.12759,2.967137 -6.30722,4.287969 -2.17963,1.320833 -4.33592,2.863803 -5.61279,5.069473 -0.70845,1.22379 -1.1158,2.61098 -1.26025,4.01764 -0.12007,1.16922 -0.0614,2.35663 0.17343,3.5083"
|
||||||
|
inkscape:path-effect="#path-effect3075"
|
||||||
|
inkscape:original-d="m 147.93247,84.054862 c 3.4411,-8.423811 27.00312,1.284477 21.85148,11.339836 -1.85745,3.625503 -8.83783,6.349442 -11.92001,9.357442 -3.48475,3.40092 0.22192,-0.32188 -1.26025,4.01764 -0.99163,2.9033 -0.76327,1.22292 0.17343,3.5083"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="csssc" />
|
||||||
|
<path
|
||||||
|
id="path3011-7"
|
||||||
|
style="fill:none;stroke:#34e0e2;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 147.44781,82.697555 c 0.86224,-3.821346 3.5811,-7.178164 7.14,-8.815345 3.5589,-1.637181 7.87702,-1.517542 11.33981,0.314185 3.46279,1.831728 5.99161,5.33394 6.64094,9.197166 0.64932,3.863227 -0.59559,7.999725 -3.26927,10.862865 -1.74762,1.871459 -4.00446,3.170044 -6.17223,4.532874 -2.16777,1.36283 -4.33397,2.87044 -5.74778,5.00531 -0.80384,1.2138 -1.33911,2.60623 -1.54135,4.04795 -0.16676,1.18883 -0.10759,2.40896 0.17343,3.57607"
|
||||||
|
inkscape:path-effect="#path-effect3075-6"
|
||||||
|
inkscape:original-d="m 147.44781,82.697555 c 3.4411,-8.586521 27.00312,1.309287 21.85148,11.558871 -1.85745,3.695532 -8.83783,6.472084 -11.92001,9.538184 -3.48475,3.46661 -0.0592,-0.37539 -1.54135,4.04795 -0.99163,2.95938 -0.76327,1.24654 0.17343,3.57607"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="csssc" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:#34e0e2;fill-opacity:1;stroke:#042a2a;stroke-width:1.49073517;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:20.4"
|
||||||
|
id="path3871"
|
||||||
|
sodipodi:cx="26.932613"
|
||||||
|
sodipodi:cy="59.130264"
|
||||||
|
sodipodi:rx="2.9814701"
|
||||||
|
sodipodi:ry="2.9814701"
|
||||||
|
d="m 29.914083,59.130264 c 0,1.646621 -1.334849,2.98147 -2.98147,2.98147 -1.64662,0 -2.98147,-1.334849 -2.98147,-2.98147 0,-1.64662 1.33485,-2.98147 2.98147,-2.98147 1.646621,0 2.98147,1.33485 2.98147,2.98147 z"
|
||||||
|
transform="matrix(1.3416199,0,0,1.3416199,120.61817,46.350924)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 17 KiB |
262
freecad_workbench/UI/icons/parttojson.svg
Normal file
|
@ -0,0 +1,262 @@
|
||||||
|
<?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="svg6752"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="New document 44">
|
||||||
|
<defs
|
||||||
|
id="defs6754">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4081">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ef2929;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4083" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#a40000;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4085" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4081"
|
||||||
|
id="linearGradient7020"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.83065033,0.55679442,-0.55679442,0.83065033,34.6951,-1.2386055)"
|
||||||
|
x1="14.824193"
|
||||||
|
y1="50.468616"
|
||||||
|
x2="20.93985"
|
||||||
|
y2="56.000233" />
|
||||||
|
<linearGradient
|
||||||
|
y2="60"
|
||||||
|
x2="16"
|
||||||
|
y1="48"
|
||||||
|
x1="12"
|
||||||
|
gradientTransform="matrix(-1,0,0,1,3.7546294,-19.78136)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="linearGradient3049"
|
||||||
|
xlink:href="#linearGradient4081-6"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4081-6">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#8ae234;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4083-7" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4e9a06;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4085-53" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
y2="60"
|
||||||
|
x2="16"
|
||||||
|
y1="48"
|
||||||
|
x1="12"
|
||||||
|
gradientTransform="translate(3.1909099,-2.1818172)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="linearGradient7125"
|
||||||
|
xlink:href="#linearGradient4081-6"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.5"
|
||||||
|
inkscape:cx="32"
|
||||||
|
inkscape:cy="32"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:snap-object-midpoints="true"
|
||||||
|
inkscape:window-width="687"
|
||||||
|
inkscape:window-height="783"
|
||||||
|
inkscape:window-x="752"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata6757">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
style="fill:#204a87;stroke:none"
|
||||||
|
d="m 31.000001,11.545457 0,19.999997 -12.000001,8 0,-19.999999 z"
|
||||||
|
id="path3150-7"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 19,37.545454 31.000001,29.545455"
|
||||||
|
id="path3930"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 28.999998,33.545454 0,-19.999999"
|
||||||
|
id="path3932"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 31.000001,13.545455 19,21.545455"
|
||||||
|
id="path3934"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 20.999997,17.545455 0,19.999999"
|
||||||
|
id="path3936"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#3465a4;stroke:none"
|
||||||
|
d="m 19,39.545454 -16.0000006,-8 0,-19.999998 L 19,19.545454 z"
|
||||||
|
id="path3152-1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 16.999997,19.545455 0,17.999999"
|
||||||
|
id="path3938"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 2.9999994,29.545454 19,37.545454"
|
||||||
|
id="path3940"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 5.0000031,31.545454 0,-17.999999"
|
||||||
|
id="path3942"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 31.000001,11.545456 0,19.999999 L 19,39.545454 19,19.545456 z"
|
||||||
|
id="path3150"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 19,21.545455 -16.0000006,-8"
|
||||||
|
id="path3944"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="m 19,39.545454 -16.0000006,-8 0,-19.999998 L 19,19.545455 z"
|
||||||
|
id="path3152"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#729fcf;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 31.000001,11.545456 19,19.545455 2.9999994,11.545456 15.000001,3.5454545 l 16,8.0000015"
|
||||||
|
id="path3156"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:none;display:inline"
|
||||||
|
d="m 35.090876,17.81818 0,35.999998 24,0 0,-27.999998 -8,-8 z"
|
||||||
|
id="path4219"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#ffffff;stroke:none;display:inline"
|
||||||
|
d="m 35.090909,17.818182 0,35.999998 24,0 0,-27.999998 -8,-8 z"
|
||||||
|
id="path4219-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#888a85;stroke:none;display:inline"
|
||||||
|
d="m 51.090909,17.818182 0,8 8,0 z"
|
||||||
|
id="path4245"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline"
|
||||||
|
d="m 51.090909,17.818182 0,8 8,0"
|
||||||
|
id="path4221"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090836,21.81818 8,0"
|
||||||
|
id="path4247"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090836,31.81818 16,0"
|
||||||
|
id="path4251"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090804,25.81818 8,0"
|
||||||
|
id="path4247-3"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;display:inline"
|
||||||
|
d="m 35.09091,17.818182 0,35.999998 23.999999,0 0,-27.999998 -8,-8 z"
|
||||||
|
id="path4219-6-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090836,35.81818 16,0"
|
||||||
|
id="path4251-4"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090836,39.81818 16,0"
|
||||||
|
id="path4251-7"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 39.090836,43.81818 16,0"
|
||||||
|
id="path4251-4-4"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient7125);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
d="m 19.190911,57.818182 12,-8 -12,-8 0,4 -12.0000011,0 0,8 12.0000011,0 z"
|
||||||
|
id="rect3165"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#8ae234;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline"
|
||||||
|
d="m 21.190911,53.818182 0,-2 -12.0000015,0 0,-4"
|
||||||
|
id="path4087"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#8ae234;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="M 19.009093,55.409091 29.054548,48.681819"
|
||||||
|
id="path4089"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#8ae234;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
|
||||||
|
d="m 19.190911,51.818182 2,2"
|
||||||
|
id="path4091"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#172a04;stroke-width:2.20000005;stroke-linecap:round;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 19.09091,57.818182 12,-8 -12,-8 0,4 -12.0000019,0 0,8 12.0000019,0 z"
|
||||||
|
id="rect3165-1"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 11 KiB |
66
freecad_workbench/UI/icons/placetask.svg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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" version="1.1" id="svg2816" height="64px" width="64px" inkscape:version="0.48.4 r9939" sodipodi:docname="plasetask.svg">
|
||||||
|
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1375" inkscape:window-height="811" id="namedview8" showgrid="true" inkscape:snap-global="true" inkscape:zoom="7.375" inkscape:cx="13.685213" inkscape:cy="39.431348" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2816">
|
||||||
|
<inkscape:grid type="xygrid" id="grid2985" empspacing="1" visible="true" enabled="true" snapvisiblegridlinesonly="true" spacingx="0.8px" spacingy="0.8px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs id="defs2818">
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3799">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3801" />
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="1" id="stop3803" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3773">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="0" id="stop3775" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3777" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3773" id="linearGradient3779" x1="21.38983" y1="54.203388" x2="19.118645" y2="38" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.74237288,0,0,0.74237288,8.1084746,15.186441)" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3799" id="linearGradient3805" x1="54.40678" y1="40.631996" x2="47.966103" y2="32.76759" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.74237288,0,0,0.74237288,8.1084746,15.186441)" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3799-9" id="linearGradient3805-1" x1="54.40678" y1="40.631996" x2="47.966103" y2="32.76759" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.52090396,0,0,0.52090396,-10.567231,-6.7288135)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3799-9">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3801-7" />
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="1" id="stop3803-1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3773-1" id="linearGradient3779-3" x1="21.38983" y1="54.203388" x2="19.118645" y2="38" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.52090396,0,0,0.52090396,-10.567231,-6.7288135)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3773-1">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="0" id="stop3775-2" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3777-0" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<metadata id="metadata2821">
|
||||||
|
<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:title>Path-BaseGeometry</dc:title>
|
||||||
|
<dc:date>2016-05-15</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/Path/Gui/Resources/icons/Path-BaseGeometry.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>
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 0,16 44,0 0,-16 z" id="path9885" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 8,-16 44,0 -8,16 z" id="path9887" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 60,40 0,-16 -8,16 0,16 z" id="path9891" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#ef2929;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0" d="m 24.033899,35.864407 4,-8 16,0 -4,8 z" id="path10413-2" inkscape:connector-curvature="0" />
|
||||||
|
<g id="g10441" transform="translate(-2.0338983,1.7627119)">
|
||||||
|
<path inkscape:connector-curvature="0" id="path10405" d="m 25.898305,27.050847 16,0 0,-12 -16,0 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path10411" d="m 41.898305,27.050847 4,-8 0,-11.9999995 -4,7.9999995 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path10409" d="m 25.898305,15.050847 4,-7.9999995 16,0 -4,7.9999995 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.9 KiB |
66
freecad_workbench/UI/icons/plasetask.svg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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" version="1.1" id="svg2816" height="64px" width="64px" inkscape:version="0.48.4 r9939" sodipodi:docname="Path-BaseGeometry.svg">
|
||||||
|
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1375" inkscape:window-height="811" id="namedview8" showgrid="true" inkscape:snap-global="true" inkscape:zoom="7.375" inkscape:cx="13.685213" inkscape:cy="39.431348" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2816">
|
||||||
|
<inkscape:grid type="xygrid" id="grid2985" empspacing="1" visible="true" enabled="true" snapvisiblegridlinesonly="true" spacingx="0.8px" spacingy="0.8px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs id="defs2818">
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3799">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3801" />
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="1" id="stop3803" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3773">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="0" id="stop3775" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3777" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3773" id="linearGradient3779" x1="21.38983" y1="54.203388" x2="19.118645" y2="38" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.74237288,0,0,0.74237288,8.1084746,15.186441)" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3799" id="linearGradient3805" x1="54.40678" y1="40.631996" x2="47.966103" y2="32.76759" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.74237288,0,0,0.74237288,8.1084746,15.186441)" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3799-9" id="linearGradient3805-1" x1="54.40678" y1="40.631996" x2="47.966103" y2="32.76759" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.52090396,0,0,0.52090396,-10.567231,-6.7288135)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3799-9">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3801-7" />
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="1" id="stop3803-1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3773-1" id="linearGradient3779-3" x1="21.38983" y1="54.203388" x2="19.118645" y2="38" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.52090396,0,0,0.52090396,-10.567231,-6.7288135)" />
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3773-1">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="0" id="stop3775-2" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3777-0" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<metadata id="metadata2821">
|
||||||
|
<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:title>Path-BaseGeometry</dc:title>
|
||||||
|
<dc:date>2016-05-15</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/Path/Gui/Resources/icons/Path-BaseGeometry.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>
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 0,16 44,0 0,-16 z" id="path9885" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 8,-16 44,0 -8,16 z" id="path9887" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 60,40 0,-16 -8,16 0,16 z" id="path9891" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#ef2929;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0" d="m 24.033899,35.864407 4,-8 16,0 -4,8 z" id="path10413-2" inkscape:connector-curvature="0" />
|
||||||
|
<g id="g10441" transform="translate(-2.0338983,1.7627119)">
|
||||||
|
<path inkscape:connector-curvature="0" id="path10405" d="m 25.898305,27.050847 16,0 0,-12 -16,0 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path10411" d="m 41.898305,27.050847 4,-8 0,-11.9999995 -4,7.9999995 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path10409" d="m 25.898305,15.050847 4,-7.9999995 16,0 -4,7.9999995 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.9 KiB |
175
freecad_workbench/UI/icons/publish.svg
Normal file
|
@ -0,0 +1,175 @@
|
||||||
|
<?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:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" version="1.0" viewBox="0 0 1000.1043 1000" id="svg2" inkscape:version="0.91 r13725" xmlns:ns1="http://sozi.baierouge.fr">
|
||||||
|
<defs id="defs4">
|
||||||
|
<linearGradient id="linearGradient6385">
|
||||||
|
<stop id="stop6387" style="stop-color:#008000;stop-opacity:1" offset="0"/>
|
||||||
|
<stop id="stop6389" style="stop-color:#00ff00;stop-opacity:1" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linearGradient6758">
|
||||||
|
<stop id="stop6760" style="stop-color:#000000;stop-opacity:0.082474" offset="0"/>
|
||||||
|
<stop id="stop6762" style="stop-color:#000000;stop-opacity:0" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linearGradient4646">
|
||||||
|
<stop id="stop4648" style="stop-color:#ffffff;stop-opacity:0.64947999" offset="0"/>
|
||||||
|
<stop id="stop4650" style="stop-color:#ffffff;stop-opacity:0" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="linearGradient20137">
|
||||||
|
<stop id="stop20139" style="stop-color:#000593;stop-opacity:1" offset="0"/>
|
||||||
|
<stop id="stop20141" style="stop-color:#00023a;stop-opacity:1" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient cx="-32.945" cy="1548.1" r="22.421" id="radialGradient1773" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-1.8804,2.3609,-2.5012,-2.3991,3780.3,5333)">
|
||||||
|
<stop id="stop6536" style="stop-color:#16009e;stop-opacity:1" offset="0"/>
|
||||||
|
<stop id="stop6544" style="stop-color:#7ccbff;stop-opacity:1" offset="0.5"/>
|
||||||
|
<stop id="stop6546" style="stop-color:#ffffff;stop-opacity:1" offset="1"/>
|
||||||
|
</radialGradient>
|
||||||
|
<linearGradient x1="12.77" y1="1590" x2="12.767" y2="1586.4" id="linearGradient1775" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="14.402" y1="1583.6" x2="12.767" y2="1586.4" id="linearGradient1777" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="18.447001" y1="1591.1" x2="18.447001" y2="1586.7" id="linearGradient1779" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="19.006001" y1="1586.4" x2="19.424" y2="1590.5" id="linearGradient1781" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.128" y1="1593.1" x2="23.128" y2="1590.7" id="linearGradient1783" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.128" y1="1588.8" x2="23.128" y2="1594.1" id="linearGradient1785" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="48.936001" y1="1546.1" x2="47.921001" y2="1548.8" id="linearGradient1787" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="46.219002" y1="1551" x2="48.936001" y2="1546.1" id="linearGradient1789" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="59.308998" y1="1550.5" x2="53.797001" y2="1554.2" id="linearGradient1791" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="55.944" y1="1555.4" x2="60.063999" y2="1551" id="linearGradient1793" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="72.003998" y1="1548.4" x2="59.155998" y2="1566.8" id="linearGradient1795" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="59.484001" y1="1570.1" x2="69.311996" y2="1557.6" id="linearGradient1797" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="89.156998" y1="1597.3" x2="59.752998" y2="1593.9" id="linearGradient1799" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="8.7990999" y1="1589.8" x2="8.3376999" y2="1581.5" id="linearGradient1803" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="7.6469002" y1="1582.1" x2="8.1456003" y2="1586.4" id="linearGradient1805" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.75" y1="1627.2" x2="25.165001" y2="1583.7" id="linearGradient1807" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="26.212" y1="1528.3" x2="27.4" y2="1651.8" id="linearGradient1809" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="-159.14" y1="1539.4" x2="-143.82001" y2="1556.5" id="linearGradient1811" xlink:href="#linearGradient4646" gradientUnits="userSpaceOnUse"/>
|
||||||
|
<linearGradient x1="-0.89604002" y1="1561.6" x2="-4.9626999" y2="1559" id="linearGradient1813" xlink:href="#linearGradient4646" gradientUnits="userSpaceOnUse"/>
|
||||||
|
<linearGradient x1="21.447001" y1="1606.9" x2="21.447001" y2="1595.2" id="linearGradient1815" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="30.447001" y1="1567.7" x2="30.447001" y2="1533.4" id="linearGradient1817" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="44.248001" y1="1587.9" x2="44.248001" y2="1580.8" id="linearGradient1819" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="45.324001" y1="1597.3" x2="45.324001" y2="1585.4" id="linearGradient1821" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="24.447001" y1="1592.5" x2="24.447001" y2="1584.2" id="linearGradient1823" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="63" y1="1589.3" x2="64.415001" y2="1584.2" id="linearGradient1825" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<filter color-interpolation-filters="sRGB" id="filter6381">
|
||||||
|
<feGaussianBlur id="feGaussianBlur6383" stdDeviation="17.611266"/>
|
||||||
|
</filter>
|
||||||
|
<linearGradient x1="1034.6887" y1="498.24683" x2="759.71667" y2="622.97644" id="linearGradient6391" xlink:href="#linearGradient6385" gradientUnits="userSpaceOnUse"/>
|
||||||
|
<radialGradient cx="-32.945" cy="1548.1" r="22.421" id="radialGradient6416" xlink:href="#radialGradient1773" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-1.8804,2.3609,-2.5012,-2.3991,3780.3,5333)"/>
|
||||||
|
<linearGradient x1="12.77" y1="1590" x2="12.767" y2="1586.4" id="linearGradient6418" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="14.402" y1="1583.6" x2="12.767" y2="1586.4" id="linearGradient6420" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="18.447001" y1="1591.1" x2="18.447001" y2="1586.7" id="linearGradient6422" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="19.006001" y1="1586.4" x2="19.424" y2="1590.5" id="linearGradient6424" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.128" y1="1593.1" x2="23.128" y2="1590.7" id="linearGradient6426" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.128" y1="1588.8" x2="23.128" y2="1594.1" id="linearGradient6428" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="48.936001" y1="1546.1" x2="47.921001" y2="1548.8" id="linearGradient6430" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="46.219002" y1="1551" x2="48.936001" y2="1546.1" id="linearGradient6432" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="59.308998" y1="1550.5" x2="53.797001" y2="1554.2" id="linearGradient6434" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="55.944" y1="1555.4" x2="60.063999" y2="1551" id="linearGradient6436" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="72.003998" y1="1548.4" x2="59.155998" y2="1566.8" id="linearGradient6438" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="59.484001" y1="1570.1" x2="69.311996" y2="1557.6" id="linearGradient6440" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="89.156998" y1="1597.3" x2="59.752998" y2="1593.9" id="linearGradient6442" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="89.156998" y1="1597.3" x2="59.752998" y2="1593.9" id="linearGradient6444" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="8.7990999" y1="1589.8" x2="8.3376999" y2="1581.5" id="linearGradient6446" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="7.6469002" y1="1582.1" x2="8.1456003" y2="1586.4" id="linearGradient6448" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="23.75" y1="1627.2" x2="25.165001" y2="1583.7" id="linearGradient6450" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="26.212" y1="1528.3" x2="27.4" y2="1651.8" id="linearGradient6452" xlink:href="#linearGradient20137" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="-159.14" y1="1539.4" x2="-143.82001" y2="1556.5" id="linearGradient6454" xlink:href="#linearGradient4646" gradientUnits="userSpaceOnUse"/>
|
||||||
|
<linearGradient x1="-0.89604002" y1="1561.6" x2="-4.9626999" y2="1559" id="linearGradient6456" xlink:href="#linearGradient4646" gradientUnits="userSpaceOnUse"/>
|
||||||
|
<linearGradient x1="21.447001" y1="1606.9" x2="21.447001" y2="1595.2" id="linearGradient6458" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="30.447001" y1="1567.7" x2="30.447001" y2="1533.4" id="linearGradient6460" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="44.248001" y1="1587.9" x2="44.248001" y2="1580.8" id="linearGradient6462" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="45.324001" y1="1597.3" x2="45.324001" y2="1585.4" id="linearGradient6464" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="24.447001" y1="1592.5" x2="24.447001" y2="1584.2" id="linearGradient6466" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="63" y1="1589.3" x2="64.415001" y2="1584.2" id="linearGradient6468" xlink:href="#linearGradient6758" gradientUnits="userSpaceOnUse" gradientTransform="matrix(8.6505,0,0,8.806,566.58,-13540)"/>
|
||||||
|
<linearGradient x1="1034.6887" y1="498.24683" x2="759.71667" y2="622.97644" id="linearGradient6470" xlink:href="#linearGradient6385" gradientUnits="userSpaceOnUse"/>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(-2.5474697,-21.033139)" id="layer1">
|
||||||
|
<g transform="translate(1631.9,430.3)" id="g7757">
|
||||||
|
<g transform="translate(64.099,-67.529)" id="g2617">
|
||||||
|
<g transform="translate(71.669,8.7884)" id="g2049">
|
||||||
|
<g transform="translate(-48.932,87.179)" id="g2875">
|
||||||
|
<g transform="translate(-58.334,26.882)" id="g2360">
|
||||||
|
<g transform="translate(0.84266,31.106)" id="g2396">
|
||||||
|
<g transform="translate(71.669,8.7884)" id="g2398">
|
||||||
|
<g transform="translate(-58.709,21.224)" id="g1783">
|
||||||
|
<g transform="translate(71.669,8.7884)" id="g1791"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(-128.6,92.726)" id="g3393">
|
||||||
|
<g transform="translate(0.84266,31.106)" id="g2570">
|
||||||
|
<g transform="translate(71.669,8.7884)" id="g3417"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(5.6673,-1.8166e-6)" id="g3842">
|
||||||
|
<g transform="translate(64.099,-67.529)" id="g3852">
|
||||||
|
<g transform="translate(71.669,8.7884)" id="g3854"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.96881466,0,0,0.98219639,0.07998054,18.178075)" id="g6393">
|
||||||
|
<g transform="matrix(1.0055,0,0,1.0074,-355.11,-20.616)" id="g2788">
|
||||||
|
<path d="m 0.53711891,1552.421 a 22.156204,23.901844 0 1 1 -44.31240891,0 22.156204,23.901844 0 1 1 44.31240891,0 z" transform="matrix(21.998,0,0,20.405,1327.5,-31160)" id="path6532" style="fill:url(#radialGradient6416);stroke:#000000;stroke-width:0.52936;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 664.88,441.16 c -0.91,-11.14 16.15,-11.69 39.03,-8.8 -7.05,3.86 -4.89,9.89 4.43,17.61 -14.49,0.37 -28.98,3.07 -43.46,-8.81 z" id="path6596" style="fill:url(#linearGradient6418);fill-rule:evenodd;stroke:url(#linearGradient6420);stroke-width:2.18199992;stroke-linejoin:round"/>
|
||||||
|
<path d="m 716.37,441.16 c 2.75,-1.28 18.07,-2.48 22.14,0 -8.26,5.24 -14.07,11.1 -17.3,17.61 -4.72,-4.11 -11.01,-7.33 -4.84,-17.61 z" id="path6598" style="fill:url(#linearGradient6422);fill-rule:evenodd;stroke:url(#linearGradient6424);stroke-width:2.18199992;stroke-linejoin:round"/>
|
||||||
|
<path d="m 755.81,458.77 c 11.52,11.03 6.57,28.15 4.96,44.03 6.01,-7.73 18.35,-1.63 16.54,-26.42 -7.91,-19.51 -14.84,-20.99 -21.5,-17.61 z" id="path6600" style="fill:url(#linearGradient6426);fill-rule:evenodd;stroke:url(#linearGradient6428);stroke-width:2.18199992;stroke-linejoin:round"/>
|
||||||
|
<path d="m 976.43,79.19 c 4.95,6.498 3.12,9.86 0.06,13.224 -14.68,-5.871 -26.71,-7.353 -22.26,-13.224 9.04,-2.496 16.45,-2.521 22.2,0 z" id="path6664" style="fill:url(#linearGradient6430);fill-rule:evenodd;stroke:url(#linearGradient6432);stroke-width:3.2729001;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 1075.3,123.22 c -15.1,-3.31 -30.6,-7.39 -34.6,8.81 10.2,2.09 19.1,9.31 26,26.41 2.9,-2.93 10.7,2.28 8.6,-8.8 -4.2,-5.87 -8.4,-11.74 -12.6,-17.61 9.7,4.99 18.7,1.35 29.9,26.41 1.3,-2.93 2.6,-5.87 3.9,-8.8 -5.2,-15.7 -10.4,-19.5 -21.2,-26.42 z" id="path6662" style="fill:url(#linearGradient6434);fill-rule:evenodd;stroke:url(#linearGradient6436);stroke-width:3.2729001;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 1231,220.08 c -35.4,-51.34 -96.4,-99.72 -129.7,-123.28 27.5,24.3 23.7,36.36 8.6,44.03 -2.4,9.36 -3.2,19.29 13.7,35.23 19.3,16.81 16.9,24.63 0,26.41 -23.1,-5.3 -26.6,1.19 -13.7,17.61 12.4,9.24 19.8,23.49 29.7,35.23 10.5,-3.4 35.5,11.7 22.2,-21.79 -6.4,-16.55 -6.7,-29.99 0,-39.85 6,-2.11 8.3,-9.24 8.7,-17.61 14.6,17.81 40.4,29.35 60.5,44.02 z" id="path6660" style="fill:url(#linearGradient6438);fill-rule:evenodd;stroke:url(#linearGradient6440);stroke-width:3.2729001;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 1254.4,290.6 c -46.3,-53.33 -75.9,-44.41 -106.6,-3.37 -1.2,10.68 1,20.96 8.6,30.64 -20.1,12.42 -10.8,39.17 -21.2,48.61 0.9,11.61 2,23.39 -4.7,30.15 9.8,1.32 15.3,9.4 17.3,22.69 v 57.9 c 28.6,38.9 58.6,85.91 77.8,65.38 9,-12.16 19.3,-10.58 32.1,-9.18 -8.3,-14.26 9,-15.27 26.7,-18.78 13.6,9.72 24.5,27.39 19.1,80.8 5.6,67.51 -24.8,135.02 -56.7,202.54 71.3,-114.81 151.7,-297.24 15.5,-530.98 -2.9,5.87 -5,17.72 -7.9,23.6 z" id="path6636" style="fill:url(#linearGradient6442);fill-rule:evenodd;stroke:url(#linearGradient6444);stroke-width:3.2729001;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 608.75,388.33 c 21.58,7.1 36.91,19.14 47.15,35.22 l -8.76,14.58 c -17.78,-21.62 -36.67,-30.88 -55.69,-38.59 l 17.3,-11.21 z" id="path6594" style="fill:url(#linearGradient6446);fill-rule:evenodd;stroke:url(#linearGradient6448);stroke-width:2.18199992;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 754.46,949.03 c 14.37,-23.08 25.01,-49.66 60.55,-52.84 33.63,0.95 50.28,-32.66 69.21,-61.64 31.95,-9.55 62.63,-21.43 77.85,-61.64 -13.55,-18.58 0.51,-39.61 25.95,-61.64 33.38,-29.03 20.68,-45.4 -8.65,-57.19 -18.18,-4.52 -51.58,-12.92 -103.8,-26.11 -26.86,-1.97 -23.07,-32.53 -34.6,-48.79 -4.93,-15.99 -33.89,-22.46 -69.21,-26.42 -24.84,-40.63 -51.35,-42.28 -77.85,-44.03 -23.56,-17.09 -49.2,-19.27 -77.86,0 -1.72,9.75 -7.91,16.25 -22.4,0 -23.79,14.86 -31.79,3.76 -33.54,-17.61 13.14,-50.86 -8.84,-47.25 -30.56,-44.03 11.81,-11.46 15.62,-31.06 17.3,-52.84 -84.02,66.76 -54.13,-13.84 -51.9,-61.64 27.56,1.48 64.26,-52.83 103.8,8.81 -5.74,10.46 -4.8,19.42 4.77,26.42 2.98,-46.81 13.24,-72.3 29.83,-79.26 19.41,-1.18 34.52,-16.61 47.13,-40.28 6.62,-10.43 22.75,-16.03 39.38,-21.36 -2.11,-14.29 5.93,-20.64 25.95,-17.61 14.98,6.83 29.94,13.16 43.25,-8.81 -16.23,-3.52 -28.57,-10.35 -34.6,-22.53 -12.4,-22.73 6.79,-13.29 25.95,-3.88 10.06,-8.19 21.15,-12.71 34.6,-8.81 -14.38,11.51 -20.8,21.77 8.65,26.42 20.7,5.95 9.42,-17.81 -8.65,-47.88 -17.17,-20.84 -32.84,-34.42 -43.25,-22.57 -11.2,-19.08 -22.11,-39.939 -43.25,0 -26.88,30.55 -45.2,42.12 -43.25,8.81 -13.96,-7.63 -26.09,-15.4 0,-26.42 9.53,-9.014 18.79,-18.367 43.25,-8.808 18.31,-12.446 34.64,-7.782 51.26,5.558 23.17,-7.287 44.22,-12.73 43.89,-31.976 -13.22,-16.758 -34.11,-7.528 -51.9,-8.806 19.32,-5.225 33.86,-13.367 69.21,-8.806 13.88,0.544 18.57,10.449 8.65,35.224 20.59,39.104 35.94,29.184 54.8,-2.599 10.27,-4.174 26.28,-5.747 36.55,-9.92 C 920.3,54.692 887.62,32.7 878.75,27.591 760.08,27.654 626.96,65.408 555.5,138.881 c -34.5,43.77 -82.26,81.51 -94.16,148.4 -9.84,57.41 -25.9,160.48 -1,106.97 -1.98,20.1 4.17,36.04 25.96,44.03 12.38,17.1 25.8,29.95 43.25,26.42 10.1,26.54 15.51,55.47 48.32,70.45 20.23,-11.43 26.18,5.23 20.88,44.03 -11.61,10.15 -21.12,23.51 -25.95,44.03 -14.55,25.21 16.8,61.64 43.25,96.86 19.04,35.59 71.77,59.27 69.21,105.68 -1.16,43.31 1.78,84.89 20.88,119.62 26.1,37.55 45.93,52.29 48.32,3.66 z" id="path6562" style="fill:url(#linearGradient6450);fill-rule:evenodd;stroke:url(#linearGradient6452);stroke-width:3.2729001;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m -113.92138,1558.6794 a 33.622631,34.809311 0 1 1 -67.24526,0 33.622631,34.809311 0 1 1 67.24526,0 z" transform="matrix(11.752,0,0,10.481,2563,-15906)" id="path6550" style="fill:url(#linearGradient6454)"/>
|
||||||
|
<path d="m 0.53711891,1552.421 a 22.156204,23.901844 0 1 1 -44.31240891,0 22.156204,23.901844 0 1 1 44.31240891,0 z" transform="matrix(21.998,0,0,20.405,1324.3,-31160)" id="path6630" style="fill:url(#linearGradient6456);stroke:#000000;stroke-width:0.52936;stroke-linecap:round;stroke-linejoin:round"/>
|
||||||
|
<path d="m 864.57,525.29 c -84.13,96.53 -75.17,64.85 -112.46,96.86 8.1,29.64 -10.16,64.16 56.34,82.99 40.69,-95.64 87.74,-58.9 133.97,-38.96 40.89,-9.42 42.27,-37.76 34.61,-70.45 -76.37,-76.26 -92.62,-93.29 -112.46,-70.44 z" id="path6728" style="fill:url(#linearGradient6458);fill-rule:evenodd"/>
|
||||||
|
<path d="m 1158.7,322.75 c -43.1,-56.85 -60.1,-4.78 -77.9,44.03 -8,16.3 -6.4,30.65 0,44.03 8.7,8.8 9.8,13.21 18.4,22.01 -24.5,10.16 -42.6,14.35 -61.6,74.85 -23.1,-11.3 -46.16,-7.56 -69.23,-4.61 15.45,-12.38 36.53,-15.26 60.53,-13 4.1,-26.33 21.9,-51.25 51.9,-65.23 -1.4,-6.14 -8.3,-13.38 -17.3,-5.22 -5.7,12.11 -11.5,17.62 -17.3,26.42 -10.8,-1.1 -6.5,-17.61 0,-26.42 7.9,-8.89 17.7,-12.8 17.3,-44.03 -14.4,5.88 -28.8,11.75 -43.2,17.62 -22.56,-16.26 -16.5,-32.52 -4.8,-48.77 19.4,-17.06 3.3,-26.39 -17.07,-34.77 -93.25,-6.91 -66.49,-60.8 -51.23,-110.19 -16.01,8.8 -40.67,1.1 -48.03,26.41 -112.34,-61.24 -46.13,-135.02 -69.2,-202.53 110.91,17.852 210.83,41.489 233.53,105.67 55.7,50.18 102.2,105.86 95.2,193.73 z" id="path6730" style="fill:url(#linearGradient6460);fill-rule:evenodd"/>
|
||||||
|
<path d="m 1015.5,454.84 c 7.3,-2.63 -42.93,-24.6 -59.76,-44.03 -5.03,20.55 -13.16,41.09 3.98,61.64 24.57,7.81 42.78,0.98 55.78,-17.61 z" id="path6732" style="fill:url(#linearGradient6462);fill-rule:evenodd"/>
|
||||||
|
<path d="m 933.77,454.84 c -10.96,8.8 -18.38,17.61 -12.19,26.42 9.83,0.99 19.66,17.22 29.49,0 13.04,-6.91 6.7,-16.64 0,-26.42 -1.05,-3.2 -7.61,-2.67 -17.3,0 z" id="path6734" style="fill:url(#linearGradient6464);fill-rule:evenodd"/>
|
||||||
|
<path d="m 868.22,472.45 c -34.37,5.14 -45.79,21.96 -64.2,35.22 -10.46,11.36 -18.33,4.23 -25.96,-4.61 4.3,-12.23 2.7,-25.31 25.96,-34.77 15.7,4.18 31.41,-0.02 47.12,-13.45 11.35,1.26 20,4.72 17.08,17.61 z" id="path6736" style="fill:url(#linearGradient6466);fill-rule:evenodd"/>
|
||||||
|
<path d="m 1128.6,442.21 c 7,7.15 9.7,13.19 5.2,20.33 l -9.7,9.91 c -1.4,-8.81 -5.4,-17.61 -12.5,-26.42 5.7,-9.6 11.3,-8.82 17,-3.82 z" id="path6738" style="fill:url(#linearGradient6468);fill-rule:evenodd"/>
|
||||||
|
</g>
|
||||||
|
<path d="m 774.92481,978.76612 c 0,0 54.5454,-341.41415 -177.7778,-430.30303 -72.7273,90.90909 -107.0707,131.31313 -107.0707,131.31313 l -52.5253,-294.94949 357.5758,-82.82829 -90.9091,115.15151 c 0,0 220.202,54.54546 270.707,353.53535 -44.4444,74.74749 -199.9999,208.08082 -199.9999,208.08082 z" transform="matrix(0.92706922,0,0,0.96276426,74.184587,38.018928)" id="path5851" style="opacity:0.75;fill:#000080;stroke:none;filter:url(#filter6381)"/>
|
||||||
|
<path d="m 832.75395,963.00261 c 0,0 54.54546,-341.41415 -177.77777,-430.30303 C 582.2489,623.60867 547.90546,664.01271 547.90546,664.01271 L 495.3802,369.06322 852.95597,286.23493 762.04688,401.38644 c 0,0 220.202,54.54546 270.70702,353.53535 -44.4444,74.74749 -199.99995,208.08082 -199.99995,208.08082 z" id="path5847" style="fill:url(#linearGradient6470);fill-opacity:1;stroke:#000080;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<metadata id="metadata5845">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work>
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
|
||||||
|
<dc:publisher>
|
||||||
|
<cc:Agent rdf:about="http://openclipart.org/">
|
||||||
|
<dc:title>Openclipart</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:publisher>
|
||||||
|
<dc:title/>
|
||||||
|
<dc:date>2006-11-06T21:15:34</dc:date>
|
||||||
|
<dc:description>A not to detailed picture of earth with land masses in dark blue.</dc:description>
|
||||||
|
<dc:source>https://openclipart.org/detail/1318/blue-earth-by-darkowl</dc:source>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>darkowl</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>earth</rdf:li>
|
||||||
|
<rdf:li>geography</rdf:li>
|
||||||
|
<rdf:li>globe</rdf:li>
|
||||||
|
<rdf:li>glossy</rdf:li>
|
||||||
|
<rdf:li>planet</rdf:li>
|
||||||
|
<rdf:li>world</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 25 KiB |
48
freecad_workbench/UI/icons/screwtask.svg
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="svg2816" height="64px" width="64px" inkscape:version="0.48.4 r9939" sodipodi:docname="screwtask.svg">
|
||||||
|
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1375" inkscape:window-height="811" id="namedview8" showgrid="true" inkscape:snap-global="true" inkscape:zoom="2.6074563" inkscape:cx="13.761741" inkscape:cy="7.0890204" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2816">
|
||||||
|
<inkscape:grid type="xygrid" id="grid2985" empspacing="1" visible="true" enabled="true" snapvisiblegridlinesonly="true" spacingx="0.8px" spacingy="0.8px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs id="defs2818" />
|
||||||
|
<metadata id="metadata2821">
|
||||||
|
<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:title>Path-BaseGeometry</dc:title>
|
||||||
|
<dc:date>2016-05-15</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/Path/Gui/Resources/icons/Path-BaseGeometry.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>
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 0,16 44,0 0,-16 z" id="path9885" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 8,40 8,-16 44,0 -8,16 z" id="path9887" inkscape:connector-curvature="0" />
|
||||||
|
<path style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" d="m 60,40 0,-16 -8,16 0,16 z" id="path9891" inkscape:connector-curvature="0" />
|
||||||
|
<g id="g11337" transform="matrix(1.6407747,0,0,1.6407747,72.077665,-1.9550749)">
|
||||||
|
<path inkscape:connector-curvature="0" id="path11317" d="m -28,12 0,9.6 c 0,0 0,1.6 4,1.6 4,0 4,-1.6 4,-1.6 l 0,-9.6" style="fill:#ef2929;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path11190-46-2" d="m -19.946244,11.494715 c 0,0 -1.423729,1.898305 -4,1.898305 -2.576271,0 -4,-0.40678 -4,-0.40678" style="fill:none;stroke:#000000;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path11048" d="m -32,8 c 0,0 0,-4 8,-4 8,0 8,4 8,4 0,0 0,4 -8,4 -8,0 -8,-4 -8,-4 z" style="fill:#729fcf;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path11190" d="m -19.898305,16.079095 c 0,0 -1.423729,1.898305 -4,1.898305 -2.576271,0 -4,-0.40678 -4,-0.40678" style="fill:none;stroke:#000000;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path11190-46" d="m -19.898305,18.327684 c 0,0 -1.423729,1.898305 -4,1.898305 -2.576271,0 -4,-0.40678 -4,-0.40678" style="fill:none;stroke:#000000;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path inkscape:connector-curvature="0" id="path11190-3" d="m -19.898305,13.830509 c 0,0 -1.423729,1.898305 -4,1.898305 -2.576271,0 -4,-0.40678 -4,-0.40678" style="fill:none;stroke:#000000;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path transform="matrix(1.0318786,0,0,0.41149652,4.8926008,12.937958)" d="m -24,-8.0000001 -3.267949,-1.2679492 -2.196153,2.7320508 L -30,-10 l -3.464102,-0.535898 2.732051,-2.196153 L -32,-16 l 3.267949,1.267949 2.196153,-2.732051 L -26,-14 l 3.464102,0.535898 -2.732051,2.196153 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="false" sodipodi:arg2="1.3089969" sodipodi:arg1="0.78539816" sodipodi:r2="2.8284271" sodipodi:r1="5.6568542" sodipodi:cy="-12" sodipodi:cx="-28" sodipodi:sides="6" id="path11272" style="fill:#729fcf;fill-opacity:0.29223747;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" sodipodi:type="star" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.4 KiB |
49
freecad_workbench/UI/icons/taskcreator.svg
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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" version="1.1" id="svg2816" height="64px" width="64px" inkscape:version="0.48.4 r9939" sodipodi:docname="Path-BaseGeometry.svg">
|
||||||
|
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1375" inkscape:window-height="811" id="namedview8" showgrid="true" inkscape:snap-global="false" inkscape:zoom="7.375" inkscape:cx="35.651266" inkscape:cy="31.713387" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2816">
|
||||||
|
<inkscape:grid type="xygrid" id="grid2985" empspacing="2" visible="true" enabled="true" snapvisiblegridlinesonly="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs id="defs2818">
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3799">
|
||||||
|
<stop style="stop-color:#204a87;stop-opacity:1" offset="0" id="stop3801" />
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="1" id="stop3803" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" id="linearGradient3773">
|
||||||
|
<stop style="stop-color:#3465a4;stop-opacity:1" offset="0" id="stop3775" />
|
||||||
|
<stop style="stop-color:#729fcf;stop-opacity:1" offset="1" id="stop3777" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3773" id="linearGradient3779" x1="21.38983" y1="54.203388" x2="19.118645" y2="38" gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3799" id="linearGradient3805" x1="54.40678" y1="40.631996" x2="47.966103" y2="32.76759" gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<metadata id="metadata2821">
|
||||||
|
<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:title>Path-BaseGeometry</dc:title>
|
||||||
|
<dc:date>2016-05-15</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/Path/Gui/Resources/icons/Path-BaseGeometry.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>
|
||||||
|
<text xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" x="9.7627115" y="27.118645" id="text10484" sodipodi:linespacing="125%"><tspan sodipodi:role="line" id="tspan10486" x="9.7627115" y="27.118645" /></text>
|
||||||
|
<text xml:space="preserve" style="font-size:72px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ef2929;fill-opacity:1;stroke:#000000;font-family:Sans;stroke-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none" x="33.084747" y="57.355934" id="text11000" sodipodi:linespacing="125%"><tspan sodipodi:role="line" id="tspan11002" x="33.084747" y="57.355934">T</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
5
freecad_workbench/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
DESCRIPTION.
|
||||||
|
FreeCAD modules for Robosembler project pipeline.
|
||||||
|
"""
|
4
freecad_workbench/cad_generation/env.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"cadFilePath": "/Users/idontsudo/Desktop/asp-example/disk_and_axis_n.FCStd",
|
||||||
|
"outPath": "/Users/idontsudo/Desktop/asp-example/"
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
|
class FileSystemRepository:
|
||||||
|
def readJSON(path: str):
|
||||||
|
return json.loads((open(path)).read())
|
||||||
|
|
||||||
|
def recursiveDeleteFolder(path: str):
|
||||||
|
shutil.rmtree(path)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def deletingOldAndCreatingNewFolder(path: str):
|
||||||
|
if FileSystemRepository.isExistsPath(path):
|
||||||
|
FileSystemRepository.recursiveDeleteFolder(path)
|
||||||
|
os.makedirs(path)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def isExistsPath(path: str):
|
||||||
|
return os.path.exists(path)
|
||||||
|
|
||||||
|
def writeFile(data, filePath, fileName):
|
||||||
|
file_to_open = filePath + fileName
|
||||||
|
|
||||||
|
f = open(file_to_open, "w", encoding="utf-8", errors="ignore")
|
||||||
|
f.write(data)
|
||||||
|
f.close()
|
18
freecad_workbench/cad_generation/helper/is_solid.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import FreeCAD
|
||||||
|
|
||||||
|
|
||||||
|
def is_object_solid(obj):
|
||||||
|
"""If obj is solid return True"""
|
||||||
|
if not isinstance(obj, FreeCAD.DocumentObject):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj, 'Shape'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj.Shape, 'Solids'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if len(obj.Shape.Solids) == 0:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
25
freecad_workbench/cad_generation/main.py
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
from helper.file_system_repository import FileSystemRepository
|
||||||
|
from scenarios.robossembler_freecad_export_scenari import (
|
||||||
|
RobossemblerFreeCadExportScenari,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
# obj.Support[0][0].Label
|
||||||
|
# 'Hex_King'
|
||||||
|
|
||||||
|
import FreeCAD as App
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
env = FileSystemRepository.readJSON("./env.json")
|
||||||
|
App.openDocument(env.get("cadFilePath"))
|
||||||
|
RobossemblerFreeCadExportScenari.call(env.get("outPath"))
|
||||||
|
App.closeDocument(App.ActiveDocument.Name)
|
||||||
|
freecadQTWindow = Gui.getMainWindow()
|
||||||
|
freecadQTWindow.close()
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
14
freecad_workbench/cad_generation/model/files_generator.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
#структура файловой системы
|
||||||
|
|
||||||
|
class FilesGenerator(Enum):
|
||||||
|
DETAIL = 'detail.json'
|
||||||
|
ASSEMBLY = 'assembly.json'
|
||||||
|
|
||||||
|
|
||||||
|
class FolderGenerator(Enum):
|
||||||
|
MESHES = 'meshes'
|
||||||
|
ASSETS = 'assets'
|
||||||
|
SDF = 'sdf'
|
||||||
|
ASSEMBlY = 'assembly'
|
86
freecad_workbench/cad_generation/model/geometry_part.py
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
from typing import Any, TypeVar, Type, cast
|
||||||
|
|
||||||
|
|
||||||
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
||||||
|
def from_float(x: Any) -> float:
|
||||||
|
assert isinstance(x, (float, int)) and not isinstance(x, bool)
|
||||||
|
return float(x)
|
||||||
|
|
||||||
|
|
||||||
|
def to_float(x: Any) -> float:
|
||||||
|
assert isinstance(x, float)
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
def to_class(c: Type[T], x: Any) -> dict:
|
||||||
|
assert isinstance(x, c)
|
||||||
|
return cast(Any, x).to_dict()
|
||||||
|
|
||||||
|
|
||||||
|
class Axis:
|
||||||
|
x: float
|
||||||
|
y: float
|
||||||
|
z: float
|
||||||
|
|
||||||
|
def __init__(self, x: float, y: float, z: float) -> None:
|
||||||
|
self.x = x
|
||||||
|
self.y = y
|
||||||
|
self.z = z
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_dict(obj: Any) -> 'Axis':
|
||||||
|
assert isinstance(obj, dict)
|
||||||
|
x = from_float(obj.get("x"))
|
||||||
|
y = from_float(obj.get("y"))
|
||||||
|
z = from_float(obj.get("z"))
|
||||||
|
return Axis(x, y, z)
|
||||||
|
|
||||||
|
def to_dict(self) -> dict:
|
||||||
|
result: dict = {}
|
||||||
|
result["x"] = to_float(self.x)
|
||||||
|
result["y"] = to_float(self.y)
|
||||||
|
result["z"] = to_float(self.z)
|
||||||
|
return result
|
||||||
|
|
||||||
|
#запись параметров тела в объект
|
||||||
|
class GeometryPart:
|
||||||
|
euler: Axis
|
||||||
|
position: Axis
|
||||||
|
rotation: Axis
|
||||||
|
center: Axis
|
||||||
|
|
||||||
|
def __init__(self, euler: Axis, position: Axis, rotation: Axis, center: Axis) -> None:
|
||||||
|
self.euler = euler
|
||||||
|
self.position = position
|
||||||
|
self.rotation = rotation
|
||||||
|
self.center = center
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_dict(obj: Any) -> 'GeometryPart':
|
||||||
|
assert isinstance(obj, dict)
|
||||||
|
euler = Axis.from_dict(obj.get("euler"))
|
||||||
|
position = Axis.from_dict(obj.get("position"))
|
||||||
|
rotation = Axis.from_dict(obj.get("rotation"))
|
||||||
|
center = Axis.from_dict(obj.get("center"))
|
||||||
|
return GeometryPart(euler, position, rotation, center)
|
||||||
|
|
||||||
|
def to_dict(self) -> dict:
|
||||||
|
result: dict = {}
|
||||||
|
result["euler"] = to_class(Axis, self.euler)
|
||||||
|
result["position"] = to_class(Axis, self.position)
|
||||||
|
result["rotation"] = to_class(Axis, self.rotation)
|
||||||
|
result["center"] = to_class(Axis, self.center)
|
||||||
|
return result
|
||||||
|
|
||||||
|
def toJson(self) -> str:
|
||||||
|
return str(self.to_dict()).replace('\'', '"')
|
||||||
|
|
||||||
|
|
||||||
|
def geometry_part_from_dict(s: Any) -> GeometryPart:
|
||||||
|
return GeometryPart.from_dict(s)
|
||||||
|
|
||||||
|
|
||||||
|
def geometry_part_to_dict(x: GeometryPart) -> Any:
|
||||||
|
return to_class(GeometryPart, x)
|
33
freecad_workbench/cad_generation/model/join_mesh_model.py
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
import FreeCAD
|
||||||
|
import Mesh
|
||||||
|
import FreeCAD as App
|
||||||
|
from model.mesh_part_model import MeshPartModel
|
||||||
|
|
||||||
|
# соединяет меши в сборочных единицах
|
||||||
|
class JoinMeshModel:
|
||||||
|
id = None
|
||||||
|
mesh = None
|
||||||
|
|
||||||
|
def __init__(self, meshesPartModels: list['MeshPartModel']) -> None:
|
||||||
|
meshes = []
|
||||||
|
import Mesh
|
||||||
|
from random import randrange
|
||||||
|
for el in meshesPartModels:
|
||||||
|
meshes.append(el.mesh.Mesh)
|
||||||
|
|
||||||
|
self.id = 'MergedMesh' + str(randrange(1000000))
|
||||||
|
document = App.ActiveDocument
|
||||||
|
merged_mesh = Mesh.Mesh()
|
||||||
|
for el in meshes:
|
||||||
|
merged_mesh.addMesh(el)
|
||||||
|
|
||||||
|
new_obj = App.activeDocument().addObject("Mesh::Feature", self.id)
|
||||||
|
new_obj.Mesh = merged_mesh
|
||||||
|
new_obj.ViewObject.DisplayMode = "Flat Lines" # Set display mode to flat lines
|
||||||
|
self.mesh = new_obj
|
||||||
|
|
||||||
|
def remove(self):
|
||||||
|
try:
|
||||||
|
App.ActiveDocument.removeObject(self.id)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
32
freecad_workbench/cad_generation/model/mesh_part_model.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
import uuid
|
||||||
|
import Mesh
|
||||||
|
import Part
|
||||||
|
import PartGui
|
||||||
|
import MeshPart
|
||||||
|
|
||||||
|
#импорт мешей и превращение их в part-объекты
|
||||||
|
class MeshPartModel:
|
||||||
|
id = None
|
||||||
|
mesh = None
|
||||||
|
|
||||||
|
def __init__(self, part) -> None:
|
||||||
|
try:
|
||||||
|
from random import randrange
|
||||||
|
self.id = 'mesh' + str(randrange(1000000))
|
||||||
|
document = App.ActiveDocument
|
||||||
|
mesh = document.addObject("Mesh::Feature", self.id)
|
||||||
|
shape = Part.getShape(part, "")
|
||||||
|
mesh.Mesh = MeshPart.meshFromShape(
|
||||||
|
Shape=shape, LinearDeflection=20, AngularDeflection=0.1, Relative=False)
|
||||||
|
mesh.Label = self.id
|
||||||
|
self.mesh = mesh
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def remove(self):
|
||||||
|
try:
|
||||||
|
App.ActiveDocument.removeObject(self.mesh.Label)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
107
freecad_workbench/cad_generation/model/sdf_geometry_model.py
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
def from_str(x):
|
||||||
|
assert isinstance(x, str)
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
def from_none(x):
|
||||||
|
assert x is None
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
def from_union(fs, x):
|
||||||
|
for f in fs:
|
||||||
|
try:
|
||||||
|
return f(x)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
assert False
|
||||||
|
|
||||||
|
|
||||||
|
def to_class(c, x):
|
||||||
|
assert isinstance(x, c)
|
||||||
|
return x.to_dict()
|
||||||
|
|
||||||
|
#обработка геометрии, создание sdf
|
||||||
|
class SdfGeometryModel:
|
||||||
|
def __init__(self, name, ixx, ixy, ixz, iyy, izz, massSDF, posX, posY, posZ, eulerX, eulerY, eulerZ, iyz, stl, friction):
|
||||||
|
self.name = name
|
||||||
|
self.ixx = ixx
|
||||||
|
self.ixy = ixy
|
||||||
|
self.ixz = ixz
|
||||||
|
self.iyy = iyy
|
||||||
|
self.izz = izz
|
||||||
|
self.massSDF = massSDF
|
||||||
|
self.posX = posX
|
||||||
|
self.posY = posY
|
||||||
|
self.posZ = posZ
|
||||||
|
self.eulerX = eulerX
|
||||||
|
self.eulerY = eulerY
|
||||||
|
self.eulerZ = eulerZ
|
||||||
|
self.iyz = iyz
|
||||||
|
self.stl = stl
|
||||||
|
self.friction = friction
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_dict(obj):
|
||||||
|
assert isinstance(obj, dict)
|
||||||
|
name = from_union([from_str, from_none], obj.get("name"))
|
||||||
|
ixx = from_union([from_str, from_none], obj.get("ixx"))
|
||||||
|
ixy = from_union([from_str, from_none], obj.get("ixy"))
|
||||||
|
ixz = from_union([from_str, from_none], obj.get("ixz"))
|
||||||
|
iyy = from_union([from_str, from_none], obj.get("iyy"))
|
||||||
|
izz = from_union([from_str, from_none], obj.get("izz"))
|
||||||
|
massSDF = from_union([from_str, from_none], obj.get("massSDF"))
|
||||||
|
posX = from_union([from_str, from_none], obj.get("posX"))
|
||||||
|
posY = from_union([from_str, from_none], obj.get("posY"))
|
||||||
|
posZ = from_union([from_str, from_none], obj.get("posZ"))
|
||||||
|
eulerX = from_union([from_str, from_none], obj.get("eulerX"))
|
||||||
|
eulerY = from_union([from_str, from_none], obj.get("eulerY"))
|
||||||
|
eulerZ = from_union([from_str, from_none], obj.get("eulerZ"))
|
||||||
|
iyz = from_union([from_str, from_none], obj.get("iyz"))
|
||||||
|
stl = from_union([from_str, from_none], obj.get("stl") )
|
||||||
|
friction = from_union([from_str, from_none], obj.get("friction"))
|
||||||
|
return SdfGeometryModel(name, ixx, ixy, ixz, iyy, izz, massSDF, posX, posY, posZ, eulerX, eulerY, eulerZ, iyz,stl,friction)
|
||||||
|
|
||||||
|
def to_dict(self):
|
||||||
|
result = {}
|
||||||
|
if self.name is not None:
|
||||||
|
result["name"] = from_union([from_str, from_none], self.name)
|
||||||
|
if self.ixx is not None:
|
||||||
|
result["ixx"] = from_union([from_str, from_none], self.ixx)
|
||||||
|
if self.ixy is not None:
|
||||||
|
result["ixy"] = from_union([from_str, from_none], self.ixy)
|
||||||
|
if self.ixz is not None:
|
||||||
|
result["ixz"] = from_union([from_str, from_none], self.ixz)
|
||||||
|
if self.iyy is not None:
|
||||||
|
result["iyy"] = from_union([from_str, from_none], self.iyy)
|
||||||
|
if self.izz is not None:
|
||||||
|
result["izz"] = from_union([from_str, from_none], self.izz)
|
||||||
|
if self.massSDF is not None:
|
||||||
|
result["massSDF"] = from_union([from_str, from_none], self.massSDF)
|
||||||
|
if self.posX is not None:
|
||||||
|
result["posX"] = from_union([from_str, from_none], self.posX)
|
||||||
|
if self.posY is not None:
|
||||||
|
result["posY"] = from_union([from_str, from_none], self.posY)
|
||||||
|
if self.posZ is not None:
|
||||||
|
result["posZ"] = from_union([from_str, from_none], self.posZ)
|
||||||
|
if self.eulerX is not None:
|
||||||
|
result["eulerX"] = from_union([from_str, from_none], self.eulerX)
|
||||||
|
if self.eulerY is not None:
|
||||||
|
result["eulerY"] = from_union([from_str, from_none], self.eulerY)
|
||||||
|
if self.eulerZ is not None:
|
||||||
|
result["eulerZ"] = from_union([from_str, from_none], self.eulerZ)
|
||||||
|
if self.iyz is not None:
|
||||||
|
result["iyz"] = from_union([from_str, from_none], self.iyz)
|
||||||
|
if self.stl is not None:
|
||||||
|
result["stl"] = from_union([from_str, from_none], self.stl)
|
||||||
|
if self.friction is not None:
|
||||||
|
result["friction"] = from_union([from_str, from_none], self.eulerZ)
|
||||||
|
return result
|
||||||
|
|
||||||
|
def toJSON(self) -> str:
|
||||||
|
return str(self.to_dict()).replace('\'', '"')
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
import Part
|
||||||
|
|
||||||
|
|
||||||
|
class SimpleCopyPartModel:
|
||||||
|
id = None
|
||||||
|
copyLink = None
|
||||||
|
label = None
|
||||||
|
part = None
|
||||||
|
|
||||||
|
def getPart(self):
|
||||||
|
return self.part
|
||||||
|
|
||||||
|
def __init__(self, part) -> None:
|
||||||
|
try:
|
||||||
|
from random import randrange
|
||||||
|
self.id = str(randrange(1000000))
|
||||||
|
childObj = part
|
||||||
|
print(part)
|
||||||
|
__shape = Part.getShape(
|
||||||
|
childObj, '', needSubElement=False, refine=False)
|
||||||
|
obj = App.ActiveDocument.addObject('Part::Feature', self.id)
|
||||||
|
obj.Shape = __shape
|
||||||
|
self.part = obj
|
||||||
|
self.label = obj.Label
|
||||||
|
App.ActiveDocument.recompute()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
def remove(self):
|
||||||
|
App.ActiveDocument.removeObject(self.label)
|
|
@ -0,0 +1,53 @@
|
||||||
|
from usecases.export_assembly_them_all_usecase import ExportAssemblyThemAllUseCase
|
||||||
|
import FreeCAD
|
||||||
|
from usecases.export_usecase import EXPORT_TYPES, ExportUseCase
|
||||||
|
from usecases.get_sdf_geometry_usecase import SdfGeometryUseCase
|
||||||
|
from usecases.assembly_parse_usecase import AssemblyParseUseCase
|
||||||
|
from model.files_generator import FolderGenerator
|
||||||
|
from helper.file_system_repository import FileSystemRepository
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
class RobossemblerFreeCadExportScenari:
|
||||||
|
def call(path):
|
||||||
|
#работа с директорией
|
||||||
|
directory = path
|
||||||
|
|
||||||
|
__objs__ = FreeCAD.ActiveDocument.RootObjects
|
||||||
|
directoryExport = directory + "/"
|
||||||
|
|
||||||
|
#создание новых папок и удаление старых при их наличии согласно структуре
|
||||||
|
FileSystemRepository.deletingOldAndCreatingNewFolder(
|
||||||
|
directoryExport + FolderGenerator.ASSETS.value
|
||||||
|
)
|
||||||
|
FileSystemRepository.deletingOldAndCreatingNewFolder(
|
||||||
|
directoryExport + FolderGenerator.SDF.value,
|
||||||
|
)
|
||||||
|
|
||||||
|
FileSystemRepository.deletingOldAndCreatingNewFolder(
|
||||||
|
directoryExport
|
||||||
|
+ FolderGenerator.SDF.value
|
||||||
|
+ "/"
|
||||||
|
+ FolderGenerator.MESHES.value
|
||||||
|
)
|
||||||
|
FileSystemRepository.deletingOldAndCreatingNewFolder(
|
||||||
|
directoryExport + FolderGenerator.ASSEMBlY.value
|
||||||
|
)
|
||||||
|
f = open(directory + "/step-structure.json", "w")
|
||||||
|
f.write(AssemblyParseUseCase().toJson())
|
||||||
|
f.close()
|
||||||
|
RobossemblerFreeCadExportScenari.geometry(directory)
|
||||||
|
ExportAssemblyThemAllUseCase().call(directoryExport)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def geometry(outPutsPath: str):
|
||||||
|
#экспорт геометрии
|
||||||
|
exportUseCase = ExportUseCase.call(outPutsPath, EXPORT_TYPES.OBJ)
|
||||||
|
|
||||||
|
for el in SdfGeometryUseCase().call(exportUseCase):
|
||||||
|
FileSystemRepository.writeFile(
|
||||||
|
el.toJSON(),
|
||||||
|
outPutsPath + FolderGenerator.ASSETS.value + "/",
|
||||||
|
el.name + ".json",
|
||||||
|
)
|
|
@ -0,0 +1,59 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
|
||||||
|
def is_object_solid(obj):
|
||||||
|
"""If obj is solid return True"""
|
||||||
|
if not isinstance(obj, App.DocumentObject):
|
||||||
|
return False
|
||||||
|
if hasattr(obj, 'Group'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj, 'Shape'):
|
||||||
|
return False
|
||||||
|
# if not hasattr(obj.Shape, 'Mass'):
|
||||||
|
# return False
|
||||||
|
if not hasattr(obj.Shape, 'Solids'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if len(obj.Shape.Solids) == 0:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
#парсит сборку, создавая список деталей и сборочных единиц
|
||||||
|
class AssemblyParseUseCase:
|
||||||
|
_parts = []
|
||||||
|
|
||||||
|
_asm = []
|
||||||
|
|
||||||
|
def getAsm(self):
|
||||||
|
return self._asm
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
if (self._asm.__len__() == 0):
|
||||||
|
self.initParse()
|
||||||
|
pass
|
||||||
|
|
||||||
|
def initParse(self):
|
||||||
|
for el in App.ActiveDocument.Objects:
|
||||||
|
if (is_object_solid(el)):
|
||||||
|
self._asm.append(el.Label)
|
||||||
|
|
||||||
|
def toJson(self):
|
||||||
|
return str(self._asm).replace('\'', "\"")
|
||||||
|
|
||||||
|
def getSubPartsLink(self, group):
|
||||||
|
groupLink = {}
|
||||||
|
for el in group:
|
||||||
|
if (is_object_solid(el)):
|
||||||
|
if str(el.Shape).find('Solid') != -1:
|
||||||
|
if groupLink.get(el.Label) == None:
|
||||||
|
groupLink[el.Label] = []
|
||||||
|
for i in el.Group:
|
||||||
|
if str(i).find('Pad') != -1:
|
||||||
|
groupLink[el.Label].append(i)
|
||||||
|
if groupLink.__len__() == 0:
|
||||||
|
return None
|
||||||
|
return groupLink
|
||||||
|
|
||||||
|
def getLinkedProperty(self):
|
||||||
|
return self._asm
|
|
@ -0,0 +1,119 @@
|
||||||
|
from typing import List
|
||||||
|
import FreeCAD as App
|
||||||
|
import Part
|
||||||
|
from model.join_mesh_model import JoinMeshModel
|
||||||
|
from model.mesh_part_model import MeshPartModel
|
||||||
|
from helper.file_system_repository import FileSystemRepository
|
||||||
|
from helper.is_solid import is_object_solid
|
||||||
|
from model.simple_copy_part_model import SimpleCopyPartModel
|
||||||
|
from model.files_generator import FolderGenerator
|
||||||
|
from usecases.assembly_parse_usecase import AssemblyParseUseCase
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
#подготавливает необходимое для работы assemble them all состояние папок
|
||||||
|
class ExportAssemblyThemAllUseCase:
|
||||||
|
def call(self, path):
|
||||||
|
assembly = AssemblyParseUseCase().getAsm()
|
||||||
|
asmStructure = {}
|
||||||
|
inc = 0
|
||||||
|
for el in assembly:
|
||||||
|
if inc != 0:
|
||||||
|
asmStructure[inc] = {"child": el, "parents": assembly[0:inc]}
|
||||||
|
inc += 1
|
||||||
|
objectsFreeCad = App.ActiveDocument.Objects
|
||||||
|
asmSolids = {}
|
||||||
|
for k, v in asmStructure.items():
|
||||||
|
assemblyParentList = v["parents"]
|
||||||
|
assemblyChild = v["child"]
|
||||||
|
for el in assemblyParentList:
|
||||||
|
for solid in objectsFreeCad:
|
||||||
|
if el == solid.Label:
|
||||||
|
if asmSolids.get(k) is None:
|
||||||
|
asmSolids[k] = {
|
||||||
|
"parents": [],
|
||||||
|
"child": list(
|
||||||
|
filter(
|
||||||
|
lambda x: x.Label == assemblyChild,
|
||||||
|
objectsFreeCad,
|
||||||
|
)
|
||||||
|
)[0],
|
||||||
|
}
|
||||||
|
|
||||||
|
asmSolids[k]["parents"].append(solid)
|
||||||
|
|
||||||
|
inc = 0
|
||||||
|
for k, v in asmSolids.items():
|
||||||
|
geometry = {"0": [], "1": []}
|
||||||
|
if k != 0:
|
||||||
|
App.activeDocument().addObject("Part::Compound", "Compound")
|
||||||
|
|
||||||
|
copyLinks = list(map(lambda el: SimpleCopyPartModel(el), v["parents"]))
|
||||||
|
|
||||||
|
if copyLinks != None:
|
||||||
|
App.activeDocument().Compound.Links = list(
|
||||||
|
map(lambda el: el.getPart(), copyLinks)
|
||||||
|
)
|
||||||
|
|
||||||
|
object = App.activeDocument().getObject("Compound")
|
||||||
|
boundBox = object.Shape.BoundBox
|
||||||
|
geometry["0"].append(boundBox.XMax)
|
||||||
|
geometry["0"].append(boundBox.YMax)
|
||||||
|
geometry["0"].append(boundBox.ZMax)
|
||||||
|
|
||||||
|
os.makedirs(
|
||||||
|
path + FolderGenerator.ASSEMBlY.value + "/" + "0000" + str(k)
|
||||||
|
)
|
||||||
|
boundBoxChild = v["child"].Shape.BoundBox
|
||||||
|
geometry["1"].append(boundBoxChild.XMax)
|
||||||
|
geometry["1"].append(boundBoxChild.YMax)
|
||||||
|
geometry["1"].append(boundBoxChild.ZMax)
|
||||||
|
meshParents = []
|
||||||
|
|
||||||
|
for el in v["parents"]:
|
||||||
|
meshParents.append(MeshPartModel(el))
|
||||||
|
joinMesh = JoinMeshModel(meshParents)
|
||||||
|
for el in meshParents:
|
||||||
|
el.remove()
|
||||||
|
import importOBJ
|
||||||
|
|
||||||
|
importOBJ.export(
|
||||||
|
joinMesh.mesh,
|
||||||
|
path
|
||||||
|
+ FolderGenerator.ASSEMBlY.value
|
||||||
|
+ "/"
|
||||||
|
+ "0000"
|
||||||
|
+ str(k)
|
||||||
|
+ "/"
|
||||||
|
+ str(1)
|
||||||
|
+ ".obj",
|
||||||
|
)
|
||||||
|
joinMesh.remove()
|
||||||
|
importOBJ.export(
|
||||||
|
v["child"],
|
||||||
|
path
|
||||||
|
+ FolderGenerator.ASSEMBlY.value
|
||||||
|
+ "/"
|
||||||
|
+ "0000"
|
||||||
|
+ str(k)
|
||||||
|
+ "/"
|
||||||
|
+ str(0)
|
||||||
|
+ ".obj",
|
||||||
|
)
|
||||||
|
FileSystemRepository.writeFile(
|
||||||
|
json.dumps(geometry),
|
||||||
|
path
|
||||||
|
+ FolderGenerator.ASSEMBlY.value
|
||||||
|
+ "/"
|
||||||
|
+ "0000"
|
||||||
|
+ str(k)
|
||||||
|
+ "/",
|
||||||
|
"translation.json",
|
||||||
|
)
|
||||||
|
|
||||||
|
App.ActiveDocument.removeObject("Compound")
|
||||||
|
for el in copyLinks:
|
||||||
|
el.remove()
|
||||||
|
App.activeDocument().recompute()
|
||||||
|
inc += 1
|
55
freecad_workbench/cad_generation/usecases/export_usecase.py
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# import importDAE
|
||||||
|
import Mesh
|
||||||
|
import FreeCAD as App
|
||||||
|
from model.files_generator import FolderGenerator
|
||||||
|
from helper.is_solid import is_object_solid
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class EXPORT_TYPES(Enum):
|
||||||
|
STL = "STL"
|
||||||
|
DAO = "DAO"
|
||||||
|
OBJ = "OBJ"
|
||||||
|
|
||||||
|
#делает Илья
|
||||||
|
class ExportUseCase:
|
||||||
|
def call(path: str, type: EXPORT_TYPES):
|
||||||
|
meshes = {}
|
||||||
|
for el in App.ActiveDocument.Objects:
|
||||||
|
if is_object_solid(el):
|
||||||
|
match type.value:
|
||||||
|
case EXPORT_TYPES.STL.value:
|
||||||
|
Mesh.export(
|
||||||
|
[el],
|
||||||
|
path
|
||||||
|
+ "/"
|
||||||
|
+ FolderGenerator.SDF.value
|
||||||
|
+ "/"
|
||||||
|
+ FolderGenerator.MESHES.value
|
||||||
|
+ "/"
|
||||||
|
+ el.Label
|
||||||
|
+ ".stl",
|
||||||
|
)
|
||||||
|
meshes[el.Label] = (
|
||||||
|
"/" + FolderGenerator.MESHES.value + "/" + el.Label + ".stl"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
case EXPORT_TYPES.OBJ.value:
|
||||||
|
import importOBJ
|
||||||
|
|
||||||
|
importOBJ.export(
|
||||||
|
[el],
|
||||||
|
path
|
||||||
|
+ "/"
|
||||||
|
+ FolderGenerator.SDF.value
|
||||||
|
+ "/"
|
||||||
|
+ FolderGenerator.MESHES.value
|
||||||
|
+ "/"
|
||||||
|
+ el.Label
|
||||||
|
+ ".obj",
|
||||||
|
)
|
||||||
|
meshes[el.Label] = (
|
||||||
|
"/" + FolderGenerator.MESHES.value + "/" + el.Label + ".obj"
|
||||||
|
)
|
||||||
|
return meshes
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
import FreeCAD as App
|
||||||
|
from helper.is_solid import is_object_solid
|
||||||
|
|
||||||
|
|
||||||
|
class GeometryUseCase:
|
||||||
|
def call() -> dict:
|
||||||
|
labels = []
|
||||||
|
Error = False
|
||||||
|
for el in App.ActiveDocument.Objects:
|
||||||
|
try:
|
||||||
|
|
||||||
|
if is_object_solid(el):
|
||||||
|
labels.append(el.Label)
|
||||||
|
|
||||||
|
geometry = {
|
||||||
|
"euler": {
|
||||||
|
"x": None,
|
||||||
|
"y": None,
|
||||||
|
"z": None
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"x": None,
|
||||||
|
"y": None,
|
||||||
|
"z": None
|
||||||
|
},
|
||||||
|
"rotation": {
|
||||||
|
"x": None,
|
||||||
|
"y": None,
|
||||||
|
"z": None
|
||||||
|
},
|
||||||
|
"center": {
|
||||||
|
"x": None,
|
||||||
|
"y": None,
|
||||||
|
"z": None
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
boundBox = el.Shape.BoundBox
|
||||||
|
geometry["center"]["x"] = boundBox.Center.x
|
||||||
|
geometry["center"]["y"] = boundBox.Center.y
|
||||||
|
geometry["center"]["z"] = boundBox.Center.z
|
||||||
|
geometry["position"]['x'] = boundBox.XMax
|
||||||
|
geometry["position"]['y'] = boundBox.YMax
|
||||||
|
geometry["position"]['z'] = boundBox.ZMax
|
||||||
|
rotation = el.Placement.Rotation
|
||||||
|
geometry["rotation"]['x'] = rotation.Axis.z
|
||||||
|
geometry["rotation"]['y'] = rotation.Axis.y
|
||||||
|
geometry["rotation"]['z'] = rotation.Axis.z
|
||||||
|
euler = el.Placement.Rotation.toEuler()
|
||||||
|
geometry["euler"]['x'] = euler[0]
|
||||||
|
geometry["euler"]['y'] = euler[1]
|
||||||
|
geometry["euler"]['z'] = euler[2]
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
# App.Console.PrintMessage("Clicked on position: ("+str(pos[0])+", "+str(pos[1])+")\n")
|
||||||
|
return {"geometry": geometry, "labels": labels, "label": el.Label}
|
|
@ -0,0 +1,70 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
from model.sdf_geometry_model import SdfGeometryModel
|
||||||
|
|
||||||
|
from helper.is_solid import is_object_solid
|
||||||
|
|
||||||
|
|
||||||
|
class SdfGeometryUseCase:
|
||||||
|
ShapePropertyCheck = ['Mass', 'MatrixOfInertia', 'Placement', ]
|
||||||
|
PartPropertyCheck = ['Shape']
|
||||||
|
|
||||||
|
def call(self, stlPaths: dict) -> list[SdfGeometryModel]:
|
||||||
|
materialSolid = {}
|
||||||
|
for el in App.ActiveDocument.Objects:
|
||||||
|
if str(el) == '<App::MaterialObjectPython object>':
|
||||||
|
friction = el.Material.get('SlidingFriction')
|
||||||
|
for i in el.References:
|
||||||
|
materialSolid[i[0].Label] = friction
|
||||||
|
geometry = []
|
||||||
|
try:
|
||||||
|
for el in App.ActiveDocument.Objects:
|
||||||
|
|
||||||
|
if is_object_solid(el):
|
||||||
|
mass = el.Shape.Mass
|
||||||
|
inertia = el.Shape.MatrixOfInertia
|
||||||
|
pos = el.Shape.Placement
|
||||||
|
inertia = el.Shape.MatrixOfInertia
|
||||||
|
name = el.Label
|
||||||
|
delimiter = 1000000
|
||||||
|
ixx = str(inertia.A11 / delimiter)
|
||||||
|
ixy = str(inertia.A12 / delimiter)
|
||||||
|
ixz = str(inertia.A13 / delimiter)
|
||||||
|
iyy = str(inertia.A22 / delimiter)
|
||||||
|
iyz = str(inertia.A23 / delimiter)
|
||||||
|
izz = str(inertia.A33 / delimiter)
|
||||||
|
massSDF = str(mass / delimiter)
|
||||||
|
posX = str(pos.Base[0] / delimiter)
|
||||||
|
posY = str(pos.Base[1] / delimiter)
|
||||||
|
posZ = str(pos.Base[2] / delimiter)
|
||||||
|
eulerX = str(pos.Rotation.toEuler()[0])
|
||||||
|
eulerY = str(pos.Rotation.toEuler()[1])
|
||||||
|
eulerZ = str(pos.Rotation.toEuler()[2])
|
||||||
|
centerMassX = str(el.Shape.CenterOfMass[0])
|
||||||
|
centerMassY = str(el.Shape.CenterOfMass[1])
|
||||||
|
centerMassZ = str(el.Shape.CenterOfMass[2])
|
||||||
|
geometry.append(
|
||||||
|
SdfGeometryModel(
|
||||||
|
stl=stlPaths.get(el.Label),
|
||||||
|
name=name,
|
||||||
|
ixx=ixx,
|
||||||
|
ixz=ixz,
|
||||||
|
ixy=ixy,
|
||||||
|
iyy=iyy,
|
||||||
|
iyz=iyz,
|
||||||
|
izz=izz,
|
||||||
|
massSDF=massSDF,
|
||||||
|
posX=posX,
|
||||||
|
posY=posY,
|
||||||
|
posZ=posZ,
|
||||||
|
eulerX=eulerX,
|
||||||
|
eulerY=eulerY,
|
||||||
|
eulerZ=eulerZ,
|
||||||
|
friction=materialSolid.get(el.Label) or '',
|
||||||
|
centerMassX=centerMassX,
|
||||||
|
centerMassY=centerMassY,
|
||||||
|
centerMassZ=centerMassZ
|
||||||
|
)
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
return geometry
|
96
freecad_workbench/cad_stability_check/.gitignore
vendored
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
env/
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*,cover
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# dotenv
|
||||||
|
.env
|
||||||
|
|
||||||
|
# virtualenv
|
||||||
|
.venv
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
env.json
|
||||||
|
out/
|
461
freecad_workbench/cad_stability_check/main.py
Normal file
|
@ -0,0 +1,461 @@
|
||||||
|
# Алгоритм генерации графа с помощью оценки стабильности подсборок в физическом движке PyBullet
|
||||||
|
from typing import Any, TypeVar, Type, cast
|
||||||
|
import FreeCAD as App
|
||||||
|
import json
|
||||||
|
import importOBJ
|
||||||
|
import Draft
|
||||||
|
import os
|
||||||
|
import Part
|
||||||
|
import numpy as np
|
||||||
|
from typing import TypeAlias
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
ISequencesUnion: TypeAlias = dict[str : dict[str : list[str]]]
|
||||||
|
|
||||||
|
|
||||||
|
def importObjAtPath(path: str, inc: int):
|
||||||
|
try:
|
||||||
|
importOBJ.insert("" + path, App.ActiveDocument.Label)
|
||||||
|
|
||||||
|
mesh = App.ActiveDocument.Objects[inc]
|
||||||
|
shape = Part.Shape()
|
||||||
|
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.05)
|
||||||
|
solid = Part.makeSolid(shape)
|
||||||
|
|
||||||
|
Part.show(solid)
|
||||||
|
|
||||||
|
App.ActiveDocument.Objects[inc + 1].Label = App.ActiveDocument.Objects[inc].Name
|
||||||
|
App.ActiveDocument.removeObject(App.ActiveDocument.Objects[inc].Name)
|
||||||
|
return App.ActiveDocument.Objects[inc]
|
||||||
|
except:
|
||||||
|
print("path")
|
||||||
|
print(path)
|
||||||
|
print("inc")
|
||||||
|
print(inc)
|
||||||
|
|
||||||
|
|
||||||
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
||||||
|
def from_float(x: Any) -> float:
|
||||||
|
assert isinstance(x, (float, int)) and not isinstance(x, bool)
|
||||||
|
return float(x)
|
||||||
|
|
||||||
|
|
||||||
|
def to_float(x: Any) -> float:
|
||||||
|
assert isinstance(x, float)
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
def from_str(x: Any) -> str:
|
||||||
|
assert isinstance(x, str)
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
def to_class(c: Type[T], x: Any) -> dict:
|
||||||
|
assert isinstance(x, c)
|
||||||
|
return cast(Any, x).to_dict()
|
||||||
|
|
||||||
|
|
||||||
|
def euler_to_quaternion(yaw, pitch, roll):
|
||||||
|
qx = np.sin(roll / 2) * np.cos(pitch / 2) * np.cos(yaw / 2) - np.cos(
|
||||||
|
roll / 2
|
||||||
|
) * np.sin(pitch / 2) * np.sin(yaw / 2)
|
||||||
|
qy = np.cos(roll / 2) * np.sin(pitch / 2) * np.cos(yaw / 2) + np.sin(
|
||||||
|
roll / 2
|
||||||
|
) * np.cos(pitch / 2) * np.sin(yaw / 2)
|
||||||
|
qz = np.cos(roll / 2) * np.cos(pitch / 2) * np.sin(yaw / 2) - np.sin(
|
||||||
|
roll / 2
|
||||||
|
) * np.sin(pitch / 2) * np.cos(yaw / 2)
|
||||||
|
qw = np.cos(roll / 2) * np.cos(pitch / 2) * np.cos(yaw / 2) + np.sin(
|
||||||
|
roll / 2
|
||||||
|
) * np.sin(pitch / 2) * np.sin(yaw / 2)
|
||||||
|
|
||||||
|
return [qx, qy, qz, qw]
|
||||||
|
|
||||||
|
|
||||||
|
class Coords:
|
||||||
|
x: float
|
||||||
|
y: float
|
||||||
|
z: float
|
||||||
|
|
||||||
|
def __init__(self, x: float, y: float, z: float) -> None:
|
||||||
|
self.x = x
|
||||||
|
self.y = y
|
||||||
|
self.z = z
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_dict(obj: Any) -> "Coords":
|
||||||
|
assert isinstance(obj, dict)
|
||||||
|
x = from_float(obj.get("x"))
|
||||||
|
y = from_float(obj.get("y"))
|
||||||
|
z = from_float(obj.get("z"))
|
||||||
|
return Coords(x, y, z)
|
||||||
|
|
||||||
|
def to_dict(self) -> dict:
|
||||||
|
result: dict = {}
|
||||||
|
result["x"] = to_float(self.x)
|
||||||
|
result["y"] = to_float(self.y)
|
||||||
|
result["z"] = to_float(self.z)
|
||||||
|
return result
|
||||||
|
|
||||||
|
def vector(self):
|
||||||
|
return App.Vector(self.x, self.y, self.z)
|
||||||
|
|
||||||
|
|
||||||
|
class MotionResultModel:
|
||||||
|
id: str
|
||||||
|
quaternion: Coords
|
||||||
|
position: Coords
|
||||||
|
|
||||||
|
def __init__(self, id: str, quaternion: Coords, position: Coords) -> None:
|
||||||
|
self.id = id
|
||||||
|
self.quaternion = quaternion
|
||||||
|
self.position = position
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_dict(obj: Any) -> "MotionResultModel":
|
||||||
|
id = from_str(obj.get("id"))
|
||||||
|
quaternion = Coords.from_dict(obj.get("quaternion"))
|
||||||
|
position = Coords.from_dict(obj.get("position"))
|
||||||
|
return MotionResultModel(id, quaternion, position)
|
||||||
|
|
||||||
|
def to_dict(self) -> dict:
|
||||||
|
result: dict = {}
|
||||||
|
result["id"] = from_str(self.id)
|
||||||
|
result["quaternion"] = to_class(Coords, self.quaternion)
|
||||||
|
result["position"] = to_class(Coords, self.position)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
class SequencesEvaluation:
|
||||||
|
sequences: ISequencesUnion
|
||||||
|
assemblyDir: str
|
||||||
|
result: dict = {}
|
||||||
|
|
||||||
|
def __init__(self, sequences, assemblyDir) -> None:
|
||||||
|
self.sequences = sequences
|
||||||
|
self.assemblyDir = assemblyDir
|
||||||
|
pass
|
||||||
|
|
||||||
|
def assemblyComputed(self):
|
||||||
|
isOk = True
|
||||||
|
for sequenceNumber, v in self.sequences.items():
|
||||||
|
for assemblyNumber, assemblySequenced in v.items():
|
||||||
|
if isOk:
|
||||||
|
# sequenceNumber += 1
|
||||||
|
isOk = False
|
||||||
|
self.comptedAssembly(
|
||||||
|
assemblySequenced, sequenceNumber, assemblyNumber
|
||||||
|
)
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
def comptedAssembly(
|
||||||
|
self, assembly: list[str], sequenceNumber: int, assemblyNumber: int
|
||||||
|
):
|
||||||
|
assemblyParts = []
|
||||||
|
for counter in range(len(assembly)):
|
||||||
|
importObjAtPath(
|
||||||
|
self.assemblyDir + "generation/meshes/" + assembly[counter] + ".obj",
|
||||||
|
counter,
|
||||||
|
)
|
||||||
|
assemblyParts.append(
|
||||||
|
{"part": App.ActiveDocument.Objects[counter], "name": assembly[counter]}
|
||||||
|
)
|
||||||
|
|
||||||
|
motionResult = json.loads(
|
||||||
|
(
|
||||||
|
open(
|
||||||
|
self.assemblyDir
|
||||||
|
+ "stability"
|
||||||
|
+ "/"
|
||||||
|
+ str(sequenceNumber + 1)
|
||||||
|
+ "/"
|
||||||
|
+ str(assemblyNumber)
|
||||||
|
+ "/"
|
||||||
|
+ "motion_result.json"
|
||||||
|
)
|
||||||
|
).read()
|
||||||
|
)
|
||||||
|
|
||||||
|
simulatorMotionResults: list["MotionResultModel"] = []
|
||||||
|
for _k, v in motionResult.items():
|
||||||
|
print(v)
|
||||||
|
simulatorMotionResults.append(MotionResultModel.from_dict(v))
|
||||||
|
|
||||||
|
for el in simulatorMotionResults:
|
||||||
|
for e in assemblyParts:
|
||||||
|
# сопоставляем детали
|
||||||
|
if el.id == e.get("name"):
|
||||||
|
# вычисляем центр детали для перемещения
|
||||||
|
center = e.get("part").Shape.CenterOfMass
|
||||||
|
# получаем центр деталей из симуляции
|
||||||
|
new_center = App.Vector(el.position.vector())
|
||||||
|
|
||||||
|
# вычисляем вектор смещения
|
||||||
|
offset = new_center - center
|
||||||
|
# перемещаем деталь на вектор смещения
|
||||||
|
e.get("part").Placement.Base += offset
|
||||||
|
|
||||||
|
# # импортируем меш связанный с зоной обьекта
|
||||||
|
zonePart = importObjAtPath(
|
||||||
|
self.assemblyDir
|
||||||
|
+ "stability/zones/meshes/zone_sub_assembly"
|
||||||
|
+ str(assembly.__len__() - 1)
|
||||||
|
+ ".obj",
|
||||||
|
len(App.ActiveDocument.Objects),
|
||||||
|
)
|
||||||
|
# # получаем координаты зоны относительно детали за которой закреплена зона
|
||||||
|
|
||||||
|
coords = json.loads(
|
||||||
|
(
|
||||||
|
open(
|
||||||
|
self.assemblyDir
|
||||||
|
+ "stability/zones/sub_assembly_coords_"
|
||||||
|
+ str(assemblyNumber - 1)
|
||||||
|
+ ".json"
|
||||||
|
)
|
||||||
|
).read()
|
||||||
|
)
|
||||||
|
assemblyCounter = len(assemblyParts)
|
||||||
|
detailWhichZoneBindings = assemblyParts[assemblyCounter - 2].get("part")
|
||||||
|
|
||||||
|
detailStabilityComputed = assemblyParts[assemblyCounter - 1].get("part")
|
||||||
|
relativeCoordinates = coords.get("relativeCoordinates")
|
||||||
|
|
||||||
|
relativeEuler = coords.get("relativeEuler")
|
||||||
|
|
||||||
|
specificEuler = {
|
||||||
|
"yaw": detailWhichZoneBindings.Placement.Rotation.toEuler()[0]
|
||||||
|
- relativeEuler.get("yaw"),
|
||||||
|
"pitch": detailWhichZoneBindings.Placement.Rotation.toEuler()[1]
|
||||||
|
- relativeEuler.get("pitch"),
|
||||||
|
"roll": detailWhichZoneBindings.Placement.Rotation.toEuler()[2]
|
||||||
|
- relativeEuler.get("roll"),
|
||||||
|
}
|
||||||
|
quaternion = euler_to_quaternion(
|
||||||
|
specificEuler.get("yaw"),
|
||||||
|
specificEuler.get("pitch"),
|
||||||
|
specificEuler.get("roll"),
|
||||||
|
)
|
||||||
|
rotation = App.Rotation(
|
||||||
|
quaternion[0], quaternion[1], quaternion[2], quaternion[3]
|
||||||
|
)
|
||||||
|
|
||||||
|
detailStabilityComputed.Placement.Rotation = rotation
|
||||||
|
centerVector = detailWhichZoneBindings.Shape.CenterOfMass
|
||||||
|
vector = App.Vector(
|
||||||
|
relativeCoordinates.get("x"),
|
||||||
|
relativeCoordinates.get("y"),
|
||||||
|
relativeCoordinates.get("z"),
|
||||||
|
)
|
||||||
|
print(vector)
|
||||||
|
# TODO
|
||||||
|
current_center = zonePart.Shape.CenterOfMass
|
||||||
|
move_vector = App.Vector(centerVector + vector) - current_center
|
||||||
|
zonePart.Placement.move(move_vector)
|
||||||
|
|
||||||
|
computedStabilityResult = computedStability(zonePart, detailStabilityComputed)
|
||||||
|
|
||||||
|
if sequenceNumber not in self.result.keys():
|
||||||
|
self.result[sequenceNumber] = []
|
||||||
|
|
||||||
|
self.result[sequenceNumber].append(
|
||||||
|
{str(assemblyNumber): assembly, "result": computedStabilityResult}
|
||||||
|
)
|
||||||
|
# for part in App.ActiveDocument.Objects:
|
||||||
|
# App.ActiveDocument.removeObject(part.Name)
|
||||||
|
|
||||||
|
|
||||||
|
def get_part_center(part):
|
||||||
|
shape = None
|
||||||
|
if not hasattr(part, "Shape"):
|
||||||
|
shape = part.Mesh
|
||||||
|
if hasattr(part, "Shape"):
|
||||||
|
shape = part.Shape
|
||||||
|
|
||||||
|
center = shape.BoundBox.Center
|
||||||
|
return App.Vector(center[0], center[1], center[2])
|
||||||
|
|
||||||
|
|
||||||
|
def move_second_part_to_match_center(first_part, second_part):
|
||||||
|
first_center = get_part_center(first_part)
|
||||||
|
second_center = get_part_center(second_part)
|
||||||
|
offset = first_center - second_center
|
||||||
|
second_part.Placement.move(offset)
|
||||||
|
|
||||||
|
|
||||||
|
def create(part):
|
||||||
|
clone = Draft.make_clone([part], forcedraft=True)
|
||||||
|
|
||||||
|
clone.Scale = App.Vector(1.30, 1.30, 1.30)
|
||||||
|
clone_corr = (
|
||||||
|
App.Vector(0.4476673941774023, -2.109332894191716, -0.5918687740295264)
|
||||||
|
- clone.Placement.Base
|
||||||
|
).scale(*App.Vector(-0.25, -0.25, -0.25))
|
||||||
|
clone.Placement.move(clone_corr)
|
||||||
|
App.ActiveDocument.recompute()
|
||||||
|
|
||||||
|
return clone
|
||||||
|
|
||||||
|
|
||||||
|
def getFullPathObj(assemblyFolder: str, name: str):
|
||||||
|
return assemblyFolder + "sdf/meshes/" + name + ".obj"
|
||||||
|
|
||||||
|
|
||||||
|
def computedStability(refElement, childElement):
|
||||||
|
rootElement = childElement.Shape.BoundBox
|
||||||
|
# Создание обьекта на котором делается операция пересечения
|
||||||
|
App.activeDocument().addObject("Part::MultiCommon", "Common")
|
||||||
|
App.activeDocument().Common.Shapes = [
|
||||||
|
refElement,
|
||||||
|
childElement,
|
||||||
|
]
|
||||||
|
App.ActiveDocument.getObject("Common").ViewObject.ShapeColor = getattr(
|
||||||
|
App.ActiveDocument.getObject(refElement.Name).getLinkedObject(True).ViewObject,
|
||||||
|
"ShapeColor",
|
||||||
|
App.ActiveDocument.getObject("Common").ViewObject.ShapeColor,
|
||||||
|
)
|
||||||
|
App.ActiveDocument.getObject("Common").ViewObject.DisplayMode = getattr(
|
||||||
|
App.ActiveDocument.getObject(childElement.Name)
|
||||||
|
.getLinkedObject(True)
|
||||||
|
.ViewObject,
|
||||||
|
"DisplayMode",
|
||||||
|
App.ActiveDocument.getObject("Common").ViewObject.DisplayMode,
|
||||||
|
)
|
||||||
|
App.ActiveDocument.recompute()
|
||||||
|
obj = App.ActiveDocument.getObjectsByLabel("Common")[0]
|
||||||
|
|
||||||
|
shp = obj.Shape
|
||||||
|
bbox = shp.BoundBox
|
||||||
|
# Если после операции пересечения зона обьекта совпадает с зоной тестируемого обьекта то тест прошел успешно
|
||||||
|
if (
|
||||||
|
bbox.XLength == rootElement.XLength
|
||||||
|
and bbox.YLength == rootElement.YLength
|
||||||
|
and rootElement.ZLength == bbox.ZLength
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def autoStabilityZoneComputed(stepFilesPaths: list[str], directoryStableZonesPath: str):
|
||||||
|
cadObjects = []
|
||||||
|
for count in range(len(stepFilesPaths)):
|
||||||
|
importObjAtPath(stepFilesPaths[count], count)
|
||||||
|
cadObjects.append(App.ActiveDocument.Objects[count])
|
||||||
|
|
||||||
|
assemblesBindings = []
|
||||||
|
|
||||||
|
for increment in range(len(cadObjects)):
|
||||||
|
if increment != 0:
|
||||||
|
detailForEvaluationZ = cadObjects[increment]
|
||||||
|
zoneBindingDetailZ = cadObjects[increment - 1]
|
||||||
|
assemblesBindings.append(
|
||||||
|
{
|
||||||
|
"zoneBindingDetail": detailForEvaluationZ,
|
||||||
|
"detailForEvaluation": zoneBindingDetailZ,
|
||||||
|
"relativeCoordinates": None,
|
||||||
|
"zonePart": None,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
for increment in range(len(assemblesBindings)):
|
||||||
|
el = assemblesBindings[increment]
|
||||||
|
|
||||||
|
zoneBindingDetail = el.get("zoneBindingDetail")
|
||||||
|
zoneBindingDetailCenterVector = zoneBindingDetail.Shape.CenterOfMass
|
||||||
|
zoneDetail = create(el.get("detailForEvaluation"))
|
||||||
|
move_second_part_to_match_center(el.get("zoneBindingDetail"), zoneDetail)
|
||||||
|
zoneDetail.Label = "zone_sub_assembly" + str(increment + 1)
|
||||||
|
|
||||||
|
zoneDetail.ViewObject.ShapeColor = (0.40, 0.74, 0.71)
|
||||||
|
zoneDetail.ViewObject.Transparency = 50
|
||||||
|
zoneDetailCenterVector = el.get("detailForEvaluation").Shape.CenterOfMass
|
||||||
|
|
||||||
|
el["relativeCoordinates"] = {
|
||||||
|
"x": zoneBindingDetailCenterVector.x - zoneDetailCenterVector.x,
|
||||||
|
"y": zoneBindingDetailCenterVector.y - zoneDetailCenterVector.y,
|
||||||
|
"z": zoneBindingDetailCenterVector.z - zoneDetailCenterVector.z,
|
||||||
|
}
|
||||||
|
|
||||||
|
el["relativeEuler"] = {
|
||||||
|
"yaw": zoneBindingDetail.Placement.Rotation.toEuler()[0]
|
||||||
|
- el.get("detailForEvaluation").Placement.Rotation.toEuler()[0],
|
||||||
|
"pitch": zoneBindingDetail.Placement.Rotation.toEuler()[1]
|
||||||
|
- el.get("detailForEvaluation").Placement.Rotation.toEuler()[1],
|
||||||
|
"roll": zoneBindingDetail.Placement.Rotation.toEuler()[2]
|
||||||
|
- el.get("detailForEvaluation").Placement.Rotation.toEuler()[2],
|
||||||
|
}
|
||||||
|
el["zonePart"] = zoneDetail
|
||||||
|
|
||||||
|
meshesPath = directoryStableZonesPath + "meshes/"
|
||||||
|
if not os.path.exists(directoryStableZonesPath):
|
||||||
|
os.makedirs(directoryStableZonesPath)
|
||||||
|
if not os.path.exists(meshesPath):
|
||||||
|
os.makedirs(meshesPath)
|
||||||
|
zonesSaved = {}
|
||||||
|
for counter in range(len(assemblesBindings)):
|
||||||
|
zoneComputed = assemblesBindings[counter]
|
||||||
|
mesh = zoneComputed.get("zonePart")
|
||||||
|
zonesSavePath = meshesPath + mesh.Label + ".obj"
|
||||||
|
importOBJ.export([mesh], zonesSavePath)
|
||||||
|
zonesSaved[mesh.Label] = "meshes/" + mesh.Label + ".obj"
|
||||||
|
for counter in range(len(assemblesBindings)):
|
||||||
|
el = assemblesBindings[counter]
|
||||||
|
savePath = zonesSaved[el.get("zonePart").Label]
|
||||||
|
el["zonePart"] = savePath
|
||||||
|
el["detailForEvaluation"] = el["detailForEvaluation"].Label
|
||||||
|
el["zoneBindingDetail"] = el["zoneBindingDetail"].Label
|
||||||
|
|
||||||
|
json_result = json.dumps(el)
|
||||||
|
|
||||||
|
file_to_open = (
|
||||||
|
directoryStableZonesPath + "sub_assembly_coords_" + str(counter) + ".json"
|
||||||
|
)
|
||||||
|
|
||||||
|
f = open(
|
||||||
|
file_to_open,
|
||||||
|
"w",
|
||||||
|
)
|
||||||
|
|
||||||
|
f.write(json_result)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
App.newDocument()
|
||||||
|
env = json.loads((open("./env.json")).read())
|
||||||
|
|
||||||
|
assemblyDir = env.get("aspPath")
|
||||||
|
sequencesJSON = json.loads((open(assemblyDir + "sequences.json")).read())
|
||||||
|
directoryStableZones = assemblyDir + "stability/zones/"
|
||||||
|
|
||||||
|
sequences = sequencesJSON.get("sequences")
|
||||||
|
stepStructure = json.loads((open(assemblyDir + "step-structure.json")).read())
|
||||||
|
|
||||||
|
stepFilesPaths = []
|
||||||
|
for step in stepStructure:
|
||||||
|
stepFilesPaths.append(assemblyDir + "generation/meshes/" + step + ".obj")
|
||||||
|
if not os.path.exists(directoryStableZones):
|
||||||
|
print("Zones not found automatic calculation started")
|
||||||
|
autoStabilityZoneComputed(stepFilesPaths, directoryStableZones)
|
||||||
|
|
||||||
|
sequencesJoin = {}
|
||||||
|
|
||||||
|
for arrayCounter in range(len(sequences)):
|
||||||
|
for indexCounter in range(len(sequences[arrayCounter])):
|
||||||
|
if indexCounter != 0:
|
||||||
|
if sequencesJoin.get(arrayCounter) == None:
|
||||||
|
sequencesJoin[arrayCounter] = {
|
||||||
|
indexCounter: sequences[arrayCounter][0 : indexCounter + 1]
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
sequencesJoin[arrayCounter][indexCounter] = sequences[arrayCounter][
|
||||||
|
0 : indexCounter + 1
|
||||||
|
]
|
||||||
|
|
||||||
|
seqEvaluation = SequencesEvaluation(sequencesJoin, assemblyDir)
|
||||||
|
seqEvaluation.assemblyComputed()
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
95
freecad_workbench/cad_stability_input/.gitignore
vendored
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
env/
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*,cover
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# dotenv
|
||||||
|
.env
|
||||||
|
|
||||||
|
# virtualenv
|
||||||
|
.venv
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
env.json
|
505
freecad_workbench/cad_stability_input/LICENSE
Normal file
|
@ -0,0 +1,505 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
(This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.)
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
{description}
|
||||||
|
Copyright (C) {year} {fullname}
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
|
USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random
|
||||||
|
Hacker.
|
||||||
|
|
||||||
|
{signature of Ty Coon}, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|
0
freecad_workbench/cad_stability_input/README.md
Normal file
4
freecad_workbench/cad_stability_input/gui/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import os
|
||||||
|
from .version import __version__
|
||||||
|
|
||||||
|
ICONPATH = os.path.join(os.path.dirname(__file__), "resources")
|
89
freecad_workbench/cad_stability_input/gui/init_gui.py
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
import os
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
import FreeCAD as App
|
||||||
|
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||||
|
import shutil
|
||||||
|
ICONPATH = os.path.join(os.path.dirname(__file__), "resources")
|
||||||
|
zone = "StabilityZone"
|
||||||
|
import requests
|
||||||
|
import importOBJ
|
||||||
|
|
||||||
|
|
||||||
|
class AddStabilityZone:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def GetResources(self):
|
||||||
|
return {'Pixmap': os.path.join(ICONPATH, "stability_zone.svg"),
|
||||||
|
'Accel': "Ctrl+A",
|
||||||
|
'MenuText': QT_TRANSLATE_NOOP("My_Command", "My Command"),
|
||||||
|
'ToolTip': QT_TRANSLATE_NOOP("My_Command", "Runs my command in the active document")}
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
App.ActiveDocument.addObject("Part::Box", "Box")
|
||||||
|
App.ActiveDocument.ActiveObject.Label = zone
|
||||||
|
selected_object = App.ActiveDocument.getObjectsByLabel(zone)[0]
|
||||||
|
selected_object.ViewObject.Transparency = 50
|
||||||
|
selected_object.ViewObject.ShapeColor = (0.15, 0.80, 0.50)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def IsActive(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
class SyncServer:
|
||||||
|
|
||||||
|
httpURL = None
|
||||||
|
def __init__(self, httpURL):
|
||||||
|
self.httpURL = httpURL
|
||||||
|
|
||||||
|
|
||||||
|
def GetResources(self):
|
||||||
|
return {'Pixmap': os.path.join(ICONPATH, "server_sync.svg"),
|
||||||
|
'Accel': "Ctrl+A",
|
||||||
|
'MenuText': QT_TRANSLATE_NOOP("My_Command", "My Command"),
|
||||||
|
'ToolTip': QT_TRANSLATE_NOOP("My_Command", "Runs my command in the active document")}
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
StabilityZone = App.ActiveDocument.getObjectsByLabel(zone)
|
||||||
|
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
dir_out = dir_path + '/out/'
|
||||||
|
if not os.path.exists(dir_out):
|
||||||
|
os.makedirs(dir_out)
|
||||||
|
importOBJ.export(StabilityZone, u"" + dir_out + 'StabilityZone.obj')
|
||||||
|
shutil.make_archive(dir_out + '/' + 'geometry', 'zip',)
|
||||||
|
zipArch = dir_out + 'geometry.zip'
|
||||||
|
requests.post(url=self.httpURL, files={'zip': open(zipArch, "rb")})
|
||||||
|
shutil.rmtree(dir_out)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def IsActive(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
class StabilityWorkbench(Gui.Workbench):
|
||||||
|
|
||||||
|
MenuText = "stability workbench"
|
||||||
|
ToolTip = "a simple template workbench"
|
||||||
|
Icon = os.path.join(ICONPATH, "template_resource.svg")
|
||||||
|
toolbox = ['AddStabilityZone', 'SyncServer']
|
||||||
|
httpURL = None
|
||||||
|
def __init__(self,httpURL):
|
||||||
|
self.httpURL = httpURL
|
||||||
|
|
||||||
|
|
||||||
|
def GetClassName(self):
|
||||||
|
return "Gui::PythonWorkbench"
|
||||||
|
|
||||||
|
def Initialize(self):
|
||||||
|
Gui.addCommand('AddStabilityZone', AddStabilityZone())
|
||||||
|
Gui.addCommand('SyncServer', SyncServer(
|
||||||
|
self.httpURL))
|
||||||
|
self.appendToolbar("Tools", self.toolbox)
|
||||||
|
self.appendMenu("Tools", self.toolbox)
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def Deactivated(self):
|
||||||
|
pass
|
|
@ -0,0 +1,134 @@
|
||||||
|
<?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="64"
|
||||||
|
height="64"
|
||||||
|
id="svg2985"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.5 r10040"
|
||||||
|
sodipodi:docname="button_valid.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2987">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3774">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4e9a06;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3776" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#8ae234;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3778" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4082"
|
||||||
|
id="linearGradient3922-0"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-0.56091264,-0.498646,0.48035179,-0.58227539,-177.89813,269.15635)"
|
||||||
|
x1="10.387"
|
||||||
|
y1="453.77875"
|
||||||
|
x2="56.319412"
|
||||||
|
y2="483.99524" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4082">
|
||||||
|
<stop
|
||||||
|
id="stop4084"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#4e9a06;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop4086"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#8ae234;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3774"
|
||||||
|
id="linearGradient3780"
|
||||||
|
x1="30"
|
||||||
|
y1="-2"
|
||||||
|
x2="26"
|
||||||
|
y2="-26"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3774"
|
||||||
|
id="linearGradient2999"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="30"
|
||||||
|
y1="-2"
|
||||||
|
x2="26"
|
||||||
|
y2="-26" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="15.696216"
|
||||||
|
inkscape:cx="42.681569"
|
||||||
|
inkscape:cy="45.101596"
|
||||||
|
inkscape:current-layer="g2995"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="837"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid2983"
|
||||||
|
empspacing="2"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata2990">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
transform="translate(0,48)">
|
||||||
|
<g
|
||||||
|
id="g2995"
|
||||||
|
transform="matrix(1.2252683,0,0,1.2252683,-6.3014179,2.4330891)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4088"
|
||||||
|
d="m 15.48076,-21.246576 10.519239,10.519232 21.038474,-21.038464 7.889428,7.889424 L 25.999999,5.0515065 7.5913312,-13.357152 z"
|
||||||
|
style="fill:url(#linearGradient2999);fill-opacity:1;stroke:#172a04;stroke-width:1.63229537;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3004"
|
||||||
|
d="M 9.9510978,-13.350403 15.477822,-18.889628 26,-8.4375583 47.031855,-29.448573 52.57108,-23.872581 26,2.7352662 z"
|
||||||
|
style="fill:none;stroke:#8ae234;stroke-width:1.63229549;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
|
@ -0,0 +1,142 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<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"
|
||||||
|
version="1.1"
|
||||||
|
id="svg6248"
|
||||||
|
height="64px"
|
||||||
|
width="64px">
|
||||||
|
<defs
|
||||||
|
id="defs6250">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3253">
|
||||||
|
<stop
|
||||||
|
id="stop3255"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#89d5f8;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop3257"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#00899e;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient6816">
|
||||||
|
<stop
|
||||||
|
id="stop6818"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#000000;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop6820"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#000000;stop-opacity:0;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient6781">
|
||||||
|
<stop
|
||||||
|
id="stop6783"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop6785"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#3465a4;stop-opacity:0;" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
|
||||||
|
r="25.198714"
|
||||||
|
fy="51.929391"
|
||||||
|
fx="33.369828"
|
||||||
|
cy="51.929391"
|
||||||
|
cx="33.369828"
|
||||||
|
id="radialGradient6822"
|
||||||
|
xlink:href="#linearGradient6816" />
|
||||||
|
<radialGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9724373,-0.105657,5.0523169e-2,0.4650009,-0.3519546,9.5854384)"
|
||||||
|
r="27.986705"
|
||||||
|
fy="17.013988"
|
||||||
|
fx="18.417862"
|
||||||
|
cy="17.013988"
|
||||||
|
cx="18.417862"
|
||||||
|
id="radialGradient3259"
|
||||||
|
xlink:href="#linearGradient3253" />
|
||||||
|
<radialGradient
|
||||||
|
r="27.986705"
|
||||||
|
fy="17.013988"
|
||||||
|
fx="18.417862"
|
||||||
|
cy="17.013988"
|
||||||
|
cx="18.417862"
|
||||||
|
gradientTransform="matrix(0.9724373,-0.105657,0.05052317,0.4650009,-0.3519546,9.5854384)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient3270"
|
||||||
|
xlink:href="#linearGradient3253" />
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata6253">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1">
|
||||||
|
<g
|
||||||
|
transform="matrix(-1,0,0,0.99363058,4,0.0382165)"
|
||||||
|
id="g3913-7">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:6.01919985;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6.01920039"
|
||||||
|
d="M -55,47.282051 -28,35.564103 -28,4.974359 -55,16.692308 z"
|
||||||
|
id="path3003-5-3-0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#16d0d2;stroke-width:2.00640011;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6.01920003"
|
||||||
|
d="M -55,47.282051 -28,35.564103 -28,4.974359 -55,16.692308 z"
|
||||||
|
id="path3003-5-3-1-9" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(60,0)"
|
||||||
|
id="g3913">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
|
||||||
|
d="M -55,47.307692 -28,35.615385 -28,5 -55,16.692308 z"
|
||||||
|
id="path3003-5-3" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#16d0d2;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
|
||||||
|
d="M -55,47.307692 -28,35.615385 -28,5 -55,16.692308 z"
|
||||||
|
id="path3003-5-3-1" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
id="path3003"
|
||||||
|
d="M 32,59 5,47.307692 5,16.692308 32,28.384615 z"
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3003-5"
|
||||||
|
d="M 32,59 59,47.307692 59,16.692308 32,28.384615 z"
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3003-2-2"
|
||||||
|
d="M 59,16.692308 32,28.384615 5,16.692308 32,5 z"
|
||||||
|
style="fill:none;stroke:#042a2a;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3003-3"
|
||||||
|
d="M 32,59 5,47.307692 5,16.692308 32,28.384615 z"
|
||||||
|
style="fill:none;stroke:#16d0d2;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3003-5-6"
|
||||||
|
d="M 32,59 59,47.307692 59,16.692308 32,28.384615 z"
|
||||||
|
style="fill:none;stroke:#16d0d2;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
id="path3003-2"
|
||||||
|
d="M 59,16.692308 32,28.384615 5,16.692308 32,5 z"
|
||||||
|
style="fill:none;stroke:#34e0e2;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.4 KiB |
|
@ -0,0 +1,166 @@
|
||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
width="64.1875"
|
||||||
|
height="64.1875"
|
||||||
|
id="svg3799"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="my_resources.svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1855"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview3241"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="3.2883564"
|
||||||
|
inkscape:cx="103.51645"
|
||||||
|
inkscape:cy="-10.131949"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg3799" />
|
||||||
|
<defs
|
||||||
|
id="defs3801">
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="EmptyTriangleOutL"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
|
||||||
|
transform="matrix(0.8,0,0,0.8,-4.8,0)"
|
||||||
|
id="path4487"
|
||||||
|
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="DotS"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||||
|
transform="matrix(0.2,0,0,0.2,1.48,0.2)"
|
||||||
|
id="path4394"
|
||||||
|
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="DotL"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||||
|
transform="matrix(0.8,0,0,0.8,5.92,0.8)"
|
||||||
|
id="path4388"
|
||||||
|
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="Tail"
|
||||||
|
style="overflow:visible">
|
||||||
|
<g
|
||||||
|
transform="scale(-1.2,-1.2)"
|
||||||
|
id="g4363">
|
||||||
|
<path
|
||||||
|
d="M -3.8048674,-3.9585227 0.54352094,0"
|
||||||
|
id="path4365"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
<path
|
||||||
|
d="M -1.2866832,-3.9585227 3.0617053,0"
|
||||||
|
id="path4367"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
<path
|
||||||
|
d="M 1.3053582,-3.9585227 5.6537466,0"
|
||||||
|
id="path4369"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
<path
|
||||||
|
d="M -3.8048674,4.1775838 0.54352094,0.21974226"
|
||||||
|
id="path4371"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
<path
|
||||||
|
d="M -1.2866832,4.1775838 3.0617053,0.21974226"
|
||||||
|
id="path4373"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
<path
|
||||||
|
d="M 1.3053582,4.1775838 5.6537466,0.21974226"
|
||||||
|
id="path4375"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:round" />
|
||||||
|
</g>
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="Arrow1Sstart"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||||
|
transform="matrix(0.2,0,0,0.2,1.2,0)"
|
||||||
|
id="path4339"
|
||||||
|
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
id="Arrow1Lstart"
|
||||||
|
style="overflow:visible">
|
||||||
|
<path
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||||
|
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||||
|
id="path4327"
|
||||||
|
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata3804">
|
||||||
|
<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>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<rect
|
||||||
|
style="fill:none;stroke:#ff0000;stroke-width:10"
|
||||||
|
id="rect4592"
|
||||||
|
width="43.182667"
|
||||||
|
height="47.440113"
|
||||||
|
x="10.643615"
|
||||||
|
y="8.2324944" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="19.766714"
|
||||||
|
y="45.637199"
|
||||||
|
id="text4594"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4596"
|
||||||
|
x="19.766714"
|
||||||
|
y="45.637199">T</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.2 KiB |
1
freecad_workbench/cad_stability_input/gui/version.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
__version__ = "0.8.1"
|
47
freecad_workbench/cad_stability_input/main.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
import os
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
import FreeCAD as App
|
||||||
|
from gui.init_gui import StabilityWorkbench
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
def importObjAtPath(path: str):
|
||||||
|
import importOBJ
|
||||||
|
importOBJ.insert(u"" + path, App.ActiveDocument.Label)
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def getFullPathObj(assemblyFolder: str, name: str):
|
||||||
|
return assemblyFolder + 'sdf/meshes/' + name + '.obj'
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
App.newDocument()
|
||||||
|
env = json.loads((open('./env.json')).read())
|
||||||
|
assemblyFolder = env.get('assemblyFolder')
|
||||||
|
assemblyStructure = json.loads(
|
||||||
|
(open(assemblyFolder + 'step-structure.json')).read())
|
||||||
|
assemblyNumber = int(env.get('buildNumber')) - 1
|
||||||
|
activeDetail = assemblyStructure[assemblyNumber]
|
||||||
|
|
||||||
|
subassemblyNotParticipatingInMarkup = assemblyStructure[0:assemblyNumber - 1]
|
||||||
|
detailOfTheMarkingZoneOfWhich = assemblyStructure[assemblyNumber - 1]
|
||||||
|
importObjAtPath(getFullPathObj(assemblyFolder, activeDetail))
|
||||||
|
importObjAtPath(getFullPathObj(
|
||||||
|
assemblyFolder, detailOfTheMarkingZoneOfWhich))
|
||||||
|
meshMark = App.ActiveDocument.Objects[0]
|
||||||
|
meshDetailOfTheMarkZone = App.ActiveDocument.Objects[1]
|
||||||
|
meshMark.ViewObject.ShapeColor = (0.31, 0.77, 0.87)
|
||||||
|
meshDetailOfTheMarkZone.ViewObject.ShapeColor = (0.68, 0.66, 0.95)
|
||||||
|
for el in list(map(lambda el: getFullPathObj(assemblyFolder, el), subassemblyNotParticipatingInMarkup)):
|
||||||
|
importObjAtPath(el)
|
||||||
|
for el in App.ActiveDocument.Objects[2:App.ActiveDocument.Objects.__len__()]:
|
||||||
|
el.ViewObject.ShapeColor = (0.32, 0.05, 0.38)
|
||||||
|
Gui.SendMsgToActiveView("ViewSelection")
|
||||||
|
|
||||||
|
Gui.addWorkbench(StabilityWorkbench(env.get('resultURL')))
|
||||||
|
Gui.activateWorkbench("StabilityWorkbench")
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
27
freecad_workbench/chekingEntities.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import FreeCAD
|
||||||
|
|
||||||
|
# Функция для получения списка всех объектов с заданным свойством
|
||||||
|
def get_objects_with_property(property_name, property_value):
|
||||||
|
result = []
|
||||||
|
for obj in FreeCAD.ActiveDocument.Objects:
|
||||||
|
if hasattr(obj, "PropertiesList") and property_name in obj.PropertiesList:
|
||||||
|
if obj.getPropertyByName(property_name) == property_value:
|
||||||
|
result.append(obj)
|
||||||
|
return result
|
||||||
|
|
||||||
|
# Получение списка всех объектов с названием тела в свойстве
|
||||||
|
bodies = get_objects_with_property("BodyName", "Body")
|
||||||
|
|
||||||
|
# Получение списка всех объектов
|
||||||
|
all_objects = FreeCAD.ActiveDocument.Objects
|
||||||
|
|
||||||
|
# Поиск и вывод тел, у которых нет связанных вспомогательных объектов
|
||||||
|
for body in bodies:
|
||||||
|
linked_objects = []
|
||||||
|
for obj in all_objects:
|
||||||
|
if obj.hasLinkOf(body):
|
||||||
|
linked_objects.append(obj.Name)
|
||||||
|
if not linked_objects:
|
||||||
|
print(f"Тело без связанных объектов: {body.Name}")
|
||||||
|
|
||||||
|
|
187
freecad_workbench/freecad_to_json.py
Normal file
|
@ -0,0 +1,187 @@
|
||||||
|
# coding: utf-8
|
||||||
|
# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@yandex.com>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
'''
|
||||||
|
DESCRIPTION.
|
||||||
|
- Reads a FreeCAD .FCStd file.
|
||||||
|
- Set tesselation parts to mesh.
|
||||||
|
- Return scene as JSON dictionary.
|
||||||
|
'''
|
||||||
|
__version__ = '0.1'
|
||||||
|
import json
|
||||||
|
import FreeCAD
|
||||||
|
import Part
|
||||||
|
import Mesh
|
||||||
|
import MeshPart
|
||||||
|
import logging
|
||||||
|
import math
|
||||||
|
from utils.is_object_solid import is_object_solid
|
||||||
|
from utils.processor import process_file
|
||||||
|
from utils.custom_parser import CustomArgumentParser
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def freecad_to_json(**kwargs):
|
||||||
|
''' Reads a FreeCAD .FCStd file and return json assembly. '''
|
||||||
|
|
||||||
|
scene = {}
|
||||||
|
js_objs = {}
|
||||||
|
|
||||||
|
doc = FreeCAD.open(kwargs['fcstd_path'])
|
||||||
|
docname = doc.Name
|
||||||
|
|
||||||
|
# collect all materials
|
||||||
|
fem_mats = []
|
||||||
|
for fem_mat in doc.Objects:
|
||||||
|
if fem_mat.isDerivedFrom('App::MaterialObjectPython'):
|
||||||
|
fem_mats.append(fem_mat)
|
||||||
|
|
||||||
|
for obj in doc.Objects:
|
||||||
|
js_obj = {}
|
||||||
|
|
||||||
|
if kwargs['skiphidden']:
|
||||||
|
if not obj.Visibility:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if obj.isDerivedFrom('PartDesign::CoordinateSystem'):
|
||||||
|
js_obj['type'] = 'LCS'
|
||||||
|
|
||||||
|
elif obj.isDerivedFrom('Part::Feature'):
|
||||||
|
js_obj['type'] = 'PART'
|
||||||
|
# filter for nonsolids
|
||||||
|
|
||||||
|
if is_object_solid(obj) or hasattr(obj, kwargs['property_forse_nonsolid']):
|
||||||
|
# create mesh from shape
|
||||||
|
shape = obj.Shape
|
||||||
|
shape = obj.Shape.copy()
|
||||||
|
shape.Placement = obj.Placement.inverse().multiply(shape.Placement)
|
||||||
|
meshfromshape = doc.addObject('Mesh::Feature', 'Mesh')
|
||||||
|
if kwargs['tesselation_method'] == 'Standard':
|
||||||
|
meshfromshape.Mesh = MeshPart.meshFromShape(
|
||||||
|
Shape=shape,
|
||||||
|
LinearDeflection=kwargs['linear_deflection'],
|
||||||
|
AngularDeflection=math.radians(kwargs['angular_deflection']),
|
||||||
|
Relative=False)
|
||||||
|
elif kwargs['tesselation_method'] == 'FEM':
|
||||||
|
meshfromshape.Mesh = MeshPart.meshFromShape(
|
||||||
|
Shape=shape,
|
||||||
|
MaxLength=kwargs['fem_size'])
|
||||||
|
else:
|
||||||
|
raise TypeError('Wrong tesselation method! '
|
||||||
|
'Standard and FEM methods are supported only!')
|
||||||
|
|
||||||
|
t = meshfromshape.Mesh.Topology
|
||||||
|
verts = [[v.x, v.y, v.z] for v in t[0]]
|
||||||
|
faces = t[1]
|
||||||
|
js_obj['mesh'] = (verts, faces)
|
||||||
|
|
||||||
|
# one material for the whole object
|
||||||
|
for fem_mat in fem_mats:
|
||||||
|
for ref in fem_mat.References:
|
||||||
|
if ref[0].Label == obj.Label:
|
||||||
|
js_obj['material'] = fem_mat.Material
|
||||||
|
|
||||||
|
# skip for other object's types
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
js_obj['fc_location'] = tuple(obj.Placement.Base)
|
||||||
|
js_obj['fc_rotation'] = obj.Placement.Rotation.Q
|
||||||
|
|
||||||
|
# construct assembly hierarchy
|
||||||
|
obj_parent = obj.getParentGeoFeatureGroup()
|
||||||
|
obj_child_name = None
|
||||||
|
parents = {}
|
||||||
|
deep_index = 0
|
||||||
|
while obj_parent:
|
||||||
|
parent = {}
|
||||||
|
parent['fc_location'] = tuple(obj_parent.Placement.Base)
|
||||||
|
parent['fc_rotation'] = obj_parent.Placement.Rotation.Q
|
||||||
|
obj_child_name = obj_parent.Label
|
||||||
|
obj_parent = obj_parent.getParentGeoFeatureGroup()
|
||||||
|
if obj_parent:
|
||||||
|
parent['parent'] = obj_parent.Label
|
||||||
|
else:
|
||||||
|
parent['parent'] = None
|
||||||
|
parents[obj_child_name] = parent
|
||||||
|
parent['deep_index'] = deep_index
|
||||||
|
deep_index += 1
|
||||||
|
js_obj['hierarchy'] = parents
|
||||||
|
|
||||||
|
js_objs[obj.Label] = js_obj
|
||||||
|
|
||||||
|
FreeCAD.closeDocument(docname)
|
||||||
|
|
||||||
|
scene[kwargs['fcstd_path']] = js_objs
|
||||||
|
|
||||||
|
logger.info('Passed %s objects without errors', len(js_objs))
|
||||||
|
|
||||||
|
print(json.dumps(scene))
|
||||||
|
|
||||||
|
|
||||||
|
# to run script via FreeCADCmd
|
||||||
|
parser = CustomArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
|
'--fcstd_path',
|
||||||
|
type=str,
|
||||||
|
help='Path to source FreeCAD scene',
|
||||||
|
required=True
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--tesselation_method',
|
||||||
|
type=str,
|
||||||
|
help='Select tesselation method: Standard or FEM.',
|
||||||
|
default='Standard',
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--linear_deflection',
|
||||||
|
type=float,
|
||||||
|
help='Max linear distance error',
|
||||||
|
default=0.1,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--angular_deflection',
|
||||||
|
type=float,
|
||||||
|
help='Max angular distance error',
|
||||||
|
default=20.0,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--fem_size',
|
||||||
|
type=float,
|
||||||
|
help='For FEM method only! Finite element size in mm',
|
||||||
|
default=50.0,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--skiphidden',
|
||||||
|
type=bool,
|
||||||
|
help='Skip processing for hidden FreeCAD objects',
|
||||||
|
default=True,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--property_forse_nonsolid',
|
||||||
|
type=str,
|
||||||
|
help='FreeCAD property to enable processing for nonsolid objects',
|
||||||
|
default='Robossembler_NonSolid',
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
|
||||||
|
fc_kwargs = vars(parser.parse_known_args()[0])
|
||||||
|
|
||||||
|
freecad_to_json(**fc_kwargs)
|
||||||
|
|
||||||
|
logger.info('FreeCAD scene passed!')
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"cadFilePath": "/home/markvoltov/TestFolder/bottle_jack/bottle_jack.FCStd",
|
||||||
|
"outPath": "/home/markvoltov/TestFolder/bottle_jack/",
|
||||||
|
"solidBodyPadding": 3,
|
||||||
|
"firstDetail": "Куб",
|
||||||
|
"sequencesFixed": [],
|
||||||
|
"restrictionsOnFasteners": []
|
||||||
|
}
|
168
freecad_workbench/geometric_feasibility_predicate/main.py
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
import os
|
||||||
|
from extensions.list import CoreList
|
||||||
|
from extensions.dict import CoreDict
|
||||||
|
from helpers.freecadtest import FreeCadASPGenerationTestController
|
||||||
|
from models.adjacency_matrix_model import (
|
||||||
|
AdjacencyMatrixModel,
|
||||||
|
)
|
||||||
|
from usecases.check_object_has_touches_use_case import (
|
||||||
|
CheckObjectHasTouchesUseCase,
|
||||||
|
)
|
||||||
|
from usecases.clusterisation_sequences_use_case import (
|
||||||
|
ClusterisationSequenceUseCase,
|
||||||
|
)
|
||||||
|
from usecases.check_sequence_use_case import (
|
||||||
|
CheckSequenceUsecase,
|
||||||
|
)
|
||||||
|
from usecases.env_reader_use_case import (
|
||||||
|
EnvReaderUseCase,
|
||||||
|
)
|
||||||
|
from usecases.exit_freecad_use_case import (
|
||||||
|
ExitFreeCadUseCase,
|
||||||
|
)
|
||||||
|
from usecases.intersection_geometry_use_case import (
|
||||||
|
IntersectionGeometryUseCase,
|
||||||
|
)
|
||||||
|
from usecases.open_freecad_document_use_case import (
|
||||||
|
OpenFreeCadDocumentUseCase,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
from mocks.mock_structure import bottle_jack_mock_structure, simple_cube_mock_structure
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
try:
|
||||||
|
EnvReaderUseCase.call().either(
|
||||||
|
leftF=lambda environment: (
|
||||||
|
OpenFreeCadDocumentUseCase.call(environment.cadFilePath).either(
|
||||||
|
leftF=lambda _: (
|
||||||
|
(
|
||||||
|
CheckObjectHasTouchesUseCase()
|
||||||
|
.call(environment.solidBodyPadding)
|
||||||
|
.either(
|
||||||
|
leftF=lambda adjaxedMatrix: (
|
||||||
|
adjaxedMatrix.sequencesToFileSystem(
|
||||||
|
environment.outPath,
|
||||||
|
environment.sequencesFixed,
|
||||||
|
),
|
||||||
|
IntersectionGeometryUseCase.call(
|
||||||
|
adjaxedMatrix.matrixGetUniqueContact(),
|
||||||
|
environment.outPath,
|
||||||
|
),
|
||||||
|
adjaxedMatrix.matrixToFileSystem(
|
||||||
|
environment.outPath,
|
||||||
|
),
|
||||||
|
ClusterisationSequenceUseCase(environment.outPath),
|
||||||
|
ExitFreeCadUseCase.call(),
|
||||||
|
),
|
||||||
|
rightF=lambda error: error.toFileSystem(
|
||||||
|
environment.outPath
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
)
|
||||||
|
|
||||||
|
except Exception as error:
|
||||||
|
print(error)
|
||||||
|
ExitFreeCadUseCase.call()
|
||||||
|
|
||||||
|
|
||||||
|
# main()
|
||||||
|
|
||||||
|
|
||||||
|
def test():
|
||||||
|
try:
|
||||||
|
mocksFolder = os.path.dirname(__file__) + "/mocks/"
|
||||||
|
|
||||||
|
outFolder = os.path.dirname(__file__) + "/out/"
|
||||||
|
|
||||||
|
FreeCadASPGenerationTestController("test adjaxed matrix simple cube").test(
|
||||||
|
assertFn=lambda model: CoreList(model.all_parts).equal(
|
||||||
|
simple_cube_mock_structure
|
||||||
|
),
|
||||||
|
execComposition=lambda _: (
|
||||||
|
CheckObjectHasTouchesUseCase()
|
||||||
|
.call(0)
|
||||||
|
.either(
|
||||||
|
leftF=lambda matrix: matrix.matrixToFileSystem(outFolder),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
documentPath=mocksFolder + "simple_assembly_with_two_cubes.FCStd",
|
||||||
|
modelName=AdjacencyMatrixModel.fileName,
|
||||||
|
model=AdjacencyMatrixModel,
|
||||||
|
)
|
||||||
|
|
||||||
|
FreeCadASPGenerationTestController(
|
||||||
|
"test adjaxed matrix vs structure of document"
|
||||||
|
).test(
|
||||||
|
assertFn=lambda model: CoreDict(model.matrix).isEquivalentByKeys(
|
||||||
|
bottle_jack_mock_structure
|
||||||
|
),
|
||||||
|
execComposition=lambda _: (
|
||||||
|
CheckObjectHasTouchesUseCase()
|
||||||
|
.call(0)
|
||||||
|
.either(
|
||||||
|
leftF=lambda matrix: matrix.matrixToFileSystem(outFolder),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
documentPath=mocksFolder + "bottle_jack.FCStd",
|
||||||
|
modelName=AdjacencyMatrixModel.fileName,
|
||||||
|
model=AdjacencyMatrixModel,
|
||||||
|
)
|
||||||
|
|
||||||
|
FreeCadASPGenerationTestController(
|
||||||
|
"test adjacency matrix keys vs allparts"
|
||||||
|
).test(
|
||||||
|
assertFn=lambda model: CoreDict(model.matrix).isMatchByKeys(
|
||||||
|
model.all_parts
|
||||||
|
),
|
||||||
|
execComposition=lambda _: (
|
||||||
|
CheckObjectHasTouchesUseCase()
|
||||||
|
.call(0)
|
||||||
|
.either(
|
||||||
|
leftF=lambda matrix: (matrix.matrixToFileSystem(outFolder)),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
documentPath=mocksFolder + "bottle_jack.FCStd",
|
||||||
|
modelName=AdjacencyMatrixModel.fileName,
|
||||||
|
model=AdjacencyMatrixModel,
|
||||||
|
)
|
||||||
|
|
||||||
|
FreeCadASPGenerationTestController("test all parts vs assembly sequence").test(
|
||||||
|
assertFn=lambda model: CheckSequenceUsecase(
|
||||||
|
ClusterisationSequenceUseCase(outFolder)
|
||||||
|
).isCorrectByParts(model.all_parts),
|
||||||
|
execComposition=lambda _: (
|
||||||
|
CheckObjectHasTouchesUseCase()
|
||||||
|
.call(0)
|
||||||
|
.either(
|
||||||
|
leftF=lambda matrix: (
|
||||||
|
matrix.matrixToFileSystem(outFolder),
|
||||||
|
ClusterisationSequenceUseCase(outFolder),
|
||||||
|
),
|
||||||
|
rightF=lambda error: print(error),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
documentPath=mocksFolder + "bottle_jack.FCStd",
|
||||||
|
modelName=AdjacencyMatrixModel.fileName,
|
||||||
|
model=AdjacencyMatrixModel,
|
||||||
|
)
|
||||||
|
|
||||||
|
ExitFreeCadUseCase.call()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print("test error")
|
||||||
|
ExitFreeCadUseCase.call()
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
test()
|
14
freecad_workbench/helper/fs.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
class FS:
|
||||||
|
def readJSON(path: str):
|
||||||
|
return json.loads((open(path)).read())
|
||||||
|
|
||||||
|
def writeFile(data, filePath, fileName):
|
||||||
|
file_to_open = filePath + fileName
|
||||||
|
|
||||||
|
f = open(file_to_open, 'w', )
|
||||||
|
|
||||||
|
f.write(data)
|
18
freecad_workbench/helper/is_solid.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import FreeCAD
|
||||||
|
|
||||||
|
|
||||||
|
def is_object_solid(obj):
|
||||||
|
"""If obj is solid return True"""
|
||||||
|
if not isinstance(obj, FreeCAD.DocumentObject):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj, 'Shape'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj.Shape, 'Solids'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if len(obj.Shape.Solids) == 0:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
81
freecad_workbench/importFreecadUsecase.py
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
import FreeCAD
|
||||||
|
import Part
|
||||||
|
import ImportGui
|
||||||
|
|
||||||
|
class GeometryValidateUseCase:
|
||||||
|
def __init__(self):
|
||||||
|
self.doc = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def import_step_and_check(self, file_path):
|
||||||
|
|
||||||
|
FreeCAD.closeDocument("Unnamed")
|
||||||
|
|
||||||
|
|
||||||
|
self.doc = FreeCAD.newDocument("Unnamed")
|
||||||
|
|
||||||
|
|
||||||
|
ImportGui.open(file_path, "Unnamed")
|
||||||
|
|
||||||
|
|
||||||
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
Gui.SendMsgToActiveView("ViewFit")
|
||||||
|
|
||||||
|
|
||||||
|
bodies = getBodies(self.doc)
|
||||||
|
|
||||||
|
|
||||||
|
intersections = self.check_intersections(bodies)
|
||||||
|
self.print_intersections(intersections)
|
||||||
|
|
||||||
|
|
||||||
|
zero_volume_bodies = self.check_zero_volume(bodies)
|
||||||
|
self.print_zero_volume(zero_volume_bodies)
|
||||||
|
|
||||||
|
|
||||||
|
self.save_checked_document(file_path)
|
||||||
|
|
||||||
|
|
||||||
|
def getBodies(doc):
|
||||||
|
bodies = []
|
||||||
|
for obj in doc.Objects:
|
||||||
|
if hasattr(obj, 'TypeId') and obj.TypeId == "Part::Feature":
|
||||||
|
bodies.append(obj)
|
||||||
|
return bodies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def check_intersections(self, bodies):
|
||||||
|
intersections = []
|
||||||
|
for i in range(len(bodies)):
|
||||||
|
for j in range(i + 1, len(bodies)):
|
||||||
|
if bodies[i].intersects(bodies[j]):
|
||||||
|
intersections.append((i + 1, j + 1))
|
||||||
|
return intersections
|
||||||
|
|
||||||
|
def check_zero_volume(self, bodies):
|
||||||
|
zero_volume_bodies = [i + 1 for i, body in enumerate(bodies) if body.Volume == 0]
|
||||||
|
return zero_volume_bodies
|
||||||
|
|
||||||
|
def print_intersections(self, intersections):
|
||||||
|
for i, j in intersections:
|
||||||
|
print("Тела пересекаются: Body {} и Body {}".format(i, j))
|
||||||
|
|
||||||
|
def print_zero_volume(self, zero_volume_bodies):
|
||||||
|
for i in zero_volume_bodies:
|
||||||
|
print("Тело {} имеет нулевой объем".format(i))
|
||||||
|
|
||||||
|
def save_checked_document(self, original_file_path):
|
||||||
|
checked_file_path = original_file_path.replace(".step", "_checked.FCStd")
|
||||||
|
FreeCAD.saveDocument(self.doc, checked_file_path)
|
||||||
|
print("Проверенная сборка сохранена в файл:", checked_file_path)
|
||||||
|
FreeCAD.closeDocument("Unnamed")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use_case = GeometryValidateUseCase()
|
||||||
|
step_file_path = '/path/to/file'
|
||||||
|
use_case.import_step_and_check(step_file_path)
|
||||||
|
|
29
freecad_workbench/is_object_solid.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# coding: utf-8
|
||||||
|
# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@yandex.com>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
'''
|
||||||
|
DESCRIPTION.
|
||||||
|
Simple FreeCAD's object test for manifold mawater-tight surface.
|
||||||
|
'''
|
||||||
|
__version__ = '0.2'
|
||||||
|
import FreeCAD
|
||||||
|
|
||||||
|
|
||||||
|
def is_object_solid(obj):
|
||||||
|
'''If obj is solid return True'''
|
||||||
|
if not isinstance(obj, FreeCAD.DocumentObject):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not hasattr(obj, 'Shape'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
return obj.Shape.isClosed()
|
165
freecad_workbench/markupEntities.py
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print('lcs - локальная система координат')
|
||||||
|
print('grip - позиция захвата')
|
||||||
|
print('area - плоскость')
|
||||||
|
print('vol - зона')
|
||||||
|
print('joint - соединение')
|
||||||
|
entityType = input('Введите тип получаемого обьекта')
|
||||||
|
|
||||||
|
def create(entityType):
|
||||||
|
|
||||||
|
if entityType == 'grip':
|
||||||
|
print('задайте начальную точку захватной зоны. ')
|
||||||
|
print('Учтите, что ось X должна быть направлена вдоль направления раскрытия пальцев')
|
||||||
|
print('Ось Z должна быть направлена в противоположную сторону от направления кончика пальца захвата')
|
||||||
|
objname = input('Введите название начальной точки' + "\n")
|
||||||
|
obj = doc.getObject(objname)
|
||||||
|
|
||||||
|
|
||||||
|
poseGenerator(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
elif entityType == 'area':
|
||||||
|
print('задайте плоскость')
|
||||||
|
objname = input('Введите название плоскости'+ "\n")
|
||||||
|
obj = doc.getObject(objname)
|
||||||
|
|
||||||
|
areaProps(obj)
|
||||||
|
|
||||||
|
elif entityType == 'vol':
|
||||||
|
print('задайте обьем')
|
||||||
|
objname = input('Введите название обьема'+ "\n")
|
||||||
|
obj = doc.getObject(objname)
|
||||||
|
|
||||||
|
volProps(obj)
|
||||||
|
|
||||||
|
elif entityType == 'joint':
|
||||||
|
print('Задайте позицию соединения')
|
||||||
|
objname = input('Введите название соединения'+ "\n")
|
||||||
|
part1 = input('укажите название первой детали'+ "\n")
|
||||||
|
part2 = input('укажите название второй детали'+ "\n")
|
||||||
|
|
||||||
|
jointGenerator(objname, part1, part2)
|
||||||
|
|
||||||
|
obj.addProperty("App::PropertyString", "Type").Type = entityType
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## заглушки функций на случай, если что-то придумаю полезное для них
|
||||||
|
|
||||||
|
|
||||||
|
def areaProps(area):
|
||||||
|
#здесь нужно отметить свойства зоны
|
||||||
|
#в принципе, Placement и размеры тут есть, больше ничего особо не нужно
|
||||||
|
#добавить характеристику entityType
|
||||||
|
|
||||||
|
print(area.Label)
|
||||||
|
|
||||||
|
def volProps(vol):
|
||||||
|
#желательно указать координаты, габариты, позицию привязки
|
||||||
|
#но думаю, что это все уже есть
|
||||||
|
print(vol.Label)
|
||||||
|
|
||||||
|
|
||||||
|
def jointGenerator(jointName, part1, part2):
|
||||||
|
|
||||||
|
#получаем относительные координаты для первой детали и для второй детали
|
||||||
|
#создаем две сущности - точка входа и точка выхода (??????)
|
||||||
|
#в работе сейчас
|
||||||
|
print(jointName.Label)
|
||||||
|
print(part1.Label)
|
||||||
|
print(part2.Label)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Эта функция работает нормально
|
||||||
|
|
||||||
|
|
||||||
|
def poseGenerator(lcs):
|
||||||
|
|
||||||
|
box = doc.addObject("Part::Box", "gripSpace")
|
||||||
|
box.Length = 62 #раскрытие
|
||||||
|
box.Width = 10 #ширина пальца
|
||||||
|
box.Height = 40 #глубина
|
||||||
|
|
||||||
|
box.Placement = lcs.Placement
|
||||||
|
|
||||||
|
|
||||||
|
#есть смысл создавать привязку прямо здесь же. благодаря параметризации, при подстройке куба все точки сместятся как надо
|
||||||
|
gripPose = App.ActiveDocument.addObject('PartDesign::CoordinateSystem', 'GripPose')
|
||||||
|
gripPose.Support = box
|
||||||
|
gripPose.positionBySupport()
|
||||||
|
gripPose.MapMode = 'ObjectXY'
|
||||||
|
gripPose.AttachmentOffset.Base = [str(box.Label) + '.Length' + '/2', str(box.Label) + '.Length'+ '/2', 0] #здесь должна быть активная привязка, не просто значения координат
|
||||||
|
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripOpen")
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripDepth")
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripWidth")
|
||||||
|
gripPose.setExpression('GripDepth', str(box.Label) + '.Height')
|
||||||
|
gripPose.setExpression('GripOpen', str(box.Label) + '.Length')
|
||||||
|
gripPose.setExpression('GripWidth', str(box.Label) + '.Width')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#нужно создавать внутри Part, а не внутри главного документа. сбиваются привязки !!!
|
||||||
|
|
||||||
|
|
||||||
|
print('Установите захватную зону вручную, растянув обьект GripSpace')
|
||||||
|
doc.recompute()
|
||||||
|
|
||||||
|
|
||||||
|
#теперь нужно производить экспорт
|
||||||
|
#он делается через Tools.py или через импорт-экспорт
|
||||||
|
|
||||||
|
|
||||||
|
create(entityType)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### getObjectInfo работает
|
||||||
|
|
||||||
|
|
||||||
|
def getFaceInfo(face):
|
||||||
|
if face:
|
||||||
|
App.Console.PrintMessage(f"Информация о грани: {face}\n")
|
||||||
|
|
||||||
|
# Получите позицию (Base) и ориентацию (Rotation) грани в глобальных координатах
|
||||||
|
placement = face.Placement
|
||||||
|
position = App.Vector(placement.Base)
|
||||||
|
orientation = App.Rotation(placement.Rotation)
|
||||||
|
|
||||||
|
App.Console.PrintMessage(f"Позиция грани: {position}\n")
|
||||||
|
App.Console.PrintMessage(f"Ориентация грани: {orientation}\n")
|
||||||
|
|
||||||
|
def getObjectInfo():
|
||||||
|
selection = Gui.Selection.getSelectionEx()
|
||||||
|
if selection:
|
||||||
|
selected_object = selection[0].Object
|
||||||
|
if selected_object:
|
||||||
|
subelement_name = selection[0].SubElementNames[0]
|
||||||
|
if "Face" in subelement_name:
|
||||||
|
face = selected_object.Shape.Faces[int(subelement_name.split("Face")[1])]
|
||||||
|
getFaceInfo(face)
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Выберите грань, а не тело или другой элемент\n")
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Объект не найден\n")
|
||||||
|
else:
|
||||||
|
App.Console.PrintError("Не выбраны объекты\n")
|
||||||
|
|
||||||
|
getObjectInfo()
|
BIN
freecad_workbench/pddl/Printer.FCStd
Normal file
97
freecad_workbench/pddl/domain.pddl
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
(define (domain Printer)
|
||||||
|
|
||||||
|
(:requirements :strips :typing :fluents :durative-actions)
|
||||||
|
(:types
|
||||||
|
printer workspace - zone
|
||||||
|
part
|
||||||
|
arm
|
||||||
|
assembly
|
||||||
|
human
|
||||||
|
filament
|
||||||
|
)
|
||||||
|
(:predicates
|
||||||
|
(arm_available ?a - arm)
|
||||||
|
(part_at ?p - part ?z - zone)
|
||||||
|
(printer_ready ?p - printer)
|
||||||
|
(printer_checked ?p - printer)
|
||||||
|
(printer_at_work ?p - printer)
|
||||||
|
(part_of ?part - part ?whole - assembly)
|
||||||
|
(assembly_order ?prev ?next - assembly)
|
||||||
|
(assembled ?whole - assembly ?z - zone)
|
||||||
|
(observer_free ?h - human)
|
||||||
|
(filament_at ?f - filament ?z - zone)
|
||||||
|
)
|
||||||
|
(:functions
|
||||||
|
)
|
||||||
|
(:durative-action print
|
||||||
|
:parameters ( ?p - part ?pr - printer )
|
||||||
|
:duration ( = ?duration 20)
|
||||||
|
:condition (and
|
||||||
|
(at start(printer_ready ?pr))
|
||||||
|
)
|
||||||
|
:effect (and
|
||||||
|
(at start (not (printer_ready ?pr)))
|
||||||
|
(at start (printer_at_work ?pr ))
|
||||||
|
(at end(part_at ?p ?pr))
|
||||||
|
(at end (not (printer_at_work ?pr )))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(:durative-action remove
|
||||||
|
:parameters ( ?p - part ?pr - printer ?z - zone ?a - arm )
|
||||||
|
:duration ( = ?duration 1)
|
||||||
|
:condition (and
|
||||||
|
(at start (part_at ?p ?pr))
|
||||||
|
(at start (arm_available ?a))
|
||||||
|
)
|
||||||
|
:effect (and
|
||||||
|
(at start (not (arm_available ?a)))
|
||||||
|
(at end (part_at ?p ?z))
|
||||||
|
(at end (arm_available ?a))
|
||||||
|
(at end (printer_ready ?pr))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(:durative-action assemble
|
||||||
|
:parameters ( ?p - part ?prev ?next - assembly ?z - zone ?arm - arm ?w - workspace )
|
||||||
|
:duration ( = ?duration 5)
|
||||||
|
:condition (and
|
||||||
|
(at start (assembled ?prev ?w))
|
||||||
|
(at start (part_at ?p ?w))
|
||||||
|
(at start (part_of ?p ?next))
|
||||||
|
(at start (arm_available ?arm))
|
||||||
|
(at start (assembly_order ?prev ?next))
|
||||||
|
)
|
||||||
|
:effect (and
|
||||||
|
(at start (not (arm_available ?arm)))
|
||||||
|
(at end (not (part_at ?p ?w)))
|
||||||
|
(at end (arm_available ?arm))
|
||||||
|
(at end (assembled ?next ?w))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(:durative-action printer_check
|
||||||
|
:parameters ( ?p - printer ?h - human )
|
||||||
|
:duration ( = ?duration 1)
|
||||||
|
:condition (and
|
||||||
|
(at start ( observer_free ?h ))
|
||||||
|
)
|
||||||
|
:effect (and
|
||||||
|
(at start (not (observer_free ?h)))
|
||||||
|
(at end (observer_free ?h))
|
||||||
|
(at end (printer_checked ?p))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(:durative-action printer_filament_load
|
||||||
|
:parameters ( ?p - printer ?h - human ?f - filament ?z - zone )
|
||||||
|
:duration ( = ?duration 5)
|
||||||
|
:condition (and
|
||||||
|
(at start (printer_checked ?p))
|
||||||
|
(at start (observer_free ?h))
|
||||||
|
(at start (filament_at ?f ?z))
|
||||||
|
)
|
||||||
|
:effect (and
|
||||||
|
(at start (not(observer_free ?h)))
|
||||||
|
(at end (observer_free ?h))
|
||||||
|
(at end (printer_ready ?p))
|
||||||
|
(at end (not (filament_at ?f ?z)))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
181
freecad_workbench/pddl/freecad2pddl.py
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#функции для создания обьектов PDDL
|
||||||
|
|
||||||
|
def add_types():
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
types = doc.addObject('App::FeaturePython', 'Types')
|
||||||
|
types.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||||
|
types.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Types'
|
||||||
|
types.addProperty("App::PropertyStringList", 'Types', 'PDDL')
|
||||||
|
|
||||||
|
print('Types of objects added successfully')
|
||||||
|
return(types)
|
||||||
|
#слишком много types
|
||||||
|
|
||||||
|
def add_parameters():
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
params = doc.addObject('App::FeaturePython', 'Parameters')
|
||||||
|
params.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||||
|
params.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Parameters'
|
||||||
|
params.addProperty('App::PropertyPythonObject', 'Parameters','PDDl')
|
||||||
|
|
||||||
|
print('Domain parameters added successfully')
|
||||||
|
return(params)
|
||||||
|
|
||||||
|
def add_action():
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
name = input('Название действия:')
|
||||||
|
action = doc.addObject('App::FeaturePython', str(name))
|
||||||
|
action.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||||
|
action.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Action'
|
||||||
|
action.addProperty("App::PropertyStringList", 'Parameters', 'PDDL')
|
||||||
|
action.addProperty("App::PropertyStringList", 'Conditions', 'PDDL')
|
||||||
|
action.addProperty("App::PropertyStringList", 'Effects', 'PDDL')
|
||||||
|
sortEntity(action)
|
||||||
|
print('Action ' + name + 'added successfully')
|
||||||
|
return(action)
|
||||||
|
|
||||||
|
|
||||||
|
def add_predicate():
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
name = input('Название предиката:')
|
||||||
|
parms = input('Переменные')
|
||||||
|
predicate = doc.addObject('App::FeaturePython', str(name))
|
||||||
|
predicate.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||||
|
predicate.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Predicate'
|
||||||
|
# predicate.addProperty("App::PropertyStringList", 'Name', 'PDDL')
|
||||||
|
predicate.addProperty("App::PropertyStringList", 'Parameters', 'PDDL').Parameters = parms
|
||||||
|
sortEntity(predicate)
|
||||||
|
print('Predicate ' + name + 'added successfully')
|
||||||
|
return(predicate)
|
||||||
|
|
||||||
|
|
||||||
|
def add_durative_action():
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
name = input('Название действия:')
|
||||||
|
action = doc.addObject('App::FeaturePython', str(name))
|
||||||
|
action.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||||
|
action.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'DurativeAction'
|
||||||
|
action.addProperty("App::PropertyStringList", 'Parameters', 'PDDL')
|
||||||
|
action.addProperty("App::PropertyStringList", 'Conditions', 'PDDL')
|
||||||
|
action.addProperty("App::PropertyStringList", 'Effects', 'PDDL')
|
||||||
|
action.addProperty('App::PropertyString', 'Duration', 'PDDL')
|
||||||
|
sortEntity(action)
|
||||||
|
print('Durative Action ' + name + ' added successfully')
|
||||||
|
return(action)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def export_to_file():
|
||||||
|
filename = App.ActiveDocument.Name
|
||||||
|
file_path = App.ActiveDocument.FileName.rsplit("/", 1)[0] + filename + '_domain.pddl'
|
||||||
|
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
objs = doc.Objects
|
||||||
|
with open(file_path, 'w') as f:
|
||||||
|
f.write('(define (domain '+ filename +')\n \n')
|
||||||
|
f.write('(:requirements :strips :typing :fluents :durative-actions)\n')
|
||||||
|
|
||||||
|
# Типы обьектов
|
||||||
|
types = doc.getObjectsByLabel('Types')[0]
|
||||||
|
f.write('(:types \n')
|
||||||
|
|
||||||
|
for obj_type in types.Types:
|
||||||
|
f.write(' ' + obj_type + ' \n')
|
||||||
|
f.write(')\n')
|
||||||
|
|
||||||
|
# предикаты
|
||||||
|
f.write(' (:predicates\n')
|
||||||
|
for obj in objs:
|
||||||
|
if hasattr(obj, 'PDDL') and hasattr(obj, 'Type') and obj.Type == 'Predicate':
|
||||||
|
f.write(' ('+ obj.Label)
|
||||||
|
for params in obj.Parameters:
|
||||||
|
f.write(' ' + params)
|
||||||
|
f.write(')\n')
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
# функции
|
||||||
|
f.write(' (:functions\n')
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
#действия:
|
||||||
|
for obj in objs:
|
||||||
|
if hasattr(obj, 'PDDL') and hasattr(obj, 'Type') and obj.Type == 'Action':
|
||||||
|
f.write('(:action ' + obj.Label + '\n')
|
||||||
|
f.write(' :parameters (')
|
||||||
|
for params in obj.Parameters:
|
||||||
|
f.write('' + params + ' ')
|
||||||
|
f.write(')\n')
|
||||||
|
f.write(' :condition (and \n')
|
||||||
|
|
||||||
|
for condition in obj.Conditions:
|
||||||
|
f.write(' (' + condition + ') \n')
|
||||||
|
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
f.write(' :effect (and \n')
|
||||||
|
|
||||||
|
for effect in obj.Effects:
|
||||||
|
f.write(' (' + effect + ') \n')
|
||||||
|
# f.write(' ')
|
||||||
|
f.write(')\n')
|
||||||
|
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
# длительные действия:
|
||||||
|
for obj in objs:
|
||||||
|
if hasattr(obj, 'PDDL') and hasattr(obj, 'Type') and obj.Type == 'DurativeAction':
|
||||||
|
f.write('(:durative-action ' + obj.Label + '\n')
|
||||||
|
f.write(' :parameters (')
|
||||||
|
for params in obj.Parameters:
|
||||||
|
f.write(' ' + params )
|
||||||
|
f.write(' )\n')
|
||||||
|
f.write(' :duration ( = ?duration '+ str(obj.Duration) +')\n')
|
||||||
|
f.write(' :condition (and \n')
|
||||||
|
|
||||||
|
for condition in obj.Conditions:
|
||||||
|
f.write(' (' + condition + ') \n')
|
||||||
|
# f.write(') ')
|
||||||
|
# f.write(')\n')
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
f.write(' :effect (and \n')
|
||||||
|
|
||||||
|
for effect in obj.Effects:
|
||||||
|
f.write(' (' + effect + ') \n')
|
||||||
|
# f.write(' ')
|
||||||
|
f.write(')\n')
|
||||||
|
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
f.write(' )\n')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def sortEntity(object):
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
|
||||||
|
if len(doc.getObjectsByLabel(object.Type)) == 0:
|
||||||
|
pddl_group = doc.addObject("App::DocumentObjectGroup", object.Type)
|
||||||
|
else:
|
||||||
|
pddl_group = doc.getObjectsByLabel(object.Type)[0]
|
||||||
|
pddl_group.addObject(object)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Gui.updateGui()
|
||||||
|
|
||||||
|
|
||||||
|
|
69
freecad_workbench/pddl/my_problem.pddl
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
(define (problem my_problem)
|
||||||
|
(:domain roboarm)
|
||||||
|
(:objects
|
||||||
|
ur_manipulator_gripper - arm
|
||||||
|
printer - printer
|
||||||
|
world - zone
|
||||||
|
box1 box2 box3 box4 box5 box6 - part
|
||||||
|
asm0 asm1 asm2 asm3 asm4 asm5 asm6 - assembly
|
||||||
|
)
|
||||||
|
|
||||||
|
(:init
|
||||||
|
not(part_at box1 world)
|
||||||
|
not(part_at box2 world)
|
||||||
|
not(part_at box3 world)
|
||||||
|
not(part_at box4 world)
|
||||||
|
not(part_at box5 world)
|
||||||
|
not(part_at box6 world)
|
||||||
|
(part_of box1 asm1)
|
||||||
|
(part_of box2 asm2)
|
||||||
|
(part_of box3 asm3)
|
||||||
|
(part_of box4 asm4)
|
||||||
|
(part_of box5 asm5)
|
||||||
|
(part_of box6 asm6)
|
||||||
|
(assembly_order asm0 asm1)
|
||||||
|
(assembly_order asm1 asm2)
|
||||||
|
(assembly_order asm2 asm3)
|
||||||
|
(assembly_order asm3 asm4)
|
||||||
|
(assembly_order asm4 asm5)
|
||||||
|
(assembly_order asm5 asm6)
|
||||||
|
|
||||||
|
(printer_available printer)
|
||||||
|
(arm_available ur_manipulator_gripper)
|
||||||
|
(assembly_at asm0 world)
|
||||||
|
(assembled asm0)
|
||||||
|
)
|
||||||
|
|
||||||
|
(:goal (and
|
||||||
|
(assembled asm6)
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
||||||
|
; нужно указать желаемое конечное состояние
|
||||||
|
; (эффект в конце действия)
|
||||||
|
; в нашем случае, допустим, будет asm6
|
||||||
|
; чтобы включить принтер в процесс, у нас должны спавниться детали
|
||||||
|
|
||||||
|
; будет что-то типа (not part_at box1 workzone)
|
||||||
|
|
||||||
|
; и action print
|
||||||
|
; начальные условия: not part_at box workzone
|
||||||
|
; принтер доступен
|
||||||
|
; в ходе дела парт печатается, принтер не доступен
|
||||||
|
; в конце - принтер доступен, деталь в зоне
|
||||||
|
|
||||||
|
; нужно в генераторе добавить поддержку условий at start и at end
|
||||||
|
; но пока что это можно прописать текстом
|
||||||
|
|
||||||
|
|
||||||
|
; предикаты -
|
||||||
|
; рука доступна - рука
|
||||||
|
; сборка в зоне - сборка зона
|
||||||
|
; деталь часть сборки - деталь сборка
|
||||||
|
; собрана - сборка
|
||||||
|
; сборочный порядок - предсборка следсборка
|
||||||
|
|
||||||
|
; +
|
||||||
|
; деталь в зоне - деталь зона
|
||||||
|
; принтер доступен - принтер
|
||||||
|
|
98
freecad_workbench/pddl/printETA.py
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
|
||||||
|
import FreeCAD
|
||||||
|
import Mesh
|
||||||
|
|
||||||
|
|
||||||
|
import gcoder
|
||||||
|
|
||||||
|
|
||||||
|
def export_to_stl(doc, output_dir):
|
||||||
|
objects = doc.Objects
|
||||||
|
|
||||||
|
for obj in objects:
|
||||||
|
if isinstance(obj, Part.Feature):
|
||||||
|
stl_path = os.path.join(output_dir, obj.Label + ".stl")
|
||||||
|
mesh = obj.Shape.tessellate(0.1)
|
||||||
|
|
||||||
|
# Создаем меш из геометрии объекта
|
||||||
|
mesh_obj = Mesh.Mesh(mesh)
|
||||||
|
|
||||||
|
# Проверяем, что меш содержит данные
|
||||||
|
if len(mesh_obj.Points) > 0:
|
||||||
|
# Экспортируем меш в формат STL
|
||||||
|
mesh_obj.write(stl_path)
|
||||||
|
|
||||||
|
|
||||||
|
def create_gcode(stl_dir, output_dir):
|
||||||
|
stl_files = [f for f in os.listdir(stl_dir) if f.endswith(".stl")]
|
||||||
|
|
||||||
|
for stl_file in stl_files:
|
||||||
|
stl_path = os.path.join(stl_dir, stl_file)
|
||||||
|
|
||||||
|
gcode_file = stl_file.replace(".stl", ".gcode")
|
||||||
|
gcode_path = os.path.join(output_dir, gcode_file)
|
||||||
|
|
||||||
|
# Команда для запуска Slic3r (в Ubuntu используется slic3r-пакет)
|
||||||
|
cmd = ["slic3r", "--load", "/home/mark-voltov/my_config.ini", "-o", gcode_path, stl_path]
|
||||||
|
|
||||||
|
# Запускаем Slic3r
|
||||||
|
subprocess.run(cmd)
|
||||||
|
|
||||||
|
def get_print_duration(gcode_dir):
|
||||||
|
|
||||||
|
gcoder.G
|
||||||
|
gcode_files = [f for f in os.listdir(gcode_dir) if f.endswith(".gcode")]
|
||||||
|
|
||||||
|
total_duration = 0
|
||||||
|
|
||||||
|
for gcode_file in gcode_files:
|
||||||
|
gcode_path = os.path.join(gcode_dir, gcode_file)
|
||||||
|
|
||||||
|
with open(gcode_path, "r") as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
|
||||||
|
for line in lines:
|
||||||
|
if line.startswith("; estimated printing time"):
|
||||||
|
duration = float(line.split(":")[1].strip()) * 60
|
||||||
|
total_duration += duration
|
||||||
|
break
|
||||||
|
|
||||||
|
return total_duration
|
||||||
|
|
||||||
|
|
||||||
|
file_location = App.ActiveDocument.FileName
|
||||||
|
file_name = os.path.basename(file_location ) #eds_report.csv
|
||||||
|
location = os.path.dirname(file_location )
|
||||||
|
|
||||||
|
|
||||||
|
# Путь к документу FreeCAD
|
||||||
|
doc_path = file_location
|
||||||
|
|
||||||
|
# Каталог для сохранения STL-файлов
|
||||||
|
stl_dir = location + '/stl'
|
||||||
|
|
||||||
|
# Каталог для сохранения G-code файлов
|
||||||
|
gcode_dir = location + '/gcode'
|
||||||
|
|
||||||
|
# Открываем документ FreeCAD
|
||||||
|
doc = FreeCAD.open(doc_path)
|
||||||
|
|
||||||
|
# Экспортируем модель в файлы STL
|
||||||
|
export_to_stl(doc, stl_dir)
|
||||||
|
print("STL файлы успешно созданы.")
|
||||||
|
|
||||||
|
# Создаем G-code файлы с помощью Slic3r
|
||||||
|
create_gcode(stl_dir, gcode_dir)
|
||||||
|
print("G-code файлы успешно созданы.")
|
||||||
|
|
||||||
|
# Получаем оценочную длительность печати
|
||||||
|
print_duration = get_print_duration(gcode_dir)
|
||||||
|
print("Оценочная длительность печати: {} секунд.".format(print_duration))
|
||||||
|
|
||||||
|
# Закрываем документ FreeCAD
|
||||||
|
FreeCAD.closeDocument(doc)
|
||||||
|
|
127
freecad_workbench/pddl/problem.pddl
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
(define (problem p1)
|
||||||
|
(:domain robossembler)
|
||||||
|
(:objects
|
||||||
|
;; information from Scene
|
||||||
|
rasmt - arm
|
||||||
|
printer1 printer2 printer3 - printer
|
||||||
|
workspace1 - workspace
|
||||||
|
worker - human
|
||||||
|
filament1 filament2 filament3 - filament
|
||||||
|
;; information from CAD
|
||||||
|
pad009003002002 pad009003002003 pad009003002005 pad009003002011 fusion004003 o_2_a001 o_2_m001 o_3_m001 o_3_a001 pad009003002008 fusion005 o_4_m001 o_5_m001 o_5_a001 o_4_a001 fusion006 r_a001 r_m001 r_l001 synfix synfix001 fusion fusion001 synfix002 fusion002 synfix003 fusion007 pad009003002012 pad001 pocket pad002 fusion008 fusion009 bearing_dgsr_6006_001 bearing_dgsr_6006_002 bearing_dgsr_6006_003 bearing_dgsr_6005_ bearing_dgsr_6005_001 bearing_dgsr_6005_002 bearing_dgsr_6005_003 bearing_dgsr_6005_004 pad003 pocket001 - part
|
||||||
|
subasm00 subasm0 subasm1 subasm2 subasm3 subasm4 subasm5 subasm6 subasm7 subasm8 subasm9 subasm10 subasm11 subasm12 subasm13 subasm14 subasm15 subasm16 subasm17 subasm18 subasm19 subasm20 subasm21 subasm22 subasm23 subasm24 subasm25 subasm26 subasm27 subasm28 subasm29 subasm30 subasm31 subasm32 subasm33 subasm34 subasm35 subasm36 subasm37 subasm38 subasm39 subasm40 subasm41 subasm42 - assembly
|
||||||
|
)
|
||||||
|
(:init
|
||||||
|
;; information from Scene
|
||||||
|
|
||||||
|
(observer_free worker)
|
||||||
|
; (not(printer_ready printer1))
|
||||||
|
|
||||||
|
; (printer_ready printer2)
|
||||||
|
; (printer_ready printer3)
|
||||||
|
(filament_at filament1 workspace1)
|
||||||
|
(filament_at filament2 workspace1)
|
||||||
|
(filament_at filament3 workspace1)
|
||||||
|
|
||||||
|
|
||||||
|
(arm_available rasmt)
|
||||||
|
;; information from CAD
|
||||||
|
(assembled subasm00 workspace1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(part_of pad009003002002 subasm0)
|
||||||
|
(part_of pad009003002003 subasm1)
|
||||||
|
(part_of pad009003002005 subasm2)
|
||||||
|
(part_of pad009003002011 subasm3)
|
||||||
|
(part_of fusion004003 subasm4)
|
||||||
|
(part_of o_2_a001 subasm5)
|
||||||
|
(part_of o_2_m001 subasm6)
|
||||||
|
(part_of o_3_m001 subasm7)
|
||||||
|
(part_of o_3_a001 subasm8)
|
||||||
|
(part_of pad009003002008 subasm9)
|
||||||
|
(part_of fusion005 subasm10)
|
||||||
|
(part_of o_4_m001 subasm11)
|
||||||
|
(part_of o_5_m001 subasm12)
|
||||||
|
(part_of o_5_a001 subasm13)
|
||||||
|
(part_of o_4_a001 subasm14)
|
||||||
|
(part_of fusion006 subasm15)
|
||||||
|
(part_of r_a001 subasm16)
|
||||||
|
(part_of r_m001 subasm17)
|
||||||
|
(part_of r_l001 subasm18)
|
||||||
|
(part_of synfix subasm19)
|
||||||
|
(part_of synfix001 subasm20)
|
||||||
|
(part_of fusion subasm21)
|
||||||
|
(part_of fusion001 subasm22)
|
||||||
|
(part_of synfix002 subasm23)
|
||||||
|
(part_of fusion002 subasm24)
|
||||||
|
(part_of synfix003 subasm25)
|
||||||
|
(part_of fusion007 subasm26)
|
||||||
|
(part_of pad009003002012 subasm27)
|
||||||
|
(part_of pad001 subasm28)
|
||||||
|
(part_of pocket subasm29)
|
||||||
|
(part_of pad002 subasm30)
|
||||||
|
(part_of fusion008 subasm31)
|
||||||
|
(part_of fusion009 subasm32)
|
||||||
|
(part_of bearing_dgsr_6006_001 subasm33)
|
||||||
|
(part_of bearing_dgsr_6006_002 subasm34)
|
||||||
|
(part_of bearing_dgsr_6006_003 subasm35)
|
||||||
|
(part_of bearing_dgsr_6005_ subasm36)
|
||||||
|
(part_of bearing_dgsr_6005_001 subasm37)
|
||||||
|
(part_of bearing_dgsr_6005_002 subasm38)
|
||||||
|
(part_of bearing_dgsr_6005_003 subasm39)
|
||||||
|
(part_of bearing_dgsr_6005_004 subasm40)
|
||||||
|
(part_of pad003 subasm41)
|
||||||
|
(part_of pocket001 subasm42)
|
||||||
|
|
||||||
|
(assembly_order subasm00 subasm0)
|
||||||
|
(assembly_order subasm0 subasm1)
|
||||||
|
(assembly_order subasm1 subasm2)
|
||||||
|
(assembly_order subasm2 subasm3)
|
||||||
|
(assembly_order subasm3 subasm4)
|
||||||
|
(assembly_order subasm4 subasm5)
|
||||||
|
(assembly_order subasm5 subasm6)
|
||||||
|
(assembly_order subasm6 subasm7)
|
||||||
|
(assembly_order subasm7 subasm8)
|
||||||
|
(assembly_order subasm8 subasm9)
|
||||||
|
(assembly_order subasm9 subasm10)
|
||||||
|
(assembly_order subasm10 subasm11)
|
||||||
|
(assembly_order subasm11 subasm12)
|
||||||
|
(assembly_order subasm12 subasm13)
|
||||||
|
(assembly_order subasm13 subasm14)
|
||||||
|
(assembly_order subasm14 subasm15)
|
||||||
|
(assembly_order subasm15 subasm16)
|
||||||
|
(assembly_order subasm16 subasm17)
|
||||||
|
(assembly_order subasm17 subasm18)
|
||||||
|
(assembly_order subasm18 subasm19)
|
||||||
|
(assembly_order subasm19 subasm20)
|
||||||
|
(assembly_order subasm20 subasm21)
|
||||||
|
(assembly_order subasm21 subasm22)
|
||||||
|
(assembly_order subasm22 subasm23)
|
||||||
|
(assembly_order subasm23 subasm24)
|
||||||
|
(assembly_order subasm24 subasm25)
|
||||||
|
(assembly_order subasm25 subasm26)
|
||||||
|
(assembly_order subasm26 subasm27)
|
||||||
|
(assembly_order subasm27 subasm28)
|
||||||
|
(assembly_order subasm28 subasm29)
|
||||||
|
(assembly_order subasm29 subasm30)
|
||||||
|
(assembly_order subasm30 subasm31)
|
||||||
|
(assembly_order subasm31 subasm32)
|
||||||
|
(assembly_order subasm32 subasm33)
|
||||||
|
(assembly_order subasm33 subasm34)
|
||||||
|
(assembly_order subasm34 subasm35)
|
||||||
|
(assembly_order subasm35 subasm36)
|
||||||
|
(assembly_order subasm36 subasm37)
|
||||||
|
(assembly_order subasm37 subasm38)
|
||||||
|
(assembly_order subasm38 subasm39)
|
||||||
|
(assembly_order subasm39 subasm40)
|
||||||
|
(assembly_order subasm40 subasm41)
|
||||||
|
(assembly_order subasm41 subasm42)
|
||||||
|
)
|
||||||
|
(:goal (and
|
||||||
|
;; information from CAD
|
||||||
|
(assembled subasm42 workspace1)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
53
freecad_workbench/poseGenerator.py
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
import FreeCAD as App
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
|
||||||
|
# App.newDocument()
|
||||||
|
doc = App.ActiveDocument
|
||||||
|
|
||||||
|
|
||||||
|
print('задайте начальную точку захватной зоны. ')
|
||||||
|
print('Учтите, что ось X должна быть направлена вдоль направления раскрытия пальцев')
|
||||||
|
print('Ось Z должна быть направлена в противоположную сторону от направления кончика пальца захвата')
|
||||||
|
lcsname = input('Введите название начальной точки' + "\n")
|
||||||
|
|
||||||
|
lcs = doc.getObject(lcsname)
|
||||||
|
|
||||||
|
def poseGenerator(lcs):
|
||||||
|
|
||||||
|
box = doc.addObject("Part::Box", "gripSpace")
|
||||||
|
box.Length = 62 #раскрытие
|
||||||
|
box.Width = 10 #ширина пальца
|
||||||
|
box.Height = 40 #глубина
|
||||||
|
|
||||||
|
box.Placement = lcs.Placement
|
||||||
|
#box.Transparency = 80 #не работает, хз почему
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#есть смысл создавать привязку прямо здесь же. благодаря параметризации, при подстройке куба все точки сместятся как надо
|
||||||
|
gripPose = App.ActiveDocument.addObject('PartDesign::CoordinateSystem', 'GripPose')
|
||||||
|
gripPose.Support = box
|
||||||
|
gripPose.MapMode = 'ObjectXY'
|
||||||
|
gripPose.AttachmentOffset.Base = [box.Length/2, box.Width/2, 0] #здесь должна быть активная привязка, не просто значения координат
|
||||||
|
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripOpen")
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripDepth")
|
||||||
|
gripPose.addProperty("App::PropertyFloat", "GripWidth")
|
||||||
|
gripPose.GripOpen = box.Length.Value
|
||||||
|
gripPose.GripWidth = box.Width.Value
|
||||||
|
gripPose.GripDepth = box.Height.Value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#нужно создавать обьект внутри Part, а не внутри главного документа. сбиваются привязки !!!
|
||||||
|
|
||||||
|
|
||||||
|
print('Установите захватную зону вручную, растянув обьект GripSpace')
|
||||||
|
doc.recompute()
|
||||||
|
|
||||||
|
#вроде как работает
|
||||||
|
|
||||||
|
|
||||||
|
poseGenerator(lcs)
|
||||||
|
|