The world's most advanced fembots are designed in FreeCAD

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jeno
Veteran
Posts: 1802
Joined: Sun Jun 29, 2014 10:41 am

Re: The world's most advanced fembots are designed in FreeCAD

Post by jeno »

Hypercube3D wrote: Sun Jul 18, 2021 11:10 am
jeno wrote: Sun Jul 18, 2021 8:30 am To shorten things up, it is much better to work with fbx-format. It supports quads. Export from Blender to fbx. Use Cad Assistant to import the fbx (the free version is fine). Save it in Cad Assistant as BREP-file. You can import BREP directly in Freecad. All quads stay alive.
It seems to import OK, but when I check scale, its x1000 and impossible to scale or do decent operations such as export as STEP or cut with the Part > Slice Apart tool (crashes). Tried under different OS and versions of FreeCAD with something as simple as a sphere generated in blender + repaired top and bottom into quad faces (still crashes). Workflow ok with f360 (but not perfect as shapes get more complex).
...
Sorry, I have rejoiced to soon :oops:
I think the scale is x100 (default unit Blender 1m <> default unit fbx 1cm). Blender offers an scale option for FBX export in transform section
fbx_export.png
fbx_export.png (30.18 KiB) Viewed 2789 times
When I check the geometry of the imported brep I got an error. It says it is not a surface. The output is

Code: Select all

Shape type:  Compound
Vertices:  0
Edges:  0
Wires:  0
Faces:  1
Shells:  0
Solids:  0
CompSolids:  0
Compounds:  1
Shapes:  2
Strangely the compound consist of 2 shapes but there is only a face and nothing else...
I digged a bit deeper. Cad Assistant runs with opencascade 7.6.0dev. Maybe this causes the issue.
Hypercube3D wrote: Sun Jul 18, 2021 11:10 am ...
I have doubt about the quad faces showing in import - seems the whole idea of T-splines and smooth infinite resolution surfaces lost because it still seems like a polygon mesh made solid.
Blender works with meshes. The quad (or tri) is flat. I guess in case it is transformed to any kind of spline or whatever the region of a certain quad wil still be flat. So it is difficult to decide what it is.

Regards
Hypercube3D
Posts: 15
Joined: Sun Aug 23, 2020 12:50 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by Hypercube3D »

keithsloan52 wrote: Sun Jul 18, 2021 11:43 am I tried with an OBJ file produced by MakeHuman ( > 1.4 Meg ) and it fails on load, was hoping to find
a smaller file that fails.
The .obj file import seems to work now for the sphere and result in solids with GDML workbench installed :)
But there is a lot missing here going from mesh to mesh solid instead of T-spline as can be seen in the diagram for the same blender generated sphere.

mesh_to_solid.jpg
mesh_to_solid.jpg (112.9 KiB) Viewed 2775 times
Attached is an .obj file that can be converted to .STEP with no geometric errors in f360, below 1MB, but fails in FreeCAD.
baby1c.zip
(221.91 KiB) Downloaded 76 times
Last edited by Hypercube3D on Sun Jul 18, 2021 2:32 pm, edited 2 times in total.
Hypercube3D
Posts: 15
Joined: Sun Aug 23, 2020 12:50 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by Hypercube3D »

jeno wrote: Sun Jul 18, 2021 1:25 pm
Hypercube3D wrote: Sun Jul 18, 2021 11:10 am
I think the scale is x100 (default unit Blender 1m <> default unit fbx 1cm). Blender offers an scale option for FBX export in transform sectionfbx_export.png
..
I digged a bit deeper. Cad Assistant runs with opencascade 7.6.0dev. Maybe this causes the issue.
Thanks for scaling note. Looking for that.
It may be the opencascade - the mesh was imported through GDML workbench OK for simple sphere.
keithsloan52
Veteran
Posts: 2753
Joined: Mon Feb 27, 2012 5:31 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by keithsloan52 »

Hypercube3D wrote: Sun Jul 18, 2021 2:22 pm
Attached is an .obj file that can be converted to .STEP with no geometric errors in f360, below 1MB, but fails in FreeCAD.

baby1c.zip
baby1c.obj contains two faces with 5 sided polygon. GDMLTessellated can only support quad and triangle faces i.e. 4 and 3 sided.
Is there an option in Blender to only export Quad & Triangle Faces when outputting an OBJ file?

I will look at converting a Face with more that 4 Vertex i.e a polygon to a number of with Three, but will have to wait a few days.

