Beispiel #1
0
 def draw_solid_entity(self, entity: DXFGraphic) -> None:
     # Handles SOLID, TRACE and 3DFACE
     dxf, dxftype = entity.dxf, entity.dxftype()
     properties = self._resolve_properties(entity)
     points = get_tri_or_quad_points(entity, adjust_order=dxftype != '3DFACE')
     # TRACE is an OCS entity
     if dxftype == 'TRACE' and dxf.hasattr('extrusion'):
         ocs = entity.ocs()
         points = list(ocs.points_to_wcs(points))
     if dxftype == '3DFACE':
         self.out.draw_path(Path.from_vertices(points, close=True), properties)
     else:  # SOLID, TRACE
         self.out.draw_filled_polygon(points, properties)
Beispiel #2
0
 def draw_solid_entity(self, entity: DXFGraphic,
                       properties: Properties) -> None:
     # Handles SOLID, TRACE and 3DFACE
     dxf, dxftype = entity.dxf, entity.dxftype()
     points = get_tri_or_quad_points(entity,
                                     adjust_order=dxftype != '3DFACE')
     # TRACE is an OCS entity
     if dxftype == 'TRACE' and dxf.hasattr('extrusion'):
         ocs = entity.ocs()
         points = list(ocs.points_to_wcs(points))
     if dxftype == '3DFACE':
         self.out.draw_path(from_vertices(points, close=True), properties)
     else:
         # Set default SOLID filling for SOLID and TRACE
         properties.filling = Filling()
         self.out.draw_filled_polygon(points, properties)