XbimGeometry
XbimGeometry copied to clipboard
No display of pure lines like IFCPOLYLINE
I am using XBM Geometry V 5.1.328 Sometimes we get models with pure line data, represented by IFCPOLYLINEs. Many Viewers display that, but XBIM unfortunately doesn't, neither the XbimXplorer nor our programmatic conversion to Wexbim for display in the web viewer. Is there an elegant way to do this?
We currently only use actual 3D geometry for visualisation. But it wouldn't be hard to present polylines. What kind of representation would you expect to see? Do you have any example?
Hi Martin,
I was wondering this myself regarding annotations on the plan. Not so much the text but polylines associated with them.
Normally these are used for things like dimensions etc. We are using them to help identify parts of the plan.
Looking at Xbim3dModelContext.ShapeGeometries() and ShapeInstances() it looks like only meshes are represented here?
Is there any way to get the 3d positions of these lines? I'm happy to visualise them myself.
Many thanks Andrew
Actually truth be told if we're talking about wishes, I'd also wish to get the "axis" representation polyline for walls etc. translated into the same space as the triangulated objects.
Oh wait, Can I just apply the wall's ShapeInstance.Transformation to it's "axis" representation points to get them into the correct space?
That would be super exciting! Andrew
When you say polyline, you presumably mean Annotation or Footprint representations rather than Axis as Axis is only for
2D or 3D Axis, or single line, representation of an element (see here)
ShapeInstance.Transformation
is what you need but there will be no ShapeInstance.Transformation
as we only process 3D as I said before. But you can reuse the code in Xbim3DModelContext
. You would need to consider both placement and map transformations.
Also, you will likely need to tessellate the curve if it is not just a simple polyline. You can use XbimGeometryEngine.CreateCurve()
to get IXbimCurve
and then use OCC to tessellate it.
Thanks Martin. Yes I actually have two different unrelated concerns here which may have confused things a little.
-
the footprint of an ifcAnnotation to get a polyline that's been added by the architects to identify a particular boundary that we need on the plan
-
the axis of a wall or slab because the IFCMaterialLayerSet makes use of the axis (and an offset from the axis) to apply material. If I have this, then I can manually apply the materials to the triangulated geometry that Xbim returns in the shapeInstance.
Thanks for the info. I've been working through code in the Xbim3DModelContext. I'm getting more confident, and it's beautifully written. But it's still tough to get my head around. :)
Andrew