Community
인벤터 Inventor - 한국어
프로그램에 관한 사용 방법, 기술, 정보 등을 검색하고, 질문을 통해 서로 도움을 주고 받을 수 있습니다.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor 2025 버전

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
손광호
444 Views, 4 Replies

Inventor 2025 버전

아직 저도 2025를 본격적으로 사용하는 게 아니라서 열공 중..

 

새로워진 기능 중에 하기 패턴 기능이 들어왔네요..

 

3년전에 해외 분이 ilogic으로 패턴 요소들을 스케치 영역으로 분리하는 로직을 구현하신 분이 있었는데

 

인벤터 기능으로 나왔습니다...

 

_0-1712582051689.png

 

줌인테크 Techanical Support Engineer
4 REPLIES 4
Message 2 of 5
daeun_jun
in reply to: 손광호

스케치 패턴이 당연히 있을것 같은 기능인데 2025에 들어온건가요?
아니면 패턴 기능의 옵션이 더 다양화 된건가요?

Autodesk Community


Product Specialist, Daeun Jun
Message 3 of 5
손광호
in reply to: 손광호

스케치 패턴은 있는 기능이지만 스케치 패턴할 요소를 영역을 그려서 활성/비활성은 

없던 기능입니다.

신기한 건 그것을 ilogic 으로 만들어서 사용하는 해외 분이 계셔서 놀랐습니다.

사각/원형 패터 외에 다양한 모양의 패턴 요소를 구현할 수 있습니다.

줌인테크 Techanical Support Engineer
Message 4 of 5
daeun_jun
in reply to: 손광호

아하! 요소의 영역을 그려서 활성 / 비활성 부분이 추가된거군요.
(오토 개발자도 그 해외분의 ilogic을 보고 구현한게 아닐까 ㅎㅎ 추측해 봅니다~!)

Autodesk Community


Product Specialist, Daeun Jun
Message 5 of 5
손광호
in reply to: 손광호

해외 블로그에서 퍼와서 활용했던 기능입니다.

위의 새로워진 기능과 유사한 ilogic 기능~

퍼 온 링크는 기억이 안 나네요~

파일도 첨부합니다~

----------------------------------------------

 
 
Sub Main()
 
Dim oDoc As PartDocument = TryCast(ThisDoc.Document, PartDocument)
If oDoc Is Nothing Then
      MessageBox.Show("This rule works with part documents only.", "iLogic Rule", _
        MessageBoxButtons.OK, MessageBoxIcon.Warning)
      Exit Sub
    End If
Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition
 
'this rule works with only one rect. pattern only
'provided directly by item number
Dim oPattern As RectangularPatternFeature _
= oDef.Features.RectangularPatternFeatures.Item(1)
 
'restore all pattern elements in order to get access to their faces
For Each oElt As FeaturePatternElement In oPattern.PatternElements
If oElt.Suppressed Then oElt.Suppressed = False
Next
oDoc.Update()
ThisApplication.ActiveView.Update
Beep
 
Dim oBoundarySketch As PlanarSketch = oDef.Sketches.Item("스케치3")
 
'temporary sketch for profile
Dim oSketch As PlanarSketch = oDef.Sketches.Add(oBoundarySketch.PlanarEntity,False)
oSketch.Visible = False
 
'project boundary
For Each oE As SketchEntity In oBoundarySketch.SketchEntities
Call oSketch.AddByProjectingEntity(oE)
Next
 
'project parent hole
Dim oHole As HoleFeature = TryCast(oPattern.ParentFeatures.Item(1), HoleFeature)
If oHole Is Nothing Then
MessageBox.Show("This rule works with hole feature pattern only.", "iLogic Rule", _
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Exit Sub
End If
Dim oEdge As Edge = oHole.SideFaces.Item(1).Edges.Item(1)
Call oSketch.AddByProjectingEntity(oEdge)
 
'project holes pattern
For Each oElt As FeaturePatternElement In oPattern.PatternElements
If oElt.Faces.Count > 0 Then
oEdge = oElt.Faces.Item(1).Edges.Item(1)
Call oSketch.AddByProjectingEntity(oEdge)
End If
Next
 
' Create a profile.
Dim oProfile As Profile = oSketch.Profiles.AddForSolid(True)
 
For Each oPath As ProfilePath In oProfile
If oPath.Count = 1 Then
Dim oPE As ProfileEntity = oPath.Item(1)
If oPE.CurveType = Curve2dTypeEnum.kCircleCurve2d Then
Dim oSkE As SketchEntity = oPE.SketchEntity
Dim oGreenCircle As SketchCircle = CType(oSkE, SketchCircle)
Dim oFPE As FeaturePatternElement = GetEltByGreenCircle(oGreenCircle)
If oFPE IsNot Nothing Then
If oPath.AddsMaterial = True Then
oFPE.Suppressed = True 'should be suppressed
End If
End If
End If
End If
Next
'delete temporary sketch
oSketch.Delete()
oDoc.Update()
Beep()
End Sub
 
 
Function GetEltByGreenCircle( _
  ByRef oGreenCircle As SketchCircle) As FeaturePatternElement
'returns FPE corresponding to the given SketchCircle object
 
If oGreenCircle Is Nothing Then Return Nothing
Dim oEdge As Edge
Try
oEdge = CType(oGreenCircle.ReferencedEntity, Edges).Item(1)
Catch ex As Exception
Return Nothing
End Try
 
Dim oFace As Face
If oEdge.Faces.Item(1).SurfaceType = SurfaceTypeEnum.kCylinderSurface Then
oFace = oEdge.Faces.Item(1)
Else
oFace = oEdge.Faces.Item(2)
End If
 
If oFace.CreatedByFeature.Type = ObjectTypeEnum.kHoleFeatureObject Then
Return Nothing
End If
 
Dim lKey As Long = oFace.TransientKey
 
Dim oPattern As RectangularPatternFeature _
= CType(oFace.CreatedByFeature, RectangularPatternFeature)
 
For Each oElt As FeaturePatternElement In oPattern.PatternElements
If oElt.Faces.Count > 0 Then
If lKey = oElt.Faces.Item(1).TransientKey Then
Return oElt
End If
End If
Next
Return Nothing
End Function 'GetEltByGreenCircle
 

 

줌인테크 Techanical Support Engineer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums