home *** CD-ROM | disk | FTP | other *** search
- /* apsol.h
- * (C) Copyright 1988-1992 by Autodesk, Inc.
- *
- * This program is copyrighted by Autodesk, Inc. and is licensed
- * to you under the following conditions. You may not distribute
- * or publish the source code of this program in any form. You
- * may incorporate this code in object form in derivative works
- * provided such derivative works are (i.) are designed and
- * intended to work solely with Autodesk, Inc. products, and
- * (ii.) contain Autodesk's copyright notice "(C) Copyright
- * 1988-1992 by Autodesk, Inc."
- *
- * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
- * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MER-
- * CHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
- * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
- * UNINTERRUPTED OR ERROR FREE.
- */
-
- #define FALSE 0
- #define TRUE 1
-
- #define AP_NORMAL 1
- #define AP_FAIL -1
- #define AP_BAD_INPUT -2
- #define AP_MEM_OUT -3
-
- typedef short ap_Status;
- typedef unsigned long ap_Solid; /* Solid Identifier */
- typedef short ap_Bool; /* Boolean Type */
- typedef ads_real ap_Real; /* Real Declaration */
-
- typedef ads_real ap_Trans3d[4][4]; /*Rigid Motion Matrix */
-
- typedef enum
- {
- AP_DIFF = 0,
- AP_INT,
- AP_UN
- }Ap_bool; /* Boolean OPerators */
-
- typedef enum
- {
- AP_BOX = 0,
- AP_CON,
- AP_CYL,
- AP_SPH,
- AP_TOR,
- AP_FIL,
- AP_CHA,
- AP_BOO,
- AP_EXT,
- AP_REV,
- AP_WED
- }Ap_solid; /* Different Solid Types */
-
-
- typedef enum
- {
- AP_PT_LINE = 0,
- AP_PT_ARCEND /* End of an Arc */
- } Appointtype; /*Point Types for Sweep Solids */
-
- typedef struct ap_swp_pts
- {
- ap_Real x;
- ap_Real y;
- Appointtype type;
- }ap_Swp_pts; /* Sweep Points */
-
- struct apboxinfo
- {
- ads_real x, y, z;
- };
-
- struct apwedinfo
- {
- ads_real x, y, z;
- };
-
- struct apcylinfo
- {
- ads_real rx, ry, h;
- };
-
- struct apconinfo
- {
- ads_real rx, ry, h;
- };
-
- struct apsphinfo
- {
- ads_real r;
- };
-
- struct aptorinfo
- {
- ads_real rmaj, rmin;
- };
-
- struct apextinfo
- {
- ads_real h, taper;
- long n;
- ap_Swp_pts *pts;
- };
-
- struct aprevinfo
- {
- ads_real ang;
- ap_Bool xaxis;
- long n;
- ap_Swp_pts *pts;
- };
-
- struct apbooinfo
- {
- Ap_bool op;
- ap_Solid op1;
- ap_Solid op2;
- };
-
- typedef enum
- {
- AP_ST, /* straight fillet between two planar faces */
- AP_CIRC /* circular fillet between cyl, con and pln */
- }Ap_filcha;
-
- struct apfilinfo
- {
- Ap_filcha type;
- ads_real r;
- };
-
- struct apchainfo
- {
- Ap_filcha type;
- ads_real d1, d2;
- };
-
- /*
- Union of all the different Solid
- Parameters
- */
- typedef union
- {
- struct apboxinfo box;
- struct apwedinfo wed;
- struct apconinfo con;
- struct apcylinfo cyl;
- struct apsphinfo sph;
- struct aptorinfo tor;
- struct aprevinfo rev;
- struct apchainfo cha;
- struct apbooinfo boo;
- struct apextinfo ext;
- struct apfilinfo fil;
- }ap_Solidparam;
-
- /*
- * Solid Information of a Solid
- */
- typedef struct ap_solinfo
- {
- Ap_solid s_type; /* type of Solid */
- ap_Bool s_iswire; /* Representation Wireframe/Mesh */
- ap_Solid s_parent; /* Solid Identifier of the parent of the solid */
- ap_Bool s_isnull; /* true if the solid is NULL */
- ap_Trans3d s_mat; /* Rigid Motion of the Solid */
- short s_color; /* Color of the Solid */
- char s_matl[64]; /* the material of the solid */
- ap_Solidparam s_param; /* The Parameters of the Solid */
- }ap_Solinfo;
-
- typedef enum
- {
- AP_POSTMESH,
- AP_POSTWIRE,
- AP_UNPOST
- }Ap_posttype; /* different Posting Options */
-
- typedef struct
- {
- ap_Real x, std_x;
- ap_Real y, std_y;
- ap_Real z, std_z;
- }ap_Mppt; /* A Massproperty Point For Inertias etc. */
-
- typedef struct
- {
- ap_Real x1, x2;
- ap_Real y1, y2;
- ap_Real z1, z2;
- }ap_Extent; /* Extents of the SOlid */
-
- /*
- * Structure storing the Massproperties of the Solid
- */
- typedef struct ap_mprop
- {
- short sublevel; /* Level of subdivision */
- ap_Real mass; /* Mass of the Solid */
- ap_Real volume; /* Volume of the Solid */
- ap_Real std_vol; /* Error in Massprop Volume */
- ap_Extent box; /* Extents of the Solid */
- ap_Mppt centroid; /* Centroid */
- ap_Mppt momint; /* Moments of Inertia */
- ap_Mppt prodint; /* Product of Inertia */
- ads_point radgyr; /* Radii of Gyration */
- ads_point prinmomt; /* Principal Moments about the Centorid */
- ads_point prindir[3]; /* Principal Directions of the respective PM */
- }ap_Mprop;
-