找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 16191|回复: 1
打印 上一主题 下一主题

[求助] 为何我的草图约束 并不对称,或者说对称得不理想

[复制链接]
跳转到指定楼层
1
发表于 2012-12-4 21:01:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我通过caa做出的草图约束 在CATIA里面为   对称1图片所示并不理想。
我想要的理想约束 如图 对称2

我首先 在草图中随意用三个点 创建了三条直线,然后对称约束:
double pt1[2] = {0, 250},
         pt2[2] = {250, 200},
         pt3[2] = {500, 500};

CATISpecObject_var spLine1 = spWF2DFactOnSketch->CreateLine(pt1,pt2);
  CATISpecObject_var spLine2 = spWF2DFactOnSketch->CreateLine(pt2,pt3);
  CATISpecObject_var spLine3 = spWF2DFactOnSketch->CreateLine(pt3,pt1);

spConstraint2DFactory->CreateConstraint( spLine2, NULL, spLine3, NULL, spLine1, NULL, NULL, Cst2DType_Symmetry, 0, 1 );


如何才能让我的对称约束变得理想呢?   
请教各位 看官!{:soso_e176:}

该贴已经同步到 zsong22的微博

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
发表于 2012-12-5 18:27:43 | 只看该作者
各位同仁, 问题已经解决!
主要是把约束后面的 1 换成0就好。   虽然 我也不懂这个数字代表什么!
spConstraint2DFactory->CreateConstraint( spLine2, NULL, spLine3, NULL, spLine1, NULL, NULL, Cst2DType_Symmetry, 0, 0);


附上,约束函数:
CreateConstraint
public virtual CATISpecObject_var CreateConstraint( CATBaseUnknown*  iElem1,
const double*  iSelPt1,
CATBaseUnknown*  iElem2,
const double*  iSelPt2,
CATBaseUnknown*  iElem3,
const double*  iSelPt3,
CATBaseUnknown*  iDirection,
const CAT2DCstType  iCstType,
const int  iDriven =0,
const int  iEvaluation =1) = 0  

Creates a constraint.
Parameters:
iElem1
[in] Address of the first geometrical element.
iSelPt1
[in] If the geometry is a curve, pass the 2D selection coordinates of the curve expressed according to the sketch system of reference. Else, pass NULL. (This entry serves as the initialization point of the resolution. If no information is passed, the system will evaluate one automatically. However, the returned solution (location where the constraint on the curve will be solved) can be unexpected for the user).
iElem2
[in] Address of the second geometrical element. Pass NULL if necessary (e.g. for a length constraint, only iElem1 should be valuated).
iSelPt2
[in] If the geometry is a curve, pass the 2D selection coordinates of the curve expressed according to the sketch system of reference. Else, pass NULL. (This entry serves as the initialization point of the resolution. If no information is passed, the system will evaluate one automatically. However, the returned solution (location where the constraint on the curve will be solved) can be unexpected for the user).
iElem3
[in] Address of the third geometrical element. Pass NULL if necessary.
iSelPt3
[in] If the geometry is a curve, pass the 2D selection coordinates of the curve expressed according to the sketch system of reference. Else, pass NULL. (This entry serves as the initialization point of the resolution. If no information is passed, the system will evaluate one automatically. However, the returned solution (location where the constraint on the curve will be solved) can be unexpected for the user).
iDirection
[in] Address of a geometrical element of the line type to create an oriented dimension. (e.g. vertical if the V direction of the sketch absolute axis is passed, or horizontal if the H direction is passed).
iCstType
[in] Type of the constraint to create.
iDriven
[in] The default value 0 corresponds to a driving dimension. If <> 0, if will be a measured dimension (reference constraint).
iEvaluation
[in] The default value 1 implies a solver evaluation after the constraint is created. If several constraints must be created successively, you can run explicitly a final evaluation by setting the value to 0.

还望,懂这个函数的同仁给于指点,   比如:参数const double*  iSelPt1 什么意思。  以及最后两个参数什么意思?
{:soso_e176:}

您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2025-1-24 16:27 , Processed in 0.025357 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2025 www.iCAx.org

快速回复 返回顶部 返回列表