Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error pushing the sketch #238

Open
dzid26 opened this issue Dec 29, 2024 · 4 comments
Open

Error pushing the sketch #238

dzid26 opened this issue Dec 29, 2024 · 4 comments

Comments

@dzid26
Copy link

dzid26 commented Dec 29, 2024

19:49:45  evaluate to recompute
19:49:45  check to sanitize
19:49:48  Running the Python command 'ksuToolsPushPCB' failed:
Traceback (most recent call last):
  File "C:\Users\dzidm\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\.\kicadStepUpCMD.py", line 1500, in Activated
    FreeCADGui.ActiveDocument.getObject(sk_obj.Name).Autoconstraints = True
                                        ^^^^^^^^^^^

'NoneType' object has no attribute 'Name' 

or

19:52:50  Running the Python command 'ksuToolsPushPCB' failed:
Traceback (most recent call last):
  File "C:\Users\dzidm\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\.\kicadStepUpCMD.py", line 1500, in Activated
    FreeCADGui.ActiveDocument.getObject(sk_obj.Name).Autoconstraints = True
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

'Gui.ViewProviderGeometryObject' object has no attribute 'Autoconstraints'

This happens if a sketch has a dependency.
For example if it is attached to a plane.
image
When I clear Attachment Support field, I can push the sketch again.

If the sketch uses External Geometry there issue also appears - which is a bigger shame. I needed to temporarily remove, in my case, shape binder dependency to be able to export the shape.

Freecad 1.0

@easyw
Copy link
Owner

easyw commented Dec 30, 2024

FC 1.0 has changed a lot with sketch wb.
I still have issues in my workflow that I haven't solved.
For this issue, you could copy the sketch and remove the dependencies to the copy, so you shouldn't have any issue in the original sketch.
Could you attach a FC file to test?
I will try to solve this for next release of kSU.

@easyw
Copy link
Owner

easyw commented Dec 30, 2024

I just tested with the latest kSU release and I don't have any issue if I select only sketch when the dialog appears.
I would definitely need a FC sample file.

@dzid26
Copy link
Author

dzid26 commented Dec 30, 2024

Let's start with something simple.
For example,

  1. I just created a new simple sketch on a plane. sketch on a plane.zip
  2. I press "Push sSketch to PCB" button.
  3. "Object selection" window opens up, I press OK - (this is already a bad sign)
  4. The sketch is copied in the model tree and nothing happens.
18:25:24  check to sanitize
18:25:25  Running the Python command 'ksuToolsPushPCB' failed:
Traceback (most recent call last):
  File "C:\Users\dzidm\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\.\kicadStepUpCMD.py", line 1500, in Activated
    FreeCADGui.ActiveDocument.getObject(sk_obj.Name).Autoconstraints = True
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

'Gui.ViewProviderGeometryObject' object has no attribute 'Autoconstraints'

If I clear reference plane, it works - aka, KicadStepUp asks for the line width.

@easyw
Copy link
Owner

easyw commented Dec 30, 2024

if you simply deselect "All" and then add "Sketch" and deselect the attach "Plane", the tool will export the sketch correctly.
I'm attaching a screencast video:

FC-sketch-on-a-plane.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants