瀏覽代碼

11.21模型树雏形

lzy 4 月之前
父節點
當前提交
80556a1a73

+ 0 - 0
MD


+ 0 - 0
README


+ 1 - 1
data/address.txt

@@ -1 +1 @@
-D:/dcip1/comx_sdk.node/unit/hypermesh/data/mPart2.stp
+D:/dcip1/comx_sdk.node/unit/hypermesh/data/Part3.stp

+ 2 - 0
data/beam/beam.txt

@@ -0,0 +1,2 @@
+$ con // mark // id xd yd zd xr yr zr Beam
+$ arrow // mark // id xn yn zn xr yr zr Beam

+ 1 - 1
data/material.txt

@@ -1 +1 @@
-整体 7.8 1000 80 207 1
+整体 7.8 1000 0.3 207 1

+ 0 - 1
data/work1/mat.db.json

@@ -1 +0,0 @@
-{"materials":{"mat1":{"泊松比":"0.3","密度(g/cm^3)":"7.8","屈服强度":"207","弹性模量(MPa)":"1000","Id":"1"}},"frozen_list":[]}

File diff suppressed because it is too large
+ 0 - 1
data/work1/proj.db.json


二進制
data/work1/proj1/Part3.ply


+ 0 - 215
data/work1/proj1/Part3.stp

@@ -1,215 +0,0 @@
-ISO-10303-21;
-HEADER;
-FILE_DESCRIPTION(('CATIA V5 STEP Exchange'),'2;1');
-
-FILE_NAME('C:\\Users\\Lenovo\\Desktop\\Part3.stp','2024-09-06T09:56:03+00:00',('none'),('none'),'CATIA Version 5-6 Release 2016','CATIA V5 STEP AP203','none');
-
-FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
-
-ENDSEC;
-DATA;
-#5=PRODUCT('Part3','','',(#2)) ;
-#1=APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies') ;
-#14=PRODUCT_DEFINITION('',' ',#6,#3) ;
-#16=SECURITY_CLASSIFICATION(' ',' ',#15) ;
-#15=SECURITY_CLASSIFICATION_LEVEL('unclassified') ;
-#46=CARTESIAN_POINT(' ',(0.,0.,0.)) ;
-#53=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#54=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#55=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#56=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#58=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#59=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#60=CARTESIAN_POINT('Vertex',(0.,60.,300.)) ;
-#62=CARTESIAN_POINT('Vertex',(0.,60.,0.)) ;
-#66=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#67=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#68=CARTESIAN_POINT('Vertex',(0.,0.,0.)) ;
-#72=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#73=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#74=CARTESIAN_POINT('Vertex',(0.,0.,300.)) ;
-#78=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#79=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#93=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#94=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#95=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#96=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#98=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#99=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#100=CARTESIAN_POINT('Vertex',(60.,60.,300.)) ;
-#102=CARTESIAN_POINT('Vertex',(60.,60.,0.)) ;
-#106=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#107=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#108=CARTESIAN_POINT('Vertex',(0.,60.,0.)) ;
-#112=CARTESIAN_POINT('Control Point',(0.,60.,0.)) ;
-#113=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#114=CARTESIAN_POINT('Vertex',(0.,60.,300.)) ;
-#118=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#119=CARTESIAN_POINT('Control Point',(0.,60.,300.)) ;
-#131=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#132=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#133=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#134=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#136=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#137=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#138=CARTESIAN_POINT('Vertex',(60.,0.,300.)) ;
-#140=CARTESIAN_POINT('Vertex',(60.,0.,0.)) ;
-#144=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#145=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#146=CARTESIAN_POINT('Vertex',(60.,60.,0.)) ;
-#150=CARTESIAN_POINT('Control Point',(60.,60.,0.)) ;
-#151=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#152=CARTESIAN_POINT('Vertex',(60.,60.,300.)) ;
-#156=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#157=CARTESIAN_POINT('Control Point',(60.,60.,300.)) ;
-#169=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#170=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#171=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#172=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#174=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#175=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#176=CARTESIAN_POINT('Vertex',(0.,0.,300.)) ;
-#178=CARTESIAN_POINT('Vertex',(0.,0.,0.)) ;
-#182=CARTESIAN_POINT('Control Point',(0.,0.,0.)) ;
-#183=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#184=CARTESIAN_POINT('Vertex',(60.,0.,0.)) ;
-#188=CARTESIAN_POINT('Control Point',(60.,0.,0.)) ;
-#189=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#190=CARTESIAN_POINT('Vertex',(60.,0.,300.)) ;
-#194=CARTESIAN_POINT('Control Point',(0.,0.,300.)) ;
-#195=CARTESIAN_POINT('Control Point',(60.,0.,300.)) ;
-#47=AXIS2_PLACEMENT_3D(' ',#46,$,$) ;
-#40=PRODUCT_DEFINITION_SHAPE(' ',' ',#14) ;
-#31=APPROVAL_PERSON_ORGANIZATION(#25,#21,#19) ;
-#25=PERSON_AND_ORGANIZATION(#22,#23) ;
-#22=PERSON(' ',' ',' ',$,$,$) ;
-#23=ORGANIZATION(' ',' ',' ') ;
-#21=APPROVAL(#20,' ') ;
-#20=APPROVAL_STATUS('not_yet_approved') ;
-#19=APPROVAL_ROLE('APPROVER') ;
-#13=DATE_AND_TIME(#11,#12) ;
-#12=LOCAL_TIME(17,56,1.,#10) ;
-#10=COORDINATED_UNIVERSAL_TIME_OFFSET(0,0,.AHEAD.) ;
-#82=ORIENTED_EDGE('',*,*,#64,.T.) ;
-#83=ORIENTED_EDGE('',*,*,#70,.T.) ;
-#84=ORIENTED_EDGE('',*,*,#76,.T.) ;
-#85=ORIENTED_EDGE('',*,*,#80,.T.) ;
-#122=ORIENTED_EDGE('',*,*,#104,.T.) ;
-#123=ORIENTED_EDGE('',*,*,#110,.T.) ;
-#124=ORIENTED_EDGE('',*,*,#116,.T.) ;
-#125=ORIENTED_EDGE('',*,*,#120,.T.) ;
-#160=ORIENTED_EDGE('',*,*,#142,.T.) ;
-#161=ORIENTED_EDGE('',*,*,#148,.T.) ;
-#162=ORIENTED_EDGE('',*,*,#154,.T.) ;
-#163=ORIENTED_EDGE('',*,*,#158,.T.) ;
-#198=ORIENTED_EDGE('',*,*,#180,.T.) ;
-#199=ORIENTED_EDGE('',*,*,#186,.T.) ;
-#200=ORIENTED_EDGE('',*,*,#192,.T.) ;
-#201=ORIENTED_EDGE('',*,*,#196,.T.) ;
-#50=OPEN_SHELL('Surface.1',(#87)) ;
-#90=OPEN_SHELL('Surface.2',(#127)) ;
-#128=OPEN_SHELL('Surface.3',(#165)) ;
-#166=OPEN_SHELL('Surface.4',(#203)) ;
-#51=SHELL_BASED_SURFACE_MODEL('NONE',(#50)) ;
-#91=SHELL_BASED_SURFACE_MODEL('NONE',(#90)) ;
-#129=SHELL_BASED_SURFACE_MODEL('NONE',(#128)) ;
-#167=SHELL_BASED_SURFACE_MODEL('NONE',(#166)) ;
-#48=SHAPE_REPRESENTATION(' ',(#47),#45) ;
-#87=ADVANCED_FACE('Surface.1',(#86),#52,.T.) ;
-#127=ADVANCED_FACE('Surface.2',(#126),#92,.T.) ;
-#165=ADVANCED_FACE('Surface.3',(#164),#130,.T.) ;
-#203=ADVANCED_FACE('Surface.4',(#202),#168,.T.) ;
-#4=APPLICATION_PROTOCOL_DEFINITION('international standard','config_control_design',1994,#1) ;
-#32=APPROVAL_DATE_TIME(#13,#21) ;
-#57=B_SPLINE_CURVE_WITH_KNOTS('',1,(#58,#59),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#65=B_SPLINE_CURVE_WITH_KNOTS('',1,(#66,#67),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#71=B_SPLINE_CURVE_WITH_KNOTS('',1,(#72,#73),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#77=B_SPLINE_CURVE_WITH_KNOTS('',1,(#78,#79),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#97=B_SPLINE_CURVE_WITH_KNOTS('',1,(#98,#99),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#105=B_SPLINE_CURVE_WITH_KNOTS('',1,(#106,#107),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#111=B_SPLINE_CURVE_WITH_KNOTS('',1,(#112,#113),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#117=B_SPLINE_CURVE_WITH_KNOTS('',1,(#118,#119),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#135=B_SPLINE_CURVE_WITH_KNOTS('',1,(#136,#137),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#143=B_SPLINE_CURVE_WITH_KNOTS('',1,(#144,#145),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#149=B_SPLINE_CURVE_WITH_KNOTS('',1,(#150,#151),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#155=B_SPLINE_CURVE_WITH_KNOTS('',1,(#156,#157),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#173=B_SPLINE_CURVE_WITH_KNOTS('',1,(#174,#175),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#181=B_SPLINE_CURVE_WITH_KNOTS('',1,(#182,#183),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#187=B_SPLINE_CURVE_WITH_KNOTS('',1,(#188,#189),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,300.),.UNSPECIFIED.) ;
-#193=B_SPLINE_CURVE_WITH_KNOTS('',1,(#194,#195),.UNSPECIFIED.,.F.,.U.,(2,2),(0.,60.),.UNSPECIFIED.) ;
-#52=B_SPLINE_SURFACE_WITH_KNOTS('',1,1,((#53,#54),(#55,#56)),.UNSPECIFIED.,.F.,.F.,.U.,(2,2),(2,2),(0.,60.),(0.,300.),.UNSPECIFIED.) ;
-#92=B_SPLINE_SURFACE_WITH_KNOTS('',1,1,((#93,#94),(#95,#96)),.UNSPECIFIED.,.F.,.F.,.U.,(2,2),(2,2),(0.,60.),(0.,300.),.UNSPECIFIED.) ;
-#130=B_SPLINE_SURFACE_WITH_KNOTS('',1,1,((#131,#132),(#133,#134)),.UNSPECIFIED.,.F.,.F.,.U.,(2,2),(2,2),(0.,60.),(0.,300.),.UNSPECIFIED.) ;
-#168=B_SPLINE_SURFACE_WITH_KNOTS('',1,1,((#169,#170),(#171,#172)),.UNSPECIFIED.,.F.,.F.,.U.,(2,2),(2,2),(0.,60.),(0.,300.),.UNSPECIFIED.) ;
-#11=CALENDAR_DATE(2024,6,9) ;
-#30=CC_DESIGN_APPROVAL(#21,(#16,#6,#14)) ;
-#18=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#13,#17,(#16)) ;
-#29=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#13,#28,(#14)) ;
-#17=DATE_TIME_ROLE('classification_date') ;
-#28=DATE_TIME_ROLE('creation_date') ;
-#27=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#26,(#16)) ;
-#33=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#34,(#6)) ;
-#35=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#36,(#6,#14)) ;
-#37=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#38,(#5)) ;
-#26=PERSON_AND_ORGANIZATION_ROLE('classification_officer') ;
-#34=PERSON_AND_ORGANIZATION_ROLE('design_supplier') ;
-#36=PERSON_AND_ORGANIZATION_ROLE('creator') ;
-#38=PERSON_AND_ORGANIZATION_ROLE('design_owner') ;
-#39=CC_DESIGN_SECURITY_CLASSIFICATION(#16,(#6)) ;
-#89=SHAPE_REPRESENTATION_RELATIONSHIP(' ',' ',#48,#88) ;
-#3=DESIGN_CONTEXT(' ',#1,'design') ;
-#64=EDGE_CURVE('',#61,#63,#57,.F.) ;
-#70=EDGE_CURVE('',#63,#69,#65,.T.) ;
-#76=EDGE_CURVE('',#69,#75,#71,.T.) ;
-#80=EDGE_CURVE('',#75,#61,#77,.F.) ;
-#104=EDGE_CURVE('',#101,#103,#97,.F.) ;
-#110=EDGE_CURVE('',#103,#109,#105,.T.) ;
-#116=EDGE_CURVE('',#109,#115,#111,.T.) ;
-#120=EDGE_CURVE('',#115,#101,#117,.F.) ;
-#142=EDGE_CURVE('',#139,#141,#135,.F.) ;
-#148=EDGE_CURVE('',#141,#147,#143,.T.) ;
-#154=EDGE_CURVE('',#147,#153,#149,.T.) ;
-#158=EDGE_CURVE('',#153,#139,#155,.F.) ;
-#180=EDGE_CURVE('',#177,#179,#173,.F.) ;
-#186=EDGE_CURVE('',#179,#185,#181,.T.) ;
-#192=EDGE_CURVE('',#185,#191,#187,.T.) ;
-#196=EDGE_CURVE('',#191,#177,#193,.F.) ;
-#81=EDGE_LOOP('',(#82,#83,#84,#85)) ;
-#121=EDGE_LOOP('',(#122,#123,#124,#125)) ;
-#159=EDGE_LOOP('',(#160,#161,#162,#163)) ;
-#197=EDGE_LOOP('',(#198,#199,#200,#201)) ;
-#86=FACE_OUTER_BOUND('',#81,.T.) ;
-#126=FACE_OUTER_BOUND('',#121,.T.) ;
-#164=FACE_OUTER_BOUND('',#159,.T.) ;
-#202=FACE_OUTER_BOUND('',#197,.T.) ;
-#44=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.005),#41,'distance_accuracy_value','CONFUSED CURVE UNCERTAINTY') ;
-#88=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('NONE',(#51,#91,#129,#167),#45) ;
-#2=MECHANICAL_CONTEXT(' ',#1,'mechanical') ;
-#24=PERSONAL_ADDRESS(' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',(#22),' ') ;
-#7=PRODUCT_CATEGORY('part',$) ;
-#9=PRODUCT_CATEGORY_RELATIONSHIP(' ',' ',#7,#8) ;
-#6=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('',' ',#5,.NOT_KNOWN.) ;
-#8=PRODUCT_RELATED_PRODUCT_CATEGORY('detail',$,(#5)) ;
-#49=SHAPE_DEFINITION_REPRESENTATION(#40,#48) ;
-#61=VERTEX_POINT('',#60) ;
-#63=VERTEX_POINT('',#62) ;
-#69=VERTEX_POINT('',#68) ;
-#75=VERTEX_POINT('',#74) ;
-#101=VERTEX_POINT('',#100) ;
-#103=VERTEX_POINT('',#102) ;
-#109=VERTEX_POINT('',#108) ;
-#115=VERTEX_POINT('',#114) ;
-#139=VERTEX_POINT('',#138) ;
-#141=VERTEX_POINT('',#140) ;
-#147=VERTEX_POINT('',#146) ;
-#153=VERTEX_POINT('',#152) ;
-#177=VERTEX_POINT('',#176) ;
-#179=VERTEX_POINT('',#178) ;
-#185=VERTEX_POINT('',#184) ;
-#191=VERTEX_POINT('',#190) ;
-#41=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)) ;
-#42=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)) ;
-#43=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()) ;
-#45=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#44))GLOBAL_UNIT_ASSIGNED_CONTEXT((#41,#42,#43))REPRESENTATION_CONTEXT(' ',' ')) ;
-ENDSEC;
-END-ISO-10303-21;

