Commit Graph

22905 Commits

Author SHA1 Message Date
alafr
d310986cd8 Fix missing import 2020-10-31 14:17:10 +01:00
alafr
942b4748fc DraftGeomUtils: Doctstring formatting
Adress vocx-fc's review
2020-10-31 14:17:07 +01:00
alafr
5aa68ea294 Draft: test for DraftGeomUtils.get_extended_wire 2020-10-31 14:17:05 +01:00
alafr
5abe618d65 Arch Structure: multiple structures command icon 2020-10-31 14:17:02 +01:00
alafr
f6e0638cab Arch structure : workflow with master sketch
* Add a command that creates multiple Arch Structure objects from a selected base, using each selected edge as an extrusion path. It creates one Arch Structure object from each edge. Therefore, the Arch Structure objects can then be individually edited if needed.
* Split the command Arch Structural System from Arch Structure. For backwards compatibility, the command Arch Structure will run the command Arch Structural System when the requirements for the Arch Structural System (Structure + Axis) are met.
2020-10-31 14:17:01 +01:00
alafr
dba9585d89 Arch Structure: fix extrusion orientation 2020-10-31 14:16:59 +01:00
alafr
66c30313b0 Arch Structure: fix the nodes default placement. 2020-10-31 14:16:58 +01:00
alafr
7938cf498f Arch Structure : use Edges as a Tool, add options
* New widget for Tool selection: this enables the use of some Edges and not only entire Shapes - it makes possible to build Structures from a master Sketch.
* Add option BasePerpendicularToTool : option to create multiple Structures with a single Base (profile), along different Tools (paths). A copy of the profile is created and aligned perpendicular to the path at it start point.
This can already be done with multiple Draft Clones attached using the "NormalToEdge" mode, but this new option will make it more straightforward and with less objects in the document.
* Group properties related to the Tool in a group "Extrusion Path"
* Add a readonly property ComputedLength (it will be needed in BIM schedules)
2020-10-31 14:16:56 +01:00
alafr
c1cf0c0f8b Draft: Add geometry functions for Arch Structure
* get_referenced_edges(property_value): returns the Edges referenced by the value of a App:PropertyLink, App::PropertyLinkSub or App::PropertyLinkSubList property.
* get_placement_perpendicular_to_wire(wire): returns the placement whose base is the wire's first vertex and it's z axis aligned to the wire's tangent.
* get_extended_wire(wire, offset_start, offset_end): returns a wire trimmed (negative offset) or extended (positive offset) at its first vertex, last vertex or both ends. For example:
            get_extended_wire(wire, -100.0, 0.0) -> returns a copy of the wire with its first 100 mm removed
            get_extended_wire(wire, 0.0, 100.0) -> returns a copy of the wire extended by 100 mm after it's last vertex
2020-10-31 14:16:50 +01:00
alafr
c743f3f083 Arch Structure: fix multiple extrusions along path
Fix the exception when trying to copy a wire with FreeCAD.Vector constructor
2020-10-31 14:12:12 +01:00
alafr
ff521b1a53 Arch Structure: Refactor getExtrusionData
- group all `base, placement = self.rebase(baseface)` in one place
- group all normal calculations in one place
- fix placement of tool (bug introduced by my previous PR)
- allow multiple faces when face is created by FaceMaker
- remove unused code: if `len(obj.Base.Shape.Edges) == 1` is true, then there is a Wire and `obj.Base.Shape.Wires` should be also truthy
2020-10-31 14:12:10 +01:00
wmayer
9eb080488d PartDesign: [skip ci] minor cosmetic changes 2020-10-31 13:32:18 +01:00
M G Berberich
6d1b292280 [PartDesign] Dynamic hole cut-types
‣ Make countersink and counterbore on metric holes freely definable by user.

‣ Fixed the Naming of M1.6, M2, M2.5 and M3.5

‣ Added constructor for custom enums from Enums to PropertyEnumeration

‣ Put definitions of cut-types (counterbore/countersink) for
  screwtypes into json-files for easy modification.

‣ Allow users to put its own definitions in json-files in
  [UserDir]/Mod/PartDesign/Resources/Hole

‣ Contains several examples of cut-type definition json-files that are
  propably not production-ready.

This uses a local copy of nlohmann::json¹ to read json-files.

