Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested IFC Entity to save a Profile Type #3

Open
theoryshaw opened this issue Feb 10, 2016 · 21 comments
Open

Suggested IFC Entity to save a Profile Type #3

theoryshaw opened this issue Feb 10, 2016 · 21 comments

Comments

@theoryshaw
Copy link
Collaborator

Could anyone suggest an IFC Entity (or Schema approach) that could save 'Profile Types'?

For example, I would like to export this Profile Family, which is used in a sweep within this Revit File, to a particular IFC Entity by which I could later use to reconstitute the same Profile Family upon import to Revit. (at this point, please disregard that this is currently not possible in Revit)

Something like a typed IFCARBITRARYPROFILEDEFWITHVOIDS Entity?

If one doesn't exist, could anyone suggest a tweak to the current schema that could accommodate it?

@jmirtsch
Copy link

Hi Ryan,

Your question isn't quite clear to me, perhaps you can clarify? I opened your Revit family. To me the Ifc Class most appropriate for an extruded profile with multiple elements is and IfcCompositeProfileDef. This would be comprised of multiple IfcArbitraryClosedProfileDef

http://www.buildingsmart-tech.org/ifc/IFC4/Add1/html/link/ifccompositeprofiledef.htm

Cheers,

Jon

@theoryshaw
Copy link
Collaborator Author

Sorry...

Let's say you have this test file with 3 sweeps composed from this Profile Family (Illustrated below)

image

How would you structure the exported IFC file in such a way where you could import this IFC file back into Revit and recreate the same Profile Family? (or generically speaking, how would you structure the exported IFC file in such a way where other BIM platforms (including yours) could read this newly structured IFC file, and recreate their equivalent of a Profile Family)

As a hypothetical, let's say after import back into Revit, you changed the Profile Family definition, and the following 3 sweeps updated.

image

As a side question, since you are familiar with the IFC for Revit component. How involved do you think it would be to tweak the code to allow this import/export functionality?

@yorikvanhavre might be interested in this, as well, to potentially recreate FreeCad's equivalent of the Profile Family.

@yorikvanhavre
Copy link

If I understand well you want to share the same profile definition between the different extruded objects, in other words, it is the profile that is shared, not the final product. By looking at the IfcProfileDef which is the parent class of all profiles, it seems it cannot share a representation like IfcProducts... Maybe there is a way to use the new library stuff in IFC4? Not sure it is designed for that purpose...

Another way could be to add a custom property (something like: "This object is sharing profile of object XXX"), but it's pretty unorthodox :)

In any case sharing a profile in freecad is possible already. We must just find an IFC way to convey that...

shared-profile

@theoryshaw
Copy link
Collaborator Author

Exactly! Taking your example, I'd like to, via an IFC file exported out of FreeCad, be able to recreate, upon import into Revit, your DWire Clone as a Revit Profile Family.

And vise versa, be able to export out an IFC file from Revit whereby you could reconstitute, upon import, your Clone Profiles in FreeCad (or GeometryGym/Rhino)

Yes, the question is what's the best way to tweak the schema to accommodate this, you think?

@yorikvanhavre
Copy link

Ah but I think it works like this: There is only one profile definition. All 3 elements constructed on it reference the same profile. Now the matter is if the revit profile family is translated as an IfcProfileDef. In freecad it is not, but I will change that http://freecadweb.org/tracker/view.php?id=2448

@yorikvanhavre
Copy link

Clarifying a bit the above comment, the ifc file must contain:

  • One IfcProfileDef
  • Three ExtrudedAreaSolid (or any other similar), each one using the same above IfcProfileDef as SweptArea

@theoryshaw
Copy link
Collaborator Author

Exactly.

Something like IfcProfileDefType, if it existed?

@jmirtsch
Copy link

160212 gg polycarbonate aluminum extrusion ifc4

Ifc has types in a manner similar to revit. I've attached how I would define this using IfcMember classification.

ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [notYetAssigned]'),'2;1');
FILE_NAME(
/* name / 'C:\My Work\Geometry Gym\documents\commercial\t\theoryshaw\160212 gg Polycarbonate Aluminum Extrusion ifc4.ifc',
/
time_stamp / '2016-02-12T08:31:57',
/
author / ('jonm'),
/
organization / ('Unknown'),
/
preprocessor_version / 'GeomGymIFC by Geometry Gym Pty Ltd',
/
originating_system / 'Unknown Application',
/
authorization */ 'None');