+ 0 - 1
data/work2/mat.db.json

@@ -1 +0,0 @@
-{"materials":{},"frozen_list":[]}

File diff suppressed because it is too large
+ 0 - 1
data/work2/proj.db.json


二進制
data/work2/proj1/mPart2.ply


+ 0 - 195
data/work2/proj1/mPart2.stp

@@ -1,195 +0,0 @@
-ISO-10303-21;
-HEADER;
-FILE_DESCRIPTION(('CATIA V5 STEP Exchange'),'2;1');
-
-FILE_NAME('F:\\project\\DingHeng\\data\\mPart2.stp','2024-08-12T08:04:32+00:00',('none'),('none'),'CATIA Version 5-6 Release 2016','CATIA V5 STEP AP203','none');
-
-FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
-
-ENDSEC;
-DATA;
-#5=PRODUCT('Part1','','',(#2)) ;
-#1=APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies') ;
-#14=PRODUCT_DEFINITION('',' ',#6,#3) ;
-#16=SECURITY_CLASSIFICATION(' ',' ',#15) ;
-#15=SECURITY_CLASSIFICATION_LEVEL('unclassified') ;
-#46=CARTESIAN_POINT(' ',(0.,0.,0.)) ;
-#50=CARTESIAN_POINT('Line Origine',(25.,-30.,0.)) ;
-#54=CARTESIAN_POINT('Limit',(-30.,-30.,0.)) ;
-#55=CARTESIAN_POINT('Limit',(80.,-30.,0.)) ;
-#58=CARTESIAN_POINT('Axis2P3D Location',(80.,0.,0.)) ;
-#62=CARTESIAN_POINT('Limit',(80.,-30.,0.)) ;
-#63=CARTESIAN_POINT('Limit',(110.,-3.39932333859E-014,0.)) ;
-#66=CARTESIAN_POINT('Line Origine',(110.,45.,0.)) ;
-#70=CARTESIAN_POINT('Limit',(110.,-3.39932333859E-014,0.)) ;
-#71=CARTESIAN_POINT('Limit',(110.,90.,0.)) ;
-#80=CARTESIAN_POINT('Axis2P3D Location',(-30.,-30.,0.)) ;
-#85=CARTESIAN_POINT('Line Origine',(-30.,-30.,10.)) ;
-#89=CARTESIAN_POINT('Vertex',(-30.,-30.,0.)) ;
-#91=CARTESIAN_POINT('Vertex',(-30.,-30.,20.)) ;
-#94=CARTESIAN_POINT('Line Origine',(25.,-30.,0.)) ;
-#98=CARTESIAN_POINT('Vertex',(80.,-30.,0.)) ;
-#101=CARTESIAN_POINT('Line Origine',(80.,-30.,10.)) ;
-#105=CARTESIAN_POINT('Vertex',(80.,-30.,20.)) ;
-#108=CARTESIAN_POINT('Line Origine',(25.,-30.,20.)) ;
-#120=CARTESIAN_POINT('Axis2P3D Location',(80.,0.,10.)) ;
-#125=CARTESIAN_POINT('Axis2P3D Location',(80.,0.,0.)) ;
-#129=CARTESIAN_POINT('Vertex',(110.,-2.47156054114E-013,0.)) ;
-#132=CARTESIAN_POINT('Line Origine',(110.,-6.06385859769E-014,10.)) ;
-#136=CARTESIAN_POINT('Vertex',(110.,-2.47156054114E-013,20.)) ;
-#139=CARTESIAN_POINT('Axis2P3D Location',(80.,0.,20.)) ;
-#151=CARTESIAN_POINT('Axis2P3D Location',(110.,90.,0.)) ;
-#156=CARTESIAN_POINT('Line Origine',(110.,45.,0.)) ;
-#160=CARTESIAN_POINT('Vertex',(110.,90.,0.)) ;
-#163=CARTESIAN_POINT('Line Origine',(110.,90.,10.)) ;
-#167=CARTESIAN_POINT('Vertex',(110.,90.,20.)) ;
-#170=CARTESIAN_POINT('Line Origine',(110.,45.,20.)) ;
-#51=DIRECTION('Vector Direction',(1.,0.,0.)) ;
-#59=DIRECTION('Axis2P3D Direction',(0.,0.,1.)) ;
-#67=DIRECTION('Vector Direction',(0.,-1.,0.)) ;
-#81=DIRECTION('Axis2P3D Direction',(0.,-1.,0.)) ;
-#82=DIRECTION('Axis2P3D XDirection',(1.,0.,0.)) ;
-#86=DIRECTION('Vector Direction',(0.,0.,1.)) ;
-#95=DIRECTION('Vector Direction',(1.,0.,0.)) ;
-#102=DIRECTION('Vector Direction',(0.,0.,1.)) ;
-#109=DIRECTION('Vector Direction',(1.,0.,0.)) ;
-#121=DIRECTION('Axis2P3D Direction',(0.,0.,1.)) ;
-#122=DIRECTION('Axis2P3D XDirection',(-1.83697019872E-016,-1.,-0.)) ;
-#126=DIRECTION('Axis2P3D Direction',(0.,0.,1.)) ;
-#133=DIRECTION('Vector Direction',(0.,0.,1.)) ;
-#140=DIRECTION('Axis2P3D Direction',(0.,0.,1.)) ;
-#152=DIRECTION('Axis2P3D Direction',(-1.,0.,0.)) ;
-#153=DIRECTION('Axis2P3D XDirection',(0.,-1.,0.)) ;
-#157=DIRECTION('Vector Direction',(0.,-1.,0.)) ;
-#164=DIRECTION('Vector Direction',(0.,0.,1.)) ;
-#171=DIRECTION('Vector Direction',(0.,-1.,0.)) ;
-#47=AXIS2_PLACEMENT_3D(' ',#46,$,$) ;
-#60=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#58,#59,$) ;
-#83=AXIS2_PLACEMENT_3D('Plane Axis2P3D',#80,#81,#82) ;
-#123=AXIS2_PLACEMENT_3D('Cylinder Axis2P3D',#120,#121,#122) ;
-#127=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#125,#126,$) ;
-#141=AXIS2_PLACEMENT_3D('Circle Axis2P3D',#139,#140,$) ;
-#154=AXIS2_PLACEMENT_3D('Plane Axis2P3D',#151,#152,#153) ;
-#40=PRODUCT_DEFINITION_SHAPE(' ',' ',#14) ;
-#74=COMPOSITE_CURVE('\X2\834956FE\X0\.1',(#57,#65,#73),.U.) ;
-#57=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#56) ;
-#65=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#64) ;
-#73=COMPOSITE_CURVE_SEGMENT(.DISCONTINUOUS.,.T.,#72) ;
-#31=APPROVAL_PERSON_ORGANIZATION(#25,#21,#19) ;
-#25=PERSON_AND_ORGANIZATION(#22,#23) ;
-#22=PERSON(' ',' ',' ',$,$,$) ;
-#23=ORGANIZATION(' ',' ',' ') ;
-#21=APPROVAL(#20,' ') ;
-#20=APPROVAL_STATUS('not_yet_approved') ;
-#19=APPROVAL_ROLE('APPROVER') ;
-#13=DATE_AND_TIME(#11,#12) ;
-#12=LOCAL_TIME(16,4,32.,#10) ;
-#10=COORDINATED_UNIVERSAL_TIME_OFFSET(0,0,.AHEAD.) ;
-#114=ORIENTED_EDGE('',*,*,#93,.F.) ;
-#115=ORIENTED_EDGE('',*,*,#100,.T.) ;
-#116=ORIENTED_EDGE('',*,*,#107,.T.) ;
-#117=ORIENTED_EDGE('',*,*,#112,.F.) ;
-#145=ORIENTED_EDGE('',*,*,#107,.F.) ;
-#146=ORIENTED_EDGE('',*,*,#131,.T.) ;
-#147=ORIENTED_EDGE('',*,*,#138,.T.) ;
-#148=ORIENTED_EDGE('',*,*,#143,.F.) ;
-#176=ORIENTED_EDGE('',*,*,#138,.F.) ;
-#177=ORIENTED_EDGE('',*,*,#162,.T.) ;
-#178=ORIENTED_EDGE('',*,*,#169,.T.) ;
-#179=ORIENTED_EDGE('',*,*,#174,.F.) ;
-#78=OPEN_SHELL('\X2\62C94F38\X0\.1',(#119,#150,#181)) ;
-#79=SHELL_BASED_SURFACE_MODEL('NONE',(#78)) ;
-#52=VECTOR('Line Direction',#51,1.) ;
-#68=VECTOR('Line Direction',#67,1.) ;
-#87=VECTOR('Line Direction',#86,1.) ;
-#96=VECTOR('Line Direction',#95,1.) ;
-#103=VECTOR('Line Direction',#102,1.) ;
-#110=VECTOR('Line Direction',#109,1.) ;
-#134=VECTOR('Line Direction',#133,1.) ;
-#158=VECTOR('Line Direction',#157,1.) ;
-#165=VECTOR('Line Direction',#164,1.) ;
-#172=VECTOR('Line Direction',#171,1.) ;
-#48=SHAPE_REPRESENTATION(' ',(#47),#45) ;
-#119=ADVANCED_FACE('\X2\62C94F38\X0\.1',(#118),#84,.T.) ;
-#150=ADVANCED_FACE('\X2\62C94F38\X0\.1',(#149),#124,.T.) ;
-#181=ADVANCED_FACE('\X2\62C94F38\X0\.1',(#180),#155,.F.) ;
-#4=APPLICATION_PROTOCOL_DEFINITION('international standard','config_control_design',1994,#1) ;
-#32=APPROVAL_DATE_TIME(#13,#21) ;
-#11=CALENDAR_DATE(2024,12,8) ;
-#30=CC_DESIGN_APPROVAL(#21,(#16,#6,#14)) ;
-#18=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#13,#17,(#16)) ;
-#29=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#13,#28,(#14)) ;
-#17=DATE_TIME_ROLE('classification_date') ;
-#28=DATE_TIME_ROLE('creation_date') ;
-#27=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#26,(#16)) ;
-#33=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#34,(#6)) ;
-#35=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#36,(#6,#14)) ;
-#37=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#25,#38,(#5)) ;
-#26=PERSON_AND_ORGANIZATION_ROLE('classification_officer') ;
-#34=PERSON_AND_ORGANIZATION_ROLE('design_supplier') ;
-#36=PERSON_AND_ORGANIZATION_ROLE('creator') ;
-#38=PERSON_AND_ORGANIZATION_ROLE('design_owner') ;
-#39=CC_DESIGN_SECURITY_CLASSIFICATION(#16,(#6)) ;
-#61=CIRCLE('generated circle',#60,30.) ;
-#128=CIRCLE('generated circle',#127,30.) ;
-#142=CIRCLE('generated circle',#141,30.) ;
-#77=SHAPE_REPRESENTATION_RELATIONSHIP(' ',' ',#48,#75) ;
-#183=SHAPE_REPRESENTATION_RELATIONSHIP(' ',' ',#48,#182) ;
-#124=CYLINDRICAL_SURFACE('generated cylinder',#123,30.) ;
-#3=DESIGN_CONTEXT(' ',#1,'design') ;
-#93=EDGE_CURVE('',#90,#92,#88,.T.) ;
-#100=EDGE_CURVE('',#90,#99,#97,.T.) ;
-#107=EDGE_CURVE('',#99,#106,#104,.T.) ;
-#112=EDGE_CURVE('',#92,#106,#111,.T.) ;
-#131=EDGE_CURVE('',#99,#130,#128,.T.) ;
-#138=EDGE_CURVE('',#130,#137,#135,.T.) ;
-#143=EDGE_CURVE('',#106,#137,#142,.T.) ;
-#162=EDGE_CURVE('',#130,#161,#159,.F.) ;
-#169=EDGE_CURVE('',#161,#168,#166,.T.) ;
-#174=EDGE_CURVE('',#137,#168,#173,.F.) ;
-#113=EDGE_LOOP('',(#114,#115,#116,#117)) ;
-#144=EDGE_LOOP('',(#145,#146,#147,#148)) ;
-#175=EDGE_LOOP('',(#176,#177,#178,#179)) ;
-#118=FACE_OUTER_BOUND('',#113,.T.) ;
-#149=FACE_OUTER_BOUND('',#144,.T.) ;
-#180=FACE_OUTER_BOUND('',#175,.T.) ;
-#76=GEOMETRIC_SET('NONE',(#74)) ;
-#75=GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION('NONE',(#76),#45) ;
-#44=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.005),#41,'distance_accuracy_value','CONFUSED CURVE UNCERTAINTY') ;
-#53=LINE('Line',#50,#52) ;
-#69=LINE('Line',#66,#68) ;
-#88=LINE('Line',#85,#87) ;
-#97=LINE('Line',#94,#96) ;
-#104=LINE('Line',#101,#103) ;
-#111=LINE('Line',#108,#110) ;
-#135=LINE('Line',#132,#134) ;
-#159=LINE('Line',#156,#158) ;
-#166=LINE('Line',#163,#165) ;
-#173=LINE('Line',#170,#172) ;
-#182=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('NONE',(#79),#45) ;
-#2=MECHANICAL_CONTEXT(' ',#1,'mechanical') ;
-#24=PERSONAL_ADDRESS(' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',(#22),' ') ;
-#84=PLANE('',#83) ;
-#155=PLANE('',#154) ;
-#7=PRODUCT_CATEGORY('part',$) ;
-#9=PRODUCT_CATEGORY_RELATIONSHIP(' ',' ',#7,#8) ;
-#6=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('',' ',#5,.NOT_KNOWN.) ;
-#8=PRODUCT_RELATED_PRODUCT_CATEGORY('detail',$,(#5)) ;
-#49=SHAPE_DEFINITION_REPRESENTATION(#40,#48) ;
-#56=TRIMMED_CURVE('',#53,(#54),(#55),.T.,.CARTESIAN.) ;
-#64=TRIMMED_CURVE('',#61,(#62),(#63),.T.,.CARTESIAN.) ;
-#72=TRIMMED_CURVE('',#69,(#70),(#71),.F.,.CARTESIAN.) ;
-#90=VERTEX_POINT('',#89) ;
-#92=VERTEX_POINT('',#91) ;
-#99=VERTEX_POINT('',#98) ;
-#106=VERTEX_POINT('',#105) ;
-#130=VERTEX_POINT('',#129) ;
-#137=VERTEX_POINT('',#136) ;
-#161=VERTEX_POINT('',#160) ;
-#168=VERTEX_POINT('',#167) ;
-#41=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)) ;
-#42=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)) ;
-#43=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()) ;
-#45=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#44))GLOBAL_UNIT_ASSIGNED_CONTEXT((#41,#42,#43))REPRESENTATION_CONTEXT(' ',' ')) ;
-ENDSEC;
-END-ISO-10303-21;

