示例#1
0
    def toRadFile(self):
        """Return a RadFile like object.

        Use this method to get easy access to radiance geometries and materials for this
        zone. For a full definition as a string use toRadString method.
        """
        return RadFile((srf for srf in self.surfaces))
    def toRadString(self, mode=1, includeMaterials=False, flipped=False, blacked=False):
        """Get full radiance file as a string.

        Args:
            mode: An integer 0-2 (Default: 1)
                0 - Do not include children surfaces.
                1 - Include children surfaces.
                2 - Only children surfaces.
            includeMaterials: Set to False if you only want the geometry definition
             (default:True).
            flipped: Flip the surface geometry.
            blacked: If True materials will all be set to plastic 0 0 0 0 0.
        """
        mode = mode or 1
        return RadFile((self,)).toRadString(mode, includeMaterials, flipped, blacked)
示例#3
0
    def to_rad_string(self,
                      mode=1,
                      include_materials=False,
                      flipped=False,
                      blacked=False):
        """Get surfaces as a RadFile. Use str(to_rad_string) to get the full str.

        Args:
            mode: An integer 0-2 (Default: 1)
                0 - Do not include children surfaces.
                1 - Include children surfaces.
                2 - Only children surfaces.
            include_materials: Set to False if you only want the geometry definition
             (default:True).
            flipped: Flip the surface geometry.
            blacked: If True materials will all be set to plastic 0 0 0 0 0.
        """
        if not self.surfaces:
            return ''
        mode = mode or 1
        return RadFile(self.surfaces).to_rad_string(mode, include_materials,
                                                    flipped, blacked)