View Issue Details

IDProjectCategoryView StatusLast Update
0003859ArchBugpublic2020-10-20 11:30
Reportersopwith Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx64OSWindowsOS Version10
Product Version0.18 
Summary0003859: Can't make an arch wall from some curves
DescriptionWhen I create an arch wall from a sketch with an elliptical, parabolic, or B-spline curve, it doesn't make anything.

In the report panel it says:
  DraftGeomUtils: unable to bind wires
  Error: Invalid base object

Creating a wall from a circle or circular arc works OK. I haven't tested other shapes such as regular polygons, slots, etc.
Steps To ReproduceCreate a sketch with an elliptical, parabolic, or B-spline curve (hyperbolic probably does it too). Exit sketcher and go to Arch workbench. Select the sketch and click on the 'Wall' button.
Additional InformationOS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15959 (Git)
Build type: Release
Branch: master
Hash: 397418078a6f61e8c39cedfe1160adc2abd73510
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Tags#pending
FreeCAD Information

Activities

sopwith

2019-02-24 20:54

reporter  

Kunda1

2019-02-25 12:38

administrator   ~0012762

@sopwith is this the issue? https://forum.freecadweb.org/viewtopic.php?t=29978

sopwith

2019-02-25 15:05

reporter   ~0012767

Hi,

I read that forum thread before filing the bug, but I decided it was a different issue in some regards because this bug involves specific classes of shapes all the time, instead of a line all the time. Also I don't got the extra DraftGeomUtils.connect errors that one person in that thread got.

If you load the attached file are you able to see the walls? It includes example walls for each type of shape mentioned.

Kunda1

2019-02-26 10:42

administrator   ~0012772

@paullee care to take look at this ?

paullee

2019-02-26 18:14

developer   ~0012775

Last edited: 2019-02-26 18:15

Happen that I am trying to tackle another problem in ArchWall creation with my limited python knowledge - arc tangent with line segment seems to be problematic.

I try the file and look at the code, it seem currently ArchWall only tackle straight line segment and arc (/circle).

Testing with below code on the 3 sketches return:-
s=Gui.Selection.getSelection()[0]
isinstance(s.Shape.Edges[0].Curve,Part.Circle) 
False
Line 826 of ArchWall.py reads:-
                            if isinstance(e.Curve,Part.Circle):
                                dvec = e.Vertexes[0].Point.sub(e.Curve.Center)
                            else:
                                dvec = DraftGeomUtils.vec(wire.Edges[0]).cross(normal)

I have no idea how to implement support for Ellipse, Parabola, B-Spline. Maybe @Yorik or others like @Moult, @Carlopav etc. like to do this?

In the interim, maybe use a series of arcs?

Kunda1

2019-02-26 18:24

administrator   ~0012776

@paullee thanks!
Bumping this to 0.19

sopwith

2019-02-27 01:02

reporter   ~0012778

I dug into the code a bit more. Once I changed the isinstance() in ArchWall.py to also include the other types of curves, and the same change in DraftGeomUtils.offsetWire()

The root of the problem is that DraftGeomUtils.offset() doesn't handle any shapes except lines and circles/arcs.

Conceptually, we want to create a curve that is a fixed "offset" distance away from the tangent of the curve in question. For a Parabola, Hyperbola, and Ellipse that can be done by scaling a copy of the original shape by the right amount in each direction. I dunno how to do that in FreeCAD.

I have no clue what the right solution is for B-spline and Bezier curves. I can imagine how to make a Logo turtle do it but not FreeCAD :-) B-spline and Bezier also have the weird issue of being able to loop back over themselves and cause really funny problems for walls.

So far I've found five shapes that aren't supported by DraftGeomUtils.offset():
   Parabola, Hyperbola, BSplineCurve, Ellipse, and BezierCurve

DraftGeomUtils.geomType() also needs fixing up to handle more types of shapes.

Kunda1

2019-02-27 20:35

administrator   ~0012783

@sopwith very cool. Please open a forum thread to discuss this. I bet you'd get some great feedback and orientation from the community.

paullee

2019-02-28 00:05

developer   ~0012798

Tackling another ArchWall Creation Problem discussed in thread below :)

Found a problem in DraftGeomUtils.offsetWire()

https://forum.freecadweb.org/viewtopic.php?f=23&t=34505

Seem scaling is a proper mathematical solution - this kind of geometries + scaling not in school syllabus years ago :)

sww1235

2019-03-21 22:43

reporter   ~0012940

Last edited: 2019-03-22 17:21

I am running into similar issues as addressed in this bug, as I cannot make walls from draftWires drawn using the circle tool.

It seems to be similar to this forum post from 2014: https://forum.freecadweb.org/viewtopic.php?t=8242

I am attempting to follow the workflow of:

  • draw circle using circle tool in arch workbench
  • turn off "make face" option of circle.
  • select circle and hit wall button.

This should create a circular wall but results in an error:


DraftGeomUtils.connect: unable to connect edges
DraftGeomUtils.connect: unable to connect edges
DraftGeomUtils: unable to bind wires
Error: Invalid base object

I have verified this issue both on the most recent MacOS build and 0.17 stable.

I hope this helps with debugging this issue.

OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15525 (Git)
Build type: Release
Branch: master
Hash: 1a7d3d9a37fe43468c8ac84590c1db53e2b2000a
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

paullee

2019-03-22 15:39

developer   ~0012942

I submitted a PR at which Yorik is reviewing....
[PR - Bug Fix] ArchWall / DraftGeomUtils - offsetWire(), connect(), precision()

