home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 January
/
Chip_1997-01_cd.bin
/
ms95
/
disk22
/
dir01
/
f011890.re_
/
f011890.re
Wrap
Text File
|
1996-04-02
|
13KB
|
477 lines
/*----------------------------------------------------------------------+
| |
| Copyright (c) 1992-93; Bentley Systems, Inc., All rights reserved. |
| |
| "MicroStation", "MDL", and "MicroCSL" are trademarks of Bentley |
| Systems, Inc. |
| |
| Limited permission is hereby granted to reproduce and modify this |
| copyrighted material provided that the resulting code is used only |
| in conjunction with Bentley Systems products under the terms of the |
| license agreement provided therein, and that this notice is retained |
| in its entirety in any such reproduction or modification. |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Current Revision: |
| $Workfile: mscons.fdf $
| $Revision: 6.1 $ $Date: 29 Jun 1995 14:26:26 $
| |
+----------------------------------------------------------------------*/
#ifndef __msconsFDF__
#define __msconsFDF__
/*----------------------------------------------------------------------+
| |
| Header File Dependencies |
| |
+----------------------------------------------------------------------*/
#include <mscons.h>
#include <msslvr.h>
#include <mdlbspln.h>
/*======================================================================+
| |
| Major Public Code Section |
| |
+======================================================================*/
/*-----------------------------------------------------------------------
Frames
-----------------------------------------------------------------------*/
ConsFrame *mdlConsFrame_createPoint
( /* <= this */
ConsFrame *pThis, /* <= */
DPoint3d *p /* => initial location */
);
ConsFrame *mdlConsFrame_createLine
( /* <= this */
ConsFrame *pThis, /* <= */
DPoint3d *p1, /* => initial location of one point on line */
DPoint3d *p2 /* => "" another point on line */
);
ConsFrame *mdlConsFrame_createEllipse
( /* <= this */
ConsFrame *pThis, /* <= */
DPoint3d *c, /* => initial location of center */
double r, /* => primary radius */
double r2, /* => secondary radius */
double zr /* => rotation (about z-axis) */
);
ConsFrame *mdlConsFrame_createCircle
( /* <= this */
ConsFrame *pThis, /* <= */
DPoint3d *c, /* => initial location of center */
double r /* => radius */
);
ConsFrame *mdlConsFrame_createBspline
( /* <= this */
ConsFrame *pThis, /* <= */
MSBsplineCurve *pCurve /* => */
);
ConsFrame *mdlConsFrame_createBsplineCell
( /* <= this */
ConsFrame *pThis, /* <= */
MSBsplineCurve *pCurve, /* => */
Dpoint3d *pCenter, /* => */
double angle /* => */
);
int mdlConsFrame_isUnderDetermined
( /* <= TRUE or FALSE */
ConsFrame *pThis
);
/*-----------------------------------------------------------------------
Parameters
-----------------------------------------------------------------------*/
ConsParm *mdlConsParm_create
( /* <= this or NULL if error */
ConsParm *pThis, /* <= */
char *name, /* => parm's identifier */
double value, /* => initial value */
int units /* => */
);
ConsParm *mdlConsParm_setUnits
( /* <= this or NULL if units don't set */
ConsParm *pThis, /* <=> */
int u /* => */
);
/*-----------------------------------------------------------------------
Constraints:
-----------------------------------------------------------------------*/
Constraint *mdlConstraint_createPointLocation
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint /* => */
);
Constraint *mdlConstraint_createRadius
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pEllipse, /* => ellipse (or simple circle) */
int ri /* => CONS_ELLIPSE_R or CONS_ELLIPSE_R2 */
);
Constraint *mdlConstraint_createDiameter
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pEllipse, /* => ellipse (or simple circle) */
int ri /* => CONS_ELLIPSE_R or CONS_ELLIPSE_R2 */
);
Constraint *mdlConstraint_createPointOn
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint, /* => */
ConsFrame *pC /* => line, ellipse */
);
Constraint *mdlConstraint_createConcentric
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint, /* => */
ConsFrame *pPoint2 /* => */
);
Constraint *mdlConstraint_createIntersection
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint, /* => */
ConsFrame *pC, /* => line, ellipse */
ConsFrame *pC1 /* => line, ellipse */
);
Constraint *mdlConstraint_createDistance
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint, /* => */
ConsFrame *pPoint2 /* => */
);
Constraint *mdlConstraint_createPCDistance
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pPoint, /* => */
ConsFrame *pFrame /* => */
);
Constraint *mdlConstraint_createOffset
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pFrame, /* => */
ConsFrame *pFrame2, /* => */
int attr /* => attribute of frames to relate */
);
Constraint *mdlConstraint_createLLDistance
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pLine, /* => */
ConsFrame *pLine2 /* => */
);
Constraint *mdlConstraint_createAngle
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pLine, /* => */
ConsFrame *pLine2, /* => */
Dpoint3d angle[3] /* => center, startpoint, endpoint of angle to measure
*/
);
Constraint *mdlConstraint_createAngleX
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pLine, /* => */
boolean fromX /* => TRUE: measure angle from x-axis; else: from y-axis */
);
Constraint *mdlConstraint_createParallel
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pLine, /* => */
ConsFrame *pLine2 /* => */
);
Constraint *mdlConstraint_createPerpendicular
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pLine, /* => */
ConsFrame *pLine2 /* => */
);
Constraint *mdlConstraint_createIOTangent
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pCircle, /* => */
ConsFrame *pCurve2 /* => */
);
Constraint *mdlConstraint_createTangent
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pCurve, /* => */
ConsFrame *pCurve2, /* => */
Dpoint3d *pHint /* => optional: about where point of tan is */
);
Constraint *mdlConstraint_createPinPoint
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pF, /* => */
Dpoint3d *pIPoint /* => initial point location */
);
Constraint *mdlConstraint_createLockFrame
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pFrame /* => */
);
Constraint *mdlConstraint_createLockVar
( /* <= this */
Constraint *pThis, /* <= */
Var *pVar /* => */
);
Constraint *mdlConstraint_createAssignment
( /* <= this */
Constraint *pThis, /* <= Assignment constraint to define */
Constraint *pTarget, /* <=> Dim. constraint to which parm is assigned */
ConsParm *pParm /* => Parameter to assign to it */
);
Constraint *mdlConstraint_createMatch
( /* <= this */
Constraint *pThis, /* <= */
ConsFrame *pFrame, /* => */
ConsFrame *pFrame2 /* => */
);
ConsFrame *mdlConstraint_getTarget
( /* <= i'th target ConsFrame */
Constraint *pThis, /* => */
int i /* => */
);
int mdlConstraint_rGroup
( /* <= redundancy group of 1st redundant eqn */
Constraint *pThis
);
int mdlConstraint_flipInsideOutside
( /* <= ERROR if not appropriate */
Constraint *pThis /* <=> constraint to modify */
);
int mdlConstraint_chooseSolution
( /* <= ERROR if not appropriate */
Constraint *pThis, /* <=> constraint to modify */
Dpoint3d *pPoint /* => point close to desired solution */
);
void mdlConstraint_setWeak
(
Constraint *pThis, /* <=> constraint to modify */
boolean isWeak /* => attribute value */
);
void mdlConstraint_setPostCheck
(
Constraint *pThis, /* <=> constraint to modify */
boolean isPostCheck /* => attribute value */
);
/*-----------------------------------------------------------------------
Algebraic Equation Constraints:
-----------------------------------------------------------------------*/
ConsEquation *mdlConsEquation_create
(
ConsEquation *pThis, /* <= */
boolean isCheck /* => is this a post-check? */
);
int mdlConsEquation_parse
( /* => SUCCESS or ERROR */
ConsEquation *pThis, /* <= empty equation ... parsed */
char *str /* => */
);
int mdlConsEquation_resolve
( /* <= SUCCESS or ERROR */
ConsEquation *pThis, /* <= parsed equation ... resolved */
ConsModel *pModel /* => model in which to look for vars */
);
int mdlConsEquation_gen
( /* <= SUCCESS or ERROR */
ConsEquation *pThis /* <= resolved equation ... made ready for computing */
);
/*-----------------------------------------------------------------------
Attachments:
-----------------------------------------------------------------------*/
ConsAttachment *mdlConsAttachment_create
( /* <= this */
ConsAttachment *pThis, /* <= */
int typ, /* => */
Cons *targets[], /* => */
int nTargets /* => */
);
/*-----------------------------------------------------------------------
Model:
-----------------------------------------------------------------------*/
void *mdlConsMod_add
( /* <= pNode */
ConsModel *pThis, /* <=> */
void *pNode /* <=> */
);
void mdlConsMod_concat
(
ConsModel *pThis, /* <=> */
ConsModel *pModel2 /* => */
);
void *mdlConsMod_drop
( /* <= pNode */
ConsModel *pThis, /* <=> */
void *pNode /* => */
);
ConsModel *mdlConsMod_create
( /* <= this */
ConsModel *pThis /* <= */
);
void mdlConsMod_destroy
(
ConsModel *pThis
);
void mdlConsMod_destroyNodes
(
ConsModel *pThis
);
void mdlConsMod_chooseSolution
(
ConsModel *pThis, /* <=> */
boolean unused /* => */
);
int mdlConsMod_solve
( /* <= SUCCESS, ERROR or -3 (NOP) */
ConsModel *pThis /* <=> (status, pCheck set) */
);
int mdlConsMod_validate
( /* <= SUCCESS if not inconsistencies; else ERROR */
ConsModel *pThis /* => (validateStatus, dof set) */
);
int mdlConsMod_dof
( /* <= degrees of freedom in system */
ConsModel *pThis /* => */
);
void mdlConsMod_backupVars
(
ConsModel *pThis
);
void mdlConsMod_restoreVars
(
ConsModel *pThis
);
void mdlConsMod_apply
(
ConsModel *pThis, /* => */
void (*fp) (), /* => */
void *arg /* => */
);
boolean mdlConsMod_isFound
( /* <= TRUE or FALSE */
ConsModel *pThis, /* => */
void *pNode /* => */
);
int mdlConsMod_transform
(
ConsModel *pThis, /* <=> */
Transform *pTransform /* => */
);
int mdlConsMod_offset
(
ConsModel *pThis, /* <=> */
Dpoint3d *pOff /* => */
);
void mdlConsMod_mirror
(
ConsModel *pThis, /* => */
Dpoint3d *pO, /* => start of line of symmetry */
RotMatrix *pRot /* => orientation of line of symmetry */
);
/*-----------------------------------------------------------------------
Constraints, Frames, etc.
-----------------------------------------------------------------------*/
Dpoint3d *mdlCons_getPoint
( /* <= pPoint if successful; else NULL */
Dpoint3d *pPoint, /* <= location of object */
Cons *pThis /* => Constraint or cons1Frame to query */
);
RotMatrix *mdlCons_getRMatrix
( /* <= pRot */
RotMatrix *pRot, /* <= RMatrix describing object's geometry */
Cons *pThis /* => */
);
int mdlCons_isChanged
( /* <= TRUE or FALSE */
Cons *pThis
);
Var *mdlCons_getVar
( /* <= i-th variable or NULL if out of range */
Cons *pThis, /* => */
int i /* => */
);
int mdlCons_isOperational
( /* <= TRUE or FALSE */
Cons *pThis
);
void mdlCons_destroy
(
Cons *pThis /* <=> */
);
#endif