Home
Reply
Contributor
vmonte01
Posts: 9

Refinement lost on Save As HSF

A block is created using api_solid_block() and refinement AF_TRIANG_NONE. 
 
Saving as HMF retains the refinement but saving as HSF loses it.  I was told this was fixed in HOOPS 16 but it does not seem to be.
 
Attached are the screenshots of the HMF and HSF files.
 
Thanks for any help,
Victor
quad_blocks.jpg
New Visitor
gavin
Posts: 2

Re: Refinement lost on Save As HSF

This is expected behaviour.  To ensure the HSF is as small as possible the HOOPS Stream Toolkit utilises both lossy and lossless algorithms.  The problem with the refinement you see below is because of vertex quantatization that is being performed on the geometry.  This is on by default and so if you want to turn that off then you should set the Full Resolution Vertices flag on the toolkit you are using to create the HSF.  For example
 
  HC_Open_Segment_By_Key(m_pHView->GetModelKey());
    HTK_Write_Stream_File("sample.hsf", flags);
  HC_Close_Segment();
 
HMF is primarily a debug tool which is just a dump of what is in the HOOPS database.  As such, it includes no compression.
 
Hope this helps
 
 
Contributor
vmonte01
Posts: 9

Re: Refinement lost on Save As HSF

Gavin, thanks for the reply,
 
However, trying this in the ACIS-HOOPS Part Viewer does not seem to work as you mentioned. 
 
1. Open the HMF file in the Viewer
2. Set Visibility to Triangulated (confirm quad interior)
3. Go to Tools / Options / File
4. Turn OFF Compress Vertices
5. Save as HSF
6. Close
7. Open HSF
8. Set Visibility to Triangulated (quad interior is gone)
New Visitor
gavin
Posts: 2

Re: Refinement lost on Save As HSF

Sorry, I did not look at the picture in greater detail.  What you want is to have the toolkit to avoid writing out tristrips and maintain the quads.  To do this you should set the TK_Disable_Tristrips flag on the toolkit which is generating the file....
Contributor
vmonte01
Posts: 9

Re: Refinement lost on Save As HSF

I added:
 
sflags |= TK_Disable_Tristrips;
 
before the call to:
 
mytools->SetWriteFlags(sflags);
 
in:
 
CSolidHoopsView::SaveFile()
 
in the acispartviewer_vc80 project but it still has the problem.
 
Any other ideas for what could be causing this?
 
Thanks.