News for hackers. Stuff that matters.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by kuon on Friday September 18, 2020 @05:31AM (#24514731)
I like FreeCAD but it has one major issue (compared to something like OnShape which I use now), it doesn't have a smart naming topology.

For example, you create a cube, you make a hole in it (not fully through), and then you chamfer one side of the original cube. If you go back in the parametric history and change the depth of the hole for it to go through the whole cube it will change the name of the faces/edges in the history and the chamfer will then be applied to another face.

This is a very hard problem to solve, and that's where some commercial packages shines.

https://wiki.freecadweb.org/Topological_naming_problem

I wish onshape was open source, but I guess it will never happen because it uses siemens parasolid under the hood (at least I think it does). I don't know if FreeCAD can come close to something like onshape with the current gerometry kernel opencascade.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by joshocar on Friday September 18, 2020 @09:23AM (#24516420)
As someone who uses Solidworks regularly for mechanical designs this problem basically makes FreeCAD unusable in any real sense. There isn't a single model I've made that I didn't need to do something like in your example.

When designing, a lot of time is spent trying to model it in such a way that one dimension change will propagate down the line so you don't have to worry about adjustments causing something like two holes to misalign. It's super easy to miss small little things that would make the whole thing not work, so you design to avoid it. Essentially, the professional programs are setup so that you make basic shapes and relations and then put in your final dimensions at the end once the conceptual design is complete.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by eggsome on Thursday September 24, 2020 @07:18PM (#24584805)
I'm not a mech engineer, but it looks like SolveSpace would do this properly?
Re:FreeCAD: A free and open source multiplatform 3D parametr... by jka on Friday September 18, 2020 @05:52AM (#24514839)
Having spent more time working on open source tools and projects recently: although yes, many codebases have limitations, there's often a rewarding escalation path towards improving the situation.

* If you're unsure about the project and/or community's stance on a feature/problem, sometimes their discussion forums can help

* If you have a precise problem or feature in mind -- which it sounds like you do in this case! -- finding/creating a bug for it and/or just commenting with your interest can help projects prioritize it

* If you're really motivated and have the time, digging into the source and attempting an implementation; often educational even if not immediately resolvable

* If you run into implementation issues (like the kernel-level concern), then GOTO 1 with the same escalation path for the design issue / dependency it relates to

It can take a lot of time and effort (especially if it ends up diverging into multiple separate issues at step four), but honestly when any of this process results in an open source project fixing a bug or introducing a new feature as a result, the sense of reward is well worth it.

All that said: I don't know if https://tracker.freecadweb.org/view.php?id=597 is the same issue, but it sounds similar and might appreciate your input :)

Re:FreeCAD: A free and open source multiplatform 3D parametr... by jka on Friday September 18, 2020 @06:37AM (#24515070)
Self-reply: perhaps this wasn't the most useful comment; and on reading further there is a proposed project[1] related to trying to resolve the naming issue. Hopefully the principles in the comment are reasonable, but it's definitely a tricky problem for FreeCAD to solve.

[1] - https://wiki.freecadweb.org/Topological_Naming_Project

Re:FreeCAD: A free and open source multiplatform 3D parametr... by mihaaly on Friday September 18, 2020 @08:35AM (#24515877)
I believe when one wants to use a software the incentives are not to spend time on testing or improving it but to save time on the original task at hand. Getting help from the software and not helping the software, not participating in its interest group society. For the purpose of the software - helping and carrying out tasks - lengthy digging in discussions for essential information is counter efficient.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by jka on Friday September 18, 2020 @10:45AM (#24517414)
Yep - it's completely fine to simply use software and not expect or contribute anything more to it; and in that sense it's good to have multiple options for any given task.

But given the ability and opportunity to provide feedback directly to a software project, they'll generally appreciate it and it'll lead to better outcomes for everyone, even if it takes a bit more time up-front.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by rkangel on Friday September 18, 2020 @11:58AM (#24518403)
I've concluded that for me the price that I should pay for good open source software is good bug reports. If I'm not contributing at the very least help the contributors make their project better. This can sometimes take a little time to get a reasonably minimal set of steps to repeat and appropriate screenshots. Admittedly this is easier as I'm a software engineer so I have decent intuition as to what is needed so they don't have to come back to me.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by fireattack on Friday September 18, 2020 @01:21PM (#24519417)
I agree with you in general, but in this very case, since there is already a wiki page for it, I guess the issue is well-known.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by thraway54321 on Friday September 18, 2020 @08:42AM (#24515933)
Supposedly a lot of topology problem is fixed in realthunders fork. https://github.com/realthunder/ https://github.com/realthunder/FreeCAD_assembly3/releases

I haven't had time to look into it myself, so I can't comment how well it works, but people on other forums have suggested that it's more stable than 0.18.4 so I intend to try it out when I have some time.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by pillefitz on Friday September 18, 2020 @11:54AM (#24518352)
While it appeared somewhat more stable, it didn't seem to have the naming issue fixed, unfortunately.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by Joker_vD on Friday September 18, 2020 @05:47AM (#24514813)
Huh. Let me try with a programming analogue: so you have that statement earlier in the program where a bunch of named variables are introduced (with values assigned to them). You change this statement, so it now computes differently named variables. Of course, all the later statements keep using the names they're using, and things become weird. Is this roughly correct?

If so, then, uh, that's the problem of renaming the bound variables, it's an annoying one, but it has been around since the inception of λ-calculus and has several well-known solutions.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by ajuc on Friday September 18, 2020 @07:51AM (#24515554)
You need to know which autogenerated names from the last generation correspond to which autogenerated names in the current generation.

The problem with CAD is - you don't know.

Previously you had:

    [OK] create sketch_1 (a rectangle)
      [OK] pad the sketch_1 into a cuboid_1 (face_1, face_2, ..., face_6)
        [OK] create sketch_2 (a round circle) in the middle of face_2 (which is on the right side of the cuboid)
          [OK] pocket the sketch_2 creating a round hole in the cuboid_1
Then you change the sketch_1 making it a pentagon instead of a rectangle. The tree becomes:

    [OK] create sketch_1b (a pentagon)
      [OK] pad the sketch_1b into a cuboid_1b (face_1b, face_2b, ..., face_7b)
        [X] create sketch_2b (a round circle) in the middle of face_?
           [X] pocket the sketch_2b creating a round hole in the cuboid_1b but where exactly ?
There's no face_2 anymore - new side faces of the cuboid_1b are each in different places and at different angles than side faces of the old cuboid_1. You can decide basing on some heuristics, but that heuristics sucks in FreeCad and is almost never right.

I only every used Free Cad so I don't know how other CAD solves this problem, I can see using a better heuristic (like the least change of the plane and distance of the sketch ? ) or forcing the user to specify which edge corresponds to which when editing a sketch that isn't the final one in the dependency chain.

You could also force the user to mark and name objects in the sketch on which other sketches can depend - and when you edit the sketch you'd have to set them up correctly after the edit.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by zeta0134 on Friday September 18, 2020 @09:53AM (#24516777)
So, could you potentially store more metadata than just the face name, like it's normal for example, or the location and approximate surface area, and try to use that to reduce the problem space for an educated guess?
Re:FreeCAD: A free and open source multiplatform 3D parametr... by UncleEntity on Friday September 18, 2020 @03:02PM (#24520659)
Or use a dependency graph where the operation are, umm, dependent on the specific geometric component parent.

When something gets changed just go and find the place where the graph is bonkers and rebind the sub-tree to the correct parent object.

Could even have a fancy auto-generated UI à la Blender's node editor.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by jbay808 on Friday September 18, 2020 @12:25PM (#24518754)
That will fail when, instead of turning the rectangle into a pentagon, you rotate it 45 degrees into a rotated rectangle.

I suspect that SolidWorks solves this by naming each face after, for example, the sketch line segment or arc that it was extruded from. But I'm not sure.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by pillefitz on Friday September 18, 2020 @12:10PM (#24518575)
I'd love to know how commercial software solve this issue. I would expect a mixture of heuristics and user inputs to resolve ambiguous assignments
Re:FreeCAD: A free and open source multiplatform 3D parametr... by TeMPOraL on Friday September 18, 2020 @06:14AM (#24514955)
I'm also not sure if I understand the problem description correctly, but based on my little experience with 3DSMax, Blender and SolveSpace, I'd use this programming analogy:

You have a code that creates an array A, and then later on code that does something to elements A[2], A[3] and A[5] - elements which you semantically understand as "frobnicators of A", and whose number and indices depend on the contents of the array.

You then apply changes to the first part of the code, and now the correct frobnicators of A to modify are A[6] and A[14]. But the tool used to auto-update the array accessing part has no obvious way to know that by mentioning A[2], A[3] and A[5] you meant the frobnicators of A, and not say the barbulators of A. So it cannot auto-infer that you now want elements A[6] and A[14].

Or back to 3D land, what I assume is happening is that when you cut a hole through a solid, what you mean is to cut a hole (in a particular spatial relation to the solid's origin), and what happens is properties of some faces of that solid get modified. Then you apply further modification to these (and other) faces. After that, when you start reparametrizing the hole you cut in the past, the latter modification has no clue what your intent was, and blindly applies itself to the same faces it used before.

I imagine the problem is not theoretically solvable without extra "intent-related data", and existing solutions are just a bunch of heuristics guessing what the person doing the modelling meant by any given step. Topology being one thing you can use to inform these heuristics.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by numpad0 on Friday September 18, 2020 @06:22AM (#24514988)
give each objects with UUIDs and refer to them by-UUID?
Re:FreeCAD: A free and open source multiplatform 3D parametr... by kuon on Friday September 18, 2020 @06:44AM (#24515115)
Yeah, but that's hard, because imagine you have an edge with UUID 1, then you edit the history which lead into that edge being cut in half. Which one of the two edges has UUID 1?

The answer is complicated because if you have a chamfer on that edge, depending on how you split it, you want to have the chamfer on both resulting edges. So they both get a new UUID, but you have to modify the next operation to apply to what "was" the edge 1.

I illustrated that here: https://imgur.com/a/XR7sO59

Re:FreeCAD: A free and open source multiplatform 3D parametr... by numpad0 on Friday September 18, 2020 @08:13AM (#24515692)
1. sketch a rectangle, extrude up. edge_1 in question created.

2. chamfer edge_1. chamfered edge_2 and _3 are created.

3. sketch a rectangle on far side, extrude toward camera for 1/2 full length. edge_4 is created at middle of box.

4. do other stuff. lots of things come and go.

5. you changed mind. extrusion distance is changed so edge_4 goes past chamfered surface.

On Fusion 360 with History enabled, this will result in a progress bar and backend goes back to step 2. to re-do and re-compute all subsequent ops up to step 5. As the result there will be probably edges 2, 3, 4, 5 that now represent near and far side chamfered edges. If you've done something that presently don't make sense at step 4., Fusion 360 throws an error and leave half done objects.

Okay, now I understand the problem. It needs the History feature to be done right, and UUID.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by Joker_vD on Friday September 18, 2020 @07:04AM (#24515250)
> So they both get a new UUID, but you have to modify the next operation to apply to what "was" the edge 1.

Of course, that's exactly how I personally would expect the things to be done? You obviously have to propagate changes through all the operations further down the line.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by pillefitz on Friday September 18, 2020 @12:17PM (#24518651)
But how? Let's take a cube, of which I modify one face. Then I change the cube to be a pentagon (let's assume it's a parametrized object). What face of the cube corresponds to which face of the pentagon?
Re:FreeCAD: A free and open source multiplatform 3D parametr... by numpad0 on Saturday September 19, 2020 @02:58AM (#24525716)
That’ll be a “downstream feature failure” in Autodesk term
Re:FreeCAD: A free and open source multiplatform 3D parametr... by phkahler on Friday September 18, 2020 @09:12AM (#24516295)
>> give each objects with UUIDs and refer to them by-UUID.

That's a core feature in SolveSpace. Not full UUIDs but something similar.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by nraynaud on Friday September 18, 2020 @06:20AM (#24514979)
yes, it's correct. That why editing the model history of an object is actually way harder than re-running a program after an edit. I feels superficially the same but after you've spent a few hours on the CAD thing, you realize that it's doing things way smarter than what it seems.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by phkahler on Friday September 18, 2020 @09:01AM (#24516162)
>> This is a very hard problem to solve, and that's where some commercial packages shines.

That is one area SolveSpace really shines too, but there is no chamfer tool - you'll have to use a boolean to subtract that chamfer.

Re:FreeCAD: A free and open source multiplatform 3D parametr... by app4soft on Saturday September 19, 2020 @08:19PM (#24531136)
> That is one area SolveSpace really shines too, but there is no chamfer tool

As discussed in related SolveSpace issue thread, "chamfer" feature could be implemented in same way as "tangent arc" (aka "fillet") already implemented.[0]

[0] https://github.com/solvespace/solvespace/issues/149