Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove camera rotation after journaling

Status
Not open for further replies.

prok20081

Computer
Apr 22, 2022
4
Hey guys. What functions in the journal are responsible for moving the camera? I i removed lines of code like this:
Code:
  NXOpen.Point3d scaleAboutPoint1 = new NXOpen.Point3d(-16.215898023039518, 10.575585667199768, 0.0);
            NXOpen.Point3d viewCenter1 = new NXOpen.Point3d(16.215898023039664, -10.575585667199684, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint1, viewCenter1);

            NXOpen.Point3d scaleAboutPoint2 = new NXOpen.Point3d(-12.972718418431583, 8.4604685337598333, 0.0);
            NXOpen.Point3d viewCenter2 = new NXOpen.Point3d(12.972718418431734, -8.460468533759741, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint2, viewCenter2);

            NXOpen.Point3d scaleAboutPoint3 = new NXOpen.Point3d(-10.378174734745263, 6.7683748270078716, 0.0);
            NXOpen.Point3d viewCenter3 = new NXOpen.Point3d(10.378174734745398, -6.7683748270077837, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint3, viewCenter3);

            NXOpen.Point3d scaleAboutPoint4 = new NXOpen.Point3d(-8.3025397877962099, 5.4146998616063069, 0.0);
            NXOpen.Point3d viewCenter4 = new NXOpen.Point3d(8.3025397877963183, -5.4146998616062154, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint4, viewCenter4);

            NXOpen.Point3d scaleAboutPoint5 = new NXOpen.Point3d(-6.6420318302369541, 4.3317598892850535, 0.0);
            NXOpen.Point3d viewCenter5 = new NXOpen.Point3d(6.642031830237066, -4.3317598892849629, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint5, viewCenter5);

            NXOpen.Point3d scaleAboutPoint6 = new NXOpen.Point3d(-5.3136254641895464, 3.4654079114280498, 0.0);
            NXOpen.Point3d viewCenter6 = new NXOpen.Point3d(5.3136254641896699, -3.4654079114279637, 0.0);
            workPart.ModelingViews.WorkView.ZoomAboutPoint(1.25, scaleAboutPoint6, viewCenter6);
And like this:
Code:
 NXOpen.Matrix3x3 rotMatrix1 = new NXOpen.Matrix3x3();
            rotMatrix1.Xx = 0.96533429702299545;
            rotMatrix1.Xy = 0.081373321601911852;
            rotMatrix1.Xz = -0.24800822067542638;
            rotMatrix1.Yx = 0.037268825544830277;
            rotMatrix1.Yy = 0.8974566731012108;
            rotMatrix1.Yz = 0.43952537418062437;
            rotMatrix1.Zx = 0.258342272254519;
            rotMatrix1.Zy = -0.43353189321845947;
            rotMatrix1.Zz = 0.86331301850996822;
            NXOpen.Point3d translation1 = new NXOpen.Point3d(-77.49478481461793, -30.874519473708904, -11.259821185011582);
            workPart.ModelingViews.WorkView.SetRotationTranslationScale(rotMatrix1, translation1, 7.8735770643394423);
After that, the camera rotations became less, but the camera continues to rotate and is centered at the beginning of the coordinate system. I can't find the part of the code that does this.
 
Replies continue below

Recommended for you

It seems you are on the right track. I'd suggest searching your remaining code for "WorkView" and inspecting the results for any operations that modify it.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor