Making copy of mirror feature instance
Not applicable
09-15-2015
04:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a mirror feature which mirrors FACE2 feature (as seen in picture).
Instead of Mirror, I wish to just make a copy of FACE2, give appropriate mirror transofrm and then suppress the Mirror feature.
Question: when I query FeaturePatternElements I get 2. How to identify the master (FACE2) and the slave (the one created by Mirror feature).
I tried to get CreatedByFeature from faces, but does not work.
Below is the trial code (not fully writtent as of now):
Dim patternElements As FeaturePatternElements = mirrfeat.PatternElements For i As Integer = 1 To patternElements.Count Dim pattelem As FeaturePatternElement = patternElements.Item(i) Dim faces As Faces = pattelem.Faces Dim partFeat As PartFeature = faces.Item(1).CreatedByFeature Dim trans As Matrix = pattelem.Transform Dim tmpToMove As ObjectCollection = _invApp.TransientObjects.CreateObjectCollection tmpToMove.Add(partFeat) Dim moveDef As MoveDefinition = m_compDef.Features.MoveFeatures.CreateMoveDefinition(tmpToMove) moveDef.Copy() moveDef.AddFreeDrag(trans.Translation.X, trans.Translation.Y, trans.Translation.Z) m_compDef.Features.MoveFeatures.Add(moveDef) Next
I need Copy Feature functionality. If I get it without creating MoveFeature, that would be better.
Can you suggest correct way to get this done?
Link copied