Message 1 of 8
Not applicable
05-15-2012
09:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
here is my jig rotate code
Protected Overrides Function Sampler(ByVal prompts As JigPrompts) As SamplerStatus
Dim myPPR As PromptPointResult
myPPR = prompts.AcquirePoint(myOpts)
Dim curPos As Point3d
curPos = myPPR.Value
If curPos.IsEqualTo(BasePt) Then
Return SamplerStatus.NoChange
Else
myMatrix = Geometry.Matrix3d.Displacement( _
BasePt.GetVectorTo(myPPR.Value))
Dim pt1 As New Point2d(BasePt.X, BasePt.Y)
Dim pt2 As New Point2d(myPPR.Value.X, myPPR.Value.Y)
BaseRo = pt1.GetVectorTo(pt2).Angle
End If
Return SamplerStatus.OK
End If
End Function
Protected Overrides Function Update() As Boolean
myBRef.Rotation = BaseRo
Return False
End FunctionI always rotate the block with bottom left point as fixed point. What can I do to make the block rotate around another point? such as centre point of the block?
Thanks very much
Solved! Go to Solution.