DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0021636

Naming of the face #14 of the presented mode raises NullObject exception

Open CASCADEOCCT:Application Frameworkclosed0 public notes

Search issues

Description

Naming of the shape #0000014 of the presented data model raises Null Object Exception.
Script to reproduce the problem is below:

NewDocument D MDTV-Standard
AddDriver D Box Attach PTxyz PTALine PRLine PMirr Sph Prism FulRevol SecRevol
#0000001 - create box using more flexible set of commands
NewCommand D
isos 12
set B2 [AddObject D]; ## add object
set F2 [AddFunction D $B2 Box]; ## add function
BoxDX D $B2 190; ## set arguments of this function
BoxDY D $B2 290
BoxDZ D $B2 390
InitLogBook D; ## initialize (clean) internal map of labels
ComputeFun D $F2; ## compute the function
GetShape D $F2:2 Box2; ## check result
fit

#0000002 Prism (after step #0000001)
explode Box2 F
set Bas1 [AttachShape D Box2_1 ${B2} ${B2} 0]
set Prism [AddPrism D $Bas1 300 0]
ComputeFun D $Prism:1
GetShape D $Prism:1:2 Pr

PrismHeight D $Prism 500
ComputeFun D $Prism:1
GetShape D $Prism:1:2 Pr
fit


#3 Revol Full
explode Box2 F
explode Box2_3 E
set Bas2 [AttachShape D Box2_3 ${B2} ${B2} 0]
set Ax2 [AttachShape D Box2_3_3 ${B2} ${B2} 0]
set FRev [AddRevol D $Bas2 $Ax2]
ComputeFun D $FRev:1
GetShape D $FRev:1:2 R1

#5
NewCommand D
set FTr1 [PTranslateDXYZ D $FRev -250 50 -130]
ComputeFun D $FTr1; ## function recomputation
GetShape D $FTr1:2 R1; ## get modified result

#6 => fuse
AddDriver D Fuse
set FS1 [AddFuse D $Prism $FRev]
ComputeFun D $FS1
GetShape D $FS1:2 Pr

#0000007 Revol Sectioned
GetShape D $F2:2 Box2;
explode Box2 F
explode Box2_2 E
set Bas3 [AttachShape D Box2_2 ${B2} ${B2} 0]
set Ax3 [AttachShape D Box2_2_3 ${B2} ${B2} 0]
set SRev [AddRevol D $Bas3 $Ax3 120 0]
ComputeFun D $SRev:1
GetShape D $SRev:1:2 R2

#0000008
set FS2 [AddFuse D $B2 $SRev]
ComputeFun D $FS2
GetShape D $FS2:2 Box2

#0000009
set FS3 [AddFuse D $B2 $Prism]
ComputeFun D $FS3
GetShape D $FS3:2 Box2


#0000007
NewCommand D
explode Box2 F
set Sel1 [AttachShape D Box2_14 ${B2} ${B2} 0]
# where Box2_14 is the face #0000014...

Public activity

No public notes

Participants are labeled by their role within this record.

Related records