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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-05, 11:53 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】hatch names, oddbhatchsetpattern

hatch names, oddbhatch::setpattern
hatch names, oddbhatch::setpattern
hi,
oddbhatch::setpattern throws an exception if hatch pattern name is something like brick,_o (132, bad name for hatch pattern). acad accepts pattern names like this, see attached sample file.
does name check depend on the type of the pattern ?
- jukkas
attached files
this exception means that pattern "brick" is unknown to pattern manager.
hatch patterns can be of 3 types:
user defined - simple hatching which is completely defined by oddbhatch methods setpatternspace(), setpatternangle() and setpatterndouble() no pattern manager and .pat files are required in this case.
custom defined and predefined patterns are described in .pat files.
predefined patterns reside in acad.pat file for english drawings and in acadiso.pat for metric ones.
custom defined pattern must be described in file <patternname>.pat
dd's pattern manager loads the patterns from .pat file. but where is an option to avoid using .pat files - adding the patterns to pattern manager programmatically - oddbhatchpatternmanager::appendpattern().
if pattern description presents in setpattern() where is no need in pattern manager.
odwriteex sample contains code illustrating different ways of specifying
hatch pattern.
sergey slezkin
sergey,
i've allmost managed to write all hatch types. but, it looks like setpattern may change the type of the hatch ?
i've created a pattern, given it to pattern manager using appendpattern. if hatch style is set to knormal before setpattern, it is kouter after the call (pattern is red from an hatch, which originally had kouter style).
also, hatch does not display in acad, if style is kouter, until style is changed to normal. but if i set the style to knormal after setpattern, hatch is displayed.
all example code in odwriteex seems to be using knormal. also, it is set after setpattern is called. is this the way setpattern / sethatchstyle should be used ?
- jukkas
setpattern() forses hatch to be outer or ignore if pattern name has _o or _i suffix.
brick,_o means:
name - brick
style - outer
hatch with outer island detection style may be not displayed because of loop types.
outer hatch covers area between external and outermost loops.
sergey slezkin
sergey,
many thanks. seems that code that writes the loops need checking, the problem with kouter - style was fixed when i changed style in appendloop from kdefault to kexternal.
if there any documentation that describes how different flags for appendloop are used and how loops should be written ? there is not much information in odwriteex.
- jukkas
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】dxf entities names as it is yang686526 DirectDWG 0 2009-05-05 08:47 AM
【转帖】dwf layout names yang686526 DirectDWG 0 2009-05-05 07:49 AM
【转帖】pdmworks ent block and attribute names for pdf yang686526 SolidWorks二次开发 0 2009-04-13 01:23 PM
【转帖】changing configuration names using document manager yang686526 SolidWorks二次开发 0 2009-04-13 09:40 AM
OpenGL 选择与反馈 huangyhg OpenGL图形显示 0 2007-01-02 07:10 PM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多