dimension a mullion

dimension a mullion

Joris.vd.Meulen
Collaborator Collaborator
1,222 Views
4 Replies
Message 1 of 5

dimension a mullion

Joris.vd.Meulen
Collaborator
Collaborator

So, again puzzled. Sort me out please.

 

Goal: dimension a horizontal mullion in a section view.

 

Approach:

  1. get plane of active view
    1. get normal of that plane
  2. get mullion (or mullions for that matter)
    1. get faces of that mullion
    2. get normals of those faces
  3. check if facenormal is perpendicular to refview (refview.CrossProduct(facenormal))
    1. for each of the 6 faces of that mullion check with refview
    2. is the .x is -1: it is okay
      1. if okay: get reference of that normal.
  4. create a line for dim function
    1. since it's a vertical dimension line I'm placing: .x is static, .z differs: 
      1. startpoint = XYZ(10, review.Y, 0)
      2. endpoint = XYZ(10, review.Y, 10)
      3. value 0 and 10 dont matter I believe as long as it's different!?
  5. dim

 

Somehow I think I'm totally doing it wrong. I don't have a clear understanding of getting the correct references. 

1. 6 faces so 6 references. 2 horizontal, 2 parrallel, 2 vertical. 

2. the 2 horizontal I must have. 

 

Am I overthinking it? Total brainfart here atm.

 

3Pinter

 

love python coding
0 Likes
1,223 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Dear Joris,

 

Thank you for your query.

 

Sorry to hear you are struggling so.

 

Is this a continuation of your previous thread that was escalated to ADN SFDC case 14127447 [dimensioning curtain wall mullions], or different?

 

https://forums.autodesk.com/t5/revit-api-forum/dimensioning-curtain-wall-mullions/m-p/7935535

 

If so, I'm sorry that was not resolved back then.

 

This does not sound all that hard, if you have access to all those surfaces with their normals and references.

 

Have you looked at the two old blog posts on dimensioning parallel walls and the other discussion in The Building Coder topic group on creating dimensioning?

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.45

 

Can you provide a minimal reproducible case including a sample model, preferably containing one single mullion, if that is enough to demonstrate the problem?

 

Could you also add an image showing what your goal is, maybe including the manually generated dimensioning?

 

Maybe then I can take a look at it for you.

 

I hope this helps.

 

Best regards,

 

Jeremy

 



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

0 Likes
Message 3 of 5

Joris.vd.Meulen
Collaborator
Collaborator

Hi @jeremytammik,

 

In a way it is and no need to be sorry for that unsolved topic.

 

I started a new topic because I need understand things first before stepping up the game. And I don't get it ... yet.

 

References from a wall: I can do.

References from a gridline: I can do.

References from a mullion: struggling somehow. Due hard time understanding references compared to normals etc.

 

Python code:

 

        hline_direction = XYZ(10,0,0)
mullionids = wall.CurtainGrid.GetMullionIds() refArray_h_mullion = ReferenceArray() for mullionid in mullionids: mullion = doc.GetElement(mullionid) tt = mullion.get_Geometry(options) for obj in tt: a = obj.GetInstanceGeometry() for i in a: for f in i.Faces: try: faceNormal = f.FaceNormal if isParallel(faceNormal,hline_direction): refArray_h_mullion.Append(f.Reference) except: pass

 

So this for the mullions.

 

For a curtain wall with 1 Vgrid will return 7 mullions, each with the obvious 6 faces. 

 

After the isParallel I get 2 faceNormals per face ... which is good I think.

Downside: I get 7x2correct references so 14 references.

 

If I dim refArray_h_mullion nothing happens. 

 

Where am I going wrong?

 

love python coding
0 Likes
Message 4 of 5

FAIR59
Advisor
Advisor
0 Likes
Message 5 of 5

Joris.vd.Meulen
Collaborator
Collaborator

ok, ok, interesting @FAIR59!

 

So no GetInstanceGeometry but rather use GetSymbolGeometry. 

Do I need the Transform at all?

love python coding
0 Likes