Wall wrapping layer geometry

Wall wrapping layer geometry

Anonymous
Not applicable
1,834 Views
11 Replies
Message 1 of 12

Wall wrapping layer geometry

Anonymous
Not applicable

Hi!

 

I'm currently working with Revit Wall layers and trying to get the geometry information from each layer. I found a solution on Jeremy's blog using PartUtils.GetAssociatedParts() to solve the problem: http://thebuildingcoder.typepad.com/blog/2011/10/retrieving-detailed-wall-layer-geometry.html

 

This approach works great for layers without wrapping and joint walls, but it fails to detect the wrapping part.
I attached the wall with layers named WrappingLayerWall.png, and the result using Create Parts Tool in Revit (same as the PartUtils API😞 CreateParts.png in attachments.
 
In this case I have no way to tell if or where the layers are wrapped since it fails to return the wrapping information. 
Is there any way that we can separate the wall by different materials?  Otherwise do you have any suggestions on retrieving wrapping layer geometry? 
 
Thanks!
 
Best,
Siwan
 
0 Likes
1,835 Views
11 Replies
Replies (11)
Message 2 of 12

jeremytammik
Autodesk
Autodesk

If you simply call Element.GetGeometry in a default 3D view, I would expect you to receive a different solid with a different material for each of the wall layers.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 12

Anonymous
Not applicable

Hi Jeremy,

 

Thanks for your suggestion. I have tried to get geometry from multi-layer wall using the following code but it only returns one solid instead of solid of each layer.

 

Snippet

public List<solid> getElementSolid(Element elem)
{
List
<Solid> solidsFound = new List<Solid>();
            Options options = new Options()             {                 ComputeReferences = false,                 DetailLevel = ViewDetailLevel.Fine,                 IncludeNonVisibleObjects = false             };             // get the solid geometry from the element             GeometryElement baseGeomElem = elem.get_Geometry(options);             foreach (GeometryObject geomObj in baseGeomElem)             {                 Solid solid = geomObj as Solid;                 if (solid != null && solid.Faces.Size != 0 && solid.Edges.Size != 0)                 {                     solidsFound.Add(solid);                 }             }

return solidsFound;
}

 

also tried to do the Geometry calculation for each layer using WallType.GetCompoundStructure(), however material only provides us the area and volume, layer only provides width, which is apparently not sufficient since I need to get the detailed vertexes of each layer.

 

Do you have any suggestion on getting that information?

 

Thanks!

Siwan

0 Likes
Message 4 of 12

Anonymous
Not applicable

Another question is how do I get materials from a solid? 

 

I tried to get material Ids from Element, but even though I get the materials for each layer those information still not enough for me to get the vertexes/outline of each layer including the wrapping part.

0 Likes
Message 5 of 12

jeremytammik
Autodesk
Autodesk

I thought the blog post you pointed to answered exactly the question you are asking on retrieving detailed wall layer geometry:

 

http://thebuildingcoder.typepad.com/blog/2011/10/retrieving-detailed-wall-layer-geometry.html

 

To determine the material of a solid, checking out this 8 year old blog post:

 

http://thebuildingcoder.typepad.com/blog/2009/11/solid-material.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 12

Anonymous
Not applicable

Hey Jeremy,

 

I think I didn't describe my question clear enough.

The approach we mentioned works great for joint walls, but I don't think it works for wrapping layers in a single wall panel.

 

The PartUtils.GetAssociatedParts() will separate wrapping layers into straight layers.

I'm not sure if it's the same in previous API versions but at least in Revit API 2016 and 2017 it behaves like this:

Capture.PNG

PartUtils.GetAssociatedParts() will get the wrapping layers into straight layers:

Capture.PNG

So is there any way for us to retrieve the points highlighted in red for wrapping layers?

Capture.PNG

 

Thanks a lot for helping!

 

Best,

Siwan

 

 

0 Likes
Message 7 of 12

jeremytammik
Autodesk
Autodesk

Yes, that is easy. 

 

Those points can be determined by looking at the wall location line, offset from the location line, and thickness of each of its layers.

 

Simply imagine lines along each layer boundary and calculate their respective intersection points.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 8 of 12

Anonymous
Not applicable

Oh right that sounds good, and we can determine if the layer is being wrapped by checking layerCapFlag parameter.

 

Thanks again Jeremy.

0 Likes
Message 9 of 12

FAIR59
Advisor
Advisor

@Anonymous wrote:

Oh right that sounds good, and we can determine if the layer is being wrapped by checking layerCapFlag parameter.

 

I don't think you can determine how far the layers get wrapped that way. For Windows / Doors that value is determined by the named reference plane " Int Wrap Plane "and Ext Wrap Plane", it need not be half the wall width.

 

The layer information in the model seems to be only a "2D hatch" applied to the cutplane of the wall. That 2D information isn't available in the regular API.

 

LayersInCutPlane.PNG

Given that the information gets exported to DXF/DWG, you could try retrieving the info from a CustomExporter, though I haven't tried that yet.

 

Or you could isolate the wall in a plan view and export to DXF, and try and read the DXF file for the line information.

0 Likes
Message 10 of 12

Anonymous
Not applicable

Hi Fair59,

 

Thanks for your reply. I though the wall wrapping layer part always has the same thickness as the layer itself. (highlighted in red)

Screen Shot 2017-11-02 at 6.18.09 PM.png

 

If I only need to work with wall panels, flat slabs, not window/door, will the two thicknesses highlighted in red the same?

 

Thanks!

Siwan

 

0 Likes
Message 11 of 12

FAIR59
Advisor
Advisor

Wrapping is indeed always with the thickness of the layers.

I was commenting on the other axis. With inserts can the wrapping stop before the Finish Face Interior. ( added black line).  Your picture looks like wrapping at the end of the Wall, then the thicknesses will be the same and stops at the inside face of the wall.

 

WindowInWrapLayers00.PNG

For your information:

The "wrap layers" may be cut by the inserts, resulting in irregular shaped faces. In the next picture the outer wrap layer is shorter and the cavity wrap layer gets "squeezed".

 

WindowInWrapLayers.PNG

0 Likes
Message 12 of 12

Anonymous
Not applicable

Oh I see what you're getting at. That's a interesting situation to consider.

 

I'll try out your suggestion for this. Thanks!

0 Likes