Revit API Forum
Welcome to Autodeskā€™s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

BRepBuilder fails without explanation

5 REPLIES 5
Reply
Message 1 of 6
jfaulkner-evolve
335 Views, 5 Replies

BRepBuilder fails without explanation

A sample file is attached.

 

All the edges are correctly oriented & ordered in the faces. All the faces are facing out. We have tried making BRepBuilderSurfaceGeometry with and without bounds and it fails either way.

 

Thanks in advance for any help.

5 REPLIES 5
Message 2 of 6

Thank you for your samples code snippet. It includes a selection filter to pick a very specific fabrication part.

  

Hence, I have no idea how to run it, in which model, and what element to select.

  

Please provide a minimal complete reproducible case including the sample model, detailed instructions, steps to reproduce the problem and succinct description of the expected versus observed behaviour.

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 3 of 6

Thank you for the response - my colleague will post a reply with the requested information.

Message 4 of 6

@jeremy_tammik It just requires a rectangular fabrication duct. Here's an example model with a rectangular fabrication duct (placed at the origin for debugging ease).

Message 5 of 6

Hi @jfaulkner-evolve,

 

Thank you for your patience.

 

I analysed the sample code and sample file and encountered the same issue. I am not sure what is causing the issue; I have submitted the same to the Revit Engineering team for further analysing with ticket REVIT-206810 - BRepBuilder fails.

 

I will come back to you as soon as I receive a response from the engineering team.

ā€ƒ Moturi George, ā€ƒā€ƒā€ƒ Developer Advocacy and Support,ā€ƒ ADN Open
Message 6 of 6

Hi @jfaulkner-evolve,

The engineering team has responded to the issue raised above.

"This appears to be a case of user error. The created on line 55 of the attached txt file has the wrong orientation:

var face1Id = builder.AddFace(face1, !(Math.Abs(connectors[1].Width - (connectorInfo0.Width)) < 0.001)); 


I didn't try to determine what the logic that computes the flag should be, but when I invert the second argument, the BRep is created successfully."

Kindly try again on your end

ā€ƒ Moturi George, ā€ƒā€ƒā€ƒ Developer Advocacy and Support,ā€ƒ ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Rail Community