Creating a proper f3d file
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
0 投票
Hi,
I need to upload my model to Matlab in 3D Foundation environment. I need to upload it in f3d format. I created this file format
in Fusion, but Matlab won't open it for me. I get this error: "Not a binary MAT-file. Try load -ASCII to read as text."
When I try to open my model as text, I get this error: "Unable to read file 'robot_sestaven.f3d'. Input must be a MAT-file or
an ASCII file containing numeric data with same number of columns in each row."
Does anyone know how to create the correct f3d format for my model?
Thanks for the advice
採用された回答
Jan Houska
2022 年 9 月 7 日
Hi Pavel-Jakub,
the F3D format used by 3D Foundation is not the same format as used in Fusion. This is just a name coincidence. You can import into 3D Foundation from another 3D format (like e.g. FBX, X3D, STL, ...), then save it to the F3D format from 3D Foundation.
Good Luck, Jan
7 件のコメント
Pavel-Jakub Novotný
2022 年 9 月 7 日
Oh, I didn't know that. So could you advise me how to save it in matlab f3d format?
Jan Houska
2022 年 9 月 7 日
You first use F3D.World.load or F3D.Actor.load to load the geometry to 3D Foundation, then you use F3D.World.save or F3D.Actor.save to save into the native F3D format. You use the World methods to load/save the entire world or the Actor methods to load/save the specified actor (and its children). For more information please see "help F3D.Actor.load" and "help F3D.Actor.save".
Good Luck, Jan
Pavel-Jakub Novotný
2022 年 9 月 8 日
編集済み: Pavel-Jakub Novotný
2022 年 9 月 8 日
I uploaded my model as an stl and we saved it to an f3d (native) file. When I try to load it, an error pops up: Unsupported file format 'Robot_uz.f3d'. But it is written in the help that it is a fully supported format for all features. So what's wrong?
Thanks, PJ
Jan Houska
2022 年 9 月 9 日
It would probably help if you post the functions you use for loading and saving the model - i.e. the sequence of functions that results in the error you describe above. Generally, the .f3d format should indeed support all features that you are able to import from other formats, so the problem is probably somwehere else.
Jan
Pavel-Jakub Novotný
2022 年 9 月 12 日
I use this program to load model parts and then save them in f3d format.
MW = F3D.World('WestPoint')
initialize(MW, [80, -80, 80], [0 0 5]);
MW.AngleUnits = 'deg';
Floor = F3D.Geometry.templateFloor(MW.Root, [200 200 0.1]);
Body = addChild(MW.Root,'Body');
load(Body, 'Telo_sestaveno.stl');
Body.Location = [0 0 3];
%% first leg
stLeg_stJoint = addChild(Body,'stLeg_stJoint');
load(stLeg_stJoint,'noha_1_sestava2.stl');
stLeg_stJoint.Location = [8 0 2];
stLeg_stJoint.Rotation = [0 0 0];
stLeg_stJoint.Color = [1 0 0];
stLeg_ndJoint = addChild(stLeg_stJoint,'stLeg_ndJoint');
load(stLeg_ndJoint,'noha_2_sestava.stl');
stLeg_ndJoint.Location = [7.5 0 0];
stLeg_ndJoint.Rotation = [0 -30 0];
stLeg_rdJoint = addChild(stLeg_ndJoint,'stLeg_ndJoint');
load(stLeg_rdJoint,'noha_3_sestava.stl');
stLeg_rdJoint.Location = [7.5 0 0];
stLeg_rdJoint.Rotation = [0 90 0];
stLeg_paw = addChild(stLeg_rdJoint,'stLeg_paw');
load(stLeg_paw,'packa_sestava.stl');
stLeg_paw.Location = [8 0 0.5];
stLeg_paw.Rotation = [0 -60 0];
%% second leg
ndLeg_stJoint = addChild(Body,'ndLeg_stJoint');
load(ndLeg_stJoint,'noha_1_sestava2.stl');
ndLeg_stJoint.Location = [0 8 2];
ndLeg_stJoint.Rotation = [0 0 90];
ndLeg_stJoint.Color = [0 1 0];
ndLeg_ndJoint = addChild(ndLeg_stJoint,'ndLeg_ndJoint');
load(ndLeg_ndJoint,'noha_2_sestava.stl');
ndLeg_ndJoint.Location = [7.5 0 0];
ndLeg_ndJoint.Rotation = [0 -30 0];
ndLeg_rdJoint = addChild(ndLeg_ndJoint,'ndLeg_ndJoint');
load(ndLeg_rdJoint,'noha_3_sestava.stl');
ndLeg_rdJoint.Location = [7.5 0 0];
ndLeg_rdJoint.Rotation = [0 90 0];
ndLeg_paw = addChild(ndLeg_rdJoint,'ndLeg_paw');
load(ndLeg_paw,'packa_sestava.stl');
ndLeg_paw.Location = [8 0 0.5];
ndLeg_paw.Rotation = [0 -60 0];
%% Third leg
rdLeg_stJoint = addChild(Body,'rdLeg_stJoint');
load(rdLeg_stJoint,'noha_1_sestava2.stl');
rdLeg_stJoint.Location = [-8 0 2];
rdLeg_stJoint.Rotation = [0 0 180];
rdLeg_ndJoint = addChild(rdLeg_stJoint,'rdLeg_ndJoint');
load(rdLeg_ndJoint,'noha_2_sestava.stl');
rdLeg_ndJoint.Location = [7.5 0 0];
rdLeg_ndJoint.Rotation = [0 -30 0];
rdLeg_rdJoint = addChild(rdLeg_ndJoint,'rdLeg_ndJoint');
load(rdLeg_rdJoint,'noha_3_sestava.stl');
rdLeg_rdJoint.Location = [7.5 0 0];
rdLeg_rdJoint.Rotation = [0 90 0];
rdLeg_paw = addChild(rdLeg_rdJoint,'rdLeg_paw');
load(rdLeg_paw,'packa_sestava.stl');
rdLeg_paw.Location = [8 0 0.5];
rdLeg_paw.Rotation = [0 -60 0];
%% fourth leg
thLeg_stJoint = addChild(Body,'thLeg_stJoint');
load(thLeg_stJoint,'noha_1_sestava2.stl');
thLeg_stJoint.Location = [0 -8 2];
thLeg_stJoint.Rotation = [0 0 -90];
thLeg_ndJoint = addChild(thLeg_stJoint,'thLeg_ndJoint');
load(thLeg_ndJoint,'noha_2_sestava.stl');
thLeg_ndJoint.Location = [7.5 0 0];
thLeg_ndJoint.Rotation = [0 -30 0];
thLeg_rdJoint = addChild(thLeg_ndJoint,'thLeg_ndJoint');
load(thLeg_rdJoint,'noha_3_sestava.stl');
thLeg_rdJoint.Location = [7.5 0 0];
thLeg_rdJoint.Rotation = [0 90 0];
thLeg_paw = addChild(thLeg_rdJoint,'thLeg_paw');
load(thLeg_paw,'packa_sestava.stl');
thLeg_paw.Location = [8 0 0.5];
thLeg_paw.Rotation = [0 -60 0];
save('robot_sestaven_2.f3d')
I used this program to open the newly created file.
MW = F3D.World('WestPoint');
initialize(MW, [80, -80, 80], [0 0 5]);
%MW.CoordinateSystem = 'unreal';
MW.AngleUnits = 'deg';
VP = MW.Viewports.Main;
VP.Title = 'WestPoint';
Path = fileparts(which(mfilename));
Floor = F3D.Geometry.templateFloor(MW.Root, [200 200 0.1]);
Robot = addChild(MW.Root, 'Robot');
load(Robot, 'robot_sestaven_2.f3d');
Robot.Location = [0 0 1.5];
Thanks for advice, PJ
Jan Houska
2022 年 9 月 16 日
編集済み: Jan Houska
2022 年 9 月 16 日
Hi PJ,
the last line of the save script should read
save(MW, 'robot_sestaven_2.f3d');
instead of
save('robot_sestaven_2.f3d')
Good Luck, Jan
Pavel-Jakub Novotný
2022 年 9 月 16 日
Thanks, it's working now.
PJ
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Assembly についてさらに検索
参考
2022 年 9 月 7 日
2022 年 9 月 16 日
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
