discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Manifolds and sharing edges/faces

J
jim.klessig
Tue, Feb 27, 2018 5:25 PM

Someone wrote 
"Two objects can't share an edge in reality, so there is no reason to sendsuch models to a 3D printer. If you want them joined then have some
overlap, if not leave a gap. "
To my mind, that is only true if you DEFINE "reality" as not having conjoined faces. IF you allow for "reality" to have conjoined faces, then you will find them every where. A block of 112 is in "reality" two  111 cubes with a common face. 
Why should "overlap be a requirement of them being "joined"? If any thing I would think "overlap" should be the "forbidden concept". That is the thing you can not actually realize in the real world.

Sent from my U.S. Cellular® Smartphone
-------- Original message --------From: discuss-request@lists.openscad.org Date: 2/27/18  9:00 AM  (GMT-08:00) To: discuss@lists.openscad.org Subject: Discuss Digest, Vol 39, Issue 27
Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

   1. Re: damaged STL file? (Jordan Brown)
   2. Re: damaged STL file? (Carsten Arnholm)
   3. Re: damaged STL file? (nop head)
   4. Re: damaged STL file? (doug moen)
   5. Re: damaged STL file? (Ronaldo Persiano)
   6. Re: damaged STL file? (nop head)
   7. Re: damaged STL file? (Ronaldo Persiano)
   8. Re: damaged STL file? (nop head)
   9. Re: damaged STL file? (Ronaldo Persiano)
  10. Re: damaged STL file? (arnholm@arnholm.org)
  11. Re: damaged STL file? (Gadgetmind)
  12. Re: damaged STL file? (nop head)
  13. Re: damaged STL file? (Mark Schafer)
  14. Re: damaged STL file? (Rogier Wolff)
  15. Why are manifolds important? (Jordan Brown)
  16. Re: damaged STL file? (doug moen)
  17. Re: Why are manifolds important? (nop head)


Message: 1
Date: Mon, 26 Feb 2018 09:35:32 -0800
From: Jordan Brown openscad@jordan.maileater.net
To: OpenSCAD general discussion discuss@lists.openscad.org,
arnholm@arnholm.org
Subject: Re: [OpenSCAD] damaged STL file?
Message-ID:
0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net
Content-Type: text/plain; charset="utf-8"

On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote:

In general I think the thread illustrates the somewhat fuzzy nature of
repairing problematic polyhedra in general and STL files in particular
(STLs do not provide any topology, it must be guessed). Several repair
tools exist but they appear to make different assumptions leading to
different results.

Are there other file formats that would be better?? Getting designers
like OpenSCAD and slicers to both implement something new would be
tough, but if there are clear benefits maybe it could be done.

Someone wrote  "Two objects can't share an edge in reality, so there is no reason to sendsuch models to a 3D printer. If you want them joined then have some overlap, if not leave a gap. " To my mind, that is only true if you DEFINE "reality" as not having conjoined faces. IF you allow for "reality" to have conjoined faces, then you will find them every where. A block of 1*1*2 is in "reality" two  1*1*1 cubes with a common face.  Why should "overlap be a requirement of them being "joined"? If any thing I would think "overlap" should be the "forbidden concept". That is the thing you can not actually realize in the real world. Sent from my U.S. Cellular® Smartphone -------- Original message --------From: discuss-request@lists.openscad.org Date: 2/27/18 9:00 AM (GMT-08:00) To: discuss@lists.openscad.org Subject: Discuss Digest, Vol 39, Issue 27 Send Discuss mailing list submissions to discuss@lists.openscad.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org or, via email, send a message with subject or body 'help' to discuss-request@lists.openscad.org You can reach the person managing the list at discuss-owner@lists.openscad.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Discuss digest..." Today's Topics:    1. Re: damaged STL file? (Jordan Brown)    2. Re: damaged STL file? (Carsten Arnholm)    3. Re: damaged STL file? (nop head)    4. Re: damaged STL file? (doug moen)    5. Re: damaged STL file? (Ronaldo Persiano)    6. Re: damaged STL file? (nop head)    7. Re: damaged STL file? (Ronaldo Persiano)    8. Re: damaged STL file? (nop head)    9. Re: damaged STL file? (Ronaldo Persiano)   10. Re: damaged STL file? (arnholm@arnholm.org)   11. Re: damaged STL file? (Gadgetmind)   12. Re: damaged STL file? (nop head)   13. Re: damaged STL file? (Mark Schafer)   14. Re: damaged STL file? (Rogier Wolff)   15. Why are manifolds important? (Jordan Brown)   16. Re: damaged STL file? (doug moen)   17. Re: Why are manifolds important? (nop head) ---------------------------------------------------------------------- Message: 1 Date: Mon, 26 Feb 2018 09:35:32 -0800 From: Jordan Brown <openscad@jordan.maileater.net> To: OpenSCAD general discussion <discuss@lists.openscad.org>, arnholm@arnholm.org Subject: Re: [OpenSCAD] damaged STL file? Message-ID: <0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net> Content-Type: text/plain; charset="utf-8" On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote: > In general I think the thread illustrates the somewhat fuzzy nature of > repairing problematic polyhedra in general and STL files in particular > (STLs do not provide any topology, it must be guessed). Several repair > tools exist but they appear to make different assumptions leading to > different results. Are there other file formats that would be better?? Getting designers like OpenSCAD and slicers to *both* implement something new would be tough, but if there are clear benefits maybe it could be done.
NH
nop head
Tue, Feb 27, 2018 5:33 PM

