ClippingPlane, how to get the angle of inclination

Hi all

I'm trying to manage a 3D object inside a PDF (with adobe pdf reader XI) via javascript. I have read the documentation online and also pdf "3D Annotations API Reference Version 8.1" and now I am able to get the 3D object, to get the list of points of view, I can move from a point of view to another, I can get all the knots, cracks etc...

Now, I want to get information on clippingPlane, such as alignment (x axis, the value axes or z axes) and tilt1/tilt2 but I couldn't find a way to get them. The documentation mentions just a way to create a clippingPlane and say that a clippingPlane is a kind of node.

Can someone help me?

Thank you very much

Bye bye

Hi all

Thank you for your suggestion! Grahn, your code works very well for the demarcation plan, I create by selecting alignment of the x-axis in the Adobe dialog box. Now, I would get the same values by selecting the other two axes. I tried the code David posted in an attempt to get the values for the y-axis, but I can't find a way to make it work. Here is the code I use:

That's what IU want to get:

And that's what I get:

What's wrong? The "-" until the numbers are not a problem, I can handle it, but the values are completely false. It makes me crazy!

Thank you very much.

Bye bye

Tags: Acrobat

Similar Questions

  • How to get the orientation angle screen with 40 Hz stably without delay to sync?

    Goal: Get orientation angle screen at 40 Hz stably without delay for synchronization.

    Problem with two situations:

    1. When you use the bbutil_swap and navigator_event_get_orientation_angle (event) to get the orientation angle screen with other data such as acceleration sensors and gyroscope data, the sampling frequency will be low grade at 10 Hz randomly. The difference of synchronization will increase from 25 ms to 100 ms.

    2. when the screen orientation angle is collected in the following code to get the angle only, the difference in timing of sampling will be 1, 2 or 5 seconds at random.

    Question: How do I get the orientation angle screen with 40 Hz stably without delay to sync?

    or something wrong in my code?

    Mini code:

    public static void handleNavigatorEvent(bps_event_t *event) {}
    switch (bps_event_get_code (event)) {}
    case NAVIGATOR_ORIENTATION_CHECK:
    navigator_orientation_check_response (event, true); If not the line, no updates on the screen rotation.
    angle = navigator_event_get_orientation_angle (event);
    break;
    case NAVIGATOR_EXIT:
    stop = true;
    break;
    }
    }

    public static void handle_events() {}
    for(; ) {
    bps_event_t * event = NULL;
    If (BPS_SUCCESS! = bps_get_event (& event, 0)) {}
    fprintf (stderr, "bps_get_event failed\n");
    break;
    }
    If {(event)
    If (bps_event_get_domain (event) is {navigator_get_domain()})
    handleNavigatorEvent (event);
    }
    } else {}
    break;
    }
    pthread_create (& t1, NULL, (void *) & rawacceleration, NULL);
    }
    }

    int main (int argc, char * argv []) {}
    screen_create_context (& screen_cxt, 0);
    bps_initialize();

    {If (EXIT_SUCCESS! = {bbutil_init_egl (screen_cxt))}
    fprintf (stderr, "bbutil_init_egl failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = screen_request_events (screen_cxt)) {}
    fprintf (stderr, "screen_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = navigator_request_events (0)) {}
    fprintf (stderr, "navigator_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    Rawlog = fopen (rawfilename, "w"); Save the file in a specific path.
    fprintf (rawlog, "Absorption system, Angle\n");

    navigator_request_events (0);

    While (! shutdown) {}
    handle_events();
    bbutil_swap();
    }

    closeshutdown();

    return 0;
    }

    Thank you for your attention,

    Using SENSOR_TYPE_ORIENTATION of sensor_type_t , you should be able to get > 10 Hz.  Use sensor_set_rate() to get the slower delay to call sensor_info().  Make sure not to enable sensor_set_skip_duplicates().

    However get the orientation at the 40 Hz streaming will not make your application any repsonsive more.  The only way to make your app more would be to manage the orientation change in a short period of time.  This is the time when orientation changes (at the hardware level), to receive you and to deal with it.  It is usually a constraint system and there is not that you can do about it.  What you see using the code above is the same information repeated over and over; FACE_UP, FACE_UP, FACE_UP, which is not really useful.

  • How to get the value of the angle of view rotation tool?

    Hello

    I want to rotate the brush tip with the rotation tool to view, given how it works now screw to the top of my brush strokes.

    (compare the two lines here - features on the right are made with the rotated view: http://img221.imageshack.us/img221/2016/psnightmare.jpg ( )

    I found how to change the rotation brush tip on this page:

    http://www.PS-scripts.com/BB/viewtopic.php?f=25 & t = 2801 & start = 15

    But how do I get the value of the angle of the tool and rotate the display...?

    As far as I know, all you can script with the rotate view tool is to select the tool itself. Unlike most other tools, you cannot use same tools preset with the display rotation tool. So I don't think it's possible set or get the angle of the view.

    You can also test the setting of the rotation brush with your brush settings. There may be questions if the brush is a sampled brush and the brush in your screenshot looks like a sample brush for me.

  • How to get the coordinates of "pathPoints" of a textFrameItem?

    Hi all

    Yes, I know that textFrameItems have pathPoints but...

    How can I get the x coordinates of the corners of a textFrameItem of rotation.

    I know I can get the angle of rotation of asin (myTextFrameItem.matrix.mValueA) etc.

    My guess would be that one should be able to use the mValueTX and mValueTY to help, but these values are very confusing and change dramatically on the application even a small rotation.

    If anyone has some preference mathematically based ideas and not API base, please let me know.

    It's very late by me now and I think I must be missing what is obvious, I think that such a function must have been made.

    Thank you

    Trevor

    PS Would be also appreciated a solution to the problem even in InDesign

    _2015-06-23_02-05-49.png

    Hi all

    I didn't try the method DOM I knew the mathematical method.

    I don't give great results if a shear has been applied, but that doesn't bother me that I do not apply the shears

    I received contact details-box-find http://stackoverflow.com/questions/9971230/calculate-rotated-rectangle-size-from-known-bou a useful formula

    y = (1 / (Math.cos (a) * Math.cos (a) - Math.sin (a) * Math.sin (a))) * (-w * Math.sin (a) + h * Math.cos (a));

    where y is the height of the inner when box no rotation is applied on it and a is the angle of rotation and w is the width.

    I had found for me a different formula but got stuck when moving to the rotation out of the 90 degree range, that is to say 1 degree or 91 degrees.

    The same problem occurred with this method to fix a fact of what follows.

    a RAD = ((360 + degs (a)) 90%);

    I did the temporary to degrees conversion as I remember problems with Mod enforcement by a fraction, I think that Ariel was a thread on this in the indesign forum.

    Here are the results of the script

    // draw a text box and rotate it before running the script
    // By Trevor www.creative-scripts.com (sorry still not too much there)
    // https://forums.adobe.com/message/7678561#7678561
    // With a little bit of help from http://stackoverflow.com/questions/9971230/calculate-rotated-rectangle-size-from-known-bounding-box-coordinates
    function main () {
    
    var doc = app.documents.length && app.activeDocument,
        itext = doc && doc.textFrames[0];
    if (!itext) {
        alert ("Sorry mate,\nI need a document with a textFrameItem on it or there's not much for me to do");
        return "twit";
    }
    var gb = itext.geometricBounds,
        imatrix = itext.matrix,
        p1X, p1Y, p2X, p2Y, p3X, p3Y, p4X, p4Y,
        a, h, w, x, y, hyp, op, adj,
        noColor = new NoColor(),
        rgbColor = new RGBColor(),
        newShape = doc.pathItems.add(),
        rect;
    ;
    
    // Do the maths
    
    a = Math.atan2 (imatrix.mValueB, imatrix.mValueA); // get the angle of the textFrameItem
    a = rads ((360 + degs(a)) % 90); // make sure it's positive otherwise the result will get messed up
    w = gb[2] - gb[0]; // Width of outer enclosing box
    h = gb[1] - gb[3]; // Height of outer enclosing box
    /* x = (1/(Math.cos(a) * Math.cos(a) - Math.sin(a) * Math.sin(a))) * (w * Math.cos(a) - h * Math.sin(a)); // Width of inner enclosed box, this is not needed for this script */
    y = (1/(Math.cos(a) * Math.cos(a)- Math.sin(a) * Math.sin(a))) * (- w * Math.sin(a) + h * Math.cos(a)); // Height of inner enclosed box
    op = Math.sin(a) * y; // this is the x coordinate offset
    adj = Math.cos(a) * y; // this is the y coordinate offset
    
    // calculate the points of the inner enclosed box
    p1X = gb[0] + op; // left bottom
    p1Y = gb[3];
    p2X = gb[0]; // left top
    p2Y = gb[3] + adj;
    p3X = gb[2] - op; // right top
    p3Y = gb[1];
    p4X = gb[2]; // right bottom
    p4Y = gb[1] - adj;
    
    // Draw outer box
    rgbColor.blue = 255;
    rect = doc.pathItems.rectangle(gb[1], gb[0], gb[2]-gb[0], Math.abs(gb[3]-gb[1]) );
    rect.fillColor = noColor;
    rect.strokeColor = rgbColor;
    
    // Draw inner box
    newShape.setEntirePath([[p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p1X, p1Y]]);
    rgbColor.red = 255;
    newShape.strokeColor = rgbColor;
    newShape.fillColor = noColor;
    
    // Helper functions
    function rads (x) {return x * (Math.PI / 180);}
    function degs (x) {return x * (180 / (Math.PI));}
    
    }
    main()
    

    Hi Uwe,

    It was late, but I don't know how I missed the path object. Age!

    A good thing I didn't post on the InDesign forum, at least here, I can wait less snickering for a such silent over look that I went back to the InDesign forum

    Either way thanks to you two, best regards,.

    Trevor

  • How to change the angle of a gradient layer without changing anything else?

    How to change the angle of a gradient layer without changing anything else?

    When I try it myself my gradient everything turns black.

    To add to the above, you can just set the angle. If you want to use other existing parameters, you need to get from the layer. The code in this other thread shows a way to get them.

    But if you do not have the values for any other reason, you can get the handle to the layer, make a duplicate of it with all the settings and just crush those you want to change.

    It is a way to just change the angle while keeping the other existing settings.

    // helper function for working with descriptors
    function getProperty( psClass, psKey, index ){// integer:Class, integer:key
        var ref = new ActionReference();
        if( psKey != undefined ) ref.putProperty( charIDToTypeID( "Prpr" ), psKey );
        if(index != undefined ){
            ref.putIndex( psClass, index );
        }else{
            ref.putEnumerated( psClass , charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        }
        try{
            var desc = executeActionGet(ref);
        }catch(e){ return; }// return on error
        if(desc.count == 0) return;// return undefined if property doesn't exists
        var dataType = desc.getType(psKey);
        switch(dataType){// not all types supported - returns undefined if not supported
            case DescValueType.INTEGERTYPE:
                return desc.getInteger(psKey);
                break;
            case DescValueType.ALIASTYPE:
                return desc.getPath(psKey);
                break;
            case DescValueType.BOOLEANTYPE:
                return desc.getBoolean(psKey);
                break;
            case DescValueType.BOOLEANTYPE:
                return desc.getBoolean(psKey);
                break;
            case DescValueType.UNITDOUBLE:
                return desc.getUnitDoubleValue(psKey);
                break;
            case DescValueType.STRINGTYPE:
                return desc.getString(psKey);
                break;
            case  DescValueType.OBJECTTYPE:
                return desc.getObjectValue(psKey);
                break;
            case  DescValueType.LISTTYPE:
                return desc.getList(psKey);
                break;
            case  DescValueType.ENUMERATEDTYPE:
                return desc.getEnumerationValue(psKey);
                break;
        }
    };
    function duplicateDescriptor( descriptor ) {
        var newDescriptor = new ActionDescriptor;
        newDescriptor.fromStream( descriptor.toStream() );
        return newDescriptor;
    };
    function localizeDescriptor( desc ) {
        var stream, pointer, zStringLength, zstring, localized_string, newZStringLength, previousStream, followingStream, newDesc;
        stream = desc.toStream();
        while( true ) {
            pointer = stream.search(/TEXT....\x00\$\x00\$\x00\$/);
            if( pointer === -1 ) {
                break;
            }
            zStringLength = getLongFromStream( stream, pointer + 4 );
            zstring = readUnicode( stream.substr( pointer + 8, ( zStringLength - 1 ) * 2) );
            localized_string = ( localize( zstring ) ) + '\u0000';
            newZStringLength = localized_string.length;
            previousStream = stream.slice( 0, pointer);
            followingStream = stream.slice( pointer + 8 + zStringLength * 2);
            stream = previousStream.concat( 'TEXT', longToString( newZStringLength ), bytesToUnicode( localized_string ), followingStream );
        }
        newDesc = new ActionDescriptor();
        newDesc.fromStream( stream );
        return newDesc;
    };
    function getShortFromStream( stream, pointer ) {
        var hi, low;
        hi = stream.charCodeAt( pointer ) << 8 ;
        low = stream.charCodeAt( pointer + 1 );
        return hi + low;
     };
    function getLongFromStream( stream, pointer ) {
        var hi, low;
        hi = getShortFromStream( stream, pointer) << 16;
        low = getShortFromStream( stream, pointer + 2);
        return hi + low;
    };
    function readUnicode( unicode ) {
        var string = "";
        for( i = pointer = 0; pointer < unicode.length; i = pointer += 2) {
            string +=String.fromCharCode( getShortFromStream( unicode, pointer ) );
        }
        return string;
    };
    function longToString( longInteger ) {
        var string;
        string = String.fromCharCode( longInteger >>> 24 );
        string += String.fromCharCode( longInteger << 8 >>> 24 );
        string += String.fromCharCode( longInteger << 16 >>> 24 );
        string += String.fromCharCode( longInteger << 24 >>> 24 );
        return string;
    };
    function bytesToUnicode( bytes ) {
        var unicode = "", char_code, charIndex;
        for( charIndex  = 0; charIndex < bytes.length; charIndex ++ ) {
            char_code = bytes.charCodeAt( charIndex );
            unicode += String.fromCharCode(char_code >> 8 ) +  String.fromCharCode( char_code & 0xff );
        }
        return unicode;
    };
    
    function setGradientAdjustmentAngle( angle ) {
        var adjustmentDesc = getProperty( charIDToTypeID("Lyr "), charIDToTypeID( 'Adjs' ) ).getObjectValue(0);
        var newAdjustmentDesc = duplicateDescriptor( adjustmentDesc );
        newAdjustmentDesc.putUnitDouble( charIDToTypeID('Angl'), charIDToTypeID('#Ang'), angle );
    
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( stringIDToTypeID('contentLayer'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
        desc.putObject( charIDToTypeID('T   '), stringIDToTypeID('gradientLayer'), newAdjustmentDesc);
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    var newAngle = 45;
    setGradientAdjustmentAngle( newAngle );
    
  • How to find the ANGLE b/w two edges in Oracle Spatial

    How to find the ANGLE b/w two edges on Oracle Spatial. I have two edge connected on the same node. I wanted to know the angle betwwn them. Can someone help me?

    Ok. My first example is an approximation. Further you get North or South of the Ecuador, gets the more vague.
    This one should do the trick with some degree of precision.

    declare
      PI constant number := 3.14159265358979;
      g1 sdo_geometry;
      g2 sdo_geometry;
      g3 sdo_geometry;
    
      angle1 number;
      angle2 number;
    
      FUNCTION POINT(P_LAT  IN number
                    ,P_LONG IN number)
        RETURN MDSYS.SDO_GEOMETRY IS
      BEGIN
        -- we load both the ordinate array and the point type because some spatial functions show inconsistent behavior
        -- it is not important for this example, just something to be aware of
        return(mdsys.sdo_geometry(2001,8307 -- WGS84
                                 ,mdsys.sdo_point_type(p_long,p_lat,null)
                                                      ,mdsys.sdo_elem_info_array(1,2,1)
                                                      ,mdsys.sdo_ordinate_array(p_long,p_lat)));
      END;
    
    begin
    
      -- For the example, project in WGS84
      -- g1,g2,g3 could also come straight out of the database as sdo_geometry
      g1 := point(50, 7);          -- Point A
      g2 := point(51, 7);          -- Point B
      g3 := point(50,10);          -- Point C
    
      angle1 := atan2(g2.sdo_point.x - g1.sdo_point.x,
                      g2.sdo_point.y - g1.sdo_point.y);
      angle2 := atan2(g3.sdo_point.x - g1.sdo_point.x,
                      g3.sdo_point.y - g1.sdo_point.y);
    
      -- depending on rotation and where we are on the planet, adjustments may be needed
      if angle1 < 0      then angle1 := angle1 + 2 * PI; end if;
      if angle2 < 0      then angle2 := angle2 + 2 * PI; end if;
      if angle2 < angle1 then angle2 := angle2 + 2 * PI; end if;
    
      dbms_output.put_line('Angle between the lines A-B and A-C: '||
                           round(sdo_util.convert_unit(angle2-angle1,'Radian','Degree'),1));
    end;
    
    Angle between the lines A-B and A-C: 90
    
  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to get the podcast of the website on the phone

    I was told to put that feed into the PODCASTING app on your iOS device.

    The site in question is https://randirhodes.com/how-to-get-the-podcast/

    I paid for a premium podcast, now how o I get this podcast to appear on my iphone 6 s more in the podcast app?

    Podcasts > select my Podcasts > press the '+' > Add Podcast > paste the URL that you got on the site.

  • How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be.

    How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be. I started with the last update that I rebooted.

    Hello
    to change the homepage when opening firefox-press 'Alt' and click on tools-> Options.

    Main menu, you can change the URL.

    If the problem persists, you can follow these simple steps:

    Enter about: config in the address bar and press ENTER. Accept the message of 'dragons' to see the Advanced preferences screen. Use the above search box to enter the below pref.

    You can assign an empty string to stop your Firefox to retrieve "extracts" and brandLogo changes the browser.aboutHomeSnippets.updateUrl pref. Right-click this pref and select Edit then clear the value as pref in the box that appears, and then click OK. Who will also disable "snippets" that appear under the container of the research on the default home page.

    Then you must open the folder of your profile, via help > Troubleshooting Information > profile folder > > button view folder. Then close Firefox. Your profile file open with Firefox closed (Firefox '3-bar' menu key > exit/Quit), wait or two minutes, then remove the storage\moz-safe-about + home folder in the Firefox profile folder to remove the brandLogo and stored in IndexedDB code snippets to make Firefox use the default brandLogo and a defined default code snippet.

    If you later change your mind about these changes, you can reset the pref browser.aboutHomeSnippets.updateUrl via the context menu and Reset allows to retrieve the default value using the storage\moz-chest-fort-about + home folder again.

  • where and how to get the new Firefox add - one of who is spying on us. Please mail to...

    Heard speak adds the new on Fire Fox. Where and how to get the new Firefox add - one of who is spying on us. Please mail to maheshubhayakar at rediffmail.com

    edited by email address - moderator

    It is helpful if you provide a link to the article you were reading.

  • Re: How to get the Tempo to work properly?

    Hello

    I have problems with the service of Tempo.

    I don't get updates via this application (all the settings of this application are accurate, i.e. "full control"). I know this because there are updates available online to my laptop via the pilot site of toshiba.

    When I installed first Tempo, updates for about a month, I received, and then all of a sudden, no update came through. My firewall is blocking either of this application.

    I tried to reinstall the application, but no change in the situation.

    Does anyone know if ALL updates are available via the website of driver toshiba out tempo? Because, in the month that this service worked, I got an update of the bios, but I recently saw a bios update online and Tempo has not always reports that it is available.

    Any ideas on how to get the Tempo to work properly?

    Thank you.

    I saw in your other thread you have installed SP1 on your Vista laptop.
    There may be some compatibility problems between SP1 and Tempo

    And Yes, as far as I know Tempo bring all available updates!

  • I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    The fastest way is to use the option 'Restore the default toolbar set' as shown here - https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • How to get the physical credit iTunes gift card?

    How to get the physical gift card iTunes on your iTunes store account balance?

    • You cannot buy an iTunes gift with in-store credit.

    See the link below to buy physical gift cards for iTunes.

    http://www.Apple.com/shop/gift-cards

  • Satellite Pro M50 with Vista: how to get the S-video on the job?

    Hi all

    I have a vista equipped Satellite Pro M50. Does anyone know how to get the S-video on the job? I can't understand.

    Inadvance, see you soon

    Phil

    Did you look in the user manual?
    This doc is always pre-installed on laptop and provides useful information. Also how to connect a TV and use simple notebooks ports.

    A hint; You must use an s-video cable to connect the laptop to the TV.
    Then use the FN + F5 key combination to switch between display devices.
    Sometimes the special s-video option must be enabled on the TV.

    I would recommend consulting the manual of the TV also.

    Good bye

  • How to get the manual for Satellite Pro 4200?

    How to get the manual for Pro 4200. I have download olm_up and setup.exe (72 kt) of http://eu.computers-toshiba-europe.com?.

    Hello

    Please visit this link:
    http://EU.computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/download_manuals.jsp

    I m you will find a good manual of your device.

    Good bye

Maybe you are looking for

  • Apple iOS 10 music

    This is a review or complaint: I'm not a shrew of forum, but I miss the old Apple music so badly!  It worked so well for me and looked so beautiful and elegant.  This new look is very childish and boring for me.  I appreciated the changes of color on

  • I have to move the mouse to load pages

    HelloI am running version 34.0 Firefox and I have to move the mouse to load pages or videos. I don't have to do this problem in Internet Explorer, Firefox only.

  • HP 14-y002la

    HelloI just bought hp 14-Y002LA laptop but without memory. I tried to install the ddr3 memory and wifi only light is orange. If I turn on the laptop without flashes of lock memory num 3 times indicating that he has no recollection. I want to know wha

  • Satellite L755 - 16 M - Webcam doesn't work not running not Win 10

    MI webcam does not work after installing Windows 10. Any solution available?

  • Question of trivial case structure

    I am using a chain with a structure of case control. According to the string value, I want the VI to show some sort of an indicator on the front panel. If the value is 00 I want to show him "Local." If the value is 10 I want to show him 'Off '. If th