Sweep gives me ACCESS VIOLATION Input error

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
b0f00nmanjaro
Posts: 11
Joined: Tue Jul 08, 2014 4:32 pm

Sweep gives me ACCESS VIOLATION Input error

Postby b0f00nmanjaro » Mon Aug 11, 2014 12:36 pm

Hi !

Input Error:
ACCESS VIOLATION at address 0xFEFD0000 during 'READ' operation
I am trying to make a thread on a pipe. I was following this tutorial: https://www.youtube.com/watch?v=fxKxSOGbDYs.
And it works if I follow the tutorial. BUT if I make a Helix with these dimenzions:
radious = 30 mm
height = 200 mm
pitch = 5.5 mm
angle = 0°
Right-handed

I can make this helix.
But I cant sweep a triangle around this helix. The triangle has 60° angles and 5.5 mm of line lenght.

I have attached the file which has a helix and sketch ready.

Freecad 14 3700 GIt
Windows XP
Attachments
noga.FCStd
(17.83 KiB) Downloaded 38 times
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby shoogen » Mon Aug 11, 2014 12:44 pm

good catch. I can reproduce it.

Code: Select all

#0  0x00007fff8c61cdc6 in TopoDS_Shape::ShapeType (this=0x4109e38)
    at occt/inc/TopoDS_Shape.lxx:132
#1  0x00007fff8504e085 in BRepFill_Sweep::BuildShell (this=0x7fffffffaba0, 
    IFirst=1, ILast=2, ReversedEdges=..., Tapes=..., Rails=..., ExtendFirst=0, 
    ExtendLast=0)
    at occt/src/BRepFill/BRepFill_Sweep.cxx:2592
#2  0x00007fff8504f6e0 in BRepFill_Sweep::Build (this=0x7fffffffaba0, 
    ReversedEdges=..., Tapes=..., Rails=..., Transition=BRepFill_Right, 
    Continuity=GeomAbs_C2, Approx=GeomFill_Location, Degmax=11, Segmax=30)
    at occt/src/BRepFill/BRepFill_Sweep.cxx:2733
#3  0x00007fff85035ff2 in BRepFill_PipeShell::Build (this=0x60323f0)
    at occt/src/BRepFill/BRepFill_PipeShell.cxx:769
#4  0x00007fff7ee32848 in BRepOffsetAPI_MakePipeShell::Build (this=
    0x7fffffffae10)
    at occt/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx:258
#5  0x00007fff87bfae4f in Part::Sweep::execute (this=0x4096e50)
    at free-cad/src/Mod/Part/App/PartFeatures.cpp:461
#6  0x00007ffff6be8c6b in App::DocumentObject::recompute (this=0x4096e50)
    at free-cad/src/App/DocumentObject.cpp:86
#7  0x00007fff87bfe4e3 in Part::Feature::recompute (this=0x4096e50)
    at free-cad/src/Mod/Part/App/PartFeature.cpp:82
OS: Debian GNU/Linux 7.6 (wheezy)
Word size: 64-bit
Version: 0.15.3869 (Git)
Branch: testing
Hash: 3a79e196d4e14664606bc0f88b0a0ab19a34d2d0
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.3.IR20140731-576f8b1

The sketch seems to be valid, but it fails the bopcheck.

The crash is reproduce-able in DRAWEXE
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby shoogen » Mon Aug 11, 2014 1:08 pm

Why are the tolerances of the Shape of the Sketch that high?
>>> [v.Tolerance for v in App.ActiveDocument.Sketch.Shape.Vertexes]
[89.8491307745948, 89.8491307745947, 89.8384686179698]
b0f00nmanjaro
Posts: 11
Joined: Tue Jul 08, 2014 4:32 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby b0f00nmanjaro » Mon Aug 11, 2014 1:13 pm

Hmm. I was trying to make M60x5.5 which is M60 bolt and nut and has 5.5 pitch. I dont know if I answered your question.
Here is the data sheet. http://mdmetric.com/tech/M-thead%20600.htm. I want to make a M60 thread on that pipe.I didint play with tolerances. Not even a little. At least I am not aware of doing that hmm.
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby shoogen » Mon Aug 11, 2014 1:16 pm

I'm sorry the question was not directed at you. There should not be a way to mess up the internal tolerances when working with the sketcher. But even i a recompute the sketch and get a shape that has valid tolerances (1e-7), the problem persists.

i filed the SIGSEGV as http://tracker.dev.opencascade.org/view.php?id=25138
But I still have no clue what happened to the tolerances.
b0f00nmanjaro
Posts: 11
Joined: Tue Jul 08, 2014 4:32 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby b0f00nmanjaro » Mon Aug 11, 2014 1:36 pm

Thank you for making a bug report and for helping me so quickly.
ickby
Posts: 2978
Joined: Wed Oct 05, 2011 7:36 am

Re: Sweep gives me ACCESS VIOLATION Input error

Postby ickby » Mon Aug 11, 2014 1:50 pm

but note that apart from the segfault this seems to be a invalid sweep: your helix pitch is as high as your triangle and it would therefore create a selfintersecting geometry (the windings would touch each other) which is invalid.
b0f00nmanjaro
Posts: 11
Joined: Tue Jul 08, 2014 4:32 pm

Re: Sweep gives me ACCESS VIOLATION Input error

Postby b0f00nmanjaro » Mon Aug 11, 2014 2:01 pm

Hmm. The tutorial that someone posted also has pitch value and triangle the same, 2 mm. And it works. So does it really intersect ?
Last edited by b0f00nmanjaro on Mon Aug 11, 2014 2:02 pm, edited 1 time in total.
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Sweep gives me ACCESS VIOLATION Input error

Postby quick61 » Mon Aug 11, 2014 2:02 pm

I might add a couple more pointers to those that feel the need to model threads in FreeCAD. First, do not start the cut on the seam line of the cylinder. This avoids a weakness in the CAD kernel. Second, along with what ickby mentioned about the triangle self intersecting, very bad, it is a big help to slightly round the inside point of the triangle. Doing so will increase your chances of getting a valid solid in the end. It can be a very small round, just so long as it is not a sharp angle.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
ickby
Posts: 2978
Joined: Wed Oct 05, 2011 7:36 am

Re: Sweep gives me ACCESS VIOLATION Input error

Postby ickby » Mon Aug 11, 2014 2:13 pm

It does intersect for sure if the pitch height is as big as the profile height (and frenet selected). Normally this would also give you a sweep tha tlooks ok (like in the tutorial). But that sweep is invalid and if you would try to use it in further operations it would gives you much trouble. You should lookout fo the tutorials of bejant and mark(quick61), they know what they are doing :)