OCC compatibility TODO list
See original GitHub issueI’m opening this issue as a TODO list of what else needs to be done on the feature/freecad-occ branch to finish up compatibility with the pythonOCC fork of cadquery. The initial list is just the result of running the test suite and seeing what breaks. See the test.log attached here.
- (https://github.com/CadQuery/cadquery/pull/16) cadquery-occ needs to provide accessors for individual
Matrix
elements. Maybe through__getitem__()
? cqparts currently inspects matrix elements viam.A11, m.A12, etc
which don’t currently exist in the OCC fork: https://github.com/cqparts/cqparts/blob/f057c2d413dfa3552289d57a132ea077c0152e4f/tests/t_cqparts/test_coordsystem.py#L20-L24 - (https://github.com/CadQuery/cadquery/pull/16)
cadquery.Matrix
constructor doesn’t accept a list of values. - (https://github.com/cqparts/cqparts/pull/130) Fix
import Part as FreeCADPart
in threads/base.py. - (https://github.com/cqparts/cqparts/pull/143) Fix issues with calculation tolerance. Several tests currently fail because cadquery-occ seems to use a more lenient tolerance value for calculations than the current freecad implementation. The tests fail because results aren’t accurate to the expected values within enough decimal places. See this test failure for example:
======================================================================
FAIL: test_parent (t_cqparts.test_params.ComponentRefTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/justinbuchanan/src/github/cq/cqparts/tests/t_cqparts/test_params.py", line 396, in test_parent
self.assertAlmostEqual(bb.xmin, -1)
AssertionError: -1.01 != -1 within 7 places
- (https://github.com/CadQuery/cadquery/pull/15) issues importing multi-shape objects from step files.
======================================================================
FAIL: test_multipart_assembly (t_cqparts.test_codecs.TestStep)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/justinbuchanan/src/github/cq/cqparts/tests/t_cqparts/test_codecs.py", line 238, in test_multipart_assembly
self.assertEqual(len(thing.components), 2)
AssertionError: 1 != 2
- Some tests reference
cadquery.freecad_impl.console_logging.enable(logging.INFO)
, which isn’t present in cadquery-occ.
There are likely other issues, but here’s what I’ve seen so far. Please feel free to add to this list. Also, if you’re working on something, please put your name next to the item or comment so we can avoid duplicate work 😃.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Migrate: FC -> OCC · GitHub
Parametric CAD for coders, a wrapper for cadquery objects. - Migrate: FC -> OCC · cqparts/cqparts.
Read more >8 best to do list apps of 2023 - Zapier
Best to-do list app for Microsoft power users (and Wunderlist refugees) · Create Workboard action items from new tasks in Microsoft To-Do ·...
Read more >To Do List and Task Management App | Microsoft To Do
With Microsoft To Do you can easily create and sync your task lists across multiple devices so you have your to do list...
Read more >Arduino - Home
Open-source electronic prototyping platform enabling users to create interactive electronic objects.
Read more >chevy impala ac not blowing - Ramozzi & Friends
THE PARTS COMPATIBILITY LIST MThe TPMS sensor matching process is: Set the ... First and easiest thing to do is to check a/c...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The tests pass now, but the test related to CadQuery issue #283 is being skipped for now. I have left the display tests which rely on FreeCAD in for now (they’re being skipped), until that functionality can be replaced by CQ-editor or something equivalent. The docs also need to be updated. In any case, cqparts should be usable with CQ 2.0 now, even with all the work that’s left to do for a full transition.
I’m most of the way through an update of cqparts to CQ 2.0. It’s on this fork. It’s built on top of the great work @adam-urbanczyk has been doing to get CadQuery updated to OCCT 7.4.x using auto-generated bindings. There are some nice performance improvements and added features. Just FYI - I do intend to clean up the commented FreeCAD references once everything is working.
@fragmuffin Would you be supportive of merging this into master once it’s been vetted properly and OCCT 7.4 support is mainline in CQ 2.0, or will it need to live on as a branch or fork?
As of this writing (and I’m quitting for the night), I have 0 assert failures and 4 errors. It’s only a matter of time before I stamp those last 4 out, but if anybody is interested in taking a look, I’ll post them below. Any other feedback on the changes that have been made are welcome too. If there’s support for merging into master, I’ll put a PR together once the tests run successfully and I have some instructions on how to run my branch against CQ 2.0 and OCCT 7.4.
Related issues: #98 #144