View Issue Details

IDProjectCategoryView StatusLast Update
0003859ArchBugpublic2019-06-18 17:57
ReportersopwithAssigned Topaullee 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Platformx64OSWindowsOS Version10
Product Version0.18 
Target Version0.19Fixed in Version 
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)
TagsNo tags attached.

Activities

sopwith

2019-02-24 20:54

reporter  

arch-wall-curves-bug.FCStd (16,201 bytes)

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

View 2 revisions

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

View 2 revisions

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:

  1. draw circle using circle tool in arch workbench
  2. turn off "make face" option of circle.
  3. 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 :)

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 View Revisions
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 View Revisions
2019-02-26 18:24 Kunda1 Additional Information Updated View Revisions
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 View Revisions
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