Commit 2da12fc
Add STEP Import for Assemblies (#1779)
* Initial commit with colors and locations working for simple assemblies
* Trying to fix mypy error
* Jumping through hoops to make mypy happy
* Lint fix
* Refactored method interface based on suggestion
* Use Self and @classmethod
* Lint fix
* Added a test specifically for testing metadata
* Seeing if coverage and tests will pass
* Added name loading from STEP file
* Made name a public property of Assembly
* Trying to increase test coverage a bit
* Syncing up some experiments
* Got color and layer search working, still need to get name search working through indirect lookup
* Got tests working for layer and color info import
* Got shape name loading to work
* Trying to get approximate tuple comparison working
* Black fix
* Added a test for a bad filename, and added a custom color
* Increase test coverage a bit and improve color name check
* Removing code that should never be hit
* Still trying to increase test coverage
* Added a test for a plain assembly
* Refactored a bit to support nested assemblies better in the future
* Fixed location handling for components of the assembly
* Fix the default color to not be black
* Fixed bug with parent location not being applied when needed
* Fixed importer for Assembly.export method
* Fixed comment
* Removed a stray import that was probably added by AI somewhere along the line.
* Implement some of the suggestions
* Added a test for nested subassemblies on import
* Rework which covers everything except subshapes and layers
* Added layer name support back in
* Added a round-trip test and fixed issues that it revealed
* mypy fixes
* More mypy fixes
* Missed a cast
* More mypy fixes
* Tried to remove the attribute iterator and could not, but moved some code out of loop
* Fixes and simplifications based on codecov checks
* More cleanup to try to get code coverage high enough without creating a contrived STEP file
* Fix lack of application to the top-level assembly
* Trying to increase test coverage high enough
* Implemented changes based on PR from Adam
* Fix mypy errors
* Add isSubshape
* Add __getitem__
* Mypy fix and a usability tweak.
* Generic support for subshape metadata
* Rework assy import
* Start reworking tests
* Streamline a bit
* Add validation when adding subshapes
* Fix pickling
* Simplify assy import
* Fix subshape name handling
* Simplify
* Additional test
* Better test
* Remove some changes
* Fix some warnings
* Fix top level key in .objects
* Initial commit
* mypy fix
* Check .objects keys in the test
* Black fix
* Rework
* Mypy fix
* Fix name
* Add xbf and start using xml xcaf
* Test with a simpler model
* Start on xml/xbf import
* Fix path handling
* Rework color handling
* Fix subshapes for xbf/xml
* Cleanup
* Remove additional levels and add/fix roundtrip tests
* Tweak tests
* Eliminate dead code
* Docs update
* Typo fixes + clarification
* typo fix
---------
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
Co-authored-by: adam-urbanczyk <13981538+adam-urbanczyk@users.noreply.github.com>1 parent d338160 commit 2da12fc
File tree
9 files changed
+1305
-324
lines changed- cadquery
- occ_impl
- exporters
- importers
- doc
- tests
9 files changed
+1305
-324
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| |||
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
175 | | - | |
| 182 | + | |
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
| |||
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
197 | | - | |
| 204 | + | |
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
| |||
344 | 351 | | |
345 | 352 | | |
346 | 353 | | |
347 | | - | |
| 354 | + | |
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
351 | | - | |
| 358 | + | |
352 | 359 | | |
353 | 360 | | |
354 | 361 | | |
| |||
360 | 367 | | |
361 | 368 | | |
362 | 369 | | |
363 | | - | |
| 370 | + | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
367 | 374 | | |
368 | 375 | | |
369 | | - | |
| 376 | + | |
370 | 377 | | |
371 | 378 | | |
372 | 379 | | |
| |||
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
414 | | - | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
| |||
506 | 513 | | |
507 | 514 | | |
508 | 515 | | |
509 | | - | |
| 516 | + | |
510 | 517 | | |
511 | 518 | | |
512 | 519 | | |
| |||
521 | 528 | | |
522 | 529 | | |
523 | 530 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
556 | 534 | | |
557 | 535 | | |
558 | 536 | | |
| |||
562 | 540 | | |
563 | 541 | | |
564 | 542 | | |
565 | | - | |
| 543 | + | |
566 | 544 | | |
567 | 545 | | |
568 | 546 | | |
| |||
583 | 561 | | |
584 | 562 | | |
585 | 563 | | |
586 | | - | |
| 564 | + | |
587 | 565 | | |
588 | 566 | | |
589 | 567 | | |
| |||
592 | 570 | | |
593 | 571 | | |
594 | 572 | | |
| 573 | + | |
| 574 | + | |
595 | 575 | | |
596 | 576 | | |
597 | 577 | | |
| |||
611 | 591 | | |
612 | 592 | | |
613 | 593 | | |
614 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
615 | 597 | | |
616 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
617 | 627 | | |
618 | 628 | | |
619 | 629 | | |
| |||
714 | 724 | | |
715 | 725 | | |
716 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
717 | 747 | | |
718 | 748 | | |
719 | | - | |
| 749 | + | |
720 | 750 | | |
721 | | - | |
| 751 | + | |
722 | 752 | | |
723 | | - | |
| 753 | + | |
724 | 754 | | |
725 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
0 commit comments