If two cubes share a face then the can be unioned and the result is
manifold. What they can't do is share a single edge or a single vertex.

On 27 February 2018 at 17:25, jim.klessig jim.klessig@gmail.com wrote:

Someone wrote

"Two objects can't share an edge in reality, so there is no reason to send
such models to a 3D printer. If you want them joined then have some
overlap, if not leave a gap. "

To my mind, that is only true if you DEFINE "reality" as not having
conjoined faces.
IF you allow for "reality" to have conjoined faces, then you will find
them every where. A block of 112 is in "reality" two  111 cubes with a
common face.

Why should "overlap be a requirement of them being "joined"? If any thing
I would think "overlap" should be the "forbidden concept". That is the
thing you can not actually realize in the real world.

Sent from my U.S. Cellular® Smartphone

-------- Original message --------
From: discuss-request@lists.openscad.org
Date: 2/27/18 9:00 AM (GMT-08:00)
To: discuss@lists.openscad.org
Subject: Discuss Digest, Vol 39, Issue 27

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: damaged STL file? (Jordan Brown)
2. Re: damaged STL file? (Carsten Arnholm)
3. Re: damaged STL file? (nop head)
4. Re: damaged STL file? (doug moen)
5. Re: damaged STL file? (Ronaldo Persiano)
6. Re: damaged STL file? (nop head)
7. Re: damaged STL file? (Ronaldo Persiano)
8. Re: damaged STL file? (nop head)
9. Re: damaged STL file? (Ronaldo Persiano)
  1. Re: damaged STL file? (arnholm@arnholm.org)
  2. Re: damaged STL file? (Gadgetmind)
  3. Re: damaged STL file? (nop head)
  4. Re: damaged STL file? (Mark Schafer)
  5. Re: damaged STL file? (Rogier Wolff)
  6. Why are manifolds important? (Jordan Brown)
  7. Re: damaged STL file? (doug moen)
  8. Re: Why are manifolds important? (nop head)

Message: 1
Date: Mon, 26 Feb 2018 09:35:32 -0800
From: Jordan Brown openscad@jordan.maileater.net
To: OpenSCAD general discussion discuss@lists.openscad.org,
arnholm@arnholm.org
Subject: Re: [OpenSCAD] damaged STL file?
Message-ID:
0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net
Content-Type: text/plain; charset="utf-8"

On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote:

In general I think the thread illustrates the somewhat fuzzy nature of
repairing problematic polyhedra in general and STL files in particular
(STLs do not provide any topology, it must be guessed). Several repair
tools exist but they appear to make different assumptions leading to
different results.

Are there other file formats that would be better?? Getting designers
like OpenSCAD and slicers to both implement something new would be
tough, but if there are clear benefits maybe it could be done.

If two cubes share a face then the can be unioned and the result is manifold. What they can't do is share a single edge or a single vertex. On 27 February 2018 at 17:25, jim.klessig <jim.klessig@gmail.com> wrote: > Someone wrote > > "Two objects can't share an edge in reality, so there is no reason to send > such models to a 3D printer. If you want them joined then have some > overlap, if not leave a gap. " > > To my mind, that is only true if you DEFINE "reality" as not having > conjoined faces. > IF you allow for "reality" to have conjoined faces, then you will find > them every where. A block of 1*1*2 is in "reality" two 1*1*1 cubes with a > common face. > > Why should "overlap be a requirement of them being "joined"? If any thing > I would think "overlap" should be the "forbidden concept". That is the > thing you can not actually realize in the real world. > > > > Sent from my U.S. Cellular® Smartphone > > -------- Original message -------- > From: discuss-request@lists.openscad.org > Date: 2/27/18 9:00 AM (GMT-08:00) > To: discuss@lists.openscad.org > Subject: Discuss Digest, Vol 39, Issue 27 > > Send Discuss mailing list submissions to > discuss@lists.openscad.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > or, via email, send a message with subject or body 'help' to > discuss-request@lists.openscad.org > > You can reach the person managing the list at > discuss-owner@lists.openscad.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Discuss digest..." > > > Today's Topics: > > 1. Re: damaged STL file? (Jordan Brown) > 2. Re: damaged STL file? (Carsten Arnholm) > 3. Re: damaged STL file? (nop head) > 4. Re: damaged STL file? (doug moen) > 5. Re: damaged STL file? (Ronaldo Persiano) > 6. Re: damaged STL file? (nop head) > 7. Re: damaged STL file? (Ronaldo Persiano) > 8. Re: damaged STL file? (nop head) > 9. Re: damaged STL file? (Ronaldo Persiano) > 10. Re: damaged STL file? (arnholm@arnholm.org) > 11. Re: damaged STL file? (Gadgetmind) > 12. Re: damaged STL file? (nop head) > 13. Re: damaged STL file? (Mark Schafer) > 14. Re: damaged STL file? (Rogier Wolff) > 15. Why are manifolds important? (Jordan Brown) > 16. Re: damaged STL file? (doug moen) > 17. Re: Why are manifolds important? (nop head) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 26 Feb 2018 09:35:32 -0800 > From: Jordan Brown <openscad@jordan.maileater.net> > To: OpenSCAD general discussion <discuss@lists.openscad.org>, > arnholm@arnholm.org > Subject: Re: [OpenSCAD] damaged STL file? > Message-ID: > <0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net> > Content-Type: text/plain; charset="utf-8" > > On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote: > > In general I think the thread illustrates the somewhat fuzzy nature of > > repairing problematic polyhedra in general and STL files in particular > > (STLs do not provide any topology, it must be guessed). Several repair > > tools exist but they appear to make different assumptions leading to > > different results. > > Are there other file formats that would be better?? Getting designers > like OpenSCAD and slicers to *both* implement something new would be > tough, but if there are clear benefits maybe it could be done. > >
DM
doug moen
Tue, Feb 27, 2018 6:12 PM

I think it is useful to note that this restriction that "two cubes can't
share a single edge or single vertex" exists in the 2-manifold STL
representation of a mesh. However, 3MF meshes don't have this restriction.
And the CGAL "Nef polyhedron" mesh data structure (used to implement union
and intersection in OpenSCAD) doesn't have this restriction. So it's
technically possible to keep your meshes in a data structure that doesn't
have this restriction, all the way from construction, through boolean
operations, through export to 3MF and import into your slicer.

The difference is that in the "manifold STL" version of reality, the
following is an illegal operation:

union () { cube(10); translate([10,10,0]) cube(10); }

But in the CGAL Nef polyhedron/3MF version of reality, this is perfectly
legal.

Currently, for this model, OpenSCAD produces a warning message:

WARNING: Object may not be a valid 2-manifold and may need repair!

Actually, this warning is needed for STL export, but not for 3MF export.

On 27 February 2018 at 12:33, nop head nop.head@gmail.com wrote:

