iLogic - Set break view operation

iLogic - Set break view operation

alysonrssl
Contributor Contributor
488 Views
1 Reply
Message 1 of 2

iLogic - Set break view operation

alysonrssl
Contributor
Contributor

Hi everyone, 

 

I'm not sure that my approach is the good one but I'm trying to get 2D point from a WorkPlane to create a break view operation. The length of my shaft can change but I always want the break view to be setted at the same part of the shaft (see image attached), that's why I've created 2 workplanes to set an upper point of that part and a below point but that doesn't seems to work, maybe there is another way to do it? 

 

Thanks in advance, 

 

 

	Dim startWP As WorkPoint = asmCompDef.WorkPoints.Item("WorkPoint_Start")
	Dim endWP As WorkPoint = asmCompDef.WorkPoints.Item("WorkPoint_End")

	Dim xCoordStart, yCoordStart, zCoordStart As Double
	zCoordStart = startWP.Point.Z

	Dim xCoordEnd, yCoordEnd, zCoordEnd As Double
	zCoordEnd = startWP.Point.Z

	If (modelLength < 500) Then Return

	Dim startPoint1 As Point2d = oTG.CreatePoint2d(frontView.Center.X, zCoordStart + 10)
	Dim endPoint1 As Point2d = oTG.CreatePoint2d(frontView.Center.X, zCoordEnd - 10)
	Dim startPoint2 As Point2d = frontView.DrawingViewToSheetSpace(startPoint1)
	Dim endPoint2 As Point2d = frontView.DrawingViewToSheetSpace(endPoint1)

	frontView.BreakOperations.Add(BreakOrientationEnum.kVerticalBreakOrientation, startPoint2, endPoint2, BreakStyleEnum.kStructuralBreakStyle, 8, 1)

 

 

0 Likes
489 Views
1 Reply
Reply (1)
Message 2 of 2

Michael.Navara
Advisor
Advisor

In my opinion (without testing) it is because you use workpoint 3d model coordinates in drawing 2d context.

Dim startPoint1 As Point2d = oTG.CreatePoint2d(frontView.Center.X, zCoordStart + 10)

You need to calculate coordinates correctly

3d Model -> DrawingView -> Sheet 

 

0 Likes