Failed to validate broken face freecad что делать
FreeCAD Forum
The help and development forum of FreeCAD
Also, be nice to others! Read the FreeCAD code of conduct!
Post by jwhitten » Thu Jun 17, 2021 5:52 pm
Thanks to everyone who’s worked to make FreeCAD such a cool thing!
I’m new to FreeCAD coming from Fusion360. In general, it seems a little different, but similar enough. I’ve been getting up to speed by making little test parts.
In this example, I am simulating making a machined plate of some sort.
I created a sketch that contains a rectangle, fully-constrained, and inside it, a set of four holes (or rather, eight holes in concentric pairs to make recessed-bolt holes). These holes are constrained by making them coincident with the corner points of a second rectangle drawn from construction lines. Finally, one of the holes is dimensionally-constrained horiz/vert to a point in the outer rectangle, making the whole geometry fully-constrained.
When I go to PAD the sketch, it keeps tossing up a «Failed to Validate Broken Face» error and I can’t figure out what I’m doing wrong. All my constraints seem correct. I have the correct number of holes and lines. The sketch validator found no issues. But I keep getting the error. Any idea what I’m doing wrong here?
I’ve included the test file for your perusal.
(I would also include a screenshot, but I’m not sure how to do that with this forum software.)
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
FreeCAD Forum
The help and development forum of FreeCAD
Failed to validate broken face
Also, be nice to others! Read the FreeCAD code of conduct!
Failed to validate broken face
Post by shomar » Fri Dec 12, 2014 3:49 am
I am trying to design my first part on free cad, I get my sketch locked and fully constrained, when I try to pad the part I get a message «failed to verify broken face» and that doesn’t work, so I went and verified the sketch and received a message that no missing coincidences found.
I am not sure how to fix this from this point, tried to search a lot but couldn’t find a solution that works.
I am using the following freeCAD, and also attached the file with the sketch that is failing, I would appreciate if you can look at this and maybe point me on where to go from here?
OS: Mac OS X
Word size: 64-bit
Version: 0.14.3703 (Git)
Branch: releases/FreeCAD-0-14
Hash: c6edd47334a3e6f209e493773093db2b9b4f0e40
Python version: 2.7.5
Qt version: 4.8.6
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Re: Failed to validate broken face
Post by NormandC » Fri Dec 12, 2014 4:24 am
Welcome here. It is not often that newcomers make such detailed posts and supply their FreeCAD info as well as a FreeCAD file. Thank you!
I’m guessing you are talking about the sketch labeled «Clamp handle»? It is to be expected that padding it would produce such an error. Internally, when creating a Pad or Extrude, the software must first create a face out of the provided sketch, then extrude it in the 3rd dimension.
To produce a valid face, a sketch must contain a single outer closed profile, which must not be crossed by other geometry. It can contain «islands», or smaller closed profiles, but they must not cross or be tangent to the outer profile.
Your sketch does not meet this condition: the handle is attached to a full circle. You must trim the circle using the Sketcher trim tool.
One problem is that your sketch contains only a single tangent constraint between a line segment and an arc. You should have a tangent constraint wherever an arc meets a line or another arc. I copied your «Clamp handle» sketch to a new file and edited it to show what I mean.
Re: Failed to validate broken face
Post by shomar » Fri Dec 12, 2014 7:18 am
Thank you very much for the help and the explanation, I really appreciate the opportunity to explain where I am going wrong and best practices. as I mentioned I am new to 3D design in general and your pointers are really valuable to me in my learning phase.
I am really glad I got my way to using freeCAD based on the response I got here, I like being in community where help is offered this quickly and thoroughly like your answer.
Much appreciated,
Shomar`
Re: Failed to validate broken face
Post by WLudman » Sun Jan 18, 2015 3:09 am
Attached is the first part that I’ve designed in FreeCad (v0.14). The sketch is fully constrained. However, when padding the sketch, the message «failed to verify broken face» is returned. There are no missing coincidences. The trim edge tool has been used on the arcs.
Please advise as to how to resolve this problem.
Attached is my FreeCad information.
OS: Windows
Word size: 32-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
Re: Failed to validate broken face
Post by NormandC » Sun Jan 18, 2015 6:17 am
Welcome here, and thanks for posting such a detailed request.
Your problem is quite obvious just opening your file: your sketch may be properly constrained, but it includes an open profile. To create a face, you absolutely need a closed profile. Add a horizontal line joining both arcs at the top, and the Pad will succeed (see attached corrected file).
Re: Failed to validate broken face
Post by WLudman » Sun Jan 18, 2015 9:32 pm
FreeCAD Forum
The help and development forum of FreeCAD
Failed to Validate Broken Face
Also, be nice to others! Read the FreeCAD code of conduct!
Failed to Validate Broken Face
Post by rayhall » Sun Feb 19, 2017 2:54 am
I am new to this forum and new to PC software CAD design. So I will apologise at the start. I may use the wrong words when trying to describe the my problem. I did come first in my class for Technical Drawing in 1968. I have for years hand drawn many 2D drawings.
I am sure others have had this error in the past, and a search of Google did not solve the problem. If I am understanding this error message correctly, their is a break in the outside border of my design. I have searched and searched and have found and fixed some breaks, but still get the error.
I have attached my design. If someone could help it would be good. My eyes are not as good as they were so could easily miss something.
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Re: Failed to Validate Broken Face
Post by jmaustpc » Sun Feb 19, 2017 3:49 am
Your first post, welcome to FreeCAD.
That error message most commonly comes up when using PartDesign WB, when you have a problem with your sketch, where it doesn’t described the outline of a face.
Most commonly things like, one line sitting over another hence hiding one line or two lines’ end points are missing a coincidence constrain.
Have a look for those common errors, if you can’t find the problem, I am sure one of the others will post your specific issue soon.
Re: Failed to Validate Broken Face
Post by jmaustpc » Sun Feb 19, 2017 3:52 am
Re: Failed to Validate Broken Face
Post by bejant » Sun Feb 19, 2017 6:11 am
Now you can create another Sketch on the top face of the 3 slots on one side of the bottom, Part Design > Pocket it, then use Part Design > Mirror to Mirror the 3 slots onto the other half.
OS: Ubuntu 16.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Re: Failed to Validate Broken Face
Post by NormandC » Sun Feb 19, 2017 7:01 am
Welcome to the forum.
That is one seriously complex sketch, with 243 constraints applied and 36 degrees of freedom left. I usually recommend to design a sketch with no more than 100 constraints, over that amount it becomes increasingly difficult to manage.
Also, in the Sketcher you need to limit the use of dimensional constraints, they are more taxing on the sketcher solver than geometric constraints. You have many duplicate dimensions that could have been avoided using equal length constraints between elements of equal length (lines) or radius (arcs). I see you did use equal length constraints, but there are many more possible. Dimensioning end points of arcs is also a bad idea because that way you can’t ensure that the arcs have a perfect tangency condition with the lines they are connected to. The only way to ensure that is to connect their end points using tangent point-on-point constraints, which should replace coincident constraints.
Working in 3D is very different than working in 2D. You usually don’t try to get everything in a single sketch then extrude it: you rather approach this as if you were actually going to make it from a billet of aluminium. You’ll start with a solid block then you’ll cut away parts of it, drill holes etc.
Your sketch shows a repetitive pattern. So it makes sense to only sketch the repetitive pattern, extrude/pad it then apply a pattern to repeat the 5 occurrences. Then you can add the details that didn’t fit into the pattern.
The PartDesign workbench has transformation features like linear and polar patterns, and mirrored features. You could start from a wide plate, then create successive groups of (sketch + pocket + transformation features) to get the final result. But the most efficient way that I can think of is using the Draft Array tool.
The Draft workbench’s main purpose is to create 2D geometry (it actually predates the sketcher), but it evolved to be much more. All its modifying tools work on 3D objects.
FreeCAD Forum
The help and development forum of FreeCAD
Проблема Failed to validate broken face
Forum rules
Правила форума и полезная информация
Проблема Failed to validate broken face
Post by twinchip » Tue Mar 26, 2019 6:09 pm
Re: Проблема Failed to validate broken face
Post by DeepSOIC » Tue Mar 26, 2019 6:32 pm
Файл приложите пожалуйста.
Re: Проблема Failed to validate broken face
Post by twinchip » Wed Mar 27, 2019 8:24 am
Re: Проблема Failed to validate broken face
Post by DeepSOIC » Wed Mar 27, 2019 11:11 am
Нет верхней грани. Значит, контур не замкнут. То есть вероятно, это не «самопересечение» и «глубина вложенности». Из остального может быть всё что угодно.
Попробуйте ещё прогнать скетч через Part CheckGeometry, рекомендую включить «BOPCheck» (по ссылке написано, как).
Для поиска и устранения маленьких разрывов есть инструмент «Validate sketch», обитающий в меню верстака Sketcher. Попробуйте потыкать в find missing coincidences и fix.
Re: Проблема Failed to validate broken face
Post by DeepSOIC » Wed Mar 27, 2019 11:14 am
Re: Проблема Failed to validate broken face
Post by twinchip » Wed Mar 27, 2019 2:45 pm
Нет верхней грани. Значит, контур не замкнут. То есть вероятно, это не «самопересечение» и «глубина вложенности». Из остального может быть всё что угодно.
Попробуйте ещё прогнать скетч через Part CheckGeometry, рекомендую включить «BOPCheck» (по ссылке написано, как).
Для поиска и устранения маленьких разрывов есть инструмент «Validate sketch», обитающий в меню верстака Sketcher. Попробуйте потыкать в find missing coincidences и fix.
Получилось все сделать. Спасибо огромное. Функция Validate Sketch помгла. В одном месте был разрыв, а вдругом наложение одной линии на другую.
Но все таки у меня нет фукнции Check Geometry, все заканчивается Boolean (если идти по инструкции)
Мне надо самому найти и установить данную функцию??
Re: Проблема Failed to validate broken face
Post by Лапчатый » Sun Mar 31, 2019 7:00 pm
ИМХО так гораздо проще ловить блох вроде несовмещённых точек и дублированных линий.
Проверяем исходный код FreeCAD и его «нехорошие» зависимости
Статья, которая задумывалась как обзор ошибок в открытом проекте FreeCAD, приобрела немного другой характер. Весомая часть предупреждений анализатора пришлась на используемые сторонние библиотеки. Разработка программного обеспечения с активным использованием сторонних библиотек даёт много плюсов, особенно в сфере Open Source. И ошибки в библиотеках не повод отказываться от них. Но надо понимать, что в используемом коде тоже могут жить баги. Их надо быть готовым встретить и по возможности исправить, тем самым улучшив используемые вами библиотеки.
FreeCAD — параметрический трехмерный редактор, позволяющий создавать объемные модели и чертежи их проекций. Разработчик FreeCAD Юрген Ригель, работающий в корпорации DaimlerChrysler, позиционирует свою программу как первый бесплатный инструмент проектирования механики. В среде специалистов ряда отраслей известна проблема создания полноценной САПР в рамках Open Source, и этот проект является кандидатом на такую «полноценность». Проверим же исходный код с помощью PVS-Studio и поможем открытому проекту в этой области стать чуточку лучше. Наверняка вы сталкивались с «глюками» в различных редакторах, когда не удаётся попасть в какую-нибудь точку или выпрямить линию, которая всегда съезжает на один пиксель. Возможно, причиной всего этого являются лишь опечатки в исходном коде.
Что с PVS-Studio?!
Проект FreeCAD является кросс-платформенным, на сайте есть очень хорошая документация по сборке. Мне не составило труда получить проектные файлы для Visual Studio Community 2013 для проверки с помощью установленного плагина PVS-Studio. Но в начале проверка не задалась…
Причиной внутренней ошибки в анализаторе стало наличие бинарной последовательности в текстовом препроцессированном файле с расширением *.i. Анализатор умеет обрабатывать такие ситуации, но тут произошло что-то новое. Проблема в одной из строчек в параметрах компиляции исходных файлов:
Флаг компиляции /FI (Name Forced Include File), как и директива #include, служат для включения текстовых заголовочных файлов. Но здесь пытаются включить файл, содержащий информацию в бинарном виде. Это каким-то чудом компилируется. Возможно, в Visual C++ такой файл просто игнорируется.
Если попытаться не компилировать, а именно препроцессировать файлы, то Visual C++ сообщает об ошибке. А вот используемый в PVS-Studio по умолчанию Clang, недолго думая, включил *.i файл бинарный файл. PVS-Studio не ожидал такого подвоха и сошёл с ума.
Чтобы было понятней, о чем идёт речь, вот фрагмент препроцессирпованного с помощью Clang файла:
Проект был аккуратно проверен без этого флага, но хочу обратить внимание разработчиков, что у них здесь ошибка.
FreeCAD
Первые примеры ошибок из проекта получены по известной всем причине.
V501 There are identical sub-expressions ‘surfaceTwo->IsVRational()’ to the left and to the right of the ‘!=’ operator. modelrefine.cpp 780
По левую сторону оператора неравенства обнаружилась не та переменная «surfaceTwo» вместо «surfaceOne» из-за маленькой опечатки. Осталось посоветовать автору в следующий раз делать copy-paste фрагментами побольше, но и до таких примеров мы тоже дойдём =).
V517 The use of ‘if (A) <. >else if (A) <. >‘ pattern was detected. There is a probability of logical error presence. Check lines: 162, 164. taskpanelview.cpp 162
Чего это мы обратили внимание на функцию, которая ещё пишется? А вот почему: с этим кодом скорее всего будет тоже самое, что и в следующих двух примерах.
V517 The use of ‘if (A) <. >else if (A) <. >‘ pattern was detected. There is a probability of logical error presence. Check lines: 1465, 1467. application.cpp 1465
Будем надеется, что автор случайно не поправил одну скопированную строчку, но в итоге всё равно дописал поиск всех необходимых строк.
V517 The use of ‘if (A) <. >else if (A) <. >‘ pattern was detected. There is a probability of logical error presence. Check lines: 191, 199. blendernavigationstyle.cpp 191
А вот, на мой взгляд, серьёзная ошибка для такого приложения. При моделировании много работы выполняется с помощью навигации мышкой, а тут такой ляп: исходный код в последнем условии никогда не получает управление, потому что первое условие такое же и выполняется первым.
V523 The ‘then’ statement is equivalent to the ‘else’ statement. viewproviderfemmesh.cpp 695
Независимо от условия, всегда выполняется одно действие. Может всё-таки так задумывалось:
Почему я исправил именно последнюю строку? Возможно, вас заинтересует статья на эту тему: Эффект последней строки. Но возможно, надо исправить первую. Не знаю :).
V570 The ‘this->quat[3]’ variable is assigned to itself. rotation.cpp 260
Ещё о «последних строках». Анализатор насторожился, так как в последней строке нет знака минуса. Но тут нельзя однозначно говорить об ошибке, возможно, при реализации такого преобразования, хотели подчеркнуть, что четвёртая компонента не изменяется.
V576 Incorrect format. A different number of actual arguments is expected while calling ‘fprintf’ function. Expected: 2. Present: 3. memdebug.cpp 222
Такой код не имеет смысла. Если указатель нулевой, то можно просто печатать символ новой строки без передачи в функцию неиспользуемых параметров.
V596 The object was created but it is not being used. The ‘throw’ keyword could be missing: throw Exception(FOO); waypointpyimp.cpp 231
В коде создаётся объект типа исключения, но не используется. По всей видимости пропущено ключевое слово «throw»:
В базовом классе «Curve» объявлены виртуальные функции, но не объявлен деструктор, который будет создан по умолчанию. И он конечно будет не виртуальным! Это означает, что объекты, наследуемые от этого класса, не будут полностью очищены при таком сценарии использования, когда указатель на дочерний объект сохраняется в указатель на базовый класс. Судя по комментарию, у базового класса наследуемых классов много, например, приведённый класс «Line» в примере.
V655 The strings were concatenated but are not utilized. Consider inspecting the expression. propertyitem.cpp 1013
Анализатор обнаружил бессмысленное сложение строк. Если приглядеться, то, возможно, тут хотели использовать оператор ‘+=’ вместо простого сложения. Тогда такой код имел бы смысл.
V595 The ‘root’ pointer was utilized before it was verified against nullptr. Check lines: 293, 294. view3dinventorexamples.cpp 293
Open CASCADE library
V519 The ‘myIndex[1]’ variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 60, 61. brepmesh_pairofindex.hxx 61
В данном примере перезаписали значение элемента массива ‘myIndex’ с индексом 1. Мне кажется, хотели сделать так:
SALOME Smesh Module
V501 There are identical sub-expressions ‘0 n_’ variable is modified while being used twice between sequence points. regex_token_iterator.hpp 63
Неизвестно, какой из операндов оператора %= будет вычислен первым. Соответственно, правильно работает выражение или нет, зависит от везения.
Заключение
Пробуйте и внедряйте статические анализаторы для регулярной проверки своих проектов, а также используемых сторонних библиотек. Это сэкономит время при написании нового кода, а также при поддержке старого.
Если хотите поделиться этой статьей с англоязычной аудиторией, то прошу использовать ссылку на перевод: Svyatoslav Razmyslov. Analyzing FreeCAD’s Source Code and Its „Sick“ Dependencies.