If two cubes share a face then the can be unioned and the result is
manifold. What they can't do is share a single edge or a single vertex.

On 27 February 2018 at 17:25, jim.klessig jim.klessig@gmail.com wrote:

Someone wrote

"Two objects can't share an edge in reality, so there is no reason to send
such models to a 3D printer. If you want them joined then have some
overlap, if not leave a gap. "

To my mind, that is only true if you DEFINE "reality" as not having
conjoined faces.
IF you allow for "reality" to have conjoined faces, then you will find
them every where. A block of 112 is in "reality" two  111 cubes with a
common face.

Why should "overlap be a requirement of them being "joined"? If any thing
I would think "overlap" should be the "forbidden concept". That is the
thing you can not actually realize in the real world.

Sent from my U.S. Cellular® Smartphone

-------- Original message --------
From: discuss-request@lists.openscad.org
Date: 2/27/18 9:00 AM (GMT-08:00)
To: discuss@lists.openscad.org
Subject: Discuss Digest, Vol 39, Issue 27

Send Discuss mailing list submissions to
discuss@lists.openscad.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
or, via email, send a message with subject or body 'help' to
discuss-request@lists.openscad.org

You can reach the person managing the list at
discuss-owner@lists.openscad.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."

Today's Topics:

1. Re: damaged STL file? (Jordan Brown)
2. Re: damaged STL file? (Carsten Arnholm)
3. Re: damaged STL file? (nop head)
4. Re: damaged STL file? (doug moen)
5. Re: damaged STL file? (Ronaldo Persiano)
6. Re: damaged STL file? (nop head)
7. Re: damaged STL file? (Ronaldo Persiano)
8. Re: damaged STL file? (nop head)
9. Re: damaged STL file? (Ronaldo Persiano)
  1. Re: damaged STL file? (arnholm@arnholm.org)
  2. Re: damaged STL file? (Gadgetmind)
  3. Re: damaged STL file? (nop head)
  4. Re: damaged STL file? (Mark Schafer)
  5. Re: damaged STL file? (Rogier Wolff)
  6. Why are manifolds important? (Jordan Brown)
  7. Re: damaged STL file? (doug moen)
  8. Re: Why are manifolds important? (nop head)

Message: 1
Date: Mon, 26 Feb 2018 09:35:32 -0800
From: Jordan Brown openscad@jordan.maileater.net
To: OpenSCAD general discussion discuss@lists.openscad.org,
arnholm@arnholm.org
Subject: Re: [OpenSCAD] damaged STL file?
Message-ID:
0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net
Content-Type: text/plain; charset="utf-8"

On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote:

In general I think the thread illustrates the somewhat fuzzy nature of
repairing problematic polyhedra in general and STL files in particular
(STLs do not provide any topology, it must be guessed). Several repair
tools exist but they appear to make different assumptions leading to
different results.

Are there other file formats that would be better?? Getting designers
like OpenSCAD and slicers to both implement something new would be
tough, but if there are clear benefits maybe it could be done.