Whilst it should reviewed quite some geometry with arc tangential with line bugs, I have tried and noted a simple circle is not supported (yet?) :)

I try in a Sketch make 2 separate arcs forming a complete circle, then ArchWall works :)

Kunda1

2019-06-17 07:36

administrator   ~0013235

Hey @paullee what's the status on this ticket?

paullee

2019-06-17 18:27

developer   ~0013239

Hi, Yorik had merged the PRs above but they are not for adding supports for geometries discussed here.

They are fixes for some problems about arcs in sketches.

I may have some idea to support Circle - but not mathematically for Parabola, Hyperbola, BSplineCurve, Ellipse, and BezierCurve.

Kunda1

2019-06-18 07:58

administrator   ~0013250

@paullee what do you recommend? Should we open Feature tickets for each unsupported method (Circle, Parabola, Hyperbola, BSplineCurve, Ellipse, and BezierCurve) and then add this ticket as a child to one of them ?

paullee

2019-06-18 17:57

developer   ~0013257

Ok, i should have found a way to support building an ArchWall on Circle (w/o a face which was not supported previously).

[PR] - ArchWall to Support Circle (w/o face)

No idea how to implement support other geometries :)

Do whatever you think fits, not much knowledge how mantis works and its features :)

Kunda1

2020-10-15 17:59

administrator   ~0014875

@yorik please weigh in on this ticket

sww1235

2020-10-15 23:51

reporter   ~0014880

I can say that paullee's last pull request fixed the arch wall circle issue. Might be able to build off of that for the other shapes

yorik

2020-10-16 10:58

administrator   ~0014886

Indeed walls can still not be built on elliptic wires..
Probably because the Draftgeom offset function cannot offset it. I'll have a look at it

paullee

2020-10-16 13:43

developer   ~0014887

Indeed @yorik has merged the request to support circle.

But I remeber the code is not prepared to accept ellipse, parabola, bspline etc.

Those complex curve are difficult for me, maybe ellipse.

Anybody to attempt ? Maybe for those has more frequent usecase


For modelling Corbu's Carpenter Center, I just use a series of arc to trace through the shape.

yorik

2020-10-20 11:15

administrator   ~0014914

Fixed with https://github.com/FreeCAD/FreeCAD/commit/87eae7c58cdfda2ca05b0edaa770e848b7f0c8ed

yorik

2020-10-20 11:30

administrator   ~0014915

Fix committed to master branch.

Related Changesets

FreeCAD: master 87eae7c5

2020-10-20 11:13:54

yorik

Details Diff
Arch: Enabled ellipse-based walls - fixes 0003859 Affected Issues
0003859
mod - src/Mod/Arch/ArchWall.py Diff File
mod - src/Mod/Draft/draftgeoutils/offsets.py Diff File

Issue History

Date Modified Username Field Change
2019-02-24 20:54 sopwith New Issue
2019-02-24 20:54 sopwith File Added: arch-wall-curves-bug.FCStd
2019-02-25 12:38 Kunda1 Status new => feedback
2019-02-25 12:38 Kunda1 Note Added: 0012762
2019-02-25 15:05 sopwith Note Added: 0012767
2019-02-25 15:05 sopwith Status feedback => new
2019-02-26 10:41 Kunda1 Assigned To => paullee
2019-02-26 10:41 Kunda1 Status new => assigned
2019-02-26 10:42 Kunda1 Note Added: 0012772
2019-02-26 18:14 paullee Note Added: 0012775
2019-02-26 18:15 paullee Note Edited: 0012775
2019-02-26 18:24 Kunda1 Note Added: 0012776
2019-02-26 18:24 Kunda1 Target Version => 0.19
2019-02-26 18:24 Kunda1 Description Updated
2019-02-26 18:24 Kunda1 Additional Information Updated
2019-02-27 01:02 sopwith Note Added: 0012778
2019-02-27 20:35 Kunda1 Note Added: 0012783
2019-02-28 00:05 paullee Note Added: 0012798
2019-03-21 22:43 sww1235 Note Added: 0012940
2019-03-22 15:39 paullee Note Added: 0012942
2019-03-22 17:21 sww1235 Note Edited: 0012940
2019-06-17 07:36 Kunda1 Note Added: 0013235
2019-06-17 18:27 paullee Note Added: 0013239
2019-06-18 07:58 Kunda1 Note Added: 0013250
2019-06-18 17:57 paullee Note Added: 0013257
2020-10-15 17:59 Kunda1 Note Added: 0014875
2020-10-15 17:59 Kunda1 Tag Attached: #pending
2020-10-15 23:51 sww1235 Note Added: 0014880
2020-10-16 10:58 yorik Note Added: 0014886
2020-10-16 10:58 yorik File Added: Screenshot from 2020-10-16 12-56-36.png
2020-10-16 10:58 yorik Assigned To paullee => yorik
2020-10-16 13:43 paullee Note Added: 0014887
2020-10-20 11:15 yorik Note Added: 0014914
2020-10-20 11:15 yorik File Added: Screenshot from 2020-10-20 13-12-10.png
2020-10-20 11:15 yorik Status assigned => closed
2020-10-20 11:15 yorik Resolution open => fixed
2020-10-20 11:15 yorik Fixed in Version => 0.19
2020-10-20 11:30 yorik Changeset attached => FreeCAD master 87eae7c5
2020-10-20 11:30 yorik Note Added: 0014915