Replies: 12 comments 8 replies
-
I would copy the contexts from: Annex E.2.1 - Fixed Reference Swept Area Solid
So concretely for the example I would suggest:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @aothms. Following your advice and trying to implement as I understand the CTs for Alignment Geometry, I've updated the example. I'm trying to generate geometry that can be viewed in Blender from an OBJ file. Using the commands for IfcConvert from our other discussion, I was getting error that 3D wasn't correct (don't recall exact error message). With the new model, I get a bit more progress but a crash in IfcConvert. Here is the command line I'm using along with the console output (using PowerShell console)
The call stack is
Is the problem my model or something with IfcConvert? |
Beta Was this translation helpful? Give feedback.
-
I ran that example file, which I think conforms to the requirements of the specification and concept templates, through the validation service. The schema syntax check fails on IfcShapeModel.WR11 because there is more than one product representation. https://validate.buildingsmart.org/report_syntax_schema/WGktvLuRPdnEfqOzhzDsvumtpWaQkqfJ Also see buildingSMART/IFC4.3.x-development#742. Is my model all messed up? What am I not understanding? |
Beta Was this translation helpful? Give feedback.
-
I kept tweaking the example until I got it to pass the bSI validation service. Here is the updated file. It still crashes IfcConvert. It looks to me like there is a disconnection between some of the validation rules and the concept template documentation. At one point, I got the schema rules to pass, but then violation of the GEM003 rule when trying to satisfy the requirements of both Alignment Geometry - Horizontal and Alignment Geometry - Horizontal and Vertical. This may be of interest to you since you are working on the validation service (I think). You probably have access to the files I used and the validation outcome. If not, I can get them for you. Perhaps only one concept template can be applied at a time? As far as I can see, the documentation is silent on this. |
Beta Was this translation helpful? Give feedback.
-
In my case I get an infinite recursion due to this line:
With just that changed to
.. I get some output, so that's really exciting and promising! I guess this come from the following: auto local_placement = site->ObjectPlacement();
if (!local_placement) {
local_placement = file.addLocalPlacement();
}
...
auto alignment = new Schema::IfcAlignment(IfcParse::IfcGlobalId(), nullptr, std::string("Example Alignment"), boost::none, boost::none, local_placement, alignment_product, boost::none);
...
file.relatePlacements(site, alignment); You directly assign the site placement to the alignment and then ask for them to be related, which apparently creates this. We should probably do a check in IfcHierarchyHelper::relatePlacements that |
Beta Was this translation helpful? Give feedback.
-
@aothms The IFC I was generating for the IfcAlignment example was somehow incorrect. When I open the file in other viewers like RDFs IfcViewer or ODAs Open IFC Viewer, the alignment geometry was a complete mess. After days of trial and error, I finally get something reasonable. From there, I had to update the internals of IfcCurveSegment to get the geometry to come out right from IFCOS (I was previously computing geometry based on my flawed understanding of IFC). So, I'm back to trying to use IfcConvert to get something I can open in Blender. I get the same errors as before (error with vector iterator) with this command and attached file. No geometry is output in an OBJ file. Actually, there is not an OBJ file.
FHWA_Bridge_Geometry_Alignment_Example.ifc.txt I get the same error for other files I generate and from the linear-placement-of-signal.ifc example from the IFC documentation. I'm using IfcConvert from the debug build on the v0.8.0 branch. Any suggestions? My goal is to be able to export IFC for alignment and bridge model from my software (PGSuper) and be able to open it in BlenderBIM. At first for just viewing and later for editing and manipulating. Am I even close to being on the right track? |
Beta Was this translation helpful? Give feedback.
-
I'm happy to see the geometry in Blender. That alone fortifies my motivation to keep going. |
Beta Was this translation helpful? Give feedback.
-
I apologize that my python is a little rusty. After I get a build, what do I need to copy into F:\IfcOpenShell_deps-vs2022-x64-installed\Python34\Lib\site-packages in order to use IFCOS from python? Or maybe a more fundamental question - if I had IFCOS v0.8 set up correctly for python, are the C++ bindings automatically generated so I can call the alignment geometry features from python? |
Beta Was this translation helpful? Give feedback.
-
@aothms Not sure if then changes you recently made are the culprit, but I'm now getting build errors for the msvc Debug configuration
|
Beta Was this translation helpful? Give feedback.
-
Also having trouble getting IFCOS working with python. I build the RelWithDebugInfo configuration and ran the install script. Here is what I get Any ideas? |
Beta Was this translation helpful? Give feedback.
-
@aothms sorry to bother you - I'm close, but still can't get a python version of the v0.8.0 running. When I run
I tried to
Any ideas? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I recently added an IfcAlignment project to the IFCOS Examples. I don't think I'm modeling the representation contexts correctly.
@aothms or others please review and advise.
Beta Was this translation helpful? Give feedback.
All reactions