__________
¹ This is a very nice,header-only C++ library under the MIT License
  (https://github.com/nlohmann/json). I copied the single-file-version
  and the forward-declaration-header into …/PartDesign/App/ so no new
  dependencies arise.
2020-10-31 12:49:00 +01:00
M G Berberich
e84fa25c0b [PartDesign] Hole countersink for metric
fix a problem with counterbore and countersink in PartDesign Hole feature.

It was not possible to custom define counterbores or countersinks if a
metric thread hole was selected.

Handle the cut-types None, Counterbore and Countersink euqal
regardless of type of thread and let the user customize:
None:        none
Counterbore: diameter and depth
Countersink: diameter and angle
2020-10-31 12:49:00 +01:00
sliptonic
0a42189173 Merge pull request #4006 from dubstar-04/TurningPartOperation
[Path] Add selection gate and set default turning diameter
2020-10-30 09:44:54 -05:00
wmayer
462efdab37 Part: [skip ci] After removing a knot check if the B-spline is still valid 2020-10-30 13:55:31 +01:00
wmayer
6ebee86867 Sketcher: [skip ci] avoid possible memory leak 2020-10-30 13:21:51 +01:00
wmayer
53441613cc Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy() 2020-10-30 10:54:25 +01:00
Daniel Wood
9c296217e5 [Path] Tidy imports 2020-10-29 21:35:24 +00:00
Daniel Wood
c1302fb4fa [Path] PEP8 whitespace fixes 2020-10-29 21:29:25 +00:00
Daniel Wood
4f6c7797ab [Path] set the default max diameter 2020-10-29 21:27:32 +00:00
Daniel Wood
65e3476e20 [Path] PEP8 Formatting fixes 2020-10-29 19:55:45 +00:00
Daniel Wood
5c4ad1a7de [Path] Add TurnPart selection 2020-10-29 19:55:05 +00:00
Roy-043
aebf568eae Draft: Draft_Dimension_linked_geometry_fix
Linked geometry was not handled if the selected edge started or ended at vertex zero.
2020-10-29 19:26:55 +01:00
Yorik van Havre
cd8af3656a Arch: Added Text settings to SectionPlanes 2020-10-29 18:28:35 +01:00
wmayer
0371a67dae Base: [skip ci] expose Type::createInstance and Type::createInstanceByName to Python 2020-10-29 17:18:10 +01:00
sliptonic
20a52f3f68 Merge pull request #4003 from dubstar-04/feature/jobsetupplane
[Path] Enable Face selection for axis alignment (JobSetUp)
2020-10-29 08:53:33 -05:00
Daniel Wood
4852ac73dc Merge branch 'master' into feature/jobsetupplane 2020-10-28 17:19:10 +00:00
Daniel Wood
e64cb66a32 Reorder imports to match PEP8 guidance 2020-10-28 17:10:51 +00:00
Daniel Wood
7618dba49d silence lgtm warnings 2020-10-28 17:09:49 +00:00
PRDC
f7532b91d4 Update ClipPlane.py 2020-10-28 17:12:21 +01:00
Yorik van Havre
7c9e0f3a99 Merged crowdin translations 2020-10-28 12:04:37 +01:00
Yorik van Havre
5eafaa37fd Updated ts files 2020-10-28 10:46:51 +01:00
Yorik van Havre
c3672f6e1d Tools: Made updatets delete temporary json files 2020-10-28 10:45:44 +01:00
Daniel Wood
7a55d5120d PEP8 whitespace fixes 2020-10-28 06:50:04 +00:00
Daniel Wood
811fa90efe [Path] Enable Face selection for axis selection (JobSetUp) 2020-10-27 21:28:30 +00:00
Yorik van Havre
0f875168b6 Material: Mateiral editor UI fixes
- Fixed color buttons
- Introduced "Section Color" property
- Fixed named properties
- Added preview icons
- Remember UI dimensions and expanded states
2020-10-27 19:16:58 +01:00
Bernd Hahnebach
d0eb71517c FEM: python, get rid of bare excepts 2020-10-27 08:24:27 +01:00
sliptonic
7f83281551 Merge pull request #3991 from Russ4262/patch-1
Path: Fixes ticket #4471
2020-10-26 20:29:23 -05:00
sliptonic
3c307b7a3c Merge pull request #3969 from sliptonic/bug/bugfixes
[PATH]  Minor bugfixes
2020-10-26 08:12:20 -05:00
sliptonic
66d3f7b057 Merge pull request #3978 from mlampert/feature/path-voronoi-vcarve-refactor
Path: Feature/path voronoi vcarve refactor
2020-10-26 08:11:34 -05:00
Yorik van Havre
0fdd157394 Draft: Added TechDraw patterns 2020-10-26 11:52:14 +01:00
Yorik van Havre
9a3fcfd8ca Arch: fixed placement of Space label on TD pages 2020-10-26 10:35:40 +01:00
Markus Lampert
1e687bb1fd Special provisions for py2 - not understanding why though 2020-10-25 18:56:47 -07:00
Markus Lampert
1f8201bbc3 Remove app include files from precompile guard 2020-10-25 16:33:13 -07:00
Markus Lampert
e878eb56e2 Include proper model headers for python files. 2020-10-25 16:33:13 -07:00
Markus Lampert
09e6552fbb Fixed 'o' and depth issue 2020-10-25 16:33:13 -07:00
Markus Lampert
4c16bef132 Allow voronoi edges to be traversed in any direction and use that to sort the sequence of milling the wires. 2020-10-25 16:33:13 -07:00
Markus Lampert
fb2a747aee Added sorting over all wires, not just the ones of a single face 2020-10-25 16:33:13 -07:00
Markus Lampert
2046db0990 Added sorting of voronoi wires to minimize rapid moves 2020-10-25 16:33:13 -07:00