Jump to content

Recommended Posts

Hi all,

 

I'm looking at feature programming samples. In the tutorial 'Loops' the debugging process shows some errors, so I replaced igesImport with igesDeprecatedImport:

FFile f(file.getFileName())
if (!f.exists())
  echo("Invalid input file, file does not exist.")
  break()
endif
igesDeprecatedImport importer()
importer.import(file.getFileName())
fobjectlist imported(importer.getLastImportedObjects())
unsigned curveCount(0)
double maxLength(-1)
unsigned index(0)
while(index < imported.getCount())
  FCurve c(imported.at(index).castTo(FCurve))
  if(!(!c))
    curveCount += 1
    maxLength = max(maxLength, c.getLength())
  endif
  index += 1
endwhile
echo("Analysis result for file " + file.getFileName() + ":")
echo("Number of curves: " + curveCount)
echo("The longest curve is " + maxLength + " units long")

I have no more errors, but the feature doesn't work as expected. The console output (the IGES file is the CAESES sample hull geometry containervessel.iges):

*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 308 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 408 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
*** INFO IGES Import : entity type warning [detected type 314 is unsupported]
*** INFO IGES Import : entity type warning [detected type 406 is unsupported]
Analysis result for file C:/Program Files (x86)/FRIENDSHIP-SYSTEMS/CAESES-FFW/tutorials/06_hull_design/containervessel.iges:
Number of curves: 0
The longest curve is -1 units long

1. The File / Import menu includes IGES and IGES (Subset, Deprecated) importing tools. Does any command replace igesImport in feature programming? Does exist only igesDeprecatedImport?

2. What's wrong with IGES entity types in the code above?

 

I can't find any documentation about IGES importing commands. Thanks for your help.

Share this post


Link to post
Share on other sites

Hi Maurizio,

 

Thanks for this information. We recently changed the file "containervessel.iges", since it had some issues. And, our IGES import has also changed within the last weeks and months. So it is an unlucky combination ;-) Our old i.e. deprecated IGES import cannot cope with the given IGES entities which is the reason for your output.

 

We will take a look at it (and also at this loop example) and get back to you as soon as this problem is solved.

 

Best regards

Joerg

Share this post


Link to post
Share on other sites

Hi Joerg,

 

if you are going to review the tutorial, I have other feedbacks ;)

1. the sample hull geometry basicosv.igs doesn't show IGES types problems, but the tutorial feature doesn't work properly and no curves are listed and measured (sorry, if no curves are included in the IGES model :))

2. I think that the feature code in the 'Loops' tutorial (p. 3) includes another error (too many slashes). I replaced

resolveEnv("$TUTORIALSDIR")+"/06_hull_design/containervessel.iges"

with

resolveEnv("$TUTORIALSDIR")+"06_hull_design/containervessel.iges"

Regards,

 

Maurizio

  • Downvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...