Commit Graph

22902 Commits

Author SHA1 Message Date
alafr
0feb039deb Arch Structure: multiple structures command icon 2020-10-31 14:17:02 +01:00
alafr
3f72d434c5 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
fda4198ef0 Arch Structure: fix extrusion orientation 2020-10-31 14:16:59 +01:00
alafr
856063090d Arch Structure: fix the nodes default placement. 2020-10-31 14:16:58 +01:00
alafr
7f83d8f0b0 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
bac868a298 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
80736caa34 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
f87ae4de08 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
c9c9ab9a6b PartDesign: [skip ci] minor cosmetic changes 2020-10-31 13:32:18 +01:00
M G Berberich
7f328ac376 [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
c66a6be944 [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
8e4bc39194 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
eefa7dd798 Part: [skip ci] After removing a knot check if the B-spline is still valid 2020-10-30 13:55:31 +01:00
wmayer
50b38cca84 Sketcher: [skip ci] avoid possible memory leak 2020-10-30 13:21:51 +01:00
wmayer
e425a6bfe5 Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy() 2020-10-30 10:54:25 +01:00
Daniel Wood
6be4352ea7 [Path] Tidy imports 2020-10-29 21:35:24 +00:00
Daniel Wood
e22de3bde1 [Path] PEP8 whitespace fixes 2020-10-29 21:29:25 +00:00
Daniel Wood
eb3fbc0f94 [Path] set the default max diameter 2020-10-29 21:27:32 +00:00
Daniel Wood
4ea4ad84ce [Path] PEP8 Formatting fixes 2020-10-29 19:55:45 +00:00
Daniel Wood
8418c014f5 [Path] Add TurnPart selection 2020-10-29 19:55:05 +00:00
Roy-043
bbddf0501c 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
687f55e94f Arch: Added Text settings to SectionPlanes 2020-10-29 18:28:35 +01:00
wmayer
e22286f5b4 Base: [skip ci] expose Type::createInstance and Type::createInstanceByName to Python 2020-10-29 17:18:10 +01:00
sliptonic
4aca75d396 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
13e76e32e0 Merge branch 'master' into feature/jobsetupplane 2020-10-28 17:19:10 +00:00
Daniel Wood
91f5f470f4 Reorder imports to match PEP8 guidance 2020-10-28 17:10:51 +00:00
Daniel Wood
766bfe9398 silence lgtm warnings 2020-10-28 17:09:49 +00:00
PRDC
cc0f147362 Update ClipPlane.py 2020-10-28 17:12:21 +01:00
Yorik van Havre
43596a68af Merged crowdin translations 2020-10-28 12:04:37 +01:00
Yorik van Havre
57fbb63b8d Updated ts files 2020-10-28 10:46:51 +01:00
Yorik van Havre
4129a4d6b5 Tools: Made updatets delete temporary json files 2020-10-28 10:45:44 +01:00
Daniel Wood
532c05eeea PEP8 whitespace fixes 2020-10-28 06:50:04 +00:00
Daniel Wood
e3213c296f [Path] Enable Face selection for axis selection (JobSetUp) 2020-10-27 21:28:30 +00:00
Yorik van Havre
cb245845c5 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
6fda0a2faa FEM: python, get rid of bare excepts 2020-10-27 08:24:27 +01:00
sliptonic
70e11ebc52 Merge pull request #3991 from Russ4262/patch-1
Path: Fixes ticket #4471
2020-10-26 20:29:23 -05:00
sliptonic
77cb54869f Merge pull request #3969 from sliptonic/bug/bugfixes
[PATH]  Minor bugfixes
2020-10-26 08:12:20 -05:00
sliptonic
97fb4d1555 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
f58f808d53 Draft: Added TechDraw patterns 2020-10-26 11:52:14 +01:00
Yorik van Havre
0b609773fe Arch: fixed placement of Space label on TD pages 2020-10-26 10:35:40 +01:00
Markus Lampert
236f8605cd Special provisions for py2 - not understanding why though 2020-10-25 18:56:47 -07:00
Markus Lampert
982656babe Remove app include files from precompile guard 2020-10-25 16:33:13 -07:00
Markus Lampert
318ad0fb65 Include proper model headers for python files. 2020-10-25 16:33:13 -07:00
Markus Lampert
85418c48df Fixed 'o' and depth issue 2020-10-25 16:33:13 -07:00
Markus Lampert
204ab7e826 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
c581602bf8 Added sorting over all wires, not just the ones of a single face 2020-10-25 16:33:13 -07:00
Markus Lampert
6e0e8541a5 Added sorting of voronoi wires to minimize rapid moves 2020-10-25 16:33:13 -07:00
Markus Lampert
e35a022132 New vcarve wire detection algorithm using the new z-values of toShape 2020-10-25 16:33:13 -07:00
Markus Lampert
3c4bccbf6c Fixed parabola calculation if vornonoi edge starts close to its location. 2020-10-25 16:33:13 -07:00
Markus Lampert
0d747d7abd Fixed voronoi parabola creation with correct orientation. 2020-10-25 16:33:13 -07:00