Commit Graph

13 Commits

Author SHA1 Message Date
Alex Young
80dbfd5814 Arch: removes unused imports
Removes unused imports as reported by LGTM.

There are exceptions: `import Arch_rc` is shown as an alert, but has side effects.  It's not clear what the best thing to do in those cases is, so I've left them for now.
2021-02-14 16:27:06 +00:00
luz paz
ec52d5fd28 Arch: Added licence blurbs with attributions to authors
[skip ci]
2020-11-16 14:51:53 +01:00
vocx-fc
9e871cf27b Arch: fix calculation of fence objects
In the past it used the `Draft.calculatePlacementsOnPath` function
but this function was moved and modified when the `PathArray`
was improved. The `calculatePlacementsOnPath` function
was moved to `draftobjects.patharray`
and renamed `placements_on_path`.

This doesn't completely fix the Fence object because some other
modifications need to be done in the calculation of the paths.
2020-06-22 11:59:58 +02:00
vocx-fc
050b13e10c Arch: division including a float to obtain correct result 2019-12-26 13:22:35 -03:00
Bernd Hahnebach
bdf1abacc7 Arch: make new property to use shape color instead of material color working for all Arch objs 2019-08-14 21:41:47 +02:00
furti
019d209199 Fix some problems with ArchFence
The commit that introduces the colorization option added some problems.
First the "sectionFaceNumbers" property is only set when an execute is
performed. When this does not happen, an exception is thrown when the
document is saved that contains a fence created with an older version
of FreeCAD.

Also the new Props on the ViewProvider where not set because the
"onDocumentRestored" is not reckognized for ViewProviders.
2019-06-27 11:48:50 -03:00
furti
5be63a94e2 Fix possible colorization problem
When we set "UseOriginalColors" to true, it is possible that we cant
calculate the exact number of diffuse colors, because the "applyShape"
method optimized the shape somewhat. That operations could remove faces.

To fix this for now, we simply set the shape without further optimizations.
2019-06-27 11:48:50 -03:00
furti
ac9cd38650 Add support for PartDesign:Body colors
When the tip of a PartDesign:Body is colorized, the colors are stored
on tip level. But when the shape of the whole body is changed the information
is stored on body level. To account for this we check if the tip has more
than one DiffuseColor set. When not, we use the shape color of the body.
2019-06-15 18:00:12 -03:00
furti
d18d98fe2b Add option to colorize ArchFence
When "UseOriginalColors" is set to true, the fence will copy the diffuse
colors of the original post and section to colorize itself.
2019-06-15 18:00:12 -03:00
furti
72014ead53 Optimize buildFence method
The method is renamed to "makeFence" to better fit to the overall Arch
naming style. Additionally it returns the generated object now so one
can use it directly from python.
2019-05-15 17:40:58 -03:00
furti
fa504cc612 Add missing "Part" import to Arch Fence 2019-05-15 17:40:58 -03:00
furti
72b291ecff Clip sections when too long
When the path wraps around a corner the section might be too long to fit
between the fence posts. So we clip it to the length so that it fits.
2019-05-07 21:31:12 -03:00
furti
bc0c959f49 Add Arch Fence builder
This tool can build a Fence by giving it a single Section, a single Post
and a Path.
It will calculate the number of posts and sections needed and repeat them
along the path so that a full fence is build.
2019-05-07 21:31:12 -03:00