* [CAM] extract tool controller ui elements into their own file
* [CAM] make the changes in the tool controller UI only apply when ok is clicked
* [CAM] Add tool controller edit panel to the Profile operation
* [CAM] Add copy button to in-operation tool controller editor
* [CAM] clean up changes
* [CAM] Add tool controller edit UI to all operations
Notes on changes that were not a simple copy/paste job from the changes
I made for Profile:
- Deburr: changed TC/coolant rows from 1 and 2 to 0 and 1
- Probe: didn't work at all initially due to bug in main where ShapeName
changed to ShapeType. I added a utility for reading either a ShapeType
or a ShapeName (check for both properties, convert ShapeType to lower
case) and applied it to probe and camotics
- Drilling: moved Keep Tool Down checkbox up from row 8 to row 2 (all
intermediate rows were missing) and added the edit checkbox in row 3
below it
- VBit, Probe (or anything else that requires a specific tool type): in
Base.py setupToolController(), I added a check to see if the currently
selected tool is an invalid type, and if so and there is a valid tool,
then change to that one. This fixes two UI bugs. Plausibly pre-existing,
if there is one valid tool and an invalid tool is selected, it's
impossible to switch to the valid one because you can't generate a combo
box change event for the new tool. Definitely new: if an invalid tool is
selected and there are no valid tools, the combo box will be empty but
the new tool controller edit utility will let you edit the current TC
anyway.
- Thread Milling: replaced the Tool Controller GroupBox with the
standard QFrame layout, and added the checkbox. Note that this
operation doesn't have a UI element for coolant -- likely a bug, but I
didn't look into it
- Surface: Changed from form layout to grid layout. Deleted an old
SurfaceEdit.ui file -- it was replaced with PageOpSurfaceEdit.ui in
2017 but not deleted (commit 77af19e7489e1fc637a68cdad220e5dd430dc2b9)
- Waterline: Changed from form layout to grid layout
* [CAM] Bug fixes
setupUi() wasn't called on the tool controller editor, preventing
changes in its UI from being written back to the object immediately.
This caused weird behavior where if you edited a field twice it would
reset the second time it was focused
Added a hook to automatically update the TC combo box when the TC name
(or anything else about it, since that was easier) changes
* Fix usage of QSignalBlockers
* [CAM] Block scroll events on tool number and spindle direction when not
focused
Specifically, if you mouse over either of these UI elements and use the
scroll wheel, it used to focus the element and change its value. This
commit makes it do neither of those things, for these specific elements,
as a measure against users accidentally changing these values.
* disable tcNumber edit field in operations panel
* Add "New tool controller" option to TC combo box
When selected, it opens (toggles, technically) the tool bit dock and
returns to the previous selection. Adding a new tool controller using
the dock (already, before this commit) automatically switches the
operation's tool controller to the new one
* Add "Copy" option to tool controller combo box
* Copy TC function only in combo box, no button
* [CAM] update in-operation "new tool controller" function to use a dialog
* [CAM] make the tool selector always a dialog and never a dock
* remove spacer from ToolControllerEdit.ui to fix exces white space
* [CAM] change tool dialog default sizing/spacing
* [CAM] fix bug where copying tool controller doesn't copy all values
This commit fixes how origin (coordinate system) indicator looks. Before
it showed as disc, and now it shows as point which is more approperiate
given the context.
Due to a Qt signal setup, the clone object for Existing Stock stock type
was recreated every time the Job properties dialog was opened (during the
stock candidates list population).
This fix blocks the Qt signal from being emitted during the dropdown
population.
* change design of CAM origin axis
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change Inventor example comment
* move to SoFCPlacementIndicatorKit - increase stock point size display
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Use So3DAnnotation for origin axis
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The previous text suggested to change the scheme in the preferences,
however, the preferences only take effect for new documents. Now, that
we have the "ProjectUnitSystem" in place, the setting for the current
document needs to be changed.
The text is restructured accodring to the UX pattern for warnings:
- What is the problem
- How can I fix it
- What happens if I don't
and includes a link to the wiki for further details.
In addition, the 'US Customary' was removed from the proposed schemes as
suggested during review.
Finally, the button text was decapitalized and aligned with the
style used in other parts of FreeCAD, e.g. the Start page.
eliminate some error messages when a Job is not fully loaded
(or when not properly constructed via scripting)
TESTED ON V0.21 -- code hasn't changed since then
The refactored postprocessor system uses
a factory to load scripts. The preference
system has logic to load the scripts to get the tooltips
That logic was overlooked during the refactor.
Added it here.
The migration of CAM to use the new material system left behind some
logic that created an old dedicated stock material property.
This commit removes that property
* Machining model and materials
Adds a few machinability material model
and a couple materials. There's a button in the job dialog
to assign a material.
The sanity report is updated to display the surface speed for assigned materials
* improving the machinability model
* Introduce MaterialConstant for the machinability model
This constant is required to calculate the actual specific cutting force
from the normalized value. It determines how the actaual value varies
when the actual chip thickness gets further away from the normalization
point.
* Rename some machinability properties
- SpecificCuttingForce becomes UnitCuttingForce to clearer differentiate
between normalized and actual specific cutting force. The term unit
cutting force is used less often in literature, but
NormalizedSpecificCuttingForce as property name is too long for my taste.
- MaterialConstant becomes ChipThicknessExponent, as "material constant"
is just too generic for our context. In literature, this constant is most
often just used as the symbol m_c.
---------
Co-authored-by: Jonas Bähr <jonas.baehr@web.de>
* Initial opengl test window
* added core files
* some fixes for code comparability with other platforms
* more compatibility cleanup
* add missing opengl libraries
* Basic simulation window works!
* try using different define
* fix wrapper for better compatibility
* Gui is now operational
* Finally SIM works on actual freecad models
* support drill commands
* cleanup python script and add tool profile generation
* Now using actual tools specified in the operation.
* support mouse wheel and freecad-style 3d navigation
* Support accuracy gauge
* remove endsimulation reference
* show simulation speed indicator
* apply clang-format
* apply changes suggested by code review
* gui items are loaded via QT resource system instead of hard coded
* use vector instead of pointer to pass tool profile points
* Fix some more formatting errors.
The ShapeAppearance is a list of materials and thus assigning a color with 'obj.ViewObject.ShapeAppearance.DiffuseColor = color'
is incorrect.
But doing it with 'obj.ViewObject.ShapeAppearance[0].DiffuseColor = color' doesn't work as expected because the
internal notification doesn't work with a list.
So, the only viable way is to revert the changes and do it by assigning the color to the 'ShapeColor' attribute.
Uses new material system for appearance
Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.
The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.
A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.