I think it is useful to note that this restriction that "two cubes can't share a single edge or single vertex" exists in the 2-manifold STL representation of a mesh. However, 3MF meshes don't have this restriction. And the CGAL "Nef polyhedron" mesh data structure (used to implement union and intersection in OpenSCAD) doesn't have this restriction. So it's technically possible to keep your meshes in a data structure that doesn't have this restriction, all the way from construction, through boolean operations, through export to 3MF and import into your slicer. The difference is that in the "manifold STL" version of reality, the following is an illegal operation: union () { cube(10); translate([10,10,0]) cube(10); } But in the CGAL Nef polyhedron/3MF version of reality, this is perfectly legal. Currently, for this model, OpenSCAD produces a warning message: WARNING: Object may not be a valid 2-manifold and may need repair! Actually, this warning is needed for STL export, but not for 3MF export. On 27 February 2018 at 12:33, nop head <nop.head@gmail.com> wrote: > If two cubes share a face then the can be unioned and the result is > manifold. What they can't do is share a single edge or a single vertex. > > On 27 February 2018 at 17:25, jim.klessig <jim.klessig@gmail.com> wrote: > >> Someone wrote >> >> "Two objects can't share an edge in reality, so there is no reason to send >> such models to a 3D printer. If you want them joined then have some >> overlap, if not leave a gap. " >> >> To my mind, that is only true if you DEFINE "reality" as not having >> conjoined faces. >> IF you allow for "reality" to have conjoined faces, then you will find >> them every where. A block of 1*1*2 is in "reality" two 1*1*1 cubes with a >> common face. >> >> Why should "overlap be a requirement of them being "joined"? If any thing >> I would think "overlap" should be the "forbidden concept". That is the >> thing you can not actually realize in the real world. >> >> >> >> Sent from my U.S. Cellular® Smartphone >> >> -------- Original message -------- >> From: discuss-request@lists.openscad.org >> Date: 2/27/18 9:00 AM (GMT-08:00) >> To: discuss@lists.openscad.org >> Subject: Discuss Digest, Vol 39, Issue 27 >> >> Send Discuss mailing list submissions to >> discuss@lists.openscad.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> or, via email, send a message with subject or body 'help' to >> discuss-request@lists.openscad.org >> >> You can reach the person managing the list at >> discuss-owner@lists.openscad.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Discuss digest..." >> >> >> Today's Topics: >> >> 1. Re: damaged STL file? (Jordan Brown) >> 2. Re: damaged STL file? (Carsten Arnholm) >> 3. Re: damaged STL file? (nop head) >> 4. Re: damaged STL file? (doug moen) >> 5. Re: damaged STL file? (Ronaldo Persiano) >> 6. Re: damaged STL file? (nop head) >> 7. Re: damaged STL file? (Ronaldo Persiano) >> 8. Re: damaged STL file? (nop head) >> 9. Re: damaged STL file? (Ronaldo Persiano) >> 10. Re: damaged STL file? (arnholm@arnholm.org) >> 11. Re: damaged STL file? (Gadgetmind) >> 12. Re: damaged STL file? (nop head) >> 13. Re: damaged STL file? (Mark Schafer) >> 14. Re: damaged STL file? (Rogier Wolff) >> 15. Why are manifolds important? (Jordan Brown) >> 16. Re: damaged STL file? (doug moen) >> 17. Re: Why are manifolds important? (nop head) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 26 Feb 2018 09:35:32 -0800 >> From: Jordan Brown <openscad@jordan.maileater.net> >> To: OpenSCAD general discussion <discuss@lists.openscad.org>, >> arnholm@arnholm.org >> Subject: Re: [OpenSCAD] damaged STL file? >> Message-ID: >> <0fd8d8f6-a1fa-8911-776e-f06e3e310f63@jordan.maileater.net> >> Content-Type: text/plain; charset="utf-8" >> >> On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote: >> > In general I think the thread illustrates the somewhat fuzzy nature of >> > repairing problematic polyhedra in general and STL files in particular >> > (STLs do not provide any topology, it must be guessed). Several repair >> > tools exist but they appear to make different assumptions leading to >> > different results. >> >> Are there other file formats that would be better?? Getting designers >> like OpenSCAD and slicers to *both* implement something new would be >> tough, but if there are clear benefits maybe it could be done. >> >>
CA
Carsten Arnholm
Tue, Feb 27, 2018 7:24 PM

On 27. feb. 2018 19:12, doug moen wrote:

I think it is useful to note that this restriction that "two cubes can't
share a single edge or single vertex" exists in the 2-manifold STL
representation of a mesh. However, 3MF meshes don't have this
restriction.

Huh? It is exactly the other way around. STL files don't contain any
common vertices and no common edges so there is no possibility of
sharing anything. Don't confuse the interpretation in OpenSCAD or other
programs with the data representation in the STL file.

3MF has the issue unless the cubes are separated in different meshes.

WARNING: Object may not be a valid 2-manifold and may need repair!

Actually, this warning is needed for STL export, but not for 3MF export.

This is not correct.

Carsten Arnholm

