Community
ReCap SDK Forum
Welcome to Autodesk’s ReCap SDK Forum. Share your knowledge, ask questions, get support and explore popular ReCap SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RCScan::isStructured() but (! RCScan::getStructuredScan())

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
lamorlette
1438 Views, 13 Replies

RCScan::isStructured() but (! RCScan::getStructuredScan())

I have a RCP project that apparently is missing the 2D structure for its stations, since I can't see the “mirror balls” in Recap.

Still, the RCScan::isStructured() returns true.

But, then, when I call RCScan::getStructuredScan(), I get a null pointer.

Is this a bug?

13 REPLIES 13
Message 2 of 14
martin.graner
in reply to: lamorlette

It is possible that the rcp project is somehow damaged. I was able to write an unstructured rcp project where strucutured rcs files were in the support folder. Simplest way to check that is to upload it here to get the project checked, or try to import the rcs files in ReCap and see if then there are mirrorballs. If in the support folder are only RCS files and nothing else then I guess it might be unstructured.

 

Did you call getScanAt(...), or something prior befor calling getStructuredScan()?

Is your project loaded correctly before that? loadFromFile(...)

Message 3 of 14
lamorlette
in reply to: martin.graner

Thanks Martin for your help.

 

Indeed:

  • There are RCC files in the support folder.
  • When opening individually the RCS files (from the support folder), I see the mirror balls in Recap.

So it seems the RCP is damaged.

 

To get the structured scan, I call RCProject::loadFromFile(), then getScanAt(), then isStructured(), then getStructuredScan().

 

Xavier

Message 4 of 14
yan.fu
in reply to: lamorlette

Could you help to upload your .rcp file here so that we can investigate on the issue? Thank you!

Message 5 of 14
lamorlette
in reply to: yan.fu

Sorry, these are not my data, I can't share them.

Message 6 of 14
yan.fu
in reply to: lamorlette

Got it. No problem. We will try to reproduce it and will let you know when it is ready for release. 

 

Thanks,

Yan

Message 7 of 14
martin.graner
in reply to: yan.fu

Hi @yan.fu,

 

I can share a point cloud with you where I got this issue vice versa. The RCS point cloud is unstructured, while the project returns true when calling RCScan->isStructured().

You can download it from:

RCP Project unstructured issue

Edit: Sry for the project size

 

@lamorlette:

My workaround for this would be to check in addition RCScan->getStructuredScanWidth() and RCScan->getStructuredScanHeight() and if one of these returns 0 I'd switch to unstructured.

 

 

Message 8 of 14
yan.fu
in reply to: martin.graner

Hi @martin.graner , @lamorlette,

 

Thank you both for valuable feedback.

I have tried your .rcp and can reproduce this issue. For the .rcp file, what I can see if that this scan was originally from some structured scan because it has been segmented using structured scan information and the segment information is written into. rcs file. So Reality Solutions SDK returns true for isStructuredScan(). We will fix it this issue by more checking.

For now, check RCScan::getStructuredScan()==nullptr is more reliable to use.

 

Thanks again for your feedback.

 

Yan

Message 9 of 14
lamorlette
in reply to: yan.fu

@martin.graner I have a case where:

  • RCScan::isStructured() → true
  • RCScan::getStructuredScanHeight() → 2460
  • RCScan::getStructuredScanWidth() → 4920
  • RCScan::getStructuredScan() → nullptr

I'm trying to see if I can share this project for investigations.

Message 10 of 14
martin.graner
in reply to: lamorlette

@lamorletteThanks for mentioning this. Then we should indeed take the way @yan.fu mentioned.

 

@yan.fu: It should be possible to use

 

RCScan::createPointIterator()
IRCPointIterator->moveToNextPoint();
const IRCPointAccessor &point = IRCPointIterator->getPoint();

on a structured scan to read it like an unstructured scan or?

So if the opposite happens, that the scan is structured but RCScan->isstructured() returns false I can import it as an unstructured scan without my application crashing?

Message 11 of 14
yan.fu
in reply to: martin.graner

IRCPointIterator only iterates the points inside .rcs file for now, no matter it is structured scan or not.

If you want to get structured scan (.rcc) information, you can use RCStructuredScan to read point for each grid point. 

Message 12 of 14
yan.fu
in reply to: lamorlette

This sounds like an unusual case. 

If you could share your data for us to investigate, it would be helpful. We don't use it for any other purpose.

 

Thanks,

Yan

Message 13 of 14
martin.graner
in reply to: yan.fu

I don't have a data set for the mentioned case.

It was only theoretical to prevent application crash if this (ever) happens.

 

Thanks for the answer.

Message 14 of 14
lamorlette
in reply to: yan.fu

@yan.fu Sorry, I asked: I am not allowed to share these data which I don't own.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report