Not being very familiar with Blender, just wondering if you could create a small/simple file that had a 5 sided Face(Polygon)
that I could use to test the conversion of polygon to triangles.
Hypercube3D
Posts: 15
Joined: Sun Aug 23, 2020 12:50 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by Hypercube3D »

keithsloan52 wrote: Sun Jul 18, 2021 2:55 pm
Not being very familiar with Blender, just wondering if you could create a small/simple file that had a 5 sided Face(Polygon)
that I could use to test the conversion of polygon to triangles.
This is same sphere with the top and bottom cropped and sealed with 5 sided faces and free of geometry errors that will convert to STEP in f360:
sphere3.zip
(10.89 KiB) Downloaded 75 times
keithsloan52
Veteran
Posts: 2753
Joined: Mon Feb 27, 2012 5:31 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by keithsloan52 »

Hypercube3D wrote: Sun Jul 18, 2021 4:50 pm
keithsloan52 wrote: Sun Jul 18, 2021 2:55 pm
Not being very familiar with Blender, just wondering if you could create a small/simple file that had a 5 sided Face(Polygon)
that I could use to test the conversion of polygon to triangles.
This is same sphere with the top and bottom cropped and sealed with 5 sided faces and free of geometry errors that will convert to STEP in f360:
sphere3.zip
Thanks the latest version of the workbench now converts Polygons to Triangles and then can be exported as STEP
1CE82AA5-6141-49D5-A1F9-6C0CF8E75801_4_5005_c.jpeg
1CE82AA5-6141-49D5-A1F9-6C0CF8E75801_4_5005_c.jpeg (34.55 KiB) Viewed 2688 times
072ECEDB-479E-42F6-B399-0372FA5D5515_4_5005_c.jpeg
072ECEDB-479E-42F6-B399-0372FA5D5515_4_5005_c.jpeg (20.26 KiB) Viewed 2688 times
Exported STEP file https://www.dropbox.com/s/nz3713kmmzl0v ... .step?dl=0
keithsloan52
Veteran
Posts: 2753
Joined: Mon Feb 27, 2012 5:31 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by keithsloan52 »

Still have a number of files that fail, they fail on a Quad Face/Facet but not sure why

Code: Select all

createGeometry
    FCfaces.append(GDMLShared.quad( \
  File "/Users/keithsloan/Library/Preferences/FreeCAD/Mod/GDML/freecad/gdml/GDMLShared.py", line 429, in quad
    f1 = Part.Face(w1)
<class 'Part.OCCError'>: Failed to create face from wire
Hypercube3D
Posts: 15
Joined: Sun Aug 23, 2020 12:50 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by Hypercube3D »

keithsloan52 wrote: Sun Jul 18, 2021 7:36 pm Still have a number of files that fail, they fail on a Quad Face/Facet but not sure why
Those 5 edged faces were not sealed properly and resulting object not really a proper solid.
non_sealed_surfaces.jpg
non_sealed_surfaces.jpg (101.45 KiB) Viewed 2657 times

The most likely reason quads are erroring is usually down to self intersecting faces. Hard to spot.

When the humanoids were built, they had self intersecting faces. After cutting, I had to move vertexes in 3D in blender to be more planar and in a round shape so that they seal properly when faces added. At times I had to use edge subdivision to create more edges so that all newly added faces were all quads.
keithsloan52
Veteran
Posts: 2753
Joined: Mon Feb 27, 2012 5:31 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by keithsloan52 »

Hypercube3D wrote: Sun Jul 18, 2021 7:54 pm Those 5 edged faces were not sealed properly and resulting object not really a proper solid.

non_sealed_surfaces.jpg
Not sure what can be done about that, I just tried to replace the polygon with triangles.
What ever created the OBJ file decided to make a couple of 5 sided polygons and looking at
your screen shots they are not going to make a sealed object, maybe the only way is to load
into blender and get it to output all triangles. At present the file is mostly quads and
a couple of polygons
keithsloan52
Veteran
Posts: 2753
Joined: Mon Feb 27, 2012 5:31 pm

Re: The world's most advanced fembots are designed in FreeCAD

Post by keithsloan52 »

Hypercube3D wrote: Sun Jul 18, 2021 7:54 pm

Those 5 edged faces were not sealed properly and resulting object not really a proper solid.

non_sealed_surfaces.jpg
Fixed some bugs and now appears okay
0427CC85-239F-4DEA-B2E8-D5138A0B3DDB.jpeg
0427CC85-239F-4DEA-B2E8-D5138A0B3DDB.jpeg (32.75 KiB) Viewed 2565 times
Post Reply