question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove FreeCAD dependency

See original GitHub issue

I have added cqparts support for my jupyter extension https://github.com/bernhard-42/cadquery-jupyter-extension. Since the extension runs only with the pythonOCC version of cadquery, I had to patch geometry.py

 class CoordSystem(cadquery.Plane):
     """
     Defines the location, and rotation of an orthogonal 3 dimensional coordinate
@@ -108,14 +103,14 @@ class CoordSystem(cadquery.Plane):
             i & = cos(\beta) cos(\gamma)
         """
         # Create reference points at origin
-        offset = FreeCAD.Vector(0, 0, 0)
-        x_vertex = FreeCAD.Vector(1, 0, 0)  # vertex along +X-axis
-        z_vertex = FreeCAD.Vector(0, 0, 1)  # vertex along +Z-axis
+        offset = cadquery.Vector((0, 0, 0))
+        x_vertex = cadquery.Vector((1, 0, 0))  # vertex along +X-axis
+        z_vertex = cadquery.Vector((0, 0, 1))  # vertex along +Z-axis

         # Transform reference points
-        offset = matrix.multiply(offset)
-        x_vertex = matrix.multiply(x_vertex)
-        z_vertex = matrix.multiply(z_vertex)
+        offset = offset.transform(matrix)
+        x_vertex = x_vertex.transform(matrix)
+        z_vertex = z_vertex.transform(matrix)

         # Get axis vectors (relative to offset vertex)
         x_axis = x_vertex - offset

I cannot test against the FreeCAD version since on macos there are issues around python versions between FreeCAD and system python (one of the reasons for me to leave FreeCAD)

Thought it could maybe help …

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
bernhard-42commented, Jan 28, 2019

Looking forward to the next release and will switch over to feature/freecad-occ for the time being

0reactions
jhselvikcommented, Aug 16, 2020

Thank you @bernhard-42, I will give that a try and let you know how it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove dependency from import? - FreeCAD Forum
Open the file and save it as another name. Delete the .step thing from your file. Delete Pad. Select the Sketch, then click...
Read more >
Object Dependencies? - FreeCAD Forum
I'm trying to delete a part of this SCAD 3D model but, it's all connected and every time I try it says. This...
Read more >
How do you remove clone dependencies? - FreeCAD Forum
If you don't want the dependencies which make a clone a clone, don't use a clone. Use Part->Create simple copy instead.
Read more >
[Solved] Delete dependent objet - FreeCAD Forum
Sometimes I have to remove a Pad and its dependent Sketch, but if just select the Pad object, it doesn't delete the Sketch...
Read more >
Delete fillet, Object Dependencies, Cancel - FreeCAD Forum
Re: Delete fillet, Object Dependencies, Cancel​​ Just hide (select the visible ones and press the space bar) all the features in the tree...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found