On 27. feb. 2018 19:12, doug moen wrote: > I think it is useful to note that this restriction that "two cubes can't > share a single edge or single vertex" exists in the 2-manifold STL > representation of a mesh. However, 3MF meshes don't have this > restriction. Huh? It is exactly the other way around. STL files don't contain any common vertices and no common edges so there is no possibility of sharing anything. Don't confuse the interpretation in OpenSCAD or other programs with the data representation in the STL file. 3MF has the issue unless the cubes are separated in different meshes. > WARNING: Object may not be a valid 2-manifold and may need repair! > > > Actually, this warning is needed for STL export, but not for 3MF export. This is not correct. Carsten Arnholm
DM
doug moen
Tue, Feb 27, 2018 8:37 PM

STL is just triangle soup, but if you restrict that triangle soup to being
2-manifold, then the restricted format that I called "2-manifold STL"
cannot represent "two cubes sharing a single edge". This restricted form of
STL is extremely relevant to this discussion, since OpenSCAD prints a
warning if you create a mesh that is not "2-manifold STL". I am not
confusing the OpenSCAD interpretation of STL with the file format itself,
this is an OpenSCAD forum where we are discussing STL with respect to
OpenSCAD.

The 3MF format is capable of representing "two cubes sharing a single
edge". You can do this in a single 3MF "object", without violating any
rules of the 3MF format. You can't represent this same model in AMF without
violating the rules of the AMF format.

A single 3MF object can contain more than one disjoint surface. This is
necessary to represent internal voids, which they discuss.

To convert the two cubes sharing an edge mesh to a valid 3MF mesh, you need
to split the two vertices that have 4 edges. There's two ways to do that.
One way results in two disjoint surfaces (2 cubes), like you said, but
still contained in a single object. The other way results in a single
surface.

I think that you don't like the complexity of 3MF, and the complexity of
the algorithm required to split vertices in order to create what the 3MF
standard calls "a mesh with manifold edges". You want a mesh interchange
format that doesn't have this complexity. That's fine.

I have a rather different set of goals. I want a standard mesh interchange
format that everybody supports, and that supports unions and intersections
of meshes, without me being told that "Object may not be a valid 2-manifold
and may need repair!". As far as I can tell, 3MF is the only candidate that
meets my criteria, or will meet it in the near future. Meshmixer just got
3MF support last month, it's still quite new in Cura, and the OpenSCAD
implementation is still under construction. A brand new mesh format that
meets your needs won't help me, because popular tools won't support it.

On 27 February 2018 at 14:24, Carsten Arnholm arnholm@arnholm.org wrote:

On 27. feb. 2018 19:12, doug moen wrote:

I think it is useful to note that this restriction that "two cubes can't
share a single edge or single vertex" exists in the 2-manifold STL
representation of a mesh. However, 3MF meshes don't have this restriction.

Huh? It is exactly the other way around. STL files don't contain any
common vertices and no common edges so there is no possibility of sharing
anything. Don't confuse the interpretation in OpenSCAD or other programs
with the data representation in the STL file.

3MF has the issue unless the cubes are separated in different meshes.

WARNING: Object may not be a valid 2-manifold and may need repair!

Actually, this warning is needed for STL export, but not for 3MF export.

