- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had a very similar error with the thicken feature, the difference is I was creating the faces also using code that is being used for thicken. Can you also explain when you are iterating through for loop what is "laminate"? is it a solid body or a feature? If you can send the file in which it works with your code and also the file in which it does not work maybe I can check if it is suitable.
I am not good with C#, but I have created the code long back in VB.Net where I was iterating through features and then finding a feature, that is a surface extrude, before iterating to the faces, I have cleared the object collection that is created (so that it will not try to thicken the face that is already thickened, try this I think that will do the trick) and I have added the counter, which is used for naming the thicken features. See below code for reference and see if it helps.
FCount = 1 Dim oFaceCol As FaceCollection oFaceCol = ThisApplication.TransientObjects.CreateFaceCollection For Each oFeat As PartFeature In oDef.Features If oFeat.Name.Contains("Partition") oFaceCol.Clear For Each oFace In oFeat.SurfaceBodies.Item(1).Faces Call oFaceCol.Add(oFace) Dim oThickFeat As ThickenFeature oThickFeat = oDef.Features.ThickenFeatures.Add(oFaceCol, "4",kSymmetricExtentDirection,kNewBodyOperation,False) oThickFeat.Name = "Thicken-Partition" & FCount FCount = FCount +1 Next End If Next
If this has answered your question, please accept it as a solution.
Regards,
Dutt Thakar.
Regards,
Dutt Thakar