Commit 33bf83e
Added code for simplified and fused assembly export to STEP (#1261)
* Added code for simplified and fused assembly export to STEP
* Changed toFused to use OCCT history API instead of the cut method
* Black fix
* Handle a null label due to a deleted face from the fuse
* Handle generated faces
* Allow a face to be null because of something other than IsDeleted
* Added assembly STEP export doucmentation
* Handle assemblies that have only one shape in them
* Better check before getting a null label and commented out generated face addition for now
* Appended CAF to new toSimplified and toFused method names for export
* Removed unneeded __iter__ call
* Trying to figure out mypy Literal for STEP export mode
* Switched to using literals for the export mode
* Switching to built-in CQ method for creating a compound
* Added glue and fuzzy tolerance settings for fused assembly
* Use the built-in assembly name, otherwise a UUID
* Pulled latest master and fixed black errors
* Started using location of assembly parent part object for compound
* Handle nested assemblies
* Added nested assembly export tests
* mypy apparently could not handle the one-liner inside toShapeList
* Attempting to fix remaining mypy errors
* Added single part fused export, fuzzy_tol and glue setting tests
* Removed simplified STEP export method and addressed some comments on the PR
* Fixed export mode literal typing omission
* Fix black error
* Fixing mypy error
* Added ability to handle a top level shape passed during Assembly initialization
* Simplified assembly handling while still keeping top level assembly objects
* Attempting to round out tests
* Update cadquery/assembly.py
Co-authored-by: AU <[email protected]>
* Update cadquery/occ_impl/assembly.py
Co-authored-by: AU <[email protected]>
* Simplification for latest OCP
Co-authored-by: AU <[email protected]>
* Fixed tests for typing change
* Use f string in exception
Co-authored-by: AU <[email protected]>
* Capitalization and f string suggestions
* Fix black check
* Simplified code by using traverse to walk the assembly structure
* Removed toShapeList
* Trying to avoid an error that only seems to be happening in CI
* Needed to put the check if a face was deleted on the fuse op
* Investigate the failures on appveyor
* Reworked and simplified adding of modified and generated faces
* Added null checks for labels after trying to add a subshape
* Fixed color handling for some faces during fuse
* Comment out on_finish
* Apply locations to shapes
* Fix failing tests
* Better testcase
* Copy explicitly
* Fix single shape export
* Mypy fix
* Add (initial) test of fused STEP export mode colors
* toFusedCAF - handle single compound special case, use existing assembly name, add more tests
* Removed performance statement in assembly exporter docstring
* Updated docstring for glue
As suggested by @lorenzncode
* Doc tweaks
* More assembly export mode doc tweaks
* Correct the export mode keyword arg name in example
* Include example of exporters.export opt dict
* Changed the name exportMode to mode
---------
Co-authored-by: AU <[email protected]>
Co-authored-by: Lorenz Neureuter <[email protected]>1 parent 3b9ead1 commit 33bf83e
File tree
8 files changed
+744
-28
lines changed- cadquery
- occ_impl
- exporters
- doc
- tests
8 files changed
+744
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
3 | 14 | | |
4 | 15 | | |
5 | 16 | | |
| |||
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
| |||
436 | 449 | | |
437 | 450 | | |
438 | 451 | | |
| 452 | + | |
439 | 453 | | |
440 | 454 | | |
441 | 455 | | |
| |||
451 | 465 | | |
452 | 466 | | |
453 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
454 | 472 | | |
455 | 473 | | |
456 | 474 | | |
| |||
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
462 | | - | |
| 480 | + | |
463 | 481 | | |
464 | 482 | | |
465 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
289 | 297 | | |
290 | 298 | | |
291 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
36 | 51 | | |
37 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
38 | 62 | | |
39 | | - | |
40 | 63 | | |
41 | 64 | | |
42 | 65 | | |
| |||
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
52 | 80 | | |
53 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
54 | 86 | | |
55 | 87 | | |
56 | 88 | | |
| |||
0 commit comments