How to share geometry?

How to share geometry?

Anonymous
Not applicable
761 Views
4 Replies
Message 1 of 5

How to share geometry?

Anonymous
Not applicable

Hi,

     I want to export model data to 3rd party rendering engine.As far as know,useing Element.get_Geometry() can get the

3d representation of the element,and if the element is familyinstance,using FamilyInstance.GetOriginalGeometry() can get the original geometry of the instance.And there is a method,FamilyInstance.GetTransform() can get the transform of family instance.But,if I follow this workflow,there will be one (or a group of)geometry for each element,even if some of them are using the same geometry.

     So,my question is,how to share geometry,so that I can call Element.Geometry() only once for those elements that using same 3d representation(or  Famliy Symbol)?

0 Likes
Accepted solutions (2)
762 Views
4 Replies
Replies (4)
Message 2 of 5

Revitalizer
Advisor
Advisor

Hi,

 

there is a static ExporterIFCUtils.UsesInstanceGeometry(FamilyInstance familyInstance) method.

(See RevitAPI.chm for details.)

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 5

Anonymous
Not applicable

Thank for your reply.That's very usefull.


@Revitalizerwrote:

Hi,

 

there is a static ExporterIFCUtils.UsesInstanceGeometry(FamilyInstance familyInstance) method.

(See RevitAPI.chm for details.)

 

Revitalizer


 

0 Likes
Message 4 of 5

Anonymous
Not applicable
Accepted solution

Other question is how to get the face fill color of geometry?I use Mesh.MaterialElementId or Face.MaterialElementId to get the  material of the element.But most of time,it returns null.Or sometime it does return a material,but it's color does not the same as I can see in the Revit 3D view.

0 Likes
Message 5 of 5

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

there are many factors influencing the final appearance of an element in a given view.

https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2016/EN...

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes