gCAD3D 2.40
xa_sele.c File Reference

obj. selections More...

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_BitTab.h"
#include "../ut/ut_gtypes.h"
#include "../gui/gui_types.h"
#include "../ut/func_types.h"
#include "../gr/ut_DL.h"
#include "../db/ut_DB.h"
#include "../xa/xa_sele.h"
#include "../xa/xa_uid.h"
#include "../xa/xa_ato.h"


static BitTab (reqObjTab, TYP_SIZ)
static BitTab (bck_ObjTab, TYP_SIZ)
int sele_ck_subCurv (subCurv sca[3], int typ, long dbi, Point *selPos)
int sele_set_icon (int *ib, int iTyp)
int UI_GR_set_sel_obj (int typ, long dbi)
int UI_GR_set_sel__ (long objInd)
int UI_GR_set_selKey (int key)
int UI_GR_set_selNam (int selTyp, long selDbi, char *selNam)
int sele_get_selPos (Point *pts)
int UI_GR_get_selNam (int *selTyp, long *selDbi, char **selNam)
int sele_set_pos (Point *spt)
int sele_get_reqTyp ()
int sele_get_pos (Point *pto)
int sele_ck_typ (int iTyp)
int sele_setNoParents (int mode)
int sele_ck_NoParents ()
int sele_ck_ConstrPln ()
int sele_dump2 ()
int sele_dump1 ()
int sele_decode ()
int sele_reset ()
int sele_reset_type (int ib)
int sele_set_types (int i0,...)
int sele_set__ (int rTyp)
int sele_set_add (int rTyp)
int sele_setNoConstrPln ()
int sele_save ()
int sele_restore ()


int WC_sur_ind
 Der Index auf die ActiveConstrPlane. More...
Mat_4x3 WC_sur_imat
 inverse TrMat of ActiveConstrPlane More...
int UI_InpMode
int GR_Event_Act
static int GR_selTmpStat
int GR_selBasTyp
int GR_selTyp
long GR_selDbi
long GR_selDli
char GR_selNam [128]
static Point GR_selPos
static int GR_reqTyp
static int GR_NoConstrPln
static int GR_NoParents =0
static int bck_GR_NoConstrPln

Detailed Description

obj. selections

sele_ck_typ Test if obj of typ iTyp is a requested typ.
sele_ck_ConstrPln Test if must add "ConstrPlane" to option-menu
sele_ck_NoParents test if must add parents to selection-list
sele_set_icon add 2D-icon to list
sele_ck_subCurv get (max.) 3 subcurves for a selected curve
sele_decode decode selected object; change sel_object into req_object
sele_reset reset selectionFilter
sele_reset_type reset a single bit
sele_set__ set selectionFilter
sele_set_add add obj to selectionfilter; typeGroups can be used;
sele_set_types set selectionFilters
sele_setNoConstrPln disable selection of point on ConstrPln
sele_setNoParents add or do not add parents to selection-list
sele_get_selPos returns selected position as point on selected object
UI_GR_get_selNam return typ, dbi & name of the selected obj
sele_dump1 print reqObjTab

Function Documentation

static BitTab ( reqObjTab  ,
static BitTab ( bck_ObjTab  ,
int sele_ck_subCurv ( subCurv  sca[3],
int  typ,
long  dbi,
Point selPos 
* get (max.) 3 subcurves for a selected curve.
* sca[0] subCurve
* sca[1] point
* sca[2] vector
* Input:
* typ,dbi DB-obj to check (selected curve)
* selPos selection-point
* Output:
* sca max 3 sub-parts of obj typ,dbi
* retCod nr of objs out
* get eg selected part of CCV or polygon
int sele_set_icon ( int *  ib,
int  iTyp 
int UI_GR_set_sel_obj ( int  typ,
long  dbi 
int UI_GR_set_sel__ ( long  objInd)
int UI_GR_set_selKey ( int  key)
int UI_GR_set_selNam ( int  selTyp,
long  selDbi,
char *  selNam 
int sele_get_selPos ( Point pts)
* returns selected position as point.
* selectionFilter must have been set to point (sele_set__ (Typ_PT) !)
* RetCod:
* -2 point not requested ..
* -1 cannot convert to point
* 0 indicate; nothing selected ..
* 1 point-object selected;
* 2 curve- or surface-obj selected; selection-position computed
int UI_GR_get_selNam ( int *  selTyp,
long *  selDbi,
char **  selNam 
* UI_GR_get_selNam return typ, dbi & name of the selected obj
* eg "P(S20 0.478)"
* get position with sele_get_pos
* Indicate: selNam is empty; get it with UI_GR_get_actPos_().
int sele_set_pos ( Point spt)
int sele_get_reqTyp ( )
int sele_get_pos ( Point pto)
* return mouseposition in userCoords
* position when mousebutton was pressed
int sele_ck_typ ( int  iTyp)
int sele_setNoParents ( int  mode)
* sele_setNoParents add or do not add parents to selection-list
* mode: 0=add-parents; 1=do-not-add-parents
* (parentObjs are unvisible)
int sele_ck_NoParents ( )
* sele_ck_NoParents test if must add parents to selection-list
* mode: 0=add-parents; 1=do-not-add-parents
int sele_ck_ConstrPln ( )
int sele_dump2 ( )
int sele_dump1 ( )
int sele_decode ( )
int sele_reset ( )
int sele_reset_type ( int  ib)
int sele_set_types ( int  i0,
* sele_set_types add additional objecttypes to selectionfilter
* calls BitTab_set with each type ..
* Example:
* sele_set__ (Typ_APPOBJ); // init
* sele_set_types (Typ_PLN, 0); // add CAD-planes
* sele_setNoConstrPln (); // allow selection of point on ConstrPln
int sele_set__ ( int  rTyp)
* init and set selectionFilter
* Input:
* rTyp = GR_reqTyp = requestedTyp; see ../xa/xa_sele.h
* Example:
* sele_set__ (Typ_PT); // Typ_PT+Typ_SUR+Typ_SOL+Typ_Model
* sele_set_types (Typ_PLN, 0); // add CAD-planes
* Example without sele_set__:
* sele_set_types (Typ_TmpPT, 0); // only indicate on active constrPln
* set reqObjTab = selectableTypes
* reqObjTab = all types that can be converted into rTyp
int sele_set_add ( int  rTyp)
* sele_set_add add obj to selectionfilter; typeGroups can be used;
* eg Typ_go_LCS = LN/CI/CV
* GR_reqTyp is not set !
int sele_setNoConstrPln ( )
int sele_save ( )
int sele_restore ( )

Variable Documentation

int WC_sur_ind

Der Index auf die ActiveConstrPlane.

Mat_4x3 WC_sur_imat

inverse TrMat of ActiveConstrPlane

int UI_InpMode
int GR_Event_Act
int GR_selTmpStat
int GR_selBasTyp
int GR_selTyp
long GR_selDbi
long GR_selDli
char GR_selNam[128]
Point GR_selPos
int GR_reqTyp
int GR_NoConstrPln
int GR_NoParents =0
int bck_GR_NoConstrPln