Blend Curve / Surface integration project

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Blend Curve / Surface integration project

Post by wmayer »

Chris_G wrote: Tue Jul 12, 2022 8:21 am Hello,
My 20yo son @MatteoG studies software development.
He is doing a business internship at my workshop this summer.
We would like to integrate Blend Curves, and Blend Surfaces into the Surface workbench.
I have already worked on this in the Curves workbench, so I hope we can push this a step further and integrate something similar into FreeCAD Surface workbench.

I have tried to write down a rough description of the planned features below :
There is now a PR available https://github.com/FreeCAD/FreeCAD/pull/7339
Have you tested if from functionality point of view it's OK for you?
User avatar
Chris_G
Veteran
Posts: 2578
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Blend Curve / Surface integration project

Post by Chris_G »

Hi,
It is almost complete, but I just realized we are still missing a change.
And the PR fails compiling on my Manjaro PC.
So we need some more work on this tomorrow.
pafurijaz
Posts: 66
Joined: Sun Dec 18, 2016 6:04 pm

Re: Blend Curve / Surface integration project

Post by pafurijaz »

This is fantastic features, to make a nice transitions I had to make this by doing it manually with help of iso-curves from patches and then blended them each one by one and make a gordon surfaces.
User avatar
Chris_G
Veteran
Posts: 2578
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Blend Curve / Surface integration project

Post by Chris_G »

The BlendSurface feature should do the job, when implemented.
This has gone slower than I expected.
We're still working on the Blendcurve feature.
My son's internship ends next week, so I'll go on with the BlendSurface next.
MatteoG
Posts: 1
Joined: Mon Jul 11, 2022 1:04 pm

Re: Blend Curve / Surface integration project

Post by MatteoG »

Hello, i have updated the PR.
it is ready for a review.
Here is a piece of Python Demo.

Code: Select all

vec = FreeCAD.Vector

import Surface

# Create C0 BlendPoint at origin
b1 = Surface.BlendPoint()
# Create G1 BlendPoint
b2 = Surface.BlendPoint([vec(10,3,6),vec(2,5,6)])
# BlendCurve between the two BlendPoints
bc = Surface.BlendCurve(b1,b2)
# Compute the interpolating BezierCurve
curve = bc.compute()
Part.show(curve.toShape(), "BlendCurve 1")

# Create G2 BlendPoint at the end of previous BlendCurve
b1 = Surface.BlendPoint(curve.toShape(), 1, 2)
# Create G1 BlendPoint
b2 = Surface.BlendPoint([vec(5,6,2),vec(2,5,6)])

bc = Surface.BlendCurve(b1,b2)
# Compute the interpolating BezierCurve
curve = bc.compute()
Part.show(curve.toShape(), "BlendCurve 2")

User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Blend Curve / Surface integration project

Post by Kunda1 »

Experimental snap should be available in ~1hour
When it's ready the download instructions will be in https://github.com/FreeCAD/FreeCAD-snap/pull/53
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Chris_G
Veteran
Posts: 2578
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Blend Curve / Surface integration project

Post by Chris_G »

Great, Thanks.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Blend Curve / Surface integration project

Post by Kunda1 »

Kunda1 wrote: Fri Aug 19, 2022 4:03 pm Experimental snap should be available in ~1hour
When it's ready the download instructions will be in https://github.com/FreeCAD/FreeCAD-snap/pull/53
Instructions:

Code: Select all

  # Note: not all distros require 'sudo'
  $ sudo snap install --channel=edge/pr-53 freecad

  # If you already have the freecad snap installed
  $ sudo snap refresh --channel=edge/pr-53 freecad 

  # Experimental: Parallel install (see https://github.com/FreeCAD/FreeCAD-snap/blob/master/docs/index.md#parallel-installs)
  $ sudo snap set system experimental.parallel-instances=true
  $ sudo snap install --channel=edge/pr-53 freecad_pr53
  $ freecad_pr53 # Run it

  # To switch back to preferred snap (swap out 'edge' for 'stable' if necessary)
  $ snap refresh freecad --channel=edge freecad
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Blend Curve / Surface integration project

Post by Kunda1 »

Merged in git commit 27bf1dff with subsequent fixes by wmayer git commit eb1f30d
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Blend Curve / Surface integration project

Post by Kunda1 »

Feature should be added to Release_notes_1.0. Any volunteers?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply