JSVKAN
Mechanical
- Dec 20, 2013
- 20
Hi
I am trying to use Surface Edge Fillet in my coding. I have a trimmed two intersecting surfaces and need to use "Surface edge fillet" on intersecting edge. I tried recording and ran same macro but it does not work. In recorded macro that edge fillet is not selecting support automatically.
Code should select intersecting edge automatically and do filleting. Could you please help me how to do surface edge fillet between two intersecting surfaces?
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim shapeFactory1 As ShapeFactory
Set shapeFactory1 = part1.ShapeFactory
Dim constRadEdgeFillet1 As ConstRadEdgeFillet
Set constRadEdgeFillet1 = shapeFactory1.AddNewSurfaceEdgeFilletWithConstantRadius(Nothing, catTangencyFilletEdgePropagation, 5#)
constRadEdgeFillet1.FilletBoundaryRelimitation = -2
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Item("a")
Dim hybridShapes1 As HybridShapes
Set hybridShapes1 = hybridBody1.HybridShapes
Dim hybridShapeTrim1 As HybridShapeTrim
Set hybridShapeTrim1 = hybridShapes1.Item("Trim.1")
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromBRepName("TgtIntersEdgeGeneratedEdges;MfIE_R20GA;TgtPropagationFillet;FirstOperandsGSMTrim.1);SecondOperands);InitEdgesREdgeEdgeFaceBrpGSMExtrude.1;0BrpSketch.2;14)));None);Cf11));FaceBrpGSMFill.1);None);Cf11));NoneLimits1);Limits2));Cf11));WithTemporaryBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)))", hybridShapeTrim1)
constRadEdgeFillet1.AddObjectToFillet reference1
constRadEdgeFillet1.EdgePropagation = catTangencyFilletEdgePropagation
constRadEdgeFillet1.FilletBoundaryRelimitation = catConnectFilletBoundaryRelimitation
constRadEdgeFillet1.FilletTrimSupport = catTrimFilletSupport
part1.Update
End Sub
Thanks.
I am trying to use Surface Edge Fillet in my coding. I have a trimmed two intersecting surfaces and need to use "Surface edge fillet" on intersecting edge. I tried recording and ran same macro but it does not work. In recorded macro that edge fillet is not selecting support automatically.
Code should select intersecting edge automatically and do filleting. Could you please help me how to do surface edge fillet between two intersecting surfaces?
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim shapeFactory1 As ShapeFactory
Set shapeFactory1 = part1.ShapeFactory
Dim constRadEdgeFillet1 As ConstRadEdgeFillet
Set constRadEdgeFillet1 = shapeFactory1.AddNewSurfaceEdgeFilletWithConstantRadius(Nothing, catTangencyFilletEdgePropagation, 5#)
constRadEdgeFillet1.FilletBoundaryRelimitation = -2
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Item("a")
Dim hybridShapes1 As HybridShapes
Set hybridShapes1 = hybridBody1.HybridShapes
Dim hybridShapeTrim1 As HybridShapeTrim
Set hybridShapeTrim1 = hybridShapes1.Item("Trim.1")
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromBRepName("TgtIntersEdgeGeneratedEdges;MfIE_R20GA;TgtPropagationFillet;FirstOperandsGSMTrim.1);SecondOperands);InitEdgesREdgeEdgeFaceBrpGSMExtrude.1;0BrpSketch.2;14)));None);Cf11));FaceBrpGSMFill.1);None);Cf11));NoneLimits1);Limits2));Cf11));WithTemporaryBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)))", hybridShapeTrim1)
constRadEdgeFillet1.AddObjectToFillet reference1
constRadEdgeFillet1.EdgePropagation = catTangencyFilletEdgePropagation
constRadEdgeFillet1.FilletBoundaryRelimitation = catConnectFilletBoundaryRelimitation
constRadEdgeFillet1.FilletTrimSupport = catTrimFilletSupport
part1.Update
End Sub
Thanks.