Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr small brep surface new constructor #13094

Merged
merged 16 commits into from
Feb 11, 2025

Conversation

andrewgorgi
Copy link
Contributor

📝 Description
Adding a constructor to the BrepSurface class (brep_surface.h) for use in SBM applications.

Please mark the PR with appropriate tags:

IGA, SBM

🆕 Changelog

Added a constructor with the array of surrogate inner/outer loop geometries
Added two class member variables, mpSurrogateInnerLoopGeometries, mpSurrogateOuterLoopGeometries (similarl to the Trimming case)

@andrewgorgi andrewgorgi requested a review from a team as a code owner February 4, 2025 14:28
@rickyaristio rickyaristio self-assigned this Feb 4, 2025
@andrewgorgi
Copy link
Contributor Author

@rubenzorrilla This is the part you asked to modify in order to avoid passing ModelParts in the constructor of the geometry. We really need to merge this to go on with the other PRs.
Thank you

Copy link
Member

@rubenzorrilla rubenzorrilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we strictly need to pass these by constructor? Can't we set them by using a Setter and Getter functions and just use the already existing untrimmed constructor?

@andrewgorgi
Copy link
Contributor Author

@rubenzorrilla
We removed the constructor and added a setter/getter for the two variables, as you suggested

*/
GeometrySurrogateArrayType& GetSurrogateInnerLoopGeometries()
{
return mpSurrogateInnerLoopGeometries;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return mpSurrogateInnerLoopGeometries;
return mrSurrogateInnerLoopGeometries;

*/
GeometrySurrogateArrayType& GetSurrogateOuterLoopGeometries()
{
return mpSurrogateOuterLoopGeometries;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return mpSurrogateOuterLoopGeometries;
return mrSurrogateOuterLoopGeometries;

Comment on lines 167 to 168
mpSurrogateInnerLoopGeometries = rOther.GetSurrogateInnerLoopGeometries();
mpSurrogateOuterLoopGeometries = rOther.GetSurrogateOuterLoopGeometries();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mpSurrogateInnerLoopGeometries = rOther.GetSurrogateInnerLoopGeometries();
mpSurrogateOuterLoopGeometries = rOther.GetSurrogateOuterLoopGeometries();
mpSurrogateInnerLoopGeometries = rOther.mpSurrogateInnerLoopGeometries;
mpSurrogateOuterLoopGeometries = rOther.mpSurrogateOuterLoopGeometries;

Comment on lines 182 to 183
mpSurrogateInnerLoopGeometries = rOther.GetSurrogateInnerLoopGeometries();
mpSurrogateOuterLoopGeometries = rOther.GetSurrogateOuterLoopGeometries();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mpSurrogateInnerLoopGeometries = rOther.GetSurrogateInnerLoopGeometries();
mpSurrogateOuterLoopGeometries = rOther.GetSurrogateOuterLoopGeometries();
mpSurrogateInnerLoopGeometries = rOther.mpSurrogateInnerLoopGeometries;
mpSurrogateOuterLoopGeometries = rOther.mpSurrogateOuterLoopGeometries;

auto p_surface = GenerateReferenceNodeSurfaceHalfCirclePointer();

using BrepSurfaceType = BrepSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceType = BrepCurveOnSurface<PointerVector<Node>, true, PointerVector<Point>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using BrepCurveOnSurfaceType = BrepCurveOnSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceType = typename BrepSurfaceType::BrepCurveOnSurfaceType;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we eventually change the type in BrepSurfaceType this will automatically handle it.


using BrepSurfaceType = BrepSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceType = BrepCurveOnSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceLoopArrayType = DenseVector<DenseVector<typename BrepCurveOnSurfaceType::Pointer>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using BrepCurveOnSurfaceLoopArrayType = DenseVector<DenseVector<typename BrepCurveOnSurfaceType::Pointer>>;
using BrepCurveOnSurfaceLoopArrayType = typename BrepSurfaceType::BrepCurveOnSurfaceLoopArrayType;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same reasoning)

Copy link
Member

@rubenzorrilla rubenzorrilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that copy constructor is still wrong. The rest are minors.

auto p_surface = GenerateReferenceNodeSurfaceHalfCirclePointer();

using BrepSurfaceType = BrepSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceType = BrepCurveOnSurface<PointerVector<Node>, true, PointerVector<Point>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we eventually change the type in BrepSurfaceType this will automatically handle it.


using BrepSurfaceType = BrepSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceType = BrepCurveOnSurface<PointerVector<Node>, true, PointerVector<Point>>;
using BrepCurveOnSurfaceLoopArrayType = DenseVector<DenseVector<typename BrepCurveOnSurfaceType::Pointer>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same reasoning)

rubenzorrilla
rubenzorrilla previously approved these changes Feb 10, 2025
@rubenzorrilla rubenzorrilla merged commit 4c68769 into master Feb 11, 2025
11 checks passed
@rubenzorrilla rubenzorrilla deleted the PR_small_BrepSurface_new_constructor branch February 11, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants