马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请问大虾,倒角应该怎么做?
我用了.MOLDL.CreateEdgeBlend() 没有做出来,它里面没有参数输入,不知道怎么做.
还用了.Features.CreateEdgeBlendBuilder() 也没有做出来,不知道怎么用.
我用Journal 功能 纪录了一段倒圆角的代码,可是看不大明白,望高手指教一下
' NX 4.0.2.2
' Journal created by Andyli on Tue Oct 31 15:20:11 2006 China Standard Time
'
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
' ----------------------------------------------
' Menu: Insert->Detail Feature->Edge Blend...
' ----------------------------------------------
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Start")
Dim nullFeatures_Feature As Features.Feature = Nothing
Dim edgeBlendBuilder1 As Features.EdgeBlendBuilder
edgeBlendBuilder1 = workPart.Features.CreateEdgeBlendBuilder(nullFeatures_Feature)
theSession.SetUndoMarkName(markId1, "Edge Blend")
Dim scCollector1 As ScCollector
scCollector1 = workPart.ScCollectors.CreateCollector()
Dim seedEdges1(0) As Edge
Dim block1 As Features.Block = CType(workPart.Features.FindObject("BLOCK(0)"), Features.Block)
Dim edge1 As Edge = CType(block1.FindObject("EDGE * 4 * 1"), Edge)
seedEdges1(0) = edge1
Dim edgeMultipleSeedTangentRule1 As EdgeMultipleSeedTangentRule
edgeMultipleSeedTangentRule1 = workPart.ScRuleFactory.CreateRuleEdgeMultipleSeedTangent(seedEdges1, 0.5, True)
Dim rules1(0) As SelectionIntentRule
rules1(0) = edgeMultipleSeedTangentRule1
scCollector1.ReplaceRules(rules1, False)
Dim markId2 As Session.UndoMarkId
markId2 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "Edge Blend")
edgeBlendBuilder1.Tolerance = 0.0254
edgeBlendBuilder1.AllInstancesOption = False
edgeBlendBuilder1.RemoveSelfIntersection = True
edgeBlendBuilder1.ConvexConcaveY = False
edgeBlendBuilder1.RollOverSmoothEdge = True
edgeBlendBuilder1.RollOntoEdge = True
edgeBlendBuilder1.MoveSharpEdge = True
edgeBlendBuilder1.OverlapOption = Features.EdgeBlendBuilder.Overlap.AnyConvexityRollOver
edgeBlendBuilder1.BlendOrder = Features.EdgeBlendBuilder.OrderOfBlending.ConvexFirst
edgeBlendBuilder1.SetbackOption = Features.EdgeBlendBuilder.Setback.SeparateFromCorner
Dim csIndex1 As Integer
csIndex1 = edgeBlendBuilder1.AddChainset(scCollector1, "10")
Dim feature1 As Features.Feature
feature1 = edgeBlendBuilder1.CommitFeature()
theSession.DeleteUndoMark(markId2, Nothing)
edgeBlendBuilder1.Destroy()
Dim markId3 As Session.UndoMarkId
markId3 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Start")
Dim edgeBlendBuilder2 As Features.EdgeBlendBuilder
edgeBlendBuilder2 = workPart.Features.CreateEdgeBlendBuilder(nullFeatures_Feature)
theSession.SetUndoMarkName(markId3, "Edge Blend")
' ----------------------------------------------
' Dialog Begin Edge Blend
' ----------------------------------------------
edgeBlendBuilder2.Destroy()
theSession.UndoToMark(markId3, Nothing)
theSession.DeleteUndoMark(markId3, Nothing)
' ----------------------------------------------
' Menu: Tools->Journal->Stop
' ----------------------------------------------
End Sub
End Module |