Gets the underlying geometry type. Implementations can return any values desired, but the values the user uses in type filters should correspond to these. As an example, if a user does:: CQ(object).faces("%mytype") The expectation is that the
(self)
| 603 | return cls.cast(s) |
| 604 | |
| 605 | def geomType(self) -> Geoms: |
| 606 | """ |
| 607 | Gets the underlying geometry type. |
| 608 | |
| 609 | Implementations can return any values desired, but the values the user |
| 610 | uses in type filters should correspond to these. |
| 611 | |
| 612 | As an example, if a user does:: |
| 613 | |
| 614 | CQ(object).faces("%mytype") |
| 615 | |
| 616 | The expectation is that the geomType attribute will return 'mytype' |
| 617 | |
| 618 | The return values depend on the type of the shape: |
| 619 | |
| 620 | | Vertex: always 'Vertex' |
| 621 | | Edge: LINE, CIRCLE, ELLIPSE, HYPERBOLA, PARABOLA, BEZIER, |
| 622 | | BSPLINE, OFFSET, OTHER |
| 623 | | Face: PLANE, CYLINDER, CONE, SPHERE, TORUS, BEZIER, BSPLINE, |
| 624 | | REVOLUTION, EXTRUSION, OFFSET, OTHER |
| 625 | | Solid: 'Solid' |
| 626 | | Shell: 'Shell' |
| 627 | | Compound: 'Compound' |
| 628 | | Wire: 'Wire' |
| 629 | |
| 630 | :returns: A string according to the geometry type |
| 631 | """ |
| 632 | |
| 633 | tr: Any = geom_LUT[shapetype(self.wrapped)] |
| 634 | |
| 635 | if isinstance(tr, str): |
| 636 | rv = tr |
| 637 | elif tr is BRepAdaptor_Curve: |
| 638 | rv = geom_LUT_EDGE[tr(tcast(TopoDS_Edge, self.wrapped)).GetType()] |
| 639 | else: |
| 640 | rv = geom_LUT_FACE[tr(self.wrapped).GetType()] |
| 641 | |
| 642 | return tcast(Geoms, rv) |
| 643 | |
| 644 | def hashCode(self) -> int: |
| 645 | """ |