ホーム » 2016 » 4月

月別アーカイブ: 4月 2016

2016年4月
 12
3456789
10111213141516
17181920212223
24252627282930

カテゴリー

アーカイブ

ブログ統計情報

  • 79,996 アクセス



Win 10 10586 3D Builder

3MF 形式ではいたデータが,10586 にしてから開けないでいた.エラー : 0x80004005
model タグに,xmlns 属性が必要になった?
 <model unit= "millimeter " xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02 " >

ply だと,

3MF でのテクスチャは未だ.


2016/05/02 テクスチャなどの大文字,小文字も区別される?また,path も / から正しく指定する必要がある.
テクスチャの場合,colorid の指定が object の属性では効果がなくなった?
  triangle 内での指定が必要?


To3MF_1603.3mf
To3MF_1605.3mf
i_Tools i_S_asZ

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

::SaveUTF8

xml などを保存する時, ::SaveUTF8(outName, outStr) ; の様にしていた.
動作としてはそれ程問題なかったように思うが,32 ビット exe で対象のデータが 50 MB 位を超えるとメモリ不足に…
例えば 100 MB の xml データの場合,
  もとのデータの Xml_E で 200 M,tstring の outStr でも 200 M.
  保存する前に,UNICODE から,UTF8 に変換するために 100 M.
200 M の連続領域が確保できないことが多いみたい.


::SaveUTF8 で,v_tstring (文字列の配列)形式のものを作成.
  bool SaveUTF8 (LPCTSTR pathName,const v_tstring& strAry)
  {
    FILE* ofp = ::Open_File(pathName,_T(“wb”)) ;
    for (size_t index=0 ; index<strAry.size() ; index++) {
      tstring str = strAry[index] + _T(“\r\n”) ;
      std::string u8Str = ::To_UTF8(str.c_str()) ;
      v_char v_chr = ::To_v_char(u8Str) ;
      ::fwrite(&v_chr[0],sizeof(char),v_chr.size(),ofp) ;
      }
    ::fclose(ofp) ;
    return true ;
    }
UNICODE から UTF8 への変換時間などはそれほど気にならない.100 MB のファイル 800,000 行で 10 秒程度.


幾つかの形式で保存した時のファイルサイズ

  OBJ AMF DAE X3D PLY AC
サイズ MB 111 368 85 29 191 57
比率 1.00 3.31 0.76 0.26 1.71 0.51
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VC 6 Release inline

次の様な呼出しで,Release ビルドでうまく動作しないことがあった.
…\PntFnc\TCrossL\TCrossLD.cpp 2 円の交点のエラー時の動作
  Vd2 cp1 = ::get_point_on_line (l1c,l2c,l1r) ;
デバッグ版では意図した動作となる.
inline Vd2 get_point_on_line ( const Vd2& ls, const Vd2& le, const double d )
{
   if (ls == le) { return ls ; }
   Vd2 unit = (le-ls).Normalized() ;
   Vd2 pos = ls + unit * d ;
   return pos ;
   }
ls と le を比較している部分で抜けてしまっている?
VC 7 では OK.


よくわからないので,間接的に呼出す様に変更.
inline Vd2 get_point_on_line(const Vd2& ls,const Vd2& le,const double d) { return get_point_on_line_(ls,le,d); }

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.