NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Sketch.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// Header for C++ interface to JA API
5//--------------------------------------------------------------------------
6//
7// Source File:
8// Sketch.ja
9//
10// Generated by:
11// apiwrap
12//
13// WARNING:
14// This file is automatically generated - do not edit by hand
15//
16#pragma once
17#include <NXOpen/NXDeprecation.hxx>
18#include <vector>
19#include <NXOpen/NXString.hxx>
20#include <NXOpen/Callback.hxx>
21#include <NXOpen/ErrorList.hxx>
22#include <NXOpen/DisplayableObject.hxx>
23#include <NXOpen/INXObject.hxx>
24#include <NXOpen/IProfile.hxx>
25#include <NXOpen/type.hxx>
26#include <NXOpen/ugmath.hxx>
27#include <NXOpen/libnxopencpp_exports.hxx>
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable:4996)
31#endif
32#ifdef __GNUC__
33#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
34#endif
35namespace NXOpen
36{
37 class Sketch;
38 namespace Annotations
39 {
40 class Dimension;
41 }
42 class Arc;
43 namespace Assemblies
44 {
45 class Component;
46 }
47 class BasePart;
48 class Curve;
50 class ErrorList;
51 class Expression;
52 namespace Features
53 {
54 class Feature;
55 }
56 class INXObject;
57 class IProfile;
58 class IReferenceAxis;
59 class ISurface;
60 class InfiniteLine;
61 class NXMatrix;
62 class NXObject;
63 class Point;
64 namespace Preferences
65 {
67 }
68 class SketchConstraint;
72 class SketchRelation;
75 class SmartObject;
76 class Spline;
77 class View;
78 class _SketchBuilder;
79 class SketchImpl;
83 class NXOPENCPPEXPORT Sketch : public NXOpen::DisplayableObject, public virtual NXOpen::IProfile
84 {
95
101
107
113
125
155 public:
156 struct ConstraintGeometry
157 {
160 public: int SplineDefiningPointIndex;
162public: ConstraintGeometry() :
163 Geometry(),
166 {
167 }
169 public: ConstraintGeometry(NXOpen::NXObject * geometryInitial ,
170 NXOpen::Sketch::ConstraintPointType pointTypeInitial ,
171 int splineDefiningPointIndexInitial ) :
173 Geometry(geometryInitial),
174 PointType(pointTypeInitial),
175 SplineDefiningPointIndex(splineDefiningPointIndexInitial)
176 {
177 }
178 };
179
195
199 public:
200 struct SketchGeometry
201 {
205 public: int PointIndex;
212 public: SketchGeometry() :
213 Geometry(),
214 PointType((NXOpen::Sketch::PointType)0),
215 PointIndex()
216 {
217 }
219 public: SketchGeometry(NXOpen::NXObject * geometryInitial ,
220 NXOpen::Sketch::PointType pointTypeInitial ,
222 int pointIndexInitial ) :
229 Geometry(geometryInitial),
230 PointType(pointTypeInitial),
231 PointIndex(pointIndexInitial)
232 {
233 }
234 };
235
248
258 public:
259 struct DimensionGeometry
260 {
263 public: int AssocValue;
275 public: DimensionGeometry() :
276 Geometry(),
277 AssocType((NXOpen::Sketch::AssocType)0),
278 AssocValue(),
279 HelpPoint(),
280 View()
281{
282 }
284 public: DimensionGeometry(NXOpen::NXObject * geometryInitial ,
285 NXOpen::Sketch::AssocType assocTypeInitial ,
286 int assocValueInitial ,
296 const NXOpen::Point3d &helpPointInitial ,
297 NXOpen::NXObject * viewInitial ) :
298 Geometry(geometryInitial),
299 AssocType(assocTypeInitial),
300 AssocValue(assocValueInitial),
301 HelpPoint(helpPointInitial),
302 View(viewInitial)
303 {
304 }
305 };
306
312
315 public:
316 struct ConstraintGeometryHelp
317 {
320 public: double Parameter;
322 public: ConstraintGeometryHelp() :
324 Point(),
325 Parameter()
326 {
327 }
330 const NXOpen::Point3d &pointInitial ,
331 double parameterInitial ) :
333 Type(typeInitial),
334 Point(pointInitial),
335 Parameter(parameterInitial)
336 {
337 }
338 };
339
348
399
409
428
441
447
453
460
469
478
487
490 public:
491 struct CopyObjectData
492 {
495 public: CopyObjectData() :
496 OrigObject(),
498 {
499 }
501 public: CopyObjectData(NXOpen::NXObject * origObjectInitial ,
502 NXOpen::NXObject * copiedObjectInitial ) :
503 OrigObject(origObjectInitial),
504 CopiedObject(copiedObjectInitial)
505 {
506 }
507 };
508 private: SketchImpl * m_sketch_impl;
509 private: friend class _SketchBuilder;
510 protected: Sketch();
511 public: ~Sketch();
516 (
517 const std::vector<NXOpen::NXObject *> & objects
518 );
524 public: NX_DEPRECATED("Deprecated in NX11.0.0. Use NXOpen::SketchInPlaceBuilder instead.") void Reattach
525 (
526 NXOpen::ISurface * attachmentPlane ,
527 NXOpen::IReferenceAxis * referenceAxis ,
530 const NXOpen::Vector3d & referenceDirection ,
538 NXOpen::AxisOrientation referenceAxisOrientation ,
539 NXOpen::Sense referenceAxisSense ,
542 NXOpen::PlaneNormalOrientation normalOrientation ,
543 const NXOpen::Point3d & localCoordinateSystemOrigin
544 );
548 public: void Activate
549 (
550 NXOpen::Sketch::ViewReorient orientView
551 );
555 public: void Deactivate
556 (
557 NXOpen::Sketch::ViewReorient orientView ,
558 NXOpen::Sketch::UpdateLevel updateLevel
559 );
563 public: bool IsActive
564 (
565 );
571 (
572 NXOpen::IReferenceAxis * referenceAxis ,
575 const NXOpen::Vector3d & referenceDirection ,
584 NXOpen::AxisOrientation referenceAxisOrientation ,
585 NXOpen::Sense referenceAxisSense
590 );
595 (
596 );
600 public: void FlipNormal
601 (
602 );
607 (
608 );
613 (
614 NXOpen::IReferenceAxis ** referenceAxis ,
617 NXOpen::AxisOrientation* referenceAxisOrientation ,
618 NXOpen::Sense* referenceAxisSense
622 );
627 (
628 );
633 (
634 );
639 (
640 );
645 (
646 );
651 (
652 );
657 (
658 );
663 (
664 NXOpen::Sketch::CreateInferConstraintSetting createInferCon
665 );
669 public: void RunAutoDimension
670 (
671 );
676 (
677 const NXOpen::Sketch::ConstraintGeometry & geom1 ,
678 const NXOpen::Sketch::ConstraintGeometry & geom2
679 );
684 (
685 const NXOpen::Sketch::ConstraintGeometry & geom
686 );
692 (
693 const NXOpen::Sketch::ConstraintGeometry & geom
694 );
699 (
700 const NXOpen::Sketch::ConstraintGeometry & geom
701 );
706 (
707 const NXOpen::Sketch::ConstraintGeometry & geom
708 );
714 (
715 const NXOpen::Sketch::ConstraintGeometry & geom1 ,
716 const NXOpen::Sketch::ConstraintGeometryHelp & geom1Help ,
717 const NXOpen::Sketch::ConstraintGeometry & geom2 ,
718 const NXOpen::Sketch::ConstraintGeometryHelp & geom2Help
719 );
724 (
725 const NXOpen::Sketch::ConstraintGeometry & conGeom
726 );
731 (
732 const NXOpen::Sketch::ConstraintGeometry & conGeom
733 );
738 (
739 const NXOpen::Sketch::ConstraintGeometry & conGeom
740 );
745 (
746 const NXOpen::Sketch::ConstraintGeometry & conGeom
747 );
756 (
757 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
758 const NXOpen::Sketch::ConstraintGeometry & conGeom2
759 );
768 (
769 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
770 const NXOpen::Sketch::ConstraintGeometry & conGeom2
771 );
779 (
780 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
781 const NXOpen::Sketch::ConstraintGeometryHelp & geom1Help ,
782 const NXOpen::Sketch::ConstraintGeometry & conGeom2 ,
783 const NXOpen::Sketch::ConstraintGeometryHelp & geom2Help
784 );
790 (
791 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
792 const NXOpen::Sketch::ConstraintGeometry & conGeom2
793 );
799 (
800 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
801 const NXOpen::Sketch::ConstraintGeometry & conGeom2
802 );
808 (
809 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
810 const NXOpen::Sketch::ConstraintGeometry & conGeom2
811 );
817 (
818 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
819 const NXOpen::Sketch::ConstraintGeometry & conGeom2
820 );
827 (
828 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
829 const NXOpen::Sketch::ConstraintGeometry & conGeom2
830 );
837 (
838 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
839 const NXOpen::Sketch::ConstraintGeometry & conGeom2
840 );
847 (
848 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
849 const NXOpen::Sketch::ConstraintGeometry & conGeom2 ,
850 const NXOpen::Sketch::ConstraintGeometryHelp & help
851 );
858 (
859 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
860 const std::vector<NXOpen::Curve *> & curvesInString ,
863 const NXOpen::Sketch::ConstraintGeometryHelp & helpData ,
864 int curveWhichHelpParamAppliesTo
866 );
875 (
876 const NXOpen::Sketch::ConstraintGeometry & conGeom1 ,
877 NXOpen::Curve * curveInString ,
882 const NXOpen::Sketch::ConstraintGeometryHelp & helpData
883 );
891 (
892 NXOpen::Sketch::ConstraintType dimType ,
894 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
895 const NXOpen::Sketch::DimensionGeometry & dimObject2 ,
896 const NXOpen::Point3d & dimOrigin ,
897 NXOpen::Expression * expression
898 );
907 (
908 NXOpen::Sketch::ConstraintType dimType ,
910 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
911 const NXOpen::Sketch::DimensionGeometry & dimObject2 ,
912 const NXOpen::Point3d & dimOrigin ,
913 NXOpen::Expression * expression ,
914 NXOpen::Sketch::DimensionOption refDim
915 );
920 (
921 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
922 const NXOpen::Point3d & dimOrigin ,
923 NXOpen::Expression * expression
924 );
929 (
930 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
931 const NXOpen::Point3d & dimOrigin ,
932 NXOpen::Expression * expression ,
933 NXOpen::Sketch::DimensionOption refDim
934 );
939 (
940 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
941 const NXOpen::Point3d & dimOrigin ,
942 NXOpen::Expression * expression
943 );
948 (
949 const NXOpen::Sketch::DimensionGeometry & dimObject1 ,
950 const NXOpen::Point3d & dimOrigin ,
951 NXOpen::Expression * expression ,
952 NXOpen::Sketch::DimensionOption refDim
953 );
958 (
959 const std::vector<NXOpen::Curve *> & curves ,
960 const NXOpen::Point3d & dimOrigin ,
961 NXOpen::Expression * expression
962 );
966 public: void LocalUpdate
967 (
968 );
972 public: void Update
973 (
974 );
978 public: void Update
979 (
980 const std::vector<NXOpen::NXObject *> & geoms
981 );
986 (
987 );
992 (
993 const std::vector<NXOpen::SmartObject *> & geoms
994 );
999 (
1000 );
1005 (
1006 const std::vector<NXOpen::SmartObject *> & geoms
1007 );
1012 (
1013 const std::vector<NXOpen::NXObject *> & dims
1014 );
1019 (
1020 );
1025 (
1026 const std::vector<NXOpen::SmartObject *> & geoms
1027 );
1031 public: void AddGeometry
1032 (
1033 NXOpen::DisplayableObject * crv ,
1034 NXOpen::Sketch::InferConstraintsOption inferCoincidentConstraints
1040 );
1045 public: void AddGeometry
1046 (
1047 NXOpen::DisplayableObject * crv
1048 );
1052 public: void AddGeometry
1053 (
1054 NXOpen::Curve * crv ,
1055 NXOpen::Sketch::InferConstraintsOption inferCoincidentConstraints ,
1061 NXOpen::Sketch::AddEllipseOption ellipseOption
1070 );
1074 public: void AddGeometry
1075 (
1076 NXOpen::Sketch::InferConstraintsOption inferCoincidentConstraints ,
1082 NXOpen::Sketch::AddEllipseOption ellipseOption ,
1091 const std::vector<NXOpen::SmartObject *> & curvesOrPoints
1092 );
1098 public: NXOpen::Sketch::Status GetStatus
1099 (
1100 int* dofNeeded
1101 );
1108 public: void CalculateStatus
1109 (
1110 );
1115 (
1116 NXOpen::Sketch::ConstraintClass conClass ,
1118 NXOpen::Sketch::ConstraintType conType
1120 );
1125 (
1126 NXOpen::SmartObject * geometry ,
1127 NXOpen::Sketch::ConstraintClass conClass
1129 );
1135 (
1136 NXOpen::SketchConstraint * constraint
1137 );
1143 (
1144 NXOpen::Annotations::Dimension * dimension
1145 );
1152 (
1153 NXOpen::Annotations::Dimension * dimension
1154 );
1158 public: std::vector<NXOpen::Expression *> GetAllExpressions
1159 (
1160 );
1164 public: std::vector<NXOpen::NXObject *> GetAllGeometry
1165 (
1166 );
1171 public: bool IsSketchGeometry
1172 (
1173 NXOpen::SmartObject * geometry
1174 );
1179 public: bool DOFDisplay
1180 (
1181 );
1186 public: void SetDOFDisplay
1187 (
1188 bool displayDof
1189 );
1198 public: std::vector<NXOpen::Arc *> Fillet
1199 (
1200 NXOpen::Curve * curve1 ,
1201 NXOpen::Curve * curve2 ,
1202 const NXOpen::Point3d & helpPoint1 ,
1203 const NXOpen::Point3d & helpPoint2 ,
1204 double radius ,
1205 NXOpen::Sketch::TrimInputOption doTrim ,
1206 NXOpen::Sketch::CreateDimensionOption createRadiusDim ,
1207 NXOpen::Sketch::AlternateSolutionOption alternateSolution ,
1210 std::vector<NXOpen::SketchConstraint *> & constraints
1213 );
1222 public: std::vector<NXOpen::Arc *> Fillet
1223 (
1224 NXOpen::Curve * curve1 ,
1225 NXOpen::Curve * curve2 ,
1226 const NXOpen::Point3d & helpPoint1 ,
1227 const NXOpen::Point3d & helpPoint2 ,
1228 const NXOpen::Point3d & pointOnArc ,
1229 double radius ,
1230 NXOpen::Sketch::TrimInputOption doTrim ,
1231 NXOpen::Sketch::CreateDimensionOption createRadiusDim ,
1232 NXOpen::Sketch::AlternateSolutionOption alternateSolution ,
1235 std::vector<NXOpen::SketchConstraint *> & constraints
1238 );
1247 public: std::vector<NXOpen::Arc *> Fillet
1248 (
1249 NXOpen::Curve * curve1 ,
1250 NXOpen::Curve * curve2 ,
1251 NXOpen::Curve * curve3 ,
1252 const NXOpen::Point3d & helpPoint1 ,
1253 const NXOpen::Point3d & helpPoint2 ,
1254 const NXOpen::Point3d & helpPoint3 ,
1255 double radius ,
1256 NXOpen::Sketch::TrimInputOption doTrim ,
1257 NXOpen::Sketch::DeleteThirdCurveOption doDelete ,
1258 NXOpen::Sketch::CreateDimensionOption createRadiusDim ,
1259 NXOpen::Sketch::AlternateSolutionOption alternateSolution ,
1262 std::vector<NXOpen::SketchConstraint *> & constraints
1265 );
1274 public: std::vector<NXOpen::Arc *> Fillet
1275 (
1276 NXOpen::Curve * curve1 ,
1277 NXOpen::Curve * curve2 ,
1278 NXOpen::Curve * curve3 ,
1279 const NXOpen::Point3d & helpPoint1 ,
1280 const NXOpen::Point3d & helpPoint2 ,
1281 const NXOpen::Point3d & helpPoint3 ,
1282 const NXOpen::Point3d & pointOnArc ,
1283 double radius ,
1284 NXOpen::Sketch::TrimInputOption doTrim ,
1285 NXOpen::Sketch::DeleteThirdCurveOption doDelete ,
1286 NXOpen::Sketch::CreateDimensionOption createRadiusDim ,
1287 NXOpen::Sketch::AlternateSolutionOption alternateSolution ,
1290 std::vector<NXOpen::SketchConstraint *> & constraints
1293 );
1298 (
1299 );
1303 public: NXOpen::View * View
1304 (
1305 );
1309 public: bool IsDraftingSketch
1310 (
1311 );
1316 (
1317 const std::vector<NXOpen::NXObject *> & objects
1318 );
1323 (
1324 const std::vector<NXOpen::Sketch::ConstraintGeometry> & objects
1325 );
1336 (
1337 NXOpen::Sketch::ConstraintClass conClass ,
1338 const std::vector<NXOpen::Sketch::ConstraintGeometry> & objects
1339 );
1343 public: std::vector<NXOpen::NXObject *> CopyObjects
1344 (
1345 const std::vector<NXOpen::NXObject *> & inputObjects
1346 );
1351 (
1352 const std::vector<NXOpen::NXObject *> & inputObjects ,
1353 std::vector<NXOpen::NXObject *> & outputObjects ,
1354 std::vector<NXOpen::NXObject *> & outputDims
1355 );
1359 public: void ShowDimensions
1360 (
1361 const std::vector<NXOpen::DisplayableObject *> & inputObjects
1362 );
1366 public: void HideDimensions
1367 (
1368 const std::vector<NXOpen::DisplayableObject *> & inputObjects
1369 );
1373 public: void ShowDimensions
1374 (
1375 );
1379 public: void ShowDimensions
1380 (
1381 const std::vector<NXOpen::Sketch::ConstraintGeometry> & objects
1382 );
1386 public: void HideDimensions
1387 (
1388 );
1392 public: void HideDimensions
1393 (
1394 const std::vector<NXOpen::Sketch::ConstraintGeometry> & objects
1395 );
1399 public: std::vector<NXOpen::SketchConstraint *> AutoConstrain
1400 (
1401 double linearTolerance ,
1402 double angularTolerance ,
1403 bool allowRemoteConstraints ,
1404 const std::vector<NXOpen::SmartObject *> & geometries ,
1405 const std::vector<NXOpen::Sketch::ConstraintType> & autoconstraintTypes
1406 );
1411 public: NX_DEPRECATED("Deprecated in NX11.0.0. None.") void MakeDatumsInternal
1412 (
1413 );
1418 public: NX_DEPRECATED("Deprecated in NX11.0.0. Please use NXOpen::Sketch::MakeDatumsExternal2 instead.") void MakeDatumsExternal
1419 (
1420 );
1424 public: bool IsInternal
1425 (
1426 );
1431 (
1432 );
1438 public: std::vector<NXOpen::Sketch::CopyObjectData> CopyObjectsWithTracking
1439 (
1440 const std::vector<NXOpen::DisplayableObject *> & inputObjects
1441 );
1446 (
1447 );
1451 public: void SetUpdateScope
1452 (
1453 NXOpen::Sketch::UpdateLevel updateScope
1454 );
1458 public: void EditSplinePoles
1459 (
1460 NXOpen::Spline * spline ,
1461 const std::vector<double> & poles
1462 );
1467 (
1468 NXOpen::Spline * spline ,
1469 const std::vector<double> & points
1470 );
1475 (
1476 NXOpen::Spline * spline
1477 );
1482 (
1483 const std::vector<NXOpen::NXObject *> & geoms
1484 );
1489 (
1490 const std::vector<NXOpen::NXObject *> & sketchGeoms ,
1491 bool preserveComplexConstraints
1492 );
1498 (
1499 const std::vector<NXOpen::NXObject *> & sketchGeoms
1500 );
1504 public: void Scale
1505 (
1506 double scaleFactor
1507 );
1514 public: void SetTextHeight
1515 (
1516 double textHeight
1517 );
1525 (
1526 const std::vector<NXOpen::DisplayableObject *> & dimensions
1527 );
1532 (
1533 );
1538 (
1539 const NXOpen::Sketch::ConstraintGeometry & geometry
1540 );
1544 public: bool RotateDragMode
1545 (
1546 );
1551 (
1552 bool rotateDrag
1553 );
1558 (
1559 const NXOpen::Point3d & center
1560 );
1565 (
1566 );
1571 (
1572 bool upgrade
1573 );
1577 public: bool UsesLegacySolver
1578 (
1579 );
1583 public: bool MechanismMode
1584 (
1585 );
1589 public: void SetMechanismMode
1590 (
1591 bool isMechanismMode
1592 );
1597 (
1598 NXOpen::SmartObject * geometry
1599 );
1604 (
1605 NXOpen::SmartObject * geometry
1606 );
1611 (
1612 );
1617 (
1618 );
1622 public: void UpdateNavigator
1623 (
1624 );
1630 (
1631 const std::vector<NXOpen::NXObject *> & foundRelations
1632 );
1636 public: NXOpen::Preferences::SketchPreferences *Preferences();
1637 };
1638}
1639#ifdef _MSC_VER
1640#pragma warning(pop)
1641#endif
1642#ifdef __GNUC__
1643#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
1644#pragma GCC diagnostic warning "-Wdeprecated-declarations"
1645#endif
1646#endif
1647#undef EXPORTLIBRARY