|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
这是录的日志里草图偏置曲线里的- y2 K& i% e0 p. j5 M( W7 ~+ q7 l. Z
NXObject nXObject2;
6 ^1 K3 z) A6 h, Z4 p nXObject2 = skeTChOffsetBuilder1.Commit(); ~: n3 w$ D" U) i
4 L- L' u3 _9 H NXObject[] objects1;
2 b" I' Y& u( y objects1 = sketchOffsetBuilder1.GetCommittedObjects();, |( H. p0 n3 N. P
我返回了nXObject2;
" m" T4 t" O- w并录制了一个草图拉伸的日志 里面这么写的0 n; |' V: R, q* G% l/ Q3 O
NXOpen.Features.Feature[] features1 = new NXOpen.Features.Feature[1];
, p5 G' Z' H/ x0 f) k; m1 d* ? NXOpen.Features.SketchFeature sketchFeature1 = (NXOpen.Features.SketchFeature)workPart.Features.FindObject("SKETCH(16)");
' V1 P6 ~2 D7 e$ I7 L features1[0] = sketchFeature1;# }. ~$ A/ x7 s0 @( D
Sketch sketch1 =(Sketch)workPart.Sketches.FindObject("SKETCH_00SKETCH_000");" _: G6 \2 v2 n' A9 `* x$ ?
Line line1 = (Line)sketch1.FindObject("Curve Line4");
6 a, p+ y, f1 O3 w3 N0 Q Curve nullCurve = null;
! k" q3 E7 [7 a3 H CurveFeatureChainRule curveFeatureChainRule1;
! i9 D5 g( N o7 w! y6 _$ B) C curveFeatureChainRule1 = workPart.ScRuleFactory.CreateRuleCurveFeatureChain(features1, line1, nullCurve, false, 0.00095);
3 S7 i) |* G, A* [( u* e , }5 i1 P% w2 w# U. u3 `" r
section1.AllowSelfIntersection(true);
. l q, z5 C4 m W- |2 H& C , t! u9 t$ Y# _! Z
SelectionIntentRule[] rules1 = new SelectionIntentRule[1];! v& v a! R; q
rules1[0] = curveFeatureChainRule1;$ O4 u$ C1 T4 N" p+ t8 L
NXObject nullNXObject = null;
# M1 T1 C8 J8 J+ z2 M Point3d helpPoint1 = new Point3d(-18.8530653857088, 21.736029640554, 0.0);4 O) ^( t+ J0 H" f4 ~
section1.AddToSection(rules1, line1, nullNXObject, nullNXObject, helpPoint1, NXOpen.Section.Mode.Create, false);
7 J# _$ V+ K: ]2 \: a8 v7 D9 x我把NXOpen.Features.SketchFeature sketchFeature1 = (NXOpen.Features.SketchFeature)workPart.Features.FindObject("SKETCH(16)");
* {" y9 n/ ]+ f改成了NXOpen.Features.SketchFeature sketchFeature1 = (NXOpen.Features.SketchFeature)nXObject2;! M+ E' b5 C3 D
它报错说无法将 NXOpen.sketchoffset强制转换成NXOpen.features.sketchfeature;
* U7 ^0 ~! B2 l$ G! e0 `- y* ^
f% p& u" Z( r: @* [2 l再录一段没有草图的拉伸" c- y c, ^$ f* g, w' L% Z
NXOpen.Features.Feature[] features1 = new NXOpen.Features.Feature[1]; R3 s9 [+ u' y
NXOpen.Features.OffsetCurve offsetCurve1 = (NXOpen.Features.OffsetCurve)nXObject2;//在这写了nXObject2
+ b( n7 f( @7 w; {& S- L features1[0] = offsetCurve1;
% K. K& M+ |+ H workPart.Features.SuppressFeatures(features1);3 B' L+ k6 U7 j+ i' M
它报错说无法将 NXOpen.sketchoffset强制转换成NXOpen.Features.OffsetCurve;0 I* _ j2 W' A
* P9 u$ m5 A& J求高手告诉我下怎么转换6 N' s! `7 F) Y% K U' w, G5 {
|
|