几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】select An Object By Mouse To Setget Its Properties (http://www.dimcax.com/hust/showthread.php?t=18516)

yang686526 2009-05-07 03:31 PM

【转帖】select An Object By Mouse To Setget Its Properties
 
select an object by mouse to set/get its properties
select an object by mouse to set/get its properties
hi everybody,
i searched a lot in the forum on this subject, but unfortunately all i found were unanswered or outdated :-(
i抎 like to know that is it possible to give this ability to users of my program to select an object (such as lines or rectangles? by mouse?
in other word, i want a very very simple cad-like program.
users do not need to draw, all they need is to select (internally drawn) objects by mouse to set or get its properties.
impossible or i抦 possible???
quote:
originally posted by mohammad
hi everybody,
i searched a lot in the forum on this subject, but unfortunately all i found were unanswered or outdated :-(
i抎 like to know that is it possible to give this ability to users of my program to select an object (such as lines or rectangles? by mouse?
in other word, i want a very very simple cad-like program.
users do not need to draw, all they need is to select (internally drawn) objects by mouse to set or get its properties.
impossible or i抦 possible???
possible :-)
i dont know if a routine exists inside of opendwg, but the steps to take otherwise are :
1 . create a octtree (3d) or a quadtree (2d), and index the entities .
2 . as the user moves around the drawing, map back to the index, and search for all intersecting/closest entities in that quadrant of the tree.
3 . look up entity from oddbdatabase.
quadtree's and octtree's are heavily documented : see
or
to get started.
cheers
jason
look at examples\win\odamfcapp sample
vladimir


所有的时间均为北京时间。 现在的时间是 06:50 AM.