I’m attempting to use IFCStyledItem to show both color and transparency. Colors work in Solibri, but not transparency. In ArchiCAD, both colors and transparency don’t work.
I’ve tried an approached suggested by @jonm of mapping a styled item to an IfcMaterialDefinitionRepresention
. That didn’t work, and in fact caused colors to stop showing up in Solibri.
There is no reason this should be so difficult. I’ve provided a cut down IFC that just creates polygonal mass as an IfcBuildingElementProxy
Finally, please don’t recommend that I change the MVD of the file. None of the IFC test applications that I have seem to care about what MVD is being used. In fact, I’ve got an AllPlan test file linked from another thread that simply puts ‘no view’ there and colors work just fine.
Here’s the shape in ArchiCAD (no color and no transparency):
Here’s the shape in Solibri (color, but no transparency):
Here’s the file:
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(
('ViewDefinition [DesignTransferView_V1.0]'),
'2;1');
FILE_NAME(
'models/Elements_Mass.ifc',
'2020-01-24T18:01:39',
('ikeough'),
('Elements'),
'IFC-dotnet',
'0.1.4.0',
'None');
FILE_SCHEMA (('IFC4'));
ENDSEC;
DATA;
#1 = IFCORGANIZATION($, 'IFC-dotnet', $, $, $);
#2 = IFCAPPLICATION(#1, '0.1.4.0', 'IFC-dotnet', 'IFC-dotnet');
#3 = IFCPOSTALADDRESS(.OFFICE., $, $, $, $, $, $, $, $, $);
#4 = IFCACTORROLE(.ARCHITECT., $, $);
#5 = IFCPERSON('ikeough', $, $, $, $, $, (#4), $);
#6 = IFCORGANIZATION('Elements', 'Elements', $, $, (#3));
#7 = IFCPERSONANDORGANIZATION(#5, #6, $);
#8 = IFCOWNERHISTORY(#7, #2, $, $, $, $, $, 1579918359);
#9 = IFCSIUNIT(*, .LENGTHUNIT., $, .METRE.);
#10 = IFCSIUNIT(*, .AREAUNIT., $, .SQUARE_METRE.);
#11 = IFCSIUNIT(*, .VOLUMEUNIT., $, .CUBIC_METRE.);
#12 = IFCSIUNIT(*, .SOLIDANGLEUNIT., $, .STERADIAN.);
#13 = IFCSIUNIT(*, .MASSUNIT., $, .GRAM.);
#14 = IFCSIUNIT(*, .TIMEUNIT., $, .SECOND.);
#15 = IFCSIUNIT(*, .THERMODYNAMICTEMPERATUREUNIT., $, .DEGREE_CELSIUS.);
#16 = IFCSIUNIT(*, .LUMINOUSINTENSITYUNIT., $, .LUMEN.);
#17 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.);
#18 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017450), #17);
#19 = IFCDIMENSIONALEXPONENTS(0, 0, 0, 0, 0, 0, 0);
#20 = IFCCONVERSIONBASEDUNIT(#19, .PLANEANGLEUNIT., 'DEGREE', #18);
#21 = IFCUNITASSIGNMENT((#9, #10, #11, #12, #13, #14, #15, #16, #17, #20));
#22 = IFCCARTESIANPOINT((0.0, 0.0, 0.0));
#23 = IFCDIRECTION((0.0, 0.0, 1.0));
#24 = IFCDIRECTION((1.0, 0.0, 0.0));
#25 = IFCAXIS2PLACEMENT3D(#22, #23, #24);
#26 = IFCDIRECTION((0.0, 1.0, 0.0));
#27 = IFCGEOMETRICREPRESENTATIONCONTEXT($, 'Model', 3, 0.000010, #25, #26);
#28 = IFCPROJECT('0rbbK2c1TFfBGXkq3k_CBa', #8, 'Elements', 'Elements', $, $, $, (#27), #21);
#29 = IFCSITE('307$HOAJv978fdh6iQQOQD', $, 'Hypar Site', 'The default site generated by Hypar', $, $, $, $, .ELEMENT., (0, 0), (0, 0), 0.0, $, $);
#30 = IFCRELAGGREGATES('3rKKdrAjj6Bg3s8$acnfQP', $, $, $, #28, (#29));
#31 = IFCBUILDING('2T7R4ctJz9ROo8O5BpDdaQ', $, 'Default Building', 'The default building generated by Hypar.', $, $, $, $, .ELEMENT., 0.0, 0.0, $);
#32 = IFCBUILDINGSTOREY('3cDOx1CgX3ve_baTgfFJg7', $, 'Default Storey', 'The default storey generated by Hypar', $, $, $, $, .ELEMENT., 0.0);
#33 = IFCRELAGGREGATES('130uEkaF5BhQV9QXB6OanO', $, $, $, #31, (#32));
#34 = IFCRELAGGREGATES('1rCW0JHU19XguGyc527LNt', $, $, $, #29, (#31));
#35 = IFCCOLOURRGB($, 1.0, 1.0, 1.0);
#36 = IFCMATERIAL('mass', $, 'Hypar');
#37 = IFCCOLOURRGB($, 0.500000, 0.500000, 1.0);
#38 = IFCSURFACESTYLESHADING(#37, 0.800000);
#39 = IFCSURFACESTYLERENDERING(#37, 0.800000, #37, #35, #35, #35, #35, IFCSPECULARROUGHNESS(1.0), .PHONG.);
#40 = IFCSURFACESTYLE('mass', .BOTH., (#38, #39));
#41 = IFCCARTESIANPOINT((0.0, 0.0, 0.0));
#42 = IFCDIRECTION((0.0, 0.0, 1.0));
#43 = IFCDIRECTION((1.0, 0.0, 0.0));
#44 = IFCAXIS2PLACEMENT3D(#41, #42, #43);
#45 = IFCLOCALPLACEMENT($, #44);
#46 = IFCCARTESIANPOINT((0.0, 0.0, 0.0));
#47 = IFCDIRECTION((0.0, 0.0, 1.0));
#48 = IFCDIRECTION((1.0, 0.0, 0.0));
#49 = IFCCARTESIANPOINT((0.0, 0.0, 0.0));
#50 = IFCCARTESIANPOINT((30.0, 10.0, 0.0));
#51 = IFCCARTESIANPOINT((20.0, 50.0, 0.0));
#52 = IFCCARTESIANPOINT((-10.0, 5.0, 0.0));
#53 = IFCPOLYLINE((#49, #50, #51, #52, #49));
#54 = IFCARBITRARYCLOSEDPROFILEDEF(.AREA., $, #53);
#55 = IFCDIRECTION((0.0, 0.0, 1.0));
#56 = IFCAXIS2PLACEMENT3D(#46, #47, #48);
#57 = IFCEXTRUDEDAREASOLID(#54, #56, #55, 5.0);
#58 = IFCSHAPEREPRESENTATION(#27, 'Body', 'SolidModel', (#57));
#59 = IFCPRODUCTDEFINITIONSHAPE($, $, (#58));
#60 = IFCBUILDINGELEMENTPROXY('05dfLk1Br3gBkiL6rr$Syd', $, $, $, $, #45, #59, $, .ELEMENT.);
#61 = IFCSTYLEDITEM(#57, (#40), $);
#62 = IFCRELCONTAINEDINSPATIALSTRUCTURE('18TdxAko18nB7bok_kjT2q', $, $, $, (#60), #32);
ENDSEC;
END-ISO-10303-21;