To display a model in multiple views, you can create multiple HPS::View and attach the imported model to each view.
https://docs.techsoft3d.com/hps/latest/prog_guide/0301_core.html
https://docs.techsoft3d.com/hps/latest/prog_guide/0906_exchange_integration.html#file-loading
Instructions
Sample code for mfc_sandbox.
Code Block |
---|
void CHPSView::OnUserCode()
{
try
{
HPS::Exchange::ImportNotifier notifier = HPS::Exchange::File::Import("C:\\HOOPS_Exchange_Publish\\samples\\data\\catiaV5\\CV5_Aquo_Bottle\\_Aquo Bottle.CATProduct", HPS::Exchange::ImportOptionsKit());
notifier.Wait();
HPS::CADModel cadModel = notifier.GetCADModel();
HPS::Model model = cadModel.GetModel();
HPS::CaptureArray captures = cadModel.GetAllCaptures();
View viewLeft = cadModel.ActivateDefaultCapture(); // Activate default capture
View viewRight = captures[0].Activate(); // Activate capture in CADModel
HPS::Layout layout = GetCanvas().GetAttachedLayout();
layout.GetAttachedView().Delete();
layout.AttachViewFront(viewLeft, HPS::Rectangle(-1, 0, -1, 1)); // left view
layout.AttachViewFront(viewRight, HPS::Rectangle(0, 1, -1, 1)); // right view
viewLeft.GetOperatorControl().Push(new HPS::OrbitOperator());
viewRight.GetOperatorControl().Push(new HPS::PanOperator());
viewLeft.FitWorld();
viewRight.FitWorld();
}
catch (const HPS::IOException& ioe)
{
// handle error
}
GetCanvas().Update();
} |
...
Add sample code and set up HOOPS Exchange integration in mfc_sandbox
...
Build and execute User Code
You can see a model in the multiple views with different capture.
...
For further instructions, check out our forum post.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...