Where is the documentation/paper for active data ?

karim

CAD community veteran
Hello, I had the paper somewhere and I could not find it now. Please give the link to the paper/documenation. thanks.
 

karim

CAD community veteran
Hi @Quaoar
Thanks a lot of the great material. If it is not too much to ask, could you kindly give a tour or overview of the analysis-situs code ? It can save a lot of time for many people who are interested in the program. an overview of the architecture and components and relations in my opinion can be great.
 

Quaoar

Administrator
Staff member
Hello @karim, thank you for the suggestion. I was actually thinking to make code review on analysis situs but it has potential of becoming too long and too boring. Maybe several shorter videos can work better. I'll write it down to the "todo" list.
 

karim

CAD community veteran
Hello @karim, thank you for the suggestion. I was actually thinking to make code review on analysis situs but it has potential of becoming too long and too boring. Maybe several shorter videos can work better. I'll write it down to the "todo" list.
Looking forward in anticipation for the review of the AS then. :D
thanks.
 

Quaoar

Administrator
Staff member
@karim Cannot promise it very soon (too much work these days), so you might want to ask some specific questions here and I'll try to elaborate.
 

karim

CAD community veteran
@Quaoar My goal is to develop a FEM GUI using active data. I am trying to use the FEM and active data papers you wrote. I will try to set up a minimal program that uses active data and ask my questions as i progress. It seems to me that active data can be very helpful. Thanks for the help. I started with compiling occ version 7.4 and it is going well. However, do I need to compile occ with vtk enabled ?
 

karim

CAD community veteran
I made the following classes:
IModel_Document is a subclass of ActData_BaseModel
class IPoint_Partition is a subclass of ActData_BasePartition
class IPoint_Node is a subclass of ActData_BaseNode

int main()
{
Handle(IModel_Document) model = new IModel_Document;
qDebug() << model->NewEmpty();

Handle(IPoint_Node)
aPointNode1 = Handle(IPoint_Node)::DownCast( IPoint_Node::Instance() );
Handle(IPoint_Node)
aPointNode2 = Handle(IPoint_Node)::DownCast( IPoint_Node::Instance() );


model->OpenCommand();
model->StubIPoint_Partition()->AddNode(aPointNode1);
model->StubIPoint_Partition()->AddNode(aPointNode2);

BRepPrimAPI_MakeWedge aWedgeMaker (100, 100, 100, 50);
auto shape = aWedgeMaker.Shape();

aPointNode1->Init(shape, shape, 12.3);
aPointNode2->Init(shape, shape, 0.0);

aPointNode1->AddChildNode(aPointNode2);

model->CommitCommand();

qDebug() << aPointNode1->IsWellFormed(); // true
qDebug() << aPointNode2->IsWellFormed(); // true
qDebug() << aPointNode1->DynamicType()->Name() ; // IPoint_Node

auto aFilename = std::string("D:\\activeDataModel.cbf");
qDebug() << aFilename.c_str();
TCollection_AsciiString filename = aFilename.c_str();
qDebug() << model->SaveAs(filename); // false

model->Release();
}

model refuses to be saved. What am I doing wrong ?
 
Last edited:

Quaoar

Administrator
Staff member
@karim It could be that the "driver" for the corresponding OCAF format is missing. You can try changing the following line:

#define ACTBinFormat "ACTBin" // "ACTBin" or "BinOcaf"

to

#define ACTBinFormat "BinOcaf" // "ACTBin" or "BinOcaf"

in the ActData.h header file. Would it change anything?
 

karim

CAD community veteran
@karim It could be that the "driver" for the corresponding OCAF format is missing. You can try changing the following line:

#define ACTBinFormat "ACTBin" // "ACTBin" or "BinOcaf"

to

#define ACTBinFormat "BinOcaf" // "ACTBin" or "BinOcaf"

in the ActData.h header file. Would it change anything?
Hi, Unfortunately this change did not resolve the issue. I am using the dll version from the analysis situs 1 library pack.
 

Quaoar

Administrator
Staff member
Can you step inside ActData_Application::SaveAs() with the debugger to see what actually happens in the code? It should request a "storage driver" deep inside, so it would be helpful to know if it found any.
 

karim

CAD community veteran
Can you step inside ActData_Application::SaveAs() with the debugger to see what actually happens in the code? It should request a "storage driver" deep inside, so it would be helpful to know if it found any.

I put a breakpoint at the SaveAs but the debugger refuses to step into the SaveAs Code. Howver the error message becomes a bit more detailed:

Exception at 0x7ffed5634fd9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in TKCDF!LDOMParser::getDocument
 

Quaoar

Administrator
Staff member
It's probably worth building OpenCascade with debug symbols (pdb files) to be able to jump into the code and see what really happens.
 

karim

CAD community veteran
I decided to build only the libraries for AS so I copied parts of a working directory of AS to a new directory and changed the make file to build only the libraries. The active data can be build on its own. it seems there are interdependencies between asiData and asiAlgo.
I attached the changed make file.
When I configure and compile, I get this weired error when compiling asiDATA_AAGAttr.h:

fatal error C1083: Cannot open include file: 'asiAlgo_AAG.h': No such file or directory
NMAKE : fatal error U1077: 'C:\cmake-3.22.0-windows-x86_64\bin\cmake.exe' : return code '0x2'

what is going on?
 

Attachments

  • CMakeLists.txt
    9.4 KB · Views: 0

karim

CAD community veteran
Can you step inside ActData_Application::SaveAs() with the debugger to see what actually happens in the code? It should request a "storage driver" deep inside, so it would be helpful to know if it found any.
I managed to debug inside SaveAs. The problem occurs here in CDF_StoreList.CXX:

97 if (aDocumentStorageDriver.IsNull())
98 {
99 Standard_SStream aMsg;
100 aMsg <<"No storage driver does exist for this format: " << theDocument->StorageFormat() << (char)0;
101 throw Standard_Failure(aMsg.str().c_str());
102 }

The exact error as you pointed out is that ACTBIN driver is not registered. So I think I have to change the storage format to BinOcaf.
 

karim

CAD community veteran
It's probably worth building OpenCascade with debug symbols (pdb files) to be able to jump into the code and see what really happens.

Hi @Quaoar, I traced the issue to the bin format. I changed the bin format to the BinOcaf in the ActData.h and recompiled the library.
Then I compiled my application using the new header files and compiled binaries and libs. My application still uses the ACTBin format.
Is there a switch somewhere else or what step am I doing wrong ? Can I set bindrirver format explicitly in the code ?
 
Last edited:

Quaoar

Administrator
Staff member
It looks a bit like some unsync issue. Have you stepped into the code again (to this CDF_StoreList or something) to see if it really is the "BinOcaf" that's being searched for?

Other than that, you can try setting up the binary driver with

Code:
BinDrivers::DefineFormat(app);

once you have "app" as the Application. Maybe even just insert this code right into ActData_BaseModel. Something like this patch:

Code:
Handle(TDocStd_Document) ActData_BaseModel::newDocument()
{
  Handle(TDocStd_Document) aResDoc;
  BinDrivers::DefineFormat( ActData_Application::Instance() );
  ActData_Application::Instance()->NewDocument(ACTBinFormat, aResDoc);
  return aResDoc;
}

I haven't tried it, so let me know if it changes anything for you.
 

karim

CAD community veteran
It looks a bit like some unsync issue. Have you stepped into the code again (to this CDF_StoreList or something) to see if it really is the "BinOcaf" that's being searched for?

Other than that, you can try setting up the binary driver with

Code:
BinDrivers::DefineFormat(app);

once you have "app" as the Application. Maybe even just insert this code right into ActData_BaseModel. Something like this patch:

Code:
Handle(TDocStd_Document) ActData_BaseModel::newDocument()
{
  Handle(TDocStd_Document) aResDoc;
  BinDrivers::DefineFormat( ActData_Application::Instance() );
  ActData_Application::Instance()->NewDocument(ACTBinFormat, aResDoc);
  return aResDoc;
}

I haven't tried it, so let me know if it changes anything for you.

Works. I modified the code so it is ok.
 
Top