I'm trying to do unequal set back chamfer on edges of multiple faces.
The method "AddUnequalSetback" in chamfers collection has argument for only one reference face and it's respective edges.
But manually it's possible to select multiple faces and their respective edges to do Unequal Setback chamfer in one go so it makes only one instance of chamfer operation like "Chamfer1".
If I try to do one by one it will make number of instances and it may go upto 200-300. Which is not desirable.
On the contrary, the "WeldChamfers" collection has a method for "AddUnequalSetback" which takes multiple faces as argument.
Is there any way to do the similar operation for unequal set back "Chamfers" for multiple faces at one go?
Thanks in advance for the help.
Solved! Go to Solution.
call or log in with your web key to GTAC (Global Technical Assist Center)
Open an IR (incident request), which may be classified by the Siemens support into an ER.
the type of the property ChamferReferenceFace of a manually created chamfer with multiple faces is 'Faces'.
The Code below generates chamfers all around a cube with one feature, so i think it should be possible.
I don't know a method to compose a faces collection with faces of different features.
Public Sub AddChamfers(ActDoc As Object) Dim Model As SolidEdgePart.Model = ActDoc.models.item(1) Dim ReferenceFace As Object = Model.ExtrudedProtrusions.Item(1).Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll) Dim EdgeArray(0 To 7) As Object Dim TopCap As SolidEdgeGeometry.Face = Model.ExtrudedProtrusions.Item(1).TopCap Dim BottomCap As SolidEdgeGeometry.Face = Model.ExtrudedProtrusions.Item(1).BottomCap For ii = 1 To 4 EdgeArray(2 * ii - 2) = TopCap.Edges.item(ii) EdgeArray(2 * ii - 1) = BottomCap.Edges.item(ii) Next Try Model.Chamfers.AddUnequalSetback(ReferenceFace, 8, EdgeArray, 0.002, 0.01) Catch ex As Exception Console.WriteLine(ex.Message) End Try End Sub
Thanks a lot for your reply.
Has been really helpful and it works perfectly.
The argument ReferenceFace in the api document says only ReferenceFace and not faces so that started the confusion.
But nevertheless i tried passing required collection of Faces for ReferenceFace argument but the issue was i was passing them as an array of faces instead of directly passing them as "Faces".
It works really great now and it is definitely possible.
Thanks once again for your input.
Solid Edge API help - I love you...
Even the provided example there confirms once more that a single reference face is expected only. Grrrr...
Great job Gerald, that you did find out the solution.