discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Peculiar artifact in model generation

F
fred_dot_u
Mon, Mar 7, 2016 5:28 PM

http://forum.openscad.org/file/n16323/pulley_artifact.png

I'm nearly complete on a project for a friend, a simple pulley. The project
is the pulley, the friend is not a simple pulley.

Two cylinders with appropriate cylinders removed to provide an opening for
the shaft. On the perimeter of the larger cylinder is a contoured groove.
The groove is constructed using a hulled shape of a circle and triangle,
rotated and extruded.

Up to the point where I added the hub extension, I had a perfect shape. This
tells me that there's been no shifting of centers or other unusual
adjustments to the modified torus that makes up the pulley groove. Once the
hub extension was added, I now have after the F6 rendering a flange or flap
connecting across the face of the groove.

I'm also unable to return the code to the point where the artifact goes
away. Removing the hub extension code does not change the failure point.

I've been enjoying to make simple models using OpenSCAD, but I'm far from
proficient at sophisticated code. I'm sure there are ways to make my code
cleaner, faster, better, more attractive, but up to the appearance of the
artifact, it worked just fine.

When I exported the STL and opened it in Meshmixer, the artifact was still
in place. I did not try to clean it up with Meshmixer, as I'd rather learn
how not to make it appear.

How can I resolve this little glitch?

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

<http://forum.openscad.org/file/n16323/pulley_artifact.png> I'm nearly complete on a project for a friend, a simple pulley. The project is the pulley, the friend is not a simple pulley. Two cylinders with appropriate cylinders removed to provide an opening for the shaft. On the perimeter of the larger cylinder is a contoured groove. The groove is constructed using a hulled shape of a circle and triangle, rotated and extruded. Up to the point where I added the hub extension, I had a perfect shape. This tells me that there's been no shifting of centers or other unusual adjustments to the modified torus that makes up the pulley groove. Once the hub extension was added, I now have after the F6 rendering a flange or flap connecting across the face of the groove. I'm also unable to return the code to the point where the artifact goes away. Removing the hub extension code does not change the failure point. I've been enjoying to make simple models using OpenSCAD, but I'm far from proficient at sophisticated code. I'm sure there are ways to make my code cleaner, faster, better, more attractive, but up to the appearance of the artifact, it worked just fine. When I exported the STL and opened it in Meshmixer, the artifact was still in place. I did not try to clean it up with Meshmixer, as I'd rather learn how not to make it appear. How can I resolve this little glitch? -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Mar 7, 2016 6:06 PM

Nice object.

fred_dot_u wrote

module groovy(){
hull(){
circle(r = cross_section_diameter / 2);
polygon(points = [[0,0], [groove_gap / 2,(

outer_diameter+1

  • groove_diameter) / 2],    [-(groove_gap / 2),(

outer_diameter+1

  • groove_diameter) / 2]]);
    }
    }

Making the groove diameter larger by changing outer_diameter to
outer_diameter+1 solves the problem.


$  Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py( 1 , 2 , git ), synwrite( 1 , 2 );  $ tips: hash( 1 , 2 ), sweep( 1 , 2 ), var( 1 , 2 ), lerp , animGif , prodVid , precision( 1 , 2 ), xl-control , type

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16325.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Nice object. fred_dot_u wrote > module groovy(){ > hull(){ > circle(r = cross_section_diameter / 2); > polygon(points = [[0,0], [groove_gap / 2,( * > outer_diameter+1 * > - groove_diameter) / 2], [-(groove_gap / 2),( * > outer_diameter+1 * > - groove_diameter) / 2]]); > } > } Making the groove diameter larger by changing outer_diameter to *outer_diameter+1* solves the problem. ----- $ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py( 1 , 2 , git ), synwrite( 1 , 2 ); $ tips: hash( 1 , 2 ), sweep( 1 , 2 ), var( 1 , 2 ), lerp , animGif , prodVid , precision( 1 , 2 ), xl-control , type -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16325.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
nophead
Mon, Mar 7, 2016 6:31 PM

Or even +0.01 to have less effect on the shape. When subtracting you always
want some overlap. The same with the cylinder that drills the hole though
the hub.

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16326.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Or even +0.01 to have less effect on the shape. When subtracting you always want some overlap. The same with the cylinder that drills the hole though the hub. -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16326.html Sent from the OpenSCAD mailing list archive at Nabble.com.
F
fred_dot_u
Mon, Mar 7, 2016 6:48 PM