STL is just triangle soup, but if you restrict that triangle soup to being 2-manifold, then the restricted format that I called "2-manifold STL" cannot represent "two cubes sharing a single edge". This restricted form of STL is extremely relevant to this discussion, since OpenSCAD prints a warning if you create a mesh that is not "2-manifold STL". I am not confusing the OpenSCAD interpretation of STL with the file format itself, this is an OpenSCAD forum where we are discussing STL with respect to OpenSCAD. The 3MF format *is* capable of representing "two cubes sharing a single edge". You can do this in a single 3MF "object", without violating any rules of the 3MF format. You can't represent this same model in AMF without violating the rules of the AMF format. A single 3MF object can contain more than one disjoint surface. This is necessary to represent internal voids, which they discuss. To convert the two cubes sharing an edge mesh to a valid 3MF mesh, you need to split the two vertices that have 4 edges. There's two ways to do that. One way results in two disjoint surfaces (2 cubes), like you said, but still contained in a single object. The other way results in a single surface. I think that you don't like the complexity of 3MF, and the complexity of the algorithm required to split vertices in order to create what the 3MF standard calls "a mesh with manifold edges". You want a mesh interchange format that doesn't have this complexity. That's fine. I have a rather different set of goals. I want a standard mesh interchange format that everybody supports, and that supports unions and intersections of meshes, without me being told that "Object may not be a valid 2-manifold and may need repair!". As far as I can tell, 3MF is the only candidate that meets my criteria, or will meet it in the near future. Meshmixer just got 3MF support last month, it's still quite new in Cura, and the OpenSCAD implementation is still under construction. A brand new mesh format that meets your needs won't help me, because popular tools won't support it. On 27 February 2018 at 14:24, Carsten Arnholm <arnholm@arnholm.org> wrote: > On 27. feb. 2018 19:12, doug moen wrote: > >> I think it is useful to note that this restriction that "two cubes can't >> share a single edge or single vertex" exists in the 2-manifold STL >> representation of a mesh. However, 3MF meshes don't have this restriction. >> > > Huh? It is exactly the other way around. STL files don't contain any > common vertices and no common edges so there is no possibility of sharing > anything. Don't confuse the interpretation in OpenSCAD or other programs > with the data representation in the STL file. > > 3MF has the issue unless the cubes are separated in different meshes. > > WARNING: Object may not be a valid 2-manifold and may need repair! >> >> >> Actually, this warning is needed for STL export, but not for 3MF export. >> > > This is not correct. > > > Carsten Arnholm > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RW
Rogier Wolff
Thu, Mar 1, 2018 9:09 AM

On Tue, Feb 27, 2018 at 05:33:13PM +0000, nop head wrote:

If two cubes share a face then the can be unioned and the result is
manifold. What they can't do is share a single edge or a single vertex.

For slicers the problem is very similar.

You have an object, you intersect that object with a plane (the slice!)
and for each delineated part of the plane, you determine if it is inside or
outside the object.

So with
cube (10);
translate ([10,0,0]) cube  (10);

when you slice at Z=5, you will encounter the common face at
X=10. When you cross that face, do you pass from inside to outside the
object or not? (Is it an edge of de object? If the walls are 1mm and
the infill 0%, do you fill the X= 9-11 mm area? Things are difficult. )

In practise, this case seems to work out.

I've had a case similar to:
module mycylinder (r,h, wt)
{
difference () {
cylinder (r=r, h=h);
//translate ([0,0,-1]) cylinder (r=r-wt, h=h+2);
cylinder (r=r-wt, h=h);
}
}

mycylinder (r=10, h=10, wt=1);
translate ([0,0,10])  mycylinder (r=10, h=10, wt=1);

Here when slicing at z=10mm, the slicer got confused with the number
of edges it encountered, and thought it had seen an odd number of
edges (i.e. passing from outside to inside) when in fact the number of
edges passed was even.

The result was that it tried to build one solid layer at that one
specific height.

Those are the kinds of corner cases that you can expect from almost
manifold objects.

Roger. 

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

On Tue, Feb 27, 2018 at 05:33:13PM +0000, nop head wrote: > If two cubes share a face then the can be unioned and the result is > manifold. What they can't do is share a single edge or a single vertex. For slicers the problem is very similar. You have an object, you intersect that object with a plane (the slice!) and for each delineated part of the plane, you determine if it is inside or outside the object. So with cube (10); translate ([10,0,0]) cube (10); when you slice at Z=5, you will encounter the common face at X=10. When you cross that face, do you pass from inside to outside the object or not? (Is it an edge of de object? If the walls are 1mm and the infill 0%, do you fill the X= 9-11 mm area? Things are difficult. ) In practise, this case seems to work out. I've had a case similar to: module mycylinder (r,h, wt) { difference () { cylinder (r=r, h=h); //translate ([0,0,-1]) cylinder (r=r-wt, h=h+2); cylinder (r=r-wt, h=h); } } mycylinder (r=10, h=10, wt=1); translate ([0,0,10]) mycylinder (r=10, h=10, wt=1); Here when slicing at z=10mm, the slicer got confused with the number of edges it encountered, and thought it had seen an odd number of edges (i.e. passing from outside to inside) when in fact the number of edges passed was even. The result was that it tried to build one solid layer at that one specific height. Those are the kinds of corner cases that you can expect from almost manifold objects. Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.