Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Displaying a 3D annotation using IFC in Revit

9 ANTWORTEN 9
Antworten
Nachricht 1 von 10
Anonymous
1179 Aufrufe, 9 Antworten

Displaying a 3D annotation using IFC in Revit

Hello,

We're developing an MR application (with Microsoft's HoloLens) that allows for adding 3D annotations to an architectural model. These annotations are attached to particular elements in the building (such as walls or doors) and as such, have a specific position within them, as well as informative text. To do this, we are using an IFC file and modifying it using the xBim library. The annotation itself is represented with an instance of the IfcAnnotation class with an IfcShapeRepresentation (IfcBoundingBox) for geometry.

This annotation is correctly represented when opening the IFC file in xBimXplorer. However, when importing the IFC into Revit nothing is visible.

We have little Revit know-how, so there might something we've overlooked. Is the same behavior from xBimXplorer possible in Revit? We have full control over how the annotation is added to the IFC file, so we can change the classes used if necessary. We include the IFC file in question as an attachment.

 

We are using Revit 2019 in Windows 10.

 

Thank you in advance!

 

The annotation correctly represented as a boxThe annotation correctly represented as a box

Tags (1)
9 ANTWORTEN 9
Nachricht 2 von 10
ToanDN
als Antwort auf: Anonymous

Please share an IFC file.
Nachricht 3 von 10
Anonymous
als Antwort auf: ToanDN

Hi,

Terribly sorry, here it is.

 

Thanks,

Carlos

Nachricht 4 von 10
Viveka_CD
als Antwort auf: Anonymous

Hi @Anonymous 

 

I see that you are a new visitor. Welcome to the Autodesk community!

 

It is interesting to note that your team is developing an MR application (with Microsoft's HoloLens) that allows for adding 3D annotations to an architectural model. I have seen annotation applications for 3d models in VRML web browsers like Cortona back in the early 2000's. It is good to note progress in this regard.

 

Coming back to your question, what is the IFC schema in XBim are using to establish this functionality?  You mentioned that the IFC file is  not visible in Revit 2019, can you confirm if you are using the latest exporter 

and also on the latest updates for Revit 2019

 

Thanks for the IFC file, Can you also share a journal recording the export in Revit?

 

Looking forward to hearing from you!

 

Thanks,

Nachricht 5 von 10
Viveka_CD
als Antwort auf: Anonymous

@Anonymous 

 

Tested this in Revit 2019, the annotation box is missing.

 

missing blue box annotation.JPG

 

What is the native software that you've used to extract the IFC?

 

Regards,

 

Nachricht 6 von 10
Anonymous
als Antwort auf: Viveka_CD

Hi @Viveka_CD,

 

Thank you for your reply. We are using IFC 2x3 and we obtained the IFC file using Revit itself. We are currently using version 19.0.1.1, but I've contacted our systems' administrator to update the version, as soon as possible. As I mentioned, we do not have a lot of Revit expertise, how could we obtain the journal recording you mentioned?

 

Thanks again,

Carlos

Nachricht 7 von 10
Viveka_CD
als Antwort auf: Anonymous

Hi @Anonymous 

 

Please see how to extract a journal and a screencast to describe what you are experiencing

Also, see: Revit - Collecting and sending diagnostic data to Autodesk Technical Support

 

As for the next steps, once we have your files, I will continue to make progress on your case.

 

Thanks,

 

Nachricht 8 von 10
ToanDN
als Antwort auf: Anonymous


@Anonymous wrote:

Hi @Viveka_CD,

 

Thank you for your reply. We are using IFC 2x3 and we obtained the IFC file using Revit itself. We are currently using version 19.0.1.1, but I've contacted our systems' administrator to update the version, as soon as possible. As I mentioned, we do not have a lot of Revit expertise, how could we obtain the journal recording you mentioned?

 

Thanks again,

Carlos


The question really is how did you create the 3d annotation and how did you place it in the IFC file?

Nachricht 9 von 10
Anonymous
als Antwort auf: ToanDN

Hi @ToanDN,

 

As I mentioned in the original question, we wrote a C# application using the xBim Library for adding the annotation.

We pieced together the code by rummaging through the xBim examples, as well as the buildingSmart pages.

I include function in that does the actual annotating for completeness:

static void AddAnnotation(IfcStore model, string objectGuid, string name, string description, double x, double y, double z)
{
	double boxSize = 0.2;

	var element = model.Instances.FirstOrDefault<IfcElement>(d => d.GlobalId == objectGuid);

	using (var txn = model.BeginTransaction("Add Annotation " + name))
	{
		// Place the annotation relative to selected object
		var pPlacement = model.Instances.New<IfcLocalPlacement>(pPlace =>
		{
			pPlace.PlacementRelTo = element.ObjectPlacement;

			var placement = model.Instances.New<IfcAxis2Placement3D>();

			pPlace.RelativePlacement = placement;

			placement.Location = model.Instances.New<IfcCartesianPoint>(p => p.SetXYZ(x, y, z));
		});

		// model as box
		var body = model.Instances.New<IfcBoundingBox>();
		body.Corner = model.Instances.New<IfcCartesianPoint>(p => p.SetXYZ(-0.5 * boxSize, -0.5 * boxSize, -0.5 * boxSize));

		var dim = new IfcPositiveLengthMeasure(boxSize);

		body.XDim = dim;
		body.YDim = dim;
		body.ZDim = dim;

		// Create a Definition shape to hold the geometry
		var shape = model.Instances.New<IfcShapeRepresentation>();
		var modelContext = model.Instances.OfType<IfcGeometricRepresentationContext>().FirstOrDefault();
		shape.ContextOfItems = modelContext;
		shape.RepresentationType = "BoundingBox";
		shape.RepresentationIdentifier = "Body";
		shape.Items.Add(body);

		// Create a Product Definition and add the model geometry to the object
		var rep = model.Instances.New<IfcProductDefinitionShape>();
		rep.Representations.Add(shape);

		var pAnnotation = model.Instances.New<IfcAnnotation>(r =>
		{
			r.GlobalId = IfcGloballyUniqueId.FromGuid(Guid.NewGuid());

			r.Name = name;
			r.Description = description;

			r.ObjectPlacement = pPlacement;
		});

		pAnnotation.Representation = rep;

		element.ContainedInStructure.First().RelatedElements.Add(pAnnotation);

		// Commit changes
		txn.Commit();
	}
}

@Viveka_CD, I also include the journal files when exporting the IFC from our RVT file.

 

Best Regards,

Carlos

 

 

Nachricht 10 von 10
Viveka_CD
als Antwort auf: Anonymous

@Anonymous  Awesome thanks for sending the journals.

 

Let me get some feedback from the IFC folks.

 

Thanks,

 

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report