二進制
js.zip


+ 11 - 2
js/Project_pane.js

@@ -36,9 +36,18 @@ function OnException(err) {
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
 var name = '';
 function OnConfirm(){
-        name = ui.project_name.value;
-        unit.form.tree.CreateProject(getName());
+        let work_name = model.acax_app.model.workArea.Current();
+        model.checkPath(work_name, (directories) =>{
+                if(directories.includes(ui.project_name.value)) {
+                        unit.form.mainfrm.OnCueline('您创建的工程已存在!', 'red');
+                }else{
+                        name = ui.project_name.value;
+                        unit.form.tree.CreateProject(getName());                    
+                       
+                }
+        });
         unit.form.Project.Close();
+        unit.form.mainfrm.OnCueline('成功创建工程!', 'green');
 }
 function getName() {
         return name;

+ 91 - 0
js/RenameConstraint_pane.js

@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////
+// System Pre-define Functions
+// 95099372-ef3e-11ea-9c81-bf848405c62e
+
+//Callback of data preparation stage before UI is fully loaded.
+function OnInitializeData(reload, preview) {
+    
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+//Callback after UI is fully loaded and displayed.
+function OnReady(reload, preview) {
+    
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+function OnCloseForm() {
+}
+
+function OnException(err) {
+        //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Callback Functions.
+// 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+
+var name = '';
+function OnConfirm(){
+        
+        name = ui.modify_name.value;                     
+        unit.form.tree.ModifyConstraintName(getName());
+        unit.form.RenameConstraint.Close();            
+}
+function getName() {
+        return name;
+}
+//The message corresponding callback executed by the docker pane.
+// when calling [side_pane].fireEvent(type,para) in the main form.
+function OnParentDockerMessage(type, para) {
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Utils Functions.
+// 6c165ad6-ef3e-11ea-987c-b761a131c2fe
+
+function onDragFile(filepath) {
+}
+
+function PUI(cb) {
+        if(pui){cb();}
+}
+
+/*Usage of BLOCK_EVENT
+        BLOCK_EVENT(()=>{
+                ui.[name].[var] = ...;
+        });
+*/
+
+function BLOCK_EVENT(cb) {
+        ui.block_event = true;
+        
+        cb();
+        
+        ui.block_event = false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// template codes for cw callback js.
+
+function CW_DeclareVariable(name, setter, getter) {
+        if(typeof(__DeclareVariable) === 'function') {
+                __DeclareVariable(name, setter, getter);
+        }
+}
+
+function CW_DeclareOuterVariable(name) {
+        if(typeof(__DeclareOuterVariable) === 'function') {
+                __DeclareOuterVariable(name);
+        }
+}

+ 90 - 0
js/RenameMaterial_pane.js

@@ -0,0 +1,90 @@
+////////////////////////////////////////////////////////////////////////////
+// System Pre-define Functions
+// 95099372-ef3e-11ea-9c81-bf848405c62e
+
+//Callback of data preparation stage before UI is fully loaded.
+function OnInitializeData(reload, preview) {
+    
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+//Callback after UI is fully loaded and displayed.
+function OnReady(reload, preview) {
+    
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+function OnCloseForm() {
+}
+
+function OnException(err) {
+        //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Callback Functions.
+// 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+var name = '';
+function OnConfirm(){
+        
+        name = ui.modify_name.value;                     
+        unit.form.tree.ModifyMaterialName(getName());
+        unit.form.RenameMaterial.Close();            
+}
+function getName() {
+        return name;
+}
+//The message corresponding callback executed by the docker pane.
+// when calling [side_pane].fireEvent(type,para) in the main form.
+function OnParentDockerMessage(type, para) {
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Utils Functions.
+// 6c165ad6-ef3e-11ea-987c-b761a131c2fe
+
+function onDragFile(filepath) {
+}
+
+function PUI(cb) {
+        if(pui){cb();}
+}
+
+/*Usage of BLOCK_EVENT
+        BLOCK_EVENT(()=>{
+                ui.[name].[var] = ...;
+        });
+*/
+
+function BLOCK_EVENT(cb) {
+        ui.block_event = true;
+        
+        cb();
+        
+        ui.block_event = false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// template codes for cw callback js.
+
+function CW_DeclareVariable(name, setter, getter) {
+        if(typeof(__DeclareVariable) === 'function') {
+                __DeclareVariable(name, setter, getter);
+        }
+}
+
+function CW_DeclareOuterVariable(name) {
+        if(typeof(__DeclareOuterVariable) === 'function') {
+                __DeclareOuterVariable(name);
+        }
+}

+ 99 - 0
js/Rename_pane.js

@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////
+// System Pre-define Functions
+// 95099372-ef3e-11ea-9c81-bf848405c62e
+
+//Callback of data preparation stage before UI is fully loaded.
+function OnInitializeData(reload, preview) {
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+//Callback after UI is fully loaded and displayed.
+function OnReady(reload, preview) {
+        if(g_show_flag === false) {pane.Close();}
+        PUI(()=>{
+                //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
+                //The 'pui' variable is valid in all functions of this document.
+                //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
+	
+        });
+}
+
+function OnCloseForm() {
+}
+
+function OnException(err) {
+        //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Callback Functions.
+// 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+var name = '';
+function OnConfirm(){
+       
+        let work_name = model.acax_app.model.workArea.Current();
+        model.checkPath(work_name, (directories) =>{
+                if(directories.includes(ui.modify_name.value)) {
+                        unit.form.mainfrm.OnCueline('修改失败,名称已存在!', 'red');
+                }else{
+                        name = ui.modify_name.value;                     
+                        unit.form.tree.ModifyProName(getName());
+                                      
+                }
+        });
+        unit.form.Rename.Close();    
+        unit.form.mainfrm.OnCueline('修改成功', 'green');    
+}
+function getName() {
+        return name;
+}
+
+//The message corresponding callback executed by the docker pane.
+// when calling [side_pane].fireEvent(type,para) in the main form.
+function OnParentDockerMessage(type, para) {
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Utils Functions.
+// 6c165ad6-ef3e-11ea-987c-b761a131c2fe
+
+function onDragFile(filepath) {
+}
+
+function PUI(cb) {
+        if(pui){cb();}
+}
+
+/*Usage of BLOCK_EVENT
+        BLOCK_EVENT(()=>{
+                ui.[name].[var] = ...;
+        });
+*/
+
+function BLOCK_EVENT(cb) {
+        ui.block_event = true;
+        
+        cb();
+        
+        ui.block_event = false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// template codes for cw callback js.
+
+function CW_DeclareVariable(name, setter, getter) {
+        if(typeof(__DeclareVariable) === 'function') {
+                __DeclareVariable(name, setter, getter);
+        }
+}
+
+function CW_DeclareOuterVariable(name) {
+        if(typeof(__DeclareOuterVariable) === 'function') {
+                __DeclareOuterVariable(name);
+        }
+}

+ 14 - 0
js/_model.js

@@ -44,7 +44,21 @@ AutoLoadGlobalPlugins();
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //Sample codes.
+exports.checkPath = function(folderPath, cb){
+        fs.readdir(folderPath, (err, items) => {
+                if (err) {
+                        return console.error('无法读取文件夹:', err.message);
+                }
+
+                const directories = items.filter((item) => {
+                        const fullPath = path.join(folderPath, item);
+                        return fs.statSync(fullPath).isDirectory();
+                });
 
+                cb(directories);
+        });
+  
+};
 exports.setBpp1 = function(input){
         Bpp1 = input;
 };

+ 159 - 12
js/boundary_constraint_pane.js

@@ -14,6 +14,7 @@ function OnInitializeData(reload, preview) {
         control(true);
         controls(true);
         //ui.stack_constraint.index = 1;
+        
         //ui.stack_menu.index = 3;
 }
 
@@ -38,6 +39,79 @@ function OnException(err) {
 // Callback Functions.
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
 
+function OnModify(){
+        if(ui.limit_constraint.index === 0 && ui.constraint_type.index === 0) {
+                let Load = {
+                        "constraint":"固定支撑",
+                        "约束类型":ui.constraint_type.value,
+                        "固定支撑属性xd":ui.con_xn.value,
+                        "固定支撑属性xr":ui.con_xr.value,
+                        "固定支撑属性yd":ui.con_yn.value,
+                        "固定支撑属性yr":ui.con_yr.value,
+                        "固定支撑属性zd":ui.con_zn.value,
+                        "固定支撑属性zr":ui.con_zr.value
+                };
+                unit.form.tree.ModifyConstraint(Load);
+        }
+        if(ui.limit_constraint.index ===1 && ui.misConstraints.index === 0 ) {
+                let Load = {
+                        "constraint":"梁",
+                        "非约束类型":ui.misConstraints.value,
+                        "梁约束位置xDirection":ui.pb_xDiration.value,
+                        "梁约束位置yDirection":ui.pb_yDiration.value,
+                        "梁约束位置zDirection":ui.pb_zDiration.value,
+                        "梁约束位置xCoord":ui.pb_xCoord.value,
+                        "梁约束位置yCoord":ui.pb_yCoord.value,
+                        "梁约束位置zCoord":ui.pb_zCoord.value,
+                        "梁约束参数半径":ui.rad.value,
+                        "梁约束参数长度":ui.pb_length.value,
+                        "梁约束参数个数":ui.pb_size.value,
+                        "弹性模量":ui.m.value,
+                        "泊松比":ui.poi.value,
+                        "梁节点大小半径":ui.pb_node_size.value,
+                        "R":ui.R.value,
+                        "G":ui.G.value,
+                        "B":ui.B.value
+                };
+                unit.form.tree.ModifyConstraint(Load);
+        }
+        if(ui.limit_constraint.index ===1 && ui.misConstraints.index === 1 ) {
+                let Load = {
+                        "constraint":"弹簧",
+                        "非约束类型":ui.misConstraints.value,
+                        "起点x":ui.pb_x.value,
+                        "起点y":ui.pb_y.value,
+                        "起点z":ui.pb_z.value,
+                        "终点x":ui.pb_X.value,
+                        "终点y":ui.pb_Y.value,
+                        "终点z":ui.pb_Z.value,
+                        "弹簧刚度x":ui.stiffness_x.value,
+                        "弹簧刚度y":ui.stiffness_y.value,
+                        "弹簧刚度z":ui.stiffness_z.value,
+                        "R":ui.R.value,
+                        "G":ui.G.value,
+                        "B":ui.B.value
+                };
+                unit.form.tree.ModifyConstraint(Load);
+        }
+        if(ui.limit_constraint.index ===1 && ui.misConstraints.index === 2 ) {
+                let Load = {
+                        "constraint":"连接",
+                        "非约束类型":ui.misConstraints.value,
+                        "起点x":ui.pb_xn.value,
+                        "起点y":ui.pb_yn.value,
+                        "起点z":ui.pb_zn.value,
+                        "终点x":ui.pb_xr.value,
+                        "终点y":ui.pb_yr.value,
+                        "终点z":ui.pb_zr.value,
+                        "R":ui.pb_con_r.value,
+                        "G":ui.pb_con_g.value,
+                        "B":ui.pb_con_b.value
+                };
+                unit.form.tree.ModifyConstraint(Load);
+        }
+}
+
 function OnChangeBeam(){
         if(parseFloat(ui.pb_length.value) <= 0 || parseFloat(ui.rad.value) <= 0 || parseFloat(ui.m.value) <= 0  || parseFloat(ui.poi.value) <= 0  || parseFloat(ui.rad.value) <= 0){
                 unit.form.mainfrm.OnChangePicture(3, 3);
@@ -56,6 +130,7 @@ function OnFix(){
         unit.form.mainfrm.OnChangePicture(3 );2;
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您完成了固定支撑属性的添加,请用鼠标右键选中需要施加约束的物体并按快捷键T或者t进行添加!</h4>');
         let Load = {
+                "constraint":"固定支撑",
                 "约束类型":ui.constraint_type.value,
                 "固定支撑属性xd":ui.con_xn.value,
                 "固定支撑属性xr":ui.con_xr.value,
@@ -85,13 +160,14 @@ function OnConnect(){
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜成功地做好了连接!</h4>');
         
         let Load = {
+                "constraint":"连接",
                 "非约束类型":ui.misConstraints.value,
-                "起点x":ui.pb_x.value,
-                "起点y":ui.pb_y.value,
-                "起点z":ui.pb_z.value,
-                "终点x":ui.pb_X.value,
-                "终点y":ui.pb_Y.value,
-                "终点z":ui.pb_Z.value,
+                "起点x":ui.pb_xn.value,
+                "起点y":ui.pb_yn.value,
+                "起点z":ui.pb_zn.value,
+                "终点x":ui.pb_xr.value,
+                "终点y":ui.pb_yr.value,
+                "终点z":ui.pb_zr.value,
                 "R":ui.pb_con_r.value,
                 "G":ui.pb_con_g.value,
                 "B":ui.pb_con_b.value
@@ -138,7 +214,7 @@ function OnReturn(){
 }
 
 function OnFile(){
-        
+
         ui.pb_pass.enable = true;
         model.setCon(1);
         
@@ -164,6 +240,7 @@ function OnSpring(){
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您完成了弹簧约束的添加!</h4>');
         
         let Load = {
+                "constraint":"弹簧",
                 "非约束类型":ui.misConstraints.value,
                 "起点x":ui.pb_x.value,
                 "起点y":ui.pb_y.value,
@@ -189,6 +266,7 @@ function OnBeam(){
         unit.form.mainfrm.OnChangePicture(3, 2);
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您完成了梁约束的添加!</h4>');
         let Load = {
+                "constraint":"梁",
                 "非约束类型":ui.misConstraints.value,
                 "梁约束位置xDirection":ui.pb_xDiration.value,
                 "梁约束位置yDirection":ui.pb_yDiration.value,
@@ -239,7 +317,9 @@ function OnStart(){
 
 function OnChangeMenu(){
         ui.stack_menu.index = parseFloat(ui.misConstraints.index);
-        
+        console.log(ui.no_limit_constraint.index === 1);
+        //console.log(ui.limit_constraint.index);
+
         if(ui.stack_menu.index === 3){
                 model.setBeam(true);
         }else{
@@ -247,9 +327,10 @@ function OnChangeMenu(){
         }
 }
 
-function OnChangeConstraint(idx){
-        ui.stack_constraint.index = parseFloat(idx);
+function OnChangeConstraint(){
         
+        ui.stack_constraint.index  = ui.limit_constraint.index;
+
         /*if(parseFloat(idx) === 1){
                 unit.form.mainfrm.OnChangePicture(3, 1);
                 unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: Blue;font-size:20px;">注意事项:弹簧单元的起点和终点需要自动添加,鼠标右键选中起始/终止点,点击按钮(在窗口左侧倒数第5个按钮)添加即可将坐标导入!</h4>');
@@ -271,7 +352,9 @@ function OnChangeConstraint(idx){
                 unit.form.mainfrm.OnCueline('注意事项:非均匀梁的各个节点需要用鼠标右键拾取后点击H或h进行保存,梁上的各个点需要在一条直线上!', 'blue');
         }
 }
-
+function ChangeRadiobutton(idx) {
+        ui.limit_constraint.index = parseFloat(idx);
+}
 //The message corresponding callback executed by the docker pane.
 // when calling [side_pane].fireEvent(type,para) in the main form.
 function OnParentDockerMessage(type, para) {
@@ -335,7 +418,71 @@ CW_DeclareVariable("end_mes",
                 ui.pb_type2.value = val;        
                 ui.pb_end_mes.value = val;               
         }, () => {}); 
-
+        
+CW_DeclareVariable("change1",
+        val => {             
+                ui.stack_constraint.index = val;               
+        }, () => {});
+        
+CW_DeclareVariable("change2",
+        val => {             
+                ui.stack_menu.index = val;
+                ui.misConstraints.index = val;                
+        }, () => {});
+CW_DeclareVariable("setConstraint0",
+        val => {             
+                ui.con_xn.value = val["固定支撑属性xd"];   
+                ui.con_xr.value = val["固定支撑属性xr"]; 
+                ui.con_yn.value = val["固定支撑属性yd"]; 
+                ui.con_yr.value = val["固定支撑属性yr"]; 
+                ui.con_zn.value = val["固定支撑属性zd"]; 
+                ui.con_zr.value = val["固定支撑属性zr"];     
+        }, () => {});
+CW_DeclareVariable("setConstraint1",
+        val => {             
+                ui.pb_xDiration.value = val["梁约束位置xDirection"];   
+                ui.pb_yDiration.value = val["梁约束位置yDirection"]; 
+                ui.pb_zDiration.value = val["梁约束位置zDirection"]; 
+                ui.pb_xCoord.value = val["梁约束位置xCoord"]; 
+                ui.pb_yCoord.value = val["梁约束位置yCoord"]; 
+                ui.pb_zCoord.value = val["梁约束位置zCoord"];     
+                ui.rad.value = val["梁约束参数半径"];     
+                ui.pb_length.value = val["梁约束参数长度"];     
+                ui.pb_size.value = val["梁约束参数个数"];     
+                ui.m.value = val["弹性模量"];     
+                ui.poi.value = val["泊松比"];     
+                ui.pb_node_size.value = val["梁节点大小半径"];     
+                ui.R.value = val.R;     
+                ui.G.value = val.G;     
+                ui.B.value = val.B;     
+        }, () => {});
+CW_DeclareVariable("setConstraint2",
+        val => {             
+                ui.pb_x.value = val["起点x"];   
+                ui.pb_y.value = val["起点y"]; 
+                ui.pb_z.value = val["起点z"]; 
+                ui.pb_X.value = val["终点x"]; 
+                ui.pb_Y.value = val["终点y"]; 
+                ui.pb_Z.value = val["终点z"];   
+                ui.stiffness_x.value = val["弹簧刚度x"];   
+                ui.stiffness_y.value = val["弹簧刚度y"]; 
+                ui.stiffness_z.value = val["弹簧刚度z"]; 
+                ui.pb_R.value = val.R; 
+                ui.pb_G.value = val.G; 
+                ui.pb_B.value = val.B;     
+        }, () => {});
+CW_DeclareVariable("setConstraint3",
+        val => {             
+                ui.pb_xn.value = val["起点x"];   
+                ui.pb_yn.value = val["起点y"]; 
+                ui.pb_zn.value = val["起点z"]; 
+                ui.pb_xr.value = val["终点x"]; 
+                ui.pb_yr.value = val["终点y"]; 
+                ui.pb_zr.value = val["终点z"];     
+                ui.pb_con_r.value = val.R; 
+                ui.pb_con_g.value = val.G; 
+                ui.pb_con_b.value = val.B;     
+        }, () => {});
 function onDragFile(filepath) {
 }
 

+ 57 - 2
js/boundary_force_pane.js

@@ -36,6 +36,33 @@ function OnException(err) {
 // Callback Functions.
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
 
+function OnModify(idx){
+        if(idx ===0){
+                let Load = {
+                        "constraint":"集中载荷压力",
+                        "压力方向xn":ui.pb_xn.value,
+                        "压力方向yn":ui.pb_yn.value,
+                        "压力方向zn":ui.pb_zn.value,
+                        "压力大小xr":ui.pb_xr.value,
+                        "压力大小yr":ui.pb_yr.value,
+                        "压力大小zr":ui.pb_zr.value
+                };
+                unit.form.tree.ModifyMConstraint(Load);
+        }else if(idx === 1){
+                let Load = {
+                        "constraint":"分布载荷压力",
+                        "压力方向fa_x":ui.fa_x.value,
+                        "压力方向fa_y":ui.fa_y.value,
+                        "压力方向fa_z":ui.fa_z.value,
+                        "压力大小fa_xr":ui.fa_xr.value,
+                        "压力大小fa_yr":ui.fa_yr.value,
+                        "压力大小fa_zr":ui.fa_zr.value,
+                        "框选范围":ui.fa_radius.value
+                };
+                unit.form.tree.ModifyMConstraint(Load);
+        }
+}
+
 function OnValueChange2(){
         if(ui.fa_x.value === '' || ui.fa_y.value === '' || ui.fa_z.value === '' || ui.fa_xr.value === '' || ui.fa_yr.value === '' || ui.fa_zr.value === '' || parseFloat(ui.fa_radius.value) <= 0){
                 unit.form.mainfrm.OnChangePicture(3, 3);
@@ -65,10 +92,12 @@ function OnReturn(){
 }
 
 function OnFrameSelect(){
+        //comx.ply.setArrows();
         unit.form.mainfrm.OnSend('frameHightLight ' + ui.fa_x.value + ' ' + ui.fa_y.value + ' ' + ui.fa_z.value + ' ' + ui.fa_xr.value + ' ' + ui.fa_yr.value + ' ' + ui.fa_zr.value + ' ' +  + ui.fa_radius.value); 
         unit.form.mainfrm.OnChangePicture(3, 2);
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您,您已将压力数据进行保存,请按鼠标右键选中您要施加约束的物体,并按快捷键R或者r进行添加!</h4>');
         let Load = {
+                "constraint":"分布载荷压力",
                 "压力方向fa_x":ui.fa_x.value,
                 "压力方向fa_y":ui.fa_y.value,
                 "压力方向fa_z":ui.fa_z.value,
@@ -77,7 +106,8 @@ function OnFrameSelect(){
                 "压力大小fa_zr":ui.fa_zr.value,
                 "框选范围":ui.fa_radius.value
         };
-        unit.form.tree.CreateBoundary(Load);
+        let name = "箭头100";
+        unit.form.tree.CreateBoundary(Load, name);
         unit.form.mainfrm.OnCueline('您已将压力数据进行保存,请按鼠标右键选中您要施加约束的物体,并按快捷键R或者r进行添加!', 'green');
 }
 
@@ -90,6 +120,7 @@ function OnArrow(){
         unit.form.mainfrm.OnChangePicture(3, 2);
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您,您已将压力数据和框选范围进行保存,请按鼠标右键选中您要施加约束的物体,并按快捷键R或者r进行添加以及快捷键U或u者进行框选!</h4>');
         let Load = {
+                "constraint":"集中载荷压力",
                 "压力方向xn":ui.pb_xn.value,
                 "压力方向yn":ui.pb_yn.value,
                 "压力方向zn":ui.pb_zn.value,
@@ -97,7 +128,8 @@ function OnArrow(){
                 "压力大小yr":ui.pb_yr.value,
                 "压力大小zr":ui.pb_zr.value
         };
-        unit.form.tree.CreateBoundary(Load);
+        let name = "箭头2";
+        unit.form.tree.CreateBoundary(Load, name);
         unit.form.mainfrm.OnCueline('您已将压力数据和框选范围进行保存,请按鼠标右键选中您要施加约束的物体,并按快捷键R或者r进行添加以及快捷键U或u者进行框选!', 'green');
 }
 
@@ -127,6 +159,29 @@ function PUI(cb) {
         });
 */
 
+CW_DeclareVariable("index",
+        val => {             
+                ui.stack_force.index = val;               
+        }, () => {});
+CW_DeclareVariable("setConstraint0",
+        val => {             
+                ui.pb_xn.value = val["压力方向xn"];  
+                ui.pb_yn.value = val["压力方向yn"]; 
+                ui.pb_zn.value = val["压力方向zn"]; 
+                ui.pb_xr.value = val["压力大小xr"]; 
+                ui.pb_yr.value = val["压力大小yr"]; 
+                ui.pb_zr.value = val["压力大小zr"];              
+        }, () => {});
+CW_DeclareVariable("setConstraint1",
+        val => {             
+                ui.fa_x.value = val["压力方向fa_x"];  
+                ui.fa_y.value = val["压力方向fa_y"]; 
+                ui.fa_z.value = val["压力方向fa_z"]; 
+                ui.fa_xr.value = val["压力大小fa_xr"]; 
+                ui.fa_yr.value = val["压力大小fa_yr"]; 
+                ui.fa_zr.value = val["压力大小fa_zr"];    
+                ui.fa_radius.value = val["框选范围"];            
+        }, () => {});
 function BLOCK_EVENT(cb) {
         ui.block_event = true;
         

+ 55 - 2
js/mainfrm_pane.js

@@ -12,6 +12,8 @@ let myArray = [];
 var res = [];
 var judge = 0;
 var startEnd = 0;
+var vtkContext = null;
+var workData = null;
 function OnDockerChange(){
         updateDockerButtonStatus(); 
 }
@@ -167,14 +169,52 @@ function OnloadModel(path) {
 //清除canvas
 function ClearCanvas() {
         ui.canvas.db = null;
-        comx.occore.Clear();
 }
 //设置材料参数界面
 function setMaterial(material) {
         ui.physics_mastk.setmaterial = material;
 }
+//设置约束
+function setConstraint(prop) {
+        let constraint = {
+                "固定支撑":function(){
+                        ui.cw_boundary_constraint_25.setConstraint0  = prop;        
+                },
+                "梁":function(){
+                        ui.cw_boundary_constraint_25.setConstraint1  = prop;    
+                },
+                "弹簧":function(){
+                        ui.cw_boundary_constraint_25.setConstraint2 = prop;    
+                },
+                "连接":function(){
+                        ui.cw_boundary_constraint_25.setConstraint3  = prop;    
+                },
+                "梁(非均匀)":function(){
+                },
+                "集中载荷压力":function(){
+                        ui.cw_boundary_force_24.setConstraint0  = prop;    
+                },
+                "分布载荷压力":function(){
+                        ui.cw_boundary_force_24.setConstraint1  = prop;    
+                }
+        };
+        constraint[prop.constraint]();
+        
+}
+//显示重命名界面
+function RenameTreeNode(Idx) {
+        if(Idx  === 2) {
+                unit.form.Rename.Show();
+        }else if(Idx === 5){
+                unit.form.RenameMaterial.Show();
+        }
+}
 function OnInitializeData(reload, preview) {
         //model.ide_info(model.uuid().length);
+        vtkContext = comx.vtk.CreateContext();
+        ui.canvas.vtkContextInterface = vtkContext.Interface();
+        workData = comx.ply.InitWorkArea();
+        
         ui.pc_geo.value = model.getPicturePath('蓝灰色.png');
         OnCueline('白色->未使用,蓝灰色->正在处理,绿色->未通过,蓝色->通过', 'blue');
         InitCanvasIOEngine();
@@ -195,7 +235,7 @@ function OnInitializeData(reload, preview) {
                 unit.form.tree.OnMessage(msg);
                 //console.log(msg);
                 
-                if(msg == 'step_file_loaded_flag') {
+                if(msg === 'step_file_loaded_flag') {
                         ui.cueline.value = '';
                         unit.form.result_attribute.OnReset();
                 }
@@ -344,6 +384,7 @@ function OnException(err) {
 
 //////////////////////////////////////////////////////////////////////////
 // Callback Functions.
+
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
 
 function OnPickup(){
@@ -668,6 +709,18 @@ function menu(Idx) {
         ui.stack_menu.index = parseInt(Idx);
 }
 
+function changeConstrain(index1, index2){
+        if(index1 === 1){
+                ui.cw_boundary_constraint_25.change1 = index2;
+        }
+        if(index1 === 2){
+                ui.cw_boundary_constraint_25.change2 = index2;
+        }
+        if(index1 === 3){
+                ui.cw_boundary_force_24.index = index2;
+        }
+}
+
 //The message corresponding callback executed by the main form
 // when calling pui.fireEvent(type,para) in the Docker subform.
 function OnChildDockerMessage(type, para){

+ 14 - 1
js/physics_material_pane.js

@@ -34,6 +34,19 @@ let myArray = [];
 //////////////////////////////////////////////////////////////////////////
 // Callback Functions.
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+
+function OnModify(){
+        // var name = ["泊松比", "密度(g/cm^3)", "屈服强度", "弹性模量(MPa)", "Id"];
+        let mat = {
+                "泊松比": ui.phy_poi.value,
+                "密度(g/cm^3)":ui.phy_density.value,
+                "屈服强度":ui.phy_yie.value,
+                "弹性模量(MPa)":ui.phy_ela.value,
+                "Id":ui.phy_id.value
+        };
+        unit.form.tree.ModifyMaterial(mat);
+}
+
 function OnId(){
 
 }
@@ -117,7 +130,7 @@ function OnMaterialFiles() {
         unit.form.mainfrm.OnSend('materials ' + str1);
         unit.form.mainfrm.OnChangePicture(2, 2);
         //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: green;font-size:20px;">恭喜您,材料添加成功!</h4>');
-        var mat = {
+        let mat = {
                 "泊松比": ui.phy_poi.value,
                 "密度(g/cm^3)":ui.phy_density.value,
                 "屈服强度":ui.phy_yie.value,

+ 486 - 41
js/tree_pane.js

@@ -6,7 +6,7 @@
 //dcip节点和模型树节点对应值
 var g_cur_id2index_cache = {};
 var g_cur_index2id_cache = {};
-//导入工作区
+
 function OnInitializeData(reload, preview) {
     
         PUI(()=>{
@@ -16,7 +16,7 @@ function OnInitializeData(reload, preview) {
 	
         });
         ui.tree_menu.index = 2;
-        
+      
 }
 
 //Callback after UI is fully loaded and displayed.
@@ -42,10 +42,260 @@ let myArray = [];
 //////////////////////////////////////////////////////////////////////////
 // Callback Functions.
 // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+//修改约束属性的名字
+function ModifyConstraintName(new_name) {
+        let cur_name = model.acax_app.model.constrain.Current();
+        let flag = model.acax_app.control.constrain.Rename(cur_name, new_name);
+        let cur_index = model.acax_app.view.GetCurrentWorkConditionIndex();
+        let cur_id;
+        if(flag === true) {
+                unit.form.mainfrm.OnCueline('修改成功', 'green'); 
+        }else{
+                unit.form.mainfrm.OnCueline('修改失败', 'red'); 
+        }
+        model.acax_app.view.RenderTree(() => {
+                g_cur_id2index_cache = {};
+                g_cur_index2id_cache = {};
+        }, info=>{
+                let id2index = g_cur_id2index_cache;
+                let index2id = g_cur_index2id_cache;
+                                
+                let index = info.index;
+                let id    = info.id;
+                                
+                if(index) {
+                        id2index[id] = index;
+                        index2id[index] = id;
+                }
+                if((new_name === info.name) &&  (model.acax_app.path.Parent(info.index, 3) === cur_index)) {
+                        cur_id = info.id;
+                }
+                return {
+                        name        : info.name,
+                        icon        : info.icon,
+                        id          : info.id,
+                        check_state : 0
+                };
+                                
+        },
+        tree => {
+                //从工程中获取保存的model数据
+                if(model.acax_app.model.project.GetModel().pro_model){
+                        //获取当前工程的名字
+                       
+                        let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
+                         
+                        let pro_name = model.acax_app.path.Name(pro_Index);
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model);  
+                                      
+                }
+                //赋值给dcip的树结构
+                ui.tree_Model.tree = tree;
+        }
+        );
+        //渲染3d模型
+        if(model.acax_app.model.project.GetModel().step === "unimported") {
+                unit.form.mainfrm.ClearCanvas();
+        }else{
+                model.acax_app.view.Render3D(info=>{
+                        unit.form.mainfrm.OnloadModel(info.model3d.step);
+                });
+        }
+        ui.tree_Model.position = cur_id;
+}
+//修改材料属性的名字
+function ModifyMaterialName(new_name) {
+        let cur_name = model.acax_app.model.materialProp.Current();
+        let flag = model.acax_app.control.materialProp.Rename(cur_name, new_name);
+        let cur_index = model.acax_app.view.GetCurrentWorkConditionIndex();
+        let cur_id;
+        if(flag === true) {
+                unit.form.mainfrm.OnCueline('修改成功', 'green'); 
+        }else{
+                unit.form.mainfrm.OnCueline('修改失败', 'red'); 
+        }
+        model.acax_app.view.RenderTree(() => {
+                g_cur_id2index_cache = {};
+                g_cur_index2id_cache = {};
+        }, info=>{
+                let id2index = g_cur_id2index_cache;
+                let index2id = g_cur_index2id_cache;
+                                
+                let index = info.index;
+                let id    = info.id;
+                                
+                if(index) {
+                        id2index[id] = index;
+                        index2id[index] = id;
+                }
+                if((new_name === info.name) &&  (model.acax_app.path.Parent(info.index, 3) === cur_index)) {
+                        cur_id = info.id;
+                }
+                return {
+                        name        : info.name,
+                        icon        : info.icon,
+                        id          : info.id,
+                        check_state : 0
+                };
+                                
+        },
+        tree => {
+                //从工程中获取保存的model数据
+                if(model.acax_app.model.project.GetModel().pro_model){
+                        //获取当前工程的名字
+                       
+                        let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
+                         
+                        let pro_name = model.acax_app.path.Name(pro_Index);
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model);  
+                                      
+                }
+                //赋值给dcip的树结构
+                ui.tree_Model.tree = tree;
+        }
+        );
+        //渲染3d模型
+        if(model.acax_app.model.project.GetModel().step === "unimported") {
+                unit.form.mainfrm.ClearCanvas();
+        }else{
+                model.acax_app.view.Render3D(info=>{
+                        unit.form.mainfrm.OnloadModel(info.model3d.step);
+                });
+        }
+        ui.tree_Model.position = cur_id;
+}
+//修改的工程名
+function ModifyProName(new_name) {
+        let cur_name = model.acax_app.path.Name(model.acax_app.view.GetCurrentProjectIndex());
+        model.acax_app.model.project.Rename(cur_name, new_name);
+        let cur_index = model.acax_app.view.GetCurrentWorkAreaIndex();
+        let cur_id;
+        model.acax_app.view.RenderTree(() => {
+                g_cur_id2index_cache = {};
+                g_cur_index2id_cache = {};
+        }, info=>{
+                let id2index = g_cur_id2index_cache;
+                let index2id = g_cur_index2id_cache;
+                                
+                let index = info.index;
+                let id    = info.id;
+                                
+                if(index) {
+                        id2index[id] = index;
+                        index2id[index] = id;
+                }
+                if((new_name === info.name) &&  (model.acax_app.path.Parent(info.index, 0) === cur_index)) {
+                        cur_id = info.id;
+                }
+                return {
+                        name        : info.name,
+                        icon        : info.icon,
+                        id          : info.id,
+                        check_state : 0
+                };
+                                
+        },
+        tree => {
+                //从工程中获取保存的model数据
+                if(model.acax_app.model.project.GetModel().pro_model){
+                        //获取当前工程的名字
+                       
+                        let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
+                         
+                        let pro_name = model.acax_app.path.Name(pro_Index);
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model);  
+                                      
+                }
+                //赋值给dcip的树结构
+                ui.tree_Model.tree = tree;
+        }
+        );
+        //渲染3d模型
+        if(model.acax_app.model.project.GetModel().step === "unimported") {
+                unit.form.mainfrm.ClearCanvas();
+        }else{
+                model.acax_app.view.Render3D(info=>{
+                        unit.form.mainfrm.OnloadModel(info.model3d.step);
+                });
+        }
+        ui.tree_Model.position = cur_id;
+}
+//处理字符串截掉后五位
+function removeLastFiveCharacters(str) {
+        str = String(str);
+        if (str.length <= 5) {
+                return ''; // 如果字符串长度小于等于 5,则返回空字符串
+        }
+        return str.substring(0, str.length - 5); // 提取从 0 到倒数第 5 位的子字符串
+}
+//点击弹出菜单
+function OnContentClick(){
+        //获取一级子节点
+        let str = removeLastFiveCharacters(ui.tree_Model.content_menu);
+        let model_id = g_cur_id2index_cache[str];
+        //let cur_name = model.acax_app.path.Name(model_id);
+        switch (model.acax_app.path.Type(model_id)){
+        case 2:               
+                unit.form.Rename.Show();
+                break;
+        case 3:
+                break;
+        case 4:
+                unit.form.RenameConstraint.Show();
+                break;
+        case 5:
+                unit.form.RenameMaterial.Show();
+                break;
+        default:
+                break;
+        }
+}
+
+//右键单击树效果
+function OnRightClick(){
+        //console.log(ui.tree_Model.position);
+        let model_id = g_cur_id2index_cache[ui.tree_Model.position];
+        switch (model.acax_app.path.Type(model_id)){
+        case 2:
+                ui.tree_Model.content_menu =[{
+                        "name":"重命名",
+                        "icon":"",
+                        "id":ui.tree_Model.position + "13579"                       
+                }];
+                break;
+        case 3:
+                break;
+        case 4:
+                ui.tree_Model.content_menu =[{
+                        "name":"重命名",
+                        "icon":"",
+                        "id":ui.tree_Model.position + "13579"                       
+                }];
+                break;
+        case 5:
+                ui.tree_Model.content_menu =[{
+                        "name":"重命名",
+                        "icon":"",
+                        "id":ui.tree_Model.position + "13579"                       
+                }];
+                break;
+        default:
+                break;
+        }
+        
+}
+
 //点击树
 function OnClickTree(){
         //获取模型树的对应节点
+        console.log(ui.tree_Model.position);
         let model_id = g_cur_id2index_cache[ui.tree_Model.position];
+        let cur_workarea = model.acax_app.view.GetCurrentWorkAreaIndex();
+        let cur_proj = model.acax_app.view.GetCurrentProjectIndex();
+        let cur_workcondition = model.acax_app.view.GetCurrentWorkConditionIndex();
         model.acax_app.view.RenderNode(model_id, info => {
                 console.log(info);
         });
@@ -56,6 +306,8 @@ function OnClickTree(){
                 if(model_id !== cur_workarea){
                         model.acax_app.view.RenderNode(model_id, info => {
                                 OpenWorkArea(info.prop);
+                                //切换到当前工作区
+                                ui.tree_Model.position = g_cur_index2id_cache[model_id];
                         });
                 }
                 break;
@@ -67,29 +319,50 @@ function OnClickTree(){
         case 2:
                 //不是当前工程,切换工程
                 if(model_id !== cur_proj){
-                        model.acax_app.view.RenderNode(model_id, info => {
-                                
-                                unit.form.physics_material.FindMateial(info.prop);
+                        model.acax_app.view.RenderNode(model_id, info => {                      
+                                ChangePro(model.acax_app.path.Name(model_id));
+                                //切换到当前工程
+                                ui.tree_Model.position = g_cur_index2id_cache[model_id];
                         });
                       
                 }
                 break;
         //切换工况
         case 3:
-                
+                //不是当前工况,切换工况
+                if(model_id !== cur_workcondition){
+                        model.acax_app.view.RenderNode(model_id, info => {    
+                                console.log(model.acax_app.path.Name(model_id)) ;                
+                                ChangeWorkCondition(model.acax_app.path.Name(model_id));
+                                //切换到当前工况
+                                ui.tree_Model.position = g_cur_index2id_cache[model_id];
+                        });
+                      
+                }
                 break;
         //选中约束
         case 4:
-                
+                model.acax_app.view.RenderNode(model_id, info => {
+                        //切换到当前约束
+                        model.acax_app.model.constrain.SwitchTo(model.acax_app.path.Name(model_id));
+                        //将约束属性设置到对应面板
+                        ChangeConstraint(Object.values(info.prop)[0], info.prop);
+                        //切换点击约束
+                        ui.tree_Model.position = g_cur_index2id_cache[model_id];
+                });
                 break;
         //选中材料属性  
         case 5:
                 model.acax_app.view.RenderNode(model_id, info => {
+                        //切换当前材料
+                        model.acax_app.model.materialProp.SwitchTo(model.acax_app.path.Name(model_id));
                         unit.form.mainfrm.menu(3);
                         unit.form.mainfrm.OnChangePicture(2, 1);
                         unit.form.mainfrm.OnCueline('结构静力学材料设置', 'blue');    
-                        console.log(info.prop);  
+                        //将材料属性设置到面板
                         unit.form.mainfrm.setMaterial(info.prop);
+                        //切换到点击材料
+                        ui.tree_Model.position = g_cur_index2id_cache[model_id];
                 });
                 break;
         default:
@@ -97,11 +370,54 @@ function OnClickTree(){
         }
      
 }
-
+//切换约束面板
+function ChangeConstraint(constraint_name, prop) {
+        let constraint = {
+                "固定支撑":function(){
+                        unit.form.mainfrm.menu(18);
+                        unit.form.mainfrm.changeConstrain(1, 0);     
+                        unit.form.mainfrm.setConstraint(prop);              
+                },
+                "梁":function(){
+                        unit.form.mainfrm.menu(18);
+                        unit.form.mainfrm.changeConstrain(1, 1);
+                        unit.form.mainfrm.changeConstrain(2, 0);
+                        unit.form.mainfrm.setConstraint(prop); 
+                },
+                "弹簧":function(){
+                        unit.form.mainfrm.menu(18);
+                        unit.form.mainfrm.changeConstrain(1, 1);
+                        unit.form.mainfrm.changeConstrain(2, 1);
+                        unit.form.mainfrm.setConstraint(prop); 
+                },
+                "连接":function(){
+                        unit.form.mainfrm.menu(18);
+                        unit.form.mainfrm.changeConstrain(1, 1);
+                        unit.form.mainfrm.changeConstrain(2, 2);
+                        unit.form.mainfrm.setConstraint(prop); 
+                },
+                "梁(非均匀)":function(){
+                },
+                "集中载荷压力":function(){
+                        unit.form.mainfrm.menu(17);
+                        unit.form.mainfrm.changeConstrain(3, 0);
+                        unit.form.mainfrm.setConstraint(prop); 
+                },
+                "分布载荷压力":function(){
+                        unit.form.mainfrm.menu(17);
+                        unit.form.mainfrm.changeConstrain(3, 1);
+                        unit.form.mainfrm.setConstraint(prop); 
+                }
+        };
+       
+        constraint[constraint_name]();
+}
 //测试函数
 function OnTest(){
-        console.log(g_cur_id2index_cache);
-        console.log(g_cur_index2id_cache);
+        
+        // console.log(model.acax_app.path.Name(g_cur_id2index_cache["131"]));
+        //console.log(g_cur_id2index_cache);
+        // console.log(g_cur_index2id_cache);
 }
 //切换工作区
 function OpenWorkArea(fname) {
@@ -126,12 +442,11 @@ function OpenWorkArea(fname) {
                                         id2index[id] = index;
                                         index2id[index] = id;
                                 }
-                                console.log(info);
                                 return {
                                         name        : info.name,
                                         icon        : info.icon,
                                         id          : info.id,
-                                        check_state : info.index
+                                        check_state : 0
                                 };
                                 
                         },
@@ -178,12 +493,11 @@ function ChangePro(pro_name) {
                         id2index[id] = index;
                         index2id[index] = id;
                 }
-                console.log(info);
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : info.index
+                        check_state : 0
                 };
                                 
         },
@@ -211,9 +525,58 @@ function ChangePro(pro_name) {
         }
         
 }
+//切换工况
+function ChangeWorkCondition(wor_name) {
+        model.acax_app.control.workCondition.SwitchTo(wor_name);
+        model.acax_app.view.RenderTree(() => {
+                g_cur_id2index_cache = {};
+                g_cur_index2id_cache = {};
+        }, info=>{
+                let id2index = g_cur_id2index_cache;
+                let index2id = g_cur_index2id_cache;
+                                
+                let index = info.index;
+                let id    = info.id;
+                                
+                if(index) {
+                        id2index[id] = index;
+                        index2id[index] = id;
+                }
+                return {
+                        name        : info.name,
+                        icon        : info.icon,
+                        id          : info.id,
+                        check_state : 0
+                };
+                                
+        },
+        tree => {
+                //从工程中获取保存的model数据
+                if(model.acax_app.model.project.GetModel().pro_model){
+                        //获取当前工程的名字
+                        let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
+                        let pro_name = model.acax_app.path.Name(pro_Index);
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model);  
+                                      
+                }
+                //赋值给dcip的树结构
+                ui.tree_Model.tree = tree;
+        }
+        );
+        //渲染3d模型
+        if(model.acax_app.model.project.GetModel().step === "unimported") {
+                unit.form.mainfrm.ClearCanvas();
+        }else{
+                model.acax_app.view.Render3D(info=>{
+                        unit.form.mainfrm.OnloadModel(info.model3d.step);
+                });
+        }
+}
 //创建工作区
 function CreateWorkArea(name) {
         model.acax_app.control.workArea.Append(name);
+        let cur_id;
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
@@ -228,11 +591,14 @@ function CreateWorkArea(name) {
                         id2index[id] = index;
                         index2id[index] = id;
                 }
+                if("workArea" === info.name) {
+                        cur_id = info.id;
+                }
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : 3
+                        check_state : 0
                 };
         },
         tree=>{
@@ -246,10 +612,14 @@ function CreateWorkArea(name) {
                         unit.form.mainfrm.OnloadModel(info.model3d.step);
                 });
         }
+        ui.tree_Model.position = cur_id;
 }
 //创建工程
 function CreateProject(name) {
         model.acax_app.control.project.Create(name);
+        let cur_name = model.acax_app.model.project.Current();
+        let cur_index = model.acax_app.view.GetCurrentWorkAreaIndex();
+        let cur_id;
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
@@ -260,16 +630,22 @@ function CreateProject(name) {
                                 
                 let index = info.index;
                 let id    = info.id;
-                
+                if(index) {
+                        id2index[id] = index;
+                        index2id[index] = id;
+                }
+                if((cur_name === info.name) &&  (model.acax_app.path.Parent(info.index, 0) === cur_index)) {
+                        cur_id = info.id;
+                }
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : 2
+                        check_state : 0
                 };
+                
         },
         tree=>{
-                // console.log(model.acax_app.utils.FormatJSON(tree)+'\n');
                 ui.tree_Model.tree = tree;
         });
         //渲染3d模型
@@ -280,6 +656,7 @@ function CreateProject(name) {
                         unit.form.mainfrm.OnloadModel(info.model3d.step);
                 });
         }
+        ui.tree_Model.position = cur_id;
 }
 //导入模型
 function OnOpenStepFile() {
@@ -327,8 +704,40 @@ function printIds(node) {
                 node.children.forEach(child => printIds(child));
         }
 }
+//给面节点改名字并添加check_state属性
+function updateJsonNodes(jsonData) {
+        let count = 1; // 用于计数生成 Face1, Face2...
+
+        function traverse(node) {
+                // 为每个节点添加 check_state: 2 属性
+                node.check_state = 2;
+                node.icon = '';
+                // 如果存在 children 属性,则递归处理
+                if (node.children && Array.isArray(node.children)) {
+                        for (let child of node.children) {
+                                traverse(child); // 递归遍历子节点
+                        }
+                } else if (node.name && node.name.startsWith("Face_")) {
+                        // 修改 name 值为 Face1, Face2...
+                        node.name = `Face${count}`;
+                        count++;
+                }
+        }
+
+        traverse(jsonData);
+        return jsonData;
+}
+//查找模型的第一个节点值获取id
+function getFirstId(obj) {
+        // 检查是否有 children 并提取第一个节点的 id
+        if (obj.children && obj.children.length > 0) {
+                return obj.children[0].id;
+        }
+        return null; // 如果没有子节点,返回 null
+}
 //导入模型树节点
 function OnTree(Idx){
+        updateJsonNodes(Idx);
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
@@ -347,7 +756,7 @@ function OnTree(Idx){
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : info.index
+                        check_state : 0
                 };
                                 
         },
@@ -363,15 +772,19 @@ function OnTree(Idx){
                 ui.tree_Model.tree = tree;
         }
         );
+        ui.tree_Model.position = getFirstId(Idx);
 }
 //创建工况
 function CreateWorkCondition(name){
         let condition_index = model.acax_app.control.workCondition.Create(name);
+        let cur_name = model.acax_app.model.workCondition.Current();
+        let cur_index = model.acax_app.view.GetCurrentProjectIndex();
+        let cur_id;
+        console.log(model.acax_app.path.Parent(cur_index, 2) === model.acax_app.view.GetCurrentProjectIndex());
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
         }, info=>{
-                console.log(info);
                 let id2index = g_cur_id2index_cache;
                 let index2id = g_cur_index2id_cache;
                                 
@@ -382,12 +795,14 @@ function CreateWorkCondition(name){
                         id2index[id] = index;
                         index2id[index] = id;
                 }
-              
+                if((cur_name === info.name) &&  (model.acax_app.path.Parent(info.index, 2) === cur_index)) {
+                        cur_id = info.id;
+                }
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : 2
+                        check_state : 0
                 };
                                 
         },
@@ -395,23 +810,28 @@ function CreateWorkCondition(name){
                 //获取当前工程的名字
                 let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
                 let pro_name = model.acax_app.path.Name(pro_Index);
-                let cur_model =  model.acax_app.model.project.GetModel().pro_model;
-                findAndAppendByName(tree, pro_name, cur_model);  
+                //模型存在在加载
+                if(model.acax_app.model.project.GetModel().pro_model) {
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model); 
+                }
+                 
                 //赋值给dcip的树结构
                 ui.tree_Model.tree = tree;
         }
         );
-        
+        ui.tree_Model.position = cur_id;
 }
 //创建材料属性
 function CreateMaterial(mat) {
-        let material = model.acax_app.control.materialProp.Create(mat);
-        
+        model.acax_app.control.materialProp.Create(mat);
+        let cur_name = model.acax_app.model.materialProp.Current();
+        let cur_index = model.acax_app.view.GetCurrentWorkConditionIndex();
+        let cur_id;
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
         }, info=>{
-                console.log(info);
                 let id2index = g_cur_id2index_cache;
                 let index2id = g_cur_index2id_cache;
                                 
@@ -422,12 +842,14 @@ function CreateMaterial(mat) {
                         id2index[id] = index;
                         index2id[index] = id;
                 }
-              
+                if((cur_name === info.name) &&  (model.acax_app.path.Parent(info.index, 3) === cur_index)) {
+                        cur_id = info.id;
+                }
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : 2
+                        check_state : 0
                 };
                                 
         },
@@ -435,22 +857,34 @@ function CreateMaterial(mat) {
                 //获取当前工程的名字
                 let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
                 let pro_name = model.acax_app.path.Name(pro_Index);
-                let cur_model =  model.acax_app.model.project.GetModel().pro_model;
-                findAndAppendByName(tree, pro_name, cur_model);  
+                if(model.acax_app.model.project.GetModel().pro_model) {
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model); 
+                }
                 //赋值给dcip的树结构
                 ui.tree_Model.tree = tree;
         }
         );
-        
+        ui.tree_Model.position = cur_id;
+}
+//修改材料面板属性属性
+function ModifyMaterial(material) {
+        //获取当前材料的名字
+        let material_name = model.acax_app.model.materialProp.Current();
+        model.acax_app.control.materialProp.Set(material, material_name);
+        unit.form.mainfrm.OnCueline('修改成功', 'green');
 }
 //创建载荷
-function CreateBoundary(Load) {
-        let load = model.acax_app.control.constrain.Create(Load);
+function CreateBoundary(Load, name) {
+        
+        let load = model.acax_app.control.constrain.Create(Load, name);
+        let cur_name = model.acax_app.model.constrain.Current();
+        let cur_index = model.acax_app.view.GetCurrentWorkConditionIndex();
+        let cur_id;
         model.acax_app.view.RenderTree(() => {
                 g_cur_id2index_cache = {};
                 g_cur_index2id_cache = {};
         }, info=>{
-                console.log(info);
                 let id2index = g_cur_id2index_cache;
                 let index2id = g_cur_index2id_cache;
                                 
@@ -461,12 +895,14 @@ function CreateBoundary(Load) {
                         id2index[id] = index;
                         index2id[index] = id;
                 }
-              
+                if((cur_name === info.name) &&  (model.acax_app.path.Parent(info.index, 3) === cur_index)) {
+                        cur_id = info.id;
+                }
                 return {
                         name        : info.name,
                         icon        : info.icon,
                         id          : info.id,
-                        check_state : 2
+                        check_state : 0
                 };
                                 
         },
@@ -474,12 +910,21 @@ function CreateBoundary(Load) {
                 //获取当前工程的名字
                 let pro_Index = model.acax_app.view.GetCurrentProjectIndex();
                 let pro_name = model.acax_app.path.Name(pro_Index);
-                let cur_model =  model.acax_app.model.project.GetModel().pro_model;
-                findAndAppendByName(tree, pro_name, cur_model);  
+                if(model.acax_app.model.project.GetModel().pro_model) {
+                        let cur_model =  model.acax_app.model.project.GetModel().pro_model;
+                        findAndAppendByName(tree, pro_name, cur_model); 
+                }
                 //赋值给dcip的树结构
                 ui.tree_Model.tree = tree;
         }
         );
+        ui.tree_Model.position = cur_id;
+}
+//修改载荷面板属性
+function ModifyConstraint(constrain) {
+        let constrain_name = model.acax_app.model.constrain.Current();
+        model.acax_app.control.constrain.Set(constrain, constrain_name);
+        unit.form.mainfrm.OnCueline('修改成功', 'green');
 }
 function OnMessage(idx){
         ui.cueline.value += idx + '\n';

+ 15 - 3
js/workArea_pane.js

@@ -11,6 +11,9 @@ function OnInitializeData(reload, preview) {
                 //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
 	
         });
+        //默认到data路径下
+        ui.floder.value = unit.dir + 'data';
+        fname = ui.floder.value;
 }
 
 //Callback after UI is fully loaded and displayed.
@@ -37,15 +40,24 @@ function OnException(err) {
 var fname = '';
 var name = '';
 function OnConfirm(){
-        name = fname + "/" +ui.work_name.value;
-        //console.log(name);
-        unit.form.tree.CreateWorkArea(getName());
+        model.checkPath(ui.floder.value, (directories) =>{
+                if(directories.includes(ui.work_name.value)) {
+                        unit.form.mainfrm.OnCueline('您创建的工作区已存在!', 'red');
+                }else{
+                        name = fname + "/" +ui.work_name.value;
+                        unit.form.tree.CreateWorkArea(getName());                     
+                      
+                }
+        });
         unit.form.workArea.Close();
+        unit.form.mainfrm.OnCueline('成功创建工作区!', 'green');
+        
 }
 function getName() {
         return name;
 }
 function OngetFloder(){
+        
         fname = ui.OpenFolderDialog("Create WorkArea", unit.dir);
         ui.floder.value = fname;        
 }

二進制
kul.zip


+ 132 - 0
kul/Rename.kul

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<kul_pkg type="ui" name="Rename" xmlns="http://www.kingmesh.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kingmesh.com kul.xsd">
+  <property name="id">0xa4285b49-0xb3ee-0x4668-0x8c-0x02-0x42-0x3e-0x19-0x7b-0x1f-0xa9</property>
+  <widget type="form" name="Rename_pane">
+    <property name="id">0x3cc8c667-0x211d-0x479b-0xaf-0x6f-0x41-0xa4-0xfa-0x0e-0x47-0x8a</property>
+    <property name="style">popup</property>
+    <property name="title">modify_pro</property>
+    <property name="titlebar">true</property>
+    <property name="icon">nil</property>
+    <property name="bkcolor">gray</property>
+    <property name="width">auto</property>
+    <property name="height">auto</property>
+    <property name="center">center</property>
+    <property name="auto_center">false</property>
+    <property name="transparent">false</property>
+    <property name="resize">true</property>
+    <property name="show">normal</property>
+    <property name="maximum_box">true</property>
+    <property name="minimum_box">true</property>
+    <property name="close_box">true</property>
+    <property name="toolwindow">false</property>
+    <property name="app_window">true</property>
+    <property name="topmost">true</property>
+    <property name="is_service">false</property>
+    <property name="attachment">none</property>
+    <property name="attachment_size">5</property>
+    <property name="attach_dev">none</property>
+    <property name="attach_dev_size">5</property>
+    <property name="javascript">Rename_pane.js</property>
+    <property name="onGeometryChange"/>
+    <property name="onHotKey"/>
+    <property name="onDockChange"/>
+    <widget type="vbox">
+      <property name="adjust">auto</property>
+      <property name="hightlight">false</property>
+      <property name="margin">1</property>
+      <property name="scroll">false</property>
+      <property name="shadow">true</property>
+      <property name="scroll_height">auto</property>
+      <property name="scroll_amargin">5</property>
+      <property name="scroll_steps">3</property>
+      <widget type="hbox">
+        <property name="adjust">auto</property>
+        <property name="hightlight">false</property>
+        <property name="margin">1</property>
+        <property name="scroll">false</property>
+        <property name="shadow">true</property>
+        <property name="scroll_width">auto</property>
+        <property name="scroll_amargin">5</property>
+        <property name="scroll_steps">3</property>
+        <widget type="label">
+          <property name="name"/>
+          <property name="text">名称:</property>
+          <property name="tip"/>
+          <property name="id_alias">4</property>
+          <property name="width">40</property>
+          <property name="height">8</property>
+          <property name="adjust">fixed</property>
+          <property name="auto_width">false</property>
+          <property name="align">right</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="handle_bind"/>
+          <property name="simple_bind"/>
+          <property name="visible_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="edit">
+          <property name="name">modify_name</property>
+          <property name="data"/>
+          <property name="tip"/>
+          <property name="id_alias">5</property>
+          <property name="width">100</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="flat">false</property>
+          <property name="align">left</property>
+          <property name="valid_check">false</property>
+          <property name="valid_okay">.*</property>
+          <property name="valid_warning">.*</property>
+          <property name="multiline">false</property>
+          <property name="password">false</property>
+          <property name="readonly">false</property>
+          <property name="wrap">true</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="enable_bind"/>
+          <property name="visible_bind"/>
+          <property name="onChange"/>
+          <property name="onAccept"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="pushbutton">
+          <property name="name"/>
+          <property name="label">确定</property>
+          <property name="tip"/>
+          <property name="bitmap">nil</property>
+          <property name="bitmap_align">left</property>
+          <property name="width">20</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="can_check">false</property>
+          <property name="default">false</property>
+          <property name="flat">false</property>
+          <property name="flat_radio">false</property>
+          <property name="gray">false</property>
+          <property name="id_alias">6</property>
+          <property name="visible">true</property>
+          <property name="onClick">OnConfirm()</property>
+          <property name="onContentMenu"/>
+          <property name="shadow">false</property>
+          <property name="shadow_type">soft</property>
+          <property name="enable_bind"/>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="visible_bind"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="space">
+          <property name="size">auto</property>
+        </widget>
+      </widget>
+    </widget>
+  </widget>
+</kul_pkg>

+ 132 - 0
kul/RenameConstraint.kul

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<kul_pkg type="ui" name="RenameConstraint" xmlns="http://www.kingmesh.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kingmesh.com kul.xsd">
+  <property name="id">0x4136b202-0x6147-0x46af-0x87-0xdc-0xde-0xf1-0x57-0xcf-0xb7-0xfb</property>
+  <widget type="form" name="RenameConstraint_pane">
+    <property name="id">0x00c2b00f-0x2b11-0x4bc2-0xb3-0xd4-0xa4-0x02-0xa0-0xd1-0xc3-0x21</property>
+    <property name="style">popup</property>
+    <property name="title">Modify Constraint Name</property>
+    <property name="titlebar">true</property>
+    <property name="icon">nil</property>
+    <property name="bkcolor">gray</property>
+    <property name="width">auto</property>
+    <property name="height">auto</property>
+    <property name="center">center</property>
+    <property name="auto_center">false</property>
+    <property name="transparent">false</property>
+    <property name="resize">true</property>
+    <property name="show">normal</property>
+    <property name="maximum_box">true</property>
+    <property name="minimum_box">true</property>
+    <property name="close_box">true</property>
+    <property name="toolwindow">false</property>
+    <property name="app_window">true</property>
+    <property name="topmost">true</property>
+    <property name="is_service">false</property>
+    <property name="attachment">none</property>
+    <property name="attachment_size">5</property>
+    <property name="attach_dev">none</property>
+    <property name="attach_dev_size">5</property>
+    <property name="javascript">RenameConstraint_pane.js</property>
+    <property name="onGeometryChange"/>
+    <property name="onHotKey"/>
+    <property name="onDockChange"/>
+    <widget type="vbox">
+      <property name="adjust">auto</property>
+      <property name="hightlight">false</property>
+      <property name="margin">1</property>
+      <property name="scroll">false</property>
+      <property name="shadow">true</property>
+      <property name="scroll_height">auto</property>
+      <property name="scroll_amargin">5</property>
+      <property name="scroll_steps">3</property>
+      <widget type="hbox">
+        <property name="adjust">auto</property>
+        <property name="hightlight">false</property>
+        <property name="margin">1</property>
+        <property name="scroll">false</property>
+        <property name="shadow">true</property>
+        <property name="scroll_width">auto</property>
+        <property name="scroll_amargin">5</property>
+        <property name="scroll_steps">3</property>
+        <widget type="label">
+          <property name="name"/>
+          <property name="text">名称:</property>
+          <property name="tip"/>
+          <property name="id_alias">4</property>
+          <property name="width">40</property>
+          <property name="height">8</property>
+          <property name="adjust">fixed</property>
+          <property name="auto_width">false</property>
+          <property name="align">right</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="handle_bind"/>
+          <property name="simple_bind"/>
+          <property name="visible_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="edit">
+          <property name="name">modify_name</property>
+          <property name="data"/>
+          <property name="tip"/>
+          <property name="id_alias">5</property>
+          <property name="width">100</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="flat">false</property>
+          <property name="align">left</property>
+          <property name="valid_check">false</property>
+          <property name="valid_okay">.*</property>
+          <property name="valid_warning">.*</property>
+          <property name="multiline">false</property>
+          <property name="password">false</property>
+          <property name="readonly">false</property>
+          <property name="wrap">true</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="enable_bind"/>
+          <property name="visible_bind"/>
+          <property name="onChange"/>
+          <property name="onAccept"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="pushbutton">
+          <property name="name"/>
+          <property name="label">确定</property>
+          <property name="tip"/>
+          <property name="bitmap">nil</property>
+          <property name="bitmap_align">left</property>
+          <property name="width">20</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="can_check">false</property>
+          <property name="default">false</property>
+          <property name="flat">false</property>
+          <property name="flat_radio">false</property>
+          <property name="gray">false</property>
+          <property name="id_alias">6</property>
+          <property name="visible">true</property>
+          <property name="onClick">OnConfirm()</property>
+          <property name="onContentMenu"/>
+          <property name="shadow">false</property>
+          <property name="shadow_type">soft</property>
+          <property name="enable_bind"/>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="visible_bind"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="space">
+          <property name="size">auto</property>
+        </widget>
+      </widget>
+    </widget>
+  </widget>
+</kul_pkg>

+ 132 - 0
kul/RenameMaterial.kul

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<kul_pkg type="ui" name="RenameMaterial" xmlns="http://www.kingmesh.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kingmesh.com kul.xsd">
+  <property name="id">0x2509343f-0x1055-0x408e-0xad-0x31-0x22-0x1e-0xaf-0xfb-0x38-0xeb</property>
+  <widget type="form" name="RenameMaterial_pane">
+    <property name="id">0xd6706c09-0x8265-0x4bc1-0xa7-0x44-0x54-0xc6-0x42-0x0a-0xdb-0x89</property>
+    <property name="style">popup</property>
+    <property name="title">Form</property>
+    <property name="titlebar">true</property>
+    <property name="icon">nil</property>
+    <property name="bkcolor">gray</property>
+    <property name="width">auto</property>
+    <property name="height">auto</property>
+    <property name="center">center</property>
+    <property name="auto_center">false</property>
+    <property name="transparent">false</property>
+    <property name="resize">true</property>
+    <property name="show">normal</property>
+    <property name="maximum_box">true</property>
+    <property name="minimum_box">true</property>
+    <property name="close_box">true</property>
+    <property name="toolwindow">false</property>
+    <property name="app_window">true</property>
+    <property name="topmost">true</property>
+    <property name="is_service">false</property>
+    <property name="attachment">none</property>
+    <property name="attachment_size">5</property>
+    <property name="attach_dev">none</property>
+    <property name="attach_dev_size">5</property>
+    <property name="javascript">RenameMaterial_pane.js</property>
+    <property name="onGeometryChange"/>
+    <property name="onHotKey"/>
+    <property name="onDockChange"/>
+    <widget type="vbox">
+      <property name="adjust">auto</property>
+      <property name="hightlight">false</property>
+      <property name="margin">1</property>
+      <property name="scroll">false</property>
+      <property name="shadow">true</property>
+      <property name="scroll_height">auto</property>
+      <property name="scroll_amargin">5</property>
+      <property name="scroll_steps">3</property>
+      <widget type="hbox">
+        <property name="adjust">auto</property>
+        <property name="hightlight">false</property>
+        <property name="margin">1</property>
+        <property name="scroll">false</property>
+        <property name="shadow">true</property>
+        <property name="scroll_width">auto</property>
+        <property name="scroll_amargin">5</property>
+        <property name="scroll_steps">3</property>
+        <widget type="label">
+          <property name="name"/>
+          <property name="text">名称:</property>
+          <property name="tip"/>
+          <property name="id_alias">4</property>
+          <property name="width">40</property>
+          <property name="height">8</property>
+          <property name="adjust">fixed</property>
+          <property name="auto_width">false</property>
+          <property name="align">right</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="handle_bind"/>
+          <property name="simple_bind"/>
+          <property name="visible_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="edit">
+          <property name="name">modify_name</property>
+          <property name="data"/>
+          <property name="tip"/>
+          <property name="id_alias">5</property>
+          <property name="width">100</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="flat">false</property>
+          <property name="align">left</property>
+          <property name="valid_check">false</property>
+          <property name="valid_okay">.*</property>
+          <property name="valid_warning">.*</property>
+          <property name="multiline">false</property>
+          <property name="password">false</property>
+          <property name="readonly">false</property>
+          <property name="wrap">true</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="enable_bind"/>
+          <property name="visible_bind"/>
+          <property name="onChange"/>
+          <property name="onAccept"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="pushbutton">
+          <property name="name"/>
+          <property name="label">确定</property>
+          <property name="tip"/>
+          <property name="bitmap">nil</property>
+          <property name="bitmap_align">left</property>
+          <property name="width">20</property>
+          <property name="height">12</property>
+          <property name="adjust">fixed</property>
+          <property name="can_check">false</property>
+          <property name="default">false</property>
+          <property name="flat">false</property>
+          <property name="flat_radio">false</property>
+          <property name="gray">false</property>
+          <property name="id_alias">6</property>
+          <property name="visible">true</property>
+          <property name="onClick">OnConfirm()</property>
+          <property name="onContentMenu"/>
+          <property name="shadow">false</property>
+          <property name="shadow_type">soft</property>
+          <property name="enable_bind"/>
+          <property name="simple_bind"/>
+          <property name="valid_bind"/>
+          <property name="visible_bind"/>
+          <property name="handle_bind"/>
+          <property name="hightlight">false</property>
+          <property name="stylesheet"/>
+        </widget>
+        <widget type="space">
+          <property name="size">auto</property>
+        </widget>
+      </widget>
+    </widget>
+  </widget>
+</kul_pkg>

File diff suppressed because it is too large
+ 219 - 1462
kul/boundary_constraint.kul


+ 76 - 0
kul/boundary_force.kul

@@ -517,6 +517,44 @@
                     <property name="size">auto</property>
                   </widget>
                 </widget>
+                <widget type="hbox">
+                  <property name="adjust">auto</property>
+                  <property name="hightlight">false</property>
+                  <property name="margin">1</property>
+                  <property name="scroll">false</property>
+                  <property name="shadow">true</property>
+                  <property name="scroll_width">auto</property>
+                  <property name="scroll_amargin">5</property>
+                  <property name="scroll_steps">3</property>
+                  <widget type="pushbutton">
+                    <property name="name"/>
+                    <property name="label">修改</property>
+                    <property name="tip"/>
+                    <property name="bitmap">nil</property>
+                    <property name="bitmap_align">left</property>
+                    <property name="width">50</property>
+                    <property name="height">12</property>
+                    <property name="adjust">fixed</property>
+                    <property name="can_check">false</property>
+                    <property name="default">false</property>
+                    <property name="flat">false</property>
+                    <property name="flat_radio">false</property>
+                    <property name="gray">false</property>
+                    <property name="id_alias">88</property>
+                    <property name="visible">true</property>
+                    <property name="onClick">OnModify(0)</property>
+                    <property name="onContentMenu"/>
+                    <property name="shadow">false</property>
+                    <property name="shadow_type">soft</property>
+                    <property name="enable_bind"/>
+                    <property name="simple_bind"/>
+                    <property name="valid_bind"/>
+                    <property name="visible_bind"/>
+                    <property name="handle_bind"/>
+                    <property name="hightlight">false</property>
+                    <property name="stylesheet"/>
+                  </widget>
+                </widget>
                 <widget type="space">
                   <property name="size">auto</property>
                 </widget>
@@ -1065,6 +1103,44 @@
                     <property name="stylesheet"/>
                   </widget>
                 </widget>
+                <widget type="hbox">
+                  <property name="adjust">auto</property>
+                  <property name="hightlight">false</property>
+                  <property name="margin">1</property>
+                  <property name="scroll">false</property>
+                  <property name="shadow">true</property>
+                  <property name="scroll_width">auto</property>
+                  <property name="scroll_amargin">5</property>
+                  <property name="scroll_steps">3</property>
+                  <widget type="pushbutton">
+                    <property name="name"/>
+                    <property name="label">修改</property>
+                    <property name="tip"/>
+                    <property name="bitmap">nil</property>
+                    <property name="bitmap_align">left</property>
+                    <property name="width">50</property>
+                    <property name="height">12</property>
+                    <property name="adjust">fixed</property>
+                    <property name="can_check">false</property>
+                    <property name="default">false</property>
+                    <property name="flat">false</property>
+                    <property name="flat_radio">false</property>
+                    <property name="gray">false</property>
+                    <property name="id_alias">91</property>
+                    <property name="visible">true</property>
+                    <property name="onClick">OnModify(1)</property>
+                    <property name="onContentMenu"/>
+                    <property name="shadow">false</property>
+                    <property name="shadow_type">soft</property>
+                    <property name="enable_bind"/>
+                    <property name="simple_bind"/>
+                    <property name="valid_bind"/>
+                    <property name="visible_bind"/>
+                    <property name="handle_bind"/>
+                    <property name="hightlight">false</property>
+                    <property name="stylesheet"/>
+                  </widget>
+                </widget>
                 <widget type="space">
                   <property name="size">auto</property>
                 </widget>

+ 24 - 0
kul/kul.entry.xml

@@ -260,6 +260,18 @@
     <location>WorkCondition.kul</location>
     <value>nil</value>
   </pkgid>
+  <pkgid name="Rename">
+    <location>Rename.kul</location>
+    <value>nil</value>
+  </pkgid>
+  <pkgid name="RenameMaterial">
+    <location>RenameMaterial.kul</location>
+    <value>nil</value>
+  </pkgid>
+  <pkgid name="RenameConstraint">
+    <location>RenameConstraint.kul</location>
+    <value>nil</value>
+  </pkgid>
   <formid name="mainfrm_pane">
     <location>mainfrm.kul</location>
     <value>nil</value>
@@ -532,4 +544,16 @@
     <location>WorkCondition.kul</location>
     <value>nil</value>
   </formid>
+  <formid name="Rename_pane">
+    <location>Rename.kul</location>
+    <value>nil</value>
+  </formid>
+  <formid name="RenameMaterial_pane">
+    <location>RenameMaterial.kul</location>
+    <value>nil</value>
+  </formid>
+  <formid name="RenameConstraint_pane">
+    <location>RenameConstraint.kul</location>
+    <value>nil</value>
+  </formid>
 </kul_pkg>

+ 41 - 0
kul/physics_material.kul

@@ -565,6 +565,47 @@
             <widget type="space">
               <property name="size">auto</property>
             </widget>
+            <widget type="hbox">
+              <property name="adjust">auto</property>
+              <property name="hightlight">false</property>
+              <property name="margin">1</property>
+              <property name="scroll">false</property>
+              <property name="shadow">true</property>
+              <property name="scroll_width">auto</property>
+              <property name="scroll_amargin">5</property>
+              <property name="scroll_steps">3</property>
+              <widget type="space">
+                <property name="size">auto</property>
+              </widget>
+              <widget type="pushbutton">
+                <property name="name"/>
+                <property name="label">修改</property>
+                <property name="tip"/>
+                <property name="bitmap">nil</property>
+                <property name="bitmap_align">left</property>
+                <property name="width">40</property>
+                <property name="height">12</property>
+                <property name="adjust">fixed</property>
+                <property name="can_check">false</property>
+                <property name="default">false</property>
+                <property name="flat">false</property>
+                <property name="flat_radio">false</property>
+                <property name="gray">false</property>
+                <property name="id_alias">53</property>
+                <property name="visible">true</property>
+                <property name="onClick">OnModify()</property>
+                <property name="onContentMenu"/>
+                <property name="shadow">false</property>
+                <property name="shadow_type">soft</property>
+                <property name="enable_bind"/>
+                <property name="simple_bind"/>
+                <property name="valid_bind"/>
+                <property name="visible_bind"/>
+                <property name="handle_bind"/>
+                <property name="hightlight">false</property>
+                <property name="stylesheet"/>
+              </widget>
+            </widget>
             <widget type="hbox">
               <property name="adjust">auto</property>
               <property name="hightlight">false</property>

+ 4 - 4
kul/tree.kul

@@ -131,7 +131,7 @@
             <property name="gray">false</property>
             <property name="id_alias">18</property>
             <property name="visible">true</property>
-            <property name="onClick">Ontest()</property>
+            <property name="onClick">OnTest()</property>
             <property name="onContentMenu"/>
             <property name="shadow">false</property>
             <property name="shadow_type">soft</property>
@@ -857,7 +857,7 @@
             <property name="height">100</property>
             <property name="virtual_width">200</property>
             <property name="adjust">auto</property>
-            <property name="check_box">false</property>
+            <property name="check_box">true</property>
             <property name="edit_label">false</property>
             <property name="grid">false</property>
             <property name="has_button">true</property>
@@ -868,8 +868,8 @@
             <property name="visible">true</property>
             <property name="onClick">OnClickTree()</property>
             <property name="onItemChecked"/>
-            <property name="onRightClick"/>
-            <property name="onContentMenu"/>
+            <property name="onRightClick">OnRightClick()</property>
+            <property name="onContentMenu">OnContentClick()</property>
             <property name="enable_bind"/>
             <property name="visible_bind"/>
             <property name="handle_bind"/>

+ 0 - 1
viewProp.db.json

@@ -1 +0,0 @@
-{"mode":{"9a6d8ea5f353854a2a6ea4387385ca3d":1,"2cdae575aa40cefba80881fa8da17882":1,"ad7d3e9eb2f0d0ea310c645014869d1f":1,"1658fbe9f2b509e154ad6e225ecccc06":1},"props":{}}

+ 0 - 1
workArea.cfg.json

@@ -1 +0,0 @@
-{"current":0,"list":["D:/dcip1/comx_sdk.node/unit/hypermesh/data/work1","D:\\dcip1\\comx_sdk.node\\unit\\hypermesh\\data\\work2"]}