Exemplo n.º 1
0
        public static MaterialBuilder GetMaterialBuilder(this IFace2 face)
        {
            if (!face.HasMaterialPropertyValues())
            {
                return(null);
            }

            var materialValue = face.MaterialPropertyValues as double[];

            return(MaterialUtility.MaterialValueToMaterialBuilder(materialValue));
        }
Exemplo n.º 2
0
        public static MaterialBuilder GetMaterialBuilder(this IPartDoc doc)
        {
            var matBuilder = default(MaterialBuilder);
            var mdlDoc     = (IModelDoc2)doc;

            var materialValue = doc.MaterialPropertyValues as double[];

            if (materialValue == null || materialValue.Length < 7)
            {
                matBuilder = MaterialUtility.DefuatMaterial;
            }
            else
            {
                matBuilder = MaterialUtility.MaterialValueToMaterialBuilder(materialValue);
            }

            return(matBuilder);
        }
Exemplo n.º 3
0
        public static MaterialBuilder GetMaterialBuilder(this IBody2 body)
        {
            var materialValue = body.MaterialPropertyValues2 as double[];

            return(MaterialUtility.MaterialValueToMaterialBuilder(materialValue));
        }
        public static MaterialBuilder GetMaterialBuilder(this IComponent2 comp)
        {
            var materialValue = comp.GetModelMaterialPropertyValues("") as double[];

            return(MaterialUtility.MaterialValueToMaterialBuilder(materialValue));
        }