ceremcem / fc-asm3-cut-window

2 stars 0 forks source link

How deal with result of cutting in the Path WB? #3

Open yrabbit opened 6 years ago

yrabbit commented 6 years ago

Hello, After I successfully cut the holes in the panel, I need to form the commands for my CNC machine. For this, I intended to go to Path WB and work with the panel (already with holes) there. Unfortunately I can not create a new job there using this panel as the base body, although in the test file I can use Cut as the base body. In the attached archive, there is both a reference example and a test file.

This is error message:

Running the Python command 'Path_Job' failed:
Traceback (most recent call last):
  File "/usr/local/FreeCAD2/Mod/Path/PathScripts/PathJobCmd.py", line 66, in Activated
    dialog.setupModel()
  File "/usr/local/FreeCAD2/Mod/Path/PathScripts/PathJobDlg.py", line 92, in setupModel
    if PathUtil.isSolid(base):
  File "/usr/local/FreeCAD2/Mod/Path/PathScripts/PathUtil.py", line 72, in isSolid
    if obj.Shape.Volume > 0.0 and obj.Shape.isClosed():

This is how correct dialog looks like, I can choose the Cut. path-job

asm3-modified.zip

ceremcem commented 6 years ago

My own struggle is that I've never used Path WB so I can not guess the desired behavior or workflow.

A quick test shows me that I can not reproduce the error you have. I opened "just-pad.fcstd" and created a contour around the object:

image

Please include your FreeCAD version and step by step reproduction. My version is:

OS: Debian GNU/Linux 9.5 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15574 (Git)
Build type: Release
Branch: LinkStage3
Hash: 39c32719884d1a56c569cd38da56eee96b8ca1b8
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
yrabbit commented 6 years ago

I'm sorry. I was inaccurate in describing my problem. The just_pad file is just an example of how you can correctly create a Path Job for an object of type Cut. I have a problem with creating a Path Job for a panel with holes in the file , which is also an object of type Cut.

Steps:

Nothing will happen except for errors in the report window: path-err

Your process of cutting windows is very convenient and good, but I want to do something with the result of this process, in this case send it to my CNC:)

=== FreeCAD info === OS: UNIX Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15623 (Git) Build type: Release Branch: dragonfly Hash: 55b5cc0b8377ed85a71954b4283d7053b7983311 Python version: 2.7.15 Qt version: 4.8.7 Coin version: 4.0.0a OCC version: 7.2.0 Locale: English/UnitedStates (en_US)

ceremcem commented 6 years ago

I can confirm that the same exception is thrown on my side. A few tests should be performed to understand if

  1. This issue is related with upstream or not
  2. This issue is related LinkStage3 or not
  3. This issue is related sub-shape binder operation or not

I'll perform these tests as soon as possible.

yrabbit commented 6 years ago

May be this will help: do you remember just_pad file? If you move Body to the assembly then you'll got same exception.

move-to-assembly

ceremcem commented 6 years ago

That sounds like we need @realthunder 's attention

yrabbit commented 6 years ago

Most likely you are right. We can forget about the "Cut": just the presence of the assembly in the project leads to a crash after P,J cylinder

realthunder commented 6 years ago

Problem confirmed. I'll fix it soon.

BTW, it will be better if you do not mix your model and Path job in the same file. Because many of the Path operation is expensive, and you normally don't want it to recompute on every model change. You can put all Path jobs in external files, and link to the model externally. You can't create Path job directly on Link yet. But you can use SubShapeBinder to bind it and then create job on the binder. You can use BindMode property of the binder to fine tune the recomputation.

yrabbit commented 6 years ago

Thank you. I really need to get used to the Binders :)

yrabbit commented 6 years ago

Yes, it works with SubShapeBinder:) There are other glitches, such as the task editing dialog does not preserve the dimensions of the Extended Box, but I do not observe such effects in upstream, so I think that they will disappear after the merge. bender-path

path-job-settings