Adding the 0.01 to the outer diameter within the module appeared to have
resolved the problem.
Usually I am able to find the answer to my problems simply by phrasing the
difficulty, confirming it on my end, then discovering my error. I suspected
it would be necessary to expand a dimension, as I'd had to do so in the
past. I was unable to identify the best dimension to accomplish the result
this time.

Thank you for your assistance, off to the printer!

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16328.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Adding the 0.01 to the outer diameter within the module appeared to have resolved the problem. Usually I am able to find the answer to my problems simply by phrasing the difficulty, confirming it on my end, then discovering my error. I suspected it would be necessary to expand a dimension, as I'd had to do so in the past. I was unable to identify the best dimension to accomplish the result this time. Thank you for your assistance, off to the printer! -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16328.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Mon, Mar 7, 2016 8:13 PM

My approach is to declare a variable for this purpose: Delta = 0.1
Then, when an object needs to interpenetrate another, to add Delta to the
object on that axis.
Its also useful when primitives are made with center=true, to sometimes add
Delta*2 and to translate by -Delta in that same dimension.

Then you get a nice controlled overlap. By changing Delta to a larger number
temporarily, you can troubleshoot these overlap areas.

as usual YMMV. Cheers...

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16332.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

My approach is to declare a variable for this purpose: Delta = 0.1 Then, when an object needs to interpenetrate another, to add Delta to the object on that axis. Its also useful when primitives are made with center=true, to sometimes add Delta*2 and to translate by -Delta in that same dimension. Then you get a nice controlled overlap. By changing Delta to a larger number temporarily, you can troubleshoot these overlap areas. as usual YMMV. Cheers... -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16332.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Tue, Mar 8, 2016 11:04 AM

Normally you only need the overlap to overcome numerical inaccuracies due
to floating point to make F6 work. For F5 to work you need enough overlap
to prevent Z buffer fighting.

In this case I think the F6 artefact was due to rotate extrude facets not
lining up with cylinder facets exactly so it had significant thickness.

On 7 March 2016 at 18:48, fred_dot_u fred_dot_u@yahoo.com wrote:

Adding the 0.01 to the outer diameter within the module appeared to have
resolved the problem.
Usually I am able to find the answer to my problems simply by phrasing the
difficulty, confirming it on my end, then discovering my error. I suspected
it would be necessary to expand a dimension, as I'd had to do so in the
past. I was unable to identify the best dimension to accomplish the result
this time.

Thank you for your assistance, off to the printer!

--
View this message in context:
http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16328.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Normally you only need the overlap to overcome numerical inaccuracies due to floating point to make F6 work. For F5 to work you need enough overlap to prevent Z buffer fighting. In this case I think the F6 artefact was due to rotate extrude facets not lining up with cylinder facets exactly so it had significant thickness. On 7 March 2016 at 18:48, fred_dot_u <fred_dot_u@yahoo.com> wrote: > Adding the 0.01 to the outer diameter within the module appeared to have > resolved the problem. > Usually I am able to find the answer to my problems simply by phrasing the > difficulty, confirming it on my end, then discovering my error. I suspected > it would be necessary to expand a dimension, as I'd had to do so in the > past. I was unable to identify the best dimension to accomplish the result > this time. > > Thank you for your assistance, off to the printer! > > > > -- > View this message in context: > http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16328.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
F
fred_dot_u
Tue, Mar 8, 2016 2:01 PM

I was able to remove the artifact with a 0.01 fudge addition. I like the
explanation of the mismatch of facets to explain the appearance. I'm not so
obsessed with precision that I can't accept a 0.01 adjustment.

The overhang for the pulley groove has proven to be excessively challenging
for my Flux Delta, so I had to move to the toy printer, a Cube 3rd gen, and
use wash-away support material. Only an hour remains to determine how
successful that is.

--
View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16351.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I was able to remove the artifact with a 0.01 fudge addition. I like the explanation of the mismatch of facets to explain the appearance. I'm not so obsessed with precision that I can't accept a 0.01 adjustment. The overhang for the pulley groove has proven to be excessively challenging for my Flux Delta, so I had to move to the toy printer, a Cube 3rd gen, and use wash-away support material. Only an hour remains to determine how successful that is. -- View this message in context: http://forum.openscad.org/Peculiar-artifact-in-model-generation-tp16323p16351.html Sent from the OpenSCAD mailing list archive at Nabble.com.