def solid(self): from ada.occ.utils import apply_penetrations geom = apply_penetrations(self._poly.make_extruded_solid(self.t), self.penetrations) return geom
def geom(self) -> TopoDS_Shape: from ada.occ.utils import apply_penetrations from .exceptions import NoGeomPassedToShapeError if self._geom is None: from ada.ifc.read.read_shapes import get_ifc_geometry if self._ifc_elem is not None: ifc_elem = self._ifc_elem elif "ifc_file" in self.metadata.keys(): a = self.parent.get_assembly() ifc_file = self.metadata["ifc_file"] ifc_f = a.get_ifc_source_by_name(ifc_file) ifc_elem = ifc_f.by_guid(self.guid) else: raise NoGeomPassedToShapeError(f'No geometry information attached to shape "{self}"') geom, color, alpha = get_ifc_geometry(ifc_elem, self.ifc_settings) self._geom = geom self.colour = color self.opacity = alpha geom = apply_penetrations(self._geom, self.penetrations) return geom
def solid(self) -> TopoDS_Shape: from ada.occ.utils import apply_penetrations, create_beam_geom geom = apply_penetrations(create_beam_geom(self, True), self.penetrations) return geom
def solid(self): from ada.occ.utils import apply_penetrations poly = CurvePoly(points3d=self.extrusion_area, parent=self) geom = apply_penetrations(poly.make_extruded_solid(self.height), self.penetrations) return geom
def solid(self): from ada.fem.shapes import ElemType from ada.occ.utils import apply_penetrations, sweep_pipe raw_geom = sweep_pipe(self.line, self.xvec1, self.section.r, self.section.wt, ElemType.SOLID) geom = apply_penetrations(raw_geom, self.penetrations) return geom
def geom(self): from ada.occ.utils import apply_penetrations if self._geom is None: from ada.occ.utils import make_sphere self._geom = make_sphere(self.cog, self.radius) geom = apply_penetrations(self._geom, self.penetrations) return geom
def solid(self): from ada.fem.shapes import ElemType from ada.occ.utils import apply_penetrations, sweep_pipe i = self.parent.segments.index(self) if i != 0: pseg = self.parent.segments[i - 1] xvec = pseg.xvec1 else: xvec = self.xvec1 raw_geom = sweep_pipe(self.line, xvec, self.section.r, self.section.wt, ElemType.SOLID) geom = apply_penetrations(raw_geom, self.penetrations) return geom
def shell(self): from ada.occ.utils import apply_penetrations geom = apply_penetrations(self.poly.face, self.penetrations) return geom