View: Shaded with Hard Edges

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: View: Shaded with Hard Edges

Post by adrianinsaval »

adrianinsaval wrote: Wed May 17, 2023 9:58 pm Feature Request, which is a concept we're not really using anymore in our tracker, if you want a new feature instead you need to think about what problem it would solve and create an issue on github describing that problem, you may then suggest said feature as a possible solution to this problem.
In this case the problem description would be something like "the 3d view is cluttered with smooth edges that are often not relevant". Think well about framing this as a problem to be solved and then create an issue. Try to be specific.
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: View: Shaded with Hard Edges

Post by grd »

I created the FR. It is issue #9636
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
maxwxyz
Posts: 159
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich, Germany
Contact:

Re: View: Shaded with Hard Edges

Post by maxwxyz »

Is there something else we can do or is it just waiting until someone capable of implementing it stumbles upon the issue on Github?
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: View: Shaded with Hard Edges

Post by mfro »

maxwxyz wrote: Sun Jun 04, 2023 6:56 am Is there something else we can do or is it just waiting until someone capable of implementing it stumbles upon the issue on Github?
Sure. You could start implementing yourself, for example.
Cheers,
Markus
maxwxyz
Posts: 159
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich, Germany
Contact:

Re: View: Shaded with Hard Edges

Post by maxwxyz »

I cannot code, that's why I've asked how I can help...
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: View: Shaded with Hard Edges

Post by adrianinsaval »

You could put a bounty for the feature on bountysource. Also you could research the coin3d and opencascade documentations and see if you can find stuff that can be used for this.
maxwxyz
Posts: 159
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich, Germany
Contact:

Re: View: Shaded with Hard Edges

Post by maxwxyz »

As mentioned, not a coder so not sure if to look for opencascade or coin3d solutions. I need to work with the model and still select edges and geometry.

The idea is either to find smooth edges and hide them (if they are categorized [1]or detectable [2]) or render them based on their continuity [3].

[1] https://old.opencascade.com/doc/occt-7. ... shape.html
[2] https://dev.opencascade.org/content/dis ... angulation
[3] https://dev.opencascade.org/content/how ... nuity-wire

I also found an old forum post asking for a similar feature so the need is there: viewtopic.php?t=7022
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: View: Shaded with Hard Edges

Post by adrianinsaval »

this one looks promising!
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: View: Shaded with Hard Edges

Post by heda »

just thinking out loud...

maybe:

Code: Select all

for edge in edges:
   at midpoint of edge, find if face1 & face2 is c1
   if c1:
      set edge color to face1 color
suppose a simplistic algo like this could be made as a macro
will of course break when a topological change is made and edges are renumbered,
so macro will have to be run again after a mod,
probably also a lot of "edge-cases", but ought to be better than nothing...
if there is no easy way to figure out continuity, one could fall back on angle between normals.
Post Reply