Commit Graph

24 Commits

Author SHA1 Message Date
Adrian Insaurralde Avalos
a17a3cf6d7 CAM: apply precommit 2024-09-03 14:54:36 -04:00
Shai Seger
3067946b4d [CAM SIMULATOR] Bug fixes for Issues #16073 and #16052 (#16118)
* Bug fixes for Issues #16073 and #16052

* Fix tool rendering when tool position is not reset. Issue #16180

* Fix some lint warnings
2024-09-02 11:31:08 -05:00
Shai Seger
778107939c Cam simulator feature update (#15597)
* remove redundant code

* Improve lighting, add ambient occlusion

* Add cleanup code. Dialog is now deleted when cloesd.

* change back to ambient occlusion

* Fix G8x drill sequence bug.  issue #14369

* fix bad simulation artifacts under Linux and QT. Issue #14369

* fix merge issue

* fix border artifact on buttons

* support showing path lines. revise the gui.

* add option for arbitrary solids. wip

* use vectors instead of mallocs

* Handle arbitrary stock shapes + show base shape.

* Complete the base shape display feature. eliminate co-planar artifacts.

* support window scaling. upstream issue #14334

* Apply lint fixes

* some missing lints.

* Attend pylint issues

* Apply code fixes based on @kadet1090 review

* fix some clang-tidy warnings.

* CAM: Linter cleanup round 1

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2024-08-21 15:18:52 -05:00
sliptonic
7709af53d4 Fixes https://github.com/Ondsel-Development/FreeCAD/issues/114
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.
2024-07-22 10:50:53 -05:00
sliptonic
d7a6b24ec0 Fixes: https://github.com/Ondsel-Development/FreeCAD/issues/116
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
2024-07-22 10:50:53 -05:00
luzpaz
63bbbf2bd3 Path (and PathSimulator): Trim trailing Newlines 2024-07-14 09:26:15 +02:00
luzpaz
2837b46c3e Fix various typos throughout the codebase 2024-07-08 17:19:20 -05:00
Max Wilfinger
8ff5a1f688 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
jffmichi
1c9d71502a Path: replace import of PySide2 with PySide 2024-06-22 08:17:16 -05:00
sliptonic
cb23383526 Fixing 'red ink' bugs in CAM
fixes:  https://github.com/Ondsel-Development/FreeCAD/issues/93
fixes https://github.com/Ondsel-Development/FreeCAD/issues/87
fixes https://github.com/Ondsel-Development/FreeCAD/issues/88


fix threadmilling error if not proper tool
fix vcarve error if no proper tool
fix probe error if no proper tool
fix deburr error if no base geometry
Fix adaptive op error if no base geometry
2024-06-22 08:16:33 -05:00
sliptonic
8365c060a8 Machining model and materials (#14460)
* 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>
2024-06-17 11:25:55 -05:00
shai
1f78025e72 Added a fix to issue #14613: tool shapes not shown correctly 2024-06-16 08:27:04 -05:00
shai
f0a66caafd Fix issue #14513 - simulation of partially selected operations not working. 2024-06-16 08:27:04 -05:00
Shai Seger
63c3bab94a New Cam simulator based on low level OpenGL functions (faster and more precise) (#13884)
* 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.
2024-05-22 10:16:34 -05:00
sliptonic
4aa7f78790 fix minor bugs with sanity report and job visibility (#14043) 2024-05-16 07:27:45 -05:00
sliptonic
f4a961e8f0 Merge pull request #13668 from Ondsel-Development/RefactorPostCommand
Refactor post command
2024-05-06 09:49:28 -05:00
sliptonic
c97e199a28 Make Job gui work with new PostProcessor class 2024-05-03 10:16:41 -05:00
Brad Collette
e22cde251c refactor Sanity
Logic is more modular with many more unit tests.
Reduced dependence on GUI
Cleaner template structure
2024-04-27 17:28:15 -05:00
Chris Hennes
f8014e0e30 Merge pull request #13520 from wwmayer/fix_material
Fix further material issues
2024-04-22 11:16:44 -05:00
sliptonic
5504a22285 translation stuff 2024-04-18 17:38:12 -05:00
wmayer
550fd359c0 CAM: fix regressions with material handling
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.
2024-04-18 13:57:48 +02:00
David Carter
ba20441935 Material: Material appearance
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.
2024-04-04 07:39:58 -05:00
sliptonic
8e92a2dd42 fix edgecase with missing toolshape
If the toolshape isn't on the local system, Sanity would fail trying to get the thumbnail.
Now fails gracefully.
2024-03-12 11:57:02 -05:00
Brad Collette
12a3e656cf move Path to CAM 2024-03-04 11:18:41 -06:00