FILE_SCHEMA (('IFC4'));
ENDSEC;

DATA;
#1= IFCPERSONANDORGANIZATION(#2,#3,$);
#2= IFCPERSON('jonm','jonm',$,$,$,$,$,$);
#3= IFCORGANIZATION($,'Geometry Gym',$,$,$);
#4= IFCAPPLICATION(#5,'1.4.1.0','ggGrasshopperIFC - Geometry Gym Plug-in for Grasshopper3d','ggGrasshopperIFC');
#5= IFCORGANIZATION($,'Geometry Gym Pty Ltd',$,$,$);
#6= IFCOWNERHISTORY(#1,#4,$,.ADDED.,1455265658,$,$,1455265658);
#7= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,0.001,#9,$);
#8= IFCCARTESIANPOINT((0.0,0.0,0.0));
#9= IFCAXIS2PLACEMENT3D(#82,#83,#84);
#10= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',,,,,#7,$,.MODEL_VIEW.,$);
#11= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',,,,,#7,$,.MODEL_VIEW.,$);
#12= IFCCARTESIANPOINT((0.0,0.0,0.0));
#13= IFCDIRECTION((1.0,0.0,0.0));
#14= IFCDIRECTION((0.0,1.0,0.0));
#15= IFCDIRECTION((0.0,0.0,1.0));
#16= IFCCARTESIANPOINT((0.0,0.0));
#17= IFCAXIS2PLACEMENT2D(#16,$);
#18= IFCSIUNIT(,.LENGTHUNIT.,$,.METRE.);
#19= IFCSIUNIT(
,.AREAUNIT.,$,.SQUARE_METRE.);
#20= IFCSIUNIT(,.VOLUMEUNIT.,$,.CUBIC_METRE.);
#21= IFCCARTESIANPOINTLIST2D(((-0.0396825396819621,0.618580765637489),(-0.039682539681962,2.30859010270706),(0.140056022410136,2.30859010270706),(0.140056022410136,2.3891253242009),(0.08870214752551,2.44047463429641),(0.0887021475255098,2.36928104575054),(0.0303454715231065,2.36928104575054),(-0.00878131484660105,2.43705062767982),(-0.00878131484660105,2.52687027465618),(0.0260778088741703,2.60162590671826),(0.0887021475255101,2.60162590671826),(0.0887021475255103,2.5215777367857),(0.140056022410135,2.53034547152217),(0.140056022410135,2.72875816993474),(-0.140056022410136,2.70519734373556),(-0.140056022410136,0.247432306253358),(0.0,0.247432306253358),(0.0,0.0),(0.0793650793639244,0.0),(0.0793650793639244,0.247432306256087),(0.508870214753188,0.247432306256087),(0.508870214753188,-0.0000000000000004),(0.588235294117112,-0.0000000000000004),(0.588235294117112,0.247432306256087),(1.81139122315653,0.247432306256087),(1.81139122315653,0.0),(1.89075630252046,0.0),(1.89075630252046,0.247432306253358),(2.22922502334313,0.247432306253358),(2.22922502334313,0.301120448179063),(2.19654528478132,0.322128851540456),(2.15919701213632,0.296451914096906),(1.89075630252319,0.296451914096906),(1.83940242763856,0.347805788981531),(1.69234360410792,0.347805788981531),(1.69234360410792,0.557889822594006),(2.22222222222263,0.557889822594006),(2.22222222222263,0.618580765637489),(1.61297852474399,0.618580765637489),(1.61297852474399,0.347805788981531),(0.592903828199269,0.347805788981531),(0.592903828199269,0.618580765637489),(-0.0396825396819621,0.618580765637489)));
#22= IFCINDEXEDPOLYCURVE(#21,$,$);
#23= IFCCARTESIANPOINTLIST2D(((-0.0163398692820919,0.33146591969944),(-0.0163398692820919,0.557889822594006),(0.508870214753188,0.557889822594006),(0.508870214753188,0.33146591969944),(-0.0163398692820919,0.33146591969944)));
#24= IFCINDEXEDPOLYCURVE(#23,$,$);
#25= IFCARBITRARYPROFILEDEFWITHVOIDS(.AREA.,'extrusion',#22,(#24));
#26= IFCCARTESIANPOINTLIST2D(((0.271602079153127,2.30859010270706),(0.271602079153127,2.88546486141785),(-0.120470339025815,2.79811193923338),(-0.120470339025815,2.7153790672537),(0.152136551915646,2.73830861882743),(0.152136551915646,2.52412358855779),(0.0764022175735595,2.51119333635233),(0.0764022175735596,2.59143992441841),(0.0360735190579364,2.59143992441841),(0.00300085808430611,2.52051537408079),(0.00300085808430584,2.43861385892982),(0.0368767776108149,2.37993904515679),(0.0797581511551471,2.37993904515679),(0.0797581511551467,2.46869448569578),(0.152136551915646,2.39631608493528),(0.152136551915646,2.30859010270706),(0.271602079153127,2.30859010270706)));
#27= IFCINDEXEDPOLYCURVE(#26,$,$);
#28= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'extrusion',#27);
#29= IFCCARTESIANPOINTLIST2D(((2.29646213976321,2.78322775201923),(2.29646213976321,2.82411803257128),(1.84640522875907,2.94413320883905),(1.84640522875907,2.48721931016328),(2.08629812078004,2.28057889822503),(2.13375103212366,2.28057889822503),(2.13375103212366,2.45889134620666),(2.19446114506796,2.62483232158774),(2.13375103212366,2.63495067374603),(2.13375103212365,2.78322775201923),(2.29646213976321,2.78322775201923)));
#30= IFCINDEXEDPOLYCURVE(#29,$,$);
#31= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'extrusion',#30);
#32= IFCCARTESIANPOINTLIST2D(((2.14752567693813,0.376464232588849),(2.11368790849808,0.357699346406345),(2.11174914555598,0.320302935019589),(2.14090485444632,0.300865795759021),(2.18079960807842,0.326797385620011),(2.23622782446364,0.326797385620011),(2.23622782446364,0.235760971053424),(2.35994397759168,0.235760971053424),(2.35994397759168,2.7754435107372),(2.14519140989705,2.7754435107372),(2.14519140989705,2.65172735760916),(2.21521942110209,2.64005602240916),(2.14519140989705,2.44864612511528),(2.14519140989705,2.28057889822503),(2.23622782446364,2.28057889822503),(2.23622782446364,0.527544351073629),(1.75770308123356,0.527544351073629),(1.75770308123356,0.473522742428965),(2.14752567693813,0.417833800186599),(2.14752567693813,0.376464232588849)));
#33= IFCINDEXEDPOLYCURVE(#32,$,$);
#34= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'extrusion',#33);
#35= IFCCOMPOSITEPROFILEDEF(.AREA.,'Polycarbonate Aluminum Extrusion',(#25,#28,#31,#34),$);
#36= IFCMATERIAL('Aluminum',$,$);
#38= IFCCARTESIANPOINT((0.0,0.0));
#40= IFCMATERIALPROFILE('Polycarbonate Aluminum Extrusion',$,#36,#35,0.0,$);
#42= IFCMATERIALPROFILESET('Polycarbonate Aluminum Extrusion',$,(#40),$);
#43= IFCRELASSOCIATESMATERIAL('2piH1ZRg94I929vJgFp6vw',#6,'MatAssoc','Material Associates',(#44),#42);
#44= IFCMEMBERTYPE('2HgJYtclb9lhu9TlhvRSvf',#6,'Polycarbonate Aluminum Extrusion',$,$,$,$,$,$,.MULLION.);
#45= IFCRELDEFINESBYTYPE('3A3RVNWgTCcwWP4P8GCbOP',#6,$,$,(#50,#62,#72),#44);
#46= IFCBUILDING('3bwUbIE5nC5uGWiuhHfAhQ',#6,'Grasshopper Building','GH Building',$,$,$,'GH Building',.ELEMENT.,$,$,$);
#47= IFCRELCONTAINEDINSPATIALSTRUCTURE('3rwynj3nL1Nev6jSgLHZsS',#6,'Building','Building Container for Elements',(#50,#62,#72),#46);
#48= IFCAXIS2PLACEMENT3D(#143,$,$);
#50= IFCMEMBERSTANDARDCASE('1RH0C6sAzAd8FgHdqkZbPP',#6,$,$,$,#51,#61,$,$);
#51= IFCLOCALPLACEMENT($,#52);
#52= IFCAXIS2PLACEMENT3D(#53,#13,#14);
#53= IFCCARTESIANPOINT((0.0,-0.140056022410309,0.0));
#54= IFCCARTESIANPOINT((0.0,0.0,144.0));
#55= IFCPOLYLINE((#12,#54));
#56= IFCSHAPEREPRESENTATION(#11,'Axis','Curve3D',(#55));
#57= IFCMATERIALPROFILESETUSAGE(#42,5,$);
#58= IFCRELASSOCIATESMATERIAL('0IkDoB_FvBTf$nJktQs2Oj',#6,'MatAssoc','Material Associates',(#50,#62,#72),#57);
#59= IFCEXTRUDEDAREASOLID(#35,$,#15,144.0);
#60= IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#59));
#61= IFCPRODUCTDEFINITIONSHAPE($,$,(#56,#60));
#62= IFCMEMBERSTANDARDCASE('1LuNRfpEP7iucWEvxp$dZy',#6,$,$,$,#63,#71,$,$);
#63= IFCLOCALPLACEMENT($,#64);
#64= IFCAXIS2PLACEMENT3D(#65,#13,#14);
#65= IFCCARTESIANPOINT((-3.36464758633275,12.4169797193476,0.0));
#66= IFCCARTESIANPOINT((0.0,0.0,144.0));
#67= IFCPOLYLINE((#12,#66));
#68= IFCSHAPEREPRESENTATION(#11,'Axis','Curve3D',(#67));
#69= IFCEXTRUDEDAREASOLID(#35,$,#15,144.0);
#70= IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#69));
#71= IFCPRODUCTDEFINITIONSHAPE($,$,(#68,#70));
#72= IFCMEMBERSTANDARDCASE('12vOggMHL3rvLC0K8SbT0w',#6,$,$,$,#73,#81,$,$);
#73= IFCLOCALPLACEMENT($,#74);
#74= IFCAXIS2PLACEMENT3D(#75,#13,#14);
#75= IFCCARTESIANPOINT((-5.43519994715291,20.1443863296601,0.0));
#76= IFCCARTESIANPOINT((0.0,0.0,144.0));
#77= IFCPOLYLINE((#12,#76));
#78= IFCSHAPEREPRESENTATION(#11,'Axis','Curve3D',(#77));
#79= IFCEXTRUDEDAREASOLID(#35,$,#15,144.0);
#80= IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#79));
#81= IFCPRODUCTDEFINITIONSHAPE($,$,(#78,#80));
#82= IFCCARTESIANPOINT((0.0,0.0,0.0));
#83= IFCDIRECTION((0.0,0.0,1.0));
#84= IFCDIRECTION((1.0,0.0,0.0));
#85= IFCPROJECT('2jkeDvAfX1MubsDm_uEZg6',#6,'Grasshopper Project',$,$,'',$,(#7),#86);
#86= IFCUNITASSIGNMENT((#88,#19,#20,#90,#91));
#87= IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(0.0254),#18);
#88= IFCCONVERSIONBASEDUNIT(#89,.LENGTHUNIT.,'Inches',#87);
#89= IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);
#90= IFCSIUNIT(
,.PLANEANGLEUNIT.,$,.RADIAN.);
#91= IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.);
#92= IFCRELAGGREGATES('2jwi2WwZf6nALO6G63KPLj',#6,'Project Container','Project Container for Buildings',#85,(#46));
#134= IFCMATERIALPROFILESET('Polycarbonate Aluminum Extrusion',$,(#132),$);
#136= IFCMEMBERTYPE('06jEwwWBf84wJmVLuBmpKg',#6,'Polycarbonate Aluminum Extrusion',$,$,$,$,$,$,.MULLION.);
#137= IFCMATERIALPROFILESET('composite extrusion',$,(#135),$);
#140= IFCRELDECLARES('3gycjPxKPBhfWyUnmFfIjZ',#6,$,$,#146,(#136));
#143= IFCCARTESIANPOINT((0.0,0.0,0.0));
#150= IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);
#155= IFCLOCALPLACEMENT($,#156);
#156= IFCLOCALPLACEMENT($,#157);
#161= IFCAXIS2PLACEMENT3D(#143,$,$);
#162= IFCMATERIALPROFILESET('Polycarbonate Aluminum Extrusion',$,(#157),$);
#165= IFCLOCALPLACEMENT($,#166);
#167= IFCLOCALPLACEMENT($,#168);
#169= IFCLOCALPLACEMENT($,#170);
#172= IFCLOCALPLACEMENT($,#173);
#175= IFCLOCALPLACEMENT($,#176);
#180= IFCLOCALPLACEMENT($,#181);
#187= IFCLOCALPLACEMENT($,#188);
ENDSEC;

END-ISO-10303-21;

@theoryshaw
Copy link
Collaborator Author

Very cool!

Seems promising.

< Studying >

@theoryshaw
Copy link
Collaborator Author

@yorikvanhavre what's your thoughts?

@yorikvanhavre
Copy link

Yes, that's exactly what I thought as well, thanks @jmirtsch! That's a perfect file for testing...

@theoryshaw
Copy link
Collaborator Author

Just an FYI. Using the open source Revit IFC exporter (v.15.6.0) and IFC4 Design Transfer MVD setting resulted in this file.

Unfortunately, as you see under IFCRELDECLARES, (3) separate profiles are created...

ggifctreeviewer_2016-02-13_07-49-07

@jmirtsch
Copy link

Yes, well there is lots of improvements that can be made to the revit exporter. You can see it generates three mapped items that each refer to an equivalent Representation Map (like a block). To me this makes the mapped item redundant and a higher quaility Ifc file would have a swept solid representation. It also generates 3 building element proxy types (that differ only because a common representation map isn't used) and as you observe, it redefines the same profile for the extrusion multiple times.

This redundancy soon adds up on a project model, and means ifc files are larger than they need to be and inefficient. I'm not sure if you used a line based generic model whether any of these aspects are improved.

You can see by the ifc line count (acknowledging my file doesn't have property sets included). My file is 200 lines, the revit one is over 1000. This ratio only gets more and more exaggerated as you add more elements.

I am working on my own enhancer that adjusts the revit generated file with these issues and more, but I'm not sure the time frame that this will be available.

@theoryshaw
Copy link
Collaborator Author

Hi @jmirtsch On your side of things, can you (or would it be relatively easy to) recreate an intelligent Graph upon import of this IFC file into GG? Intelligent, meaning, retaining the profile definition.

@theoryshaw
Copy link
Collaborator Author

Thanks @jmirtsch for the ping, here's a further breakdown to clarify...

  • start with your gg file of the (3) profile extrusions.
  • you exported out to an IFC
  • Is it possible to import this IFC file back into GG and recreate your visual graphs (or to a degree)?

Basically asking if you can recreate the GG file you started by importing that IFC file?

Just curious to understand how much intelligence you would loose upon a roundtrip, if any.

Thanks Much, Ryan

@yorikvanhavre
Copy link

In FreeCAD this is now implemented the way @jmirtsch showed above. When exporting extruded objects (Walls, structures or basic Part extrusions) that share a same profile object, that is saved that way in IFC:

...
 #34=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,$,#33);
...
#39=IFCEXTRUDEDAREASOLID(#34,#38,#36,2.);
#48=IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#39));
#49=IFCPRODUCTDEFINITIONSHAPE($,$,(#48));
#50=IFCCOLUMN('0TXgOyYYWHwA4c093rt3ko',#5,'Structure','',$,#47,#49,$,$);
...
#55=IFCEXTRUDEDAREASOLID(#34,#54,#36,2.);
#57=IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#55));
#58=IFCPRODUCTDEFINITIONSHAPE($,$,(#57));
#59=IFCCOLUMN('0TYAEwYYWHwA4c093rt3ko',#5,'Structure001','',$,#47,#58,$,$);

Both columns have their own extrusion object (so they can have different lengths) but use the same IFCARBITRARYCLOSEDPROFILEDEF (or any other *ProfileDef as needed). On import, FreeCAD also recreates the columns using the same profile object.

@yorikvanhavre
Copy link

yorikvanhavre commented Jul 20, 2018

screenshot from 2018-07-20 18-45-37
The IFC file referenced above (remove .txt extension, it's a fake one to be able to upload here):
2 beams with same profile from freecad.ifc.txt

@theoryshaw
Copy link
Collaborator Author

This is fun one--exploring mirroring and rotating of the profile...
OpeningDesign/FreeMVD_WorkFlow@3b1afd6

@theoryshaw
Copy link
Collaborator Author

@luzpaz
Copy link

luzpaz commented Mar 3, 2023

Any traction on this ?

@Moult
Copy link

Moult commented Mar 3, 2023

I think its clear how this is handled in IFC (I.e. shared profile def). I'd also say from experience in a native IFC environment that shared / managed profiles must be named to differentiate them from random bespoke profiles (e.g.slabs, wall footprints, etc). Otherwise in a "profile manager" you end up with hundreds of profiles.

The only remaining issue is that naturally revit isn't really playing by these rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants