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

InsertMooring general function snippet #101

Open
ferrari212 opened this issue Sep 25, 2019 · 2 comments
Open

InsertMooring general function snippet #101

ferrari212 opened this issue Sep 25, 2019 · 2 comments
Assignees

Comments

@ferrari212
Copy link
Contributor

The mooring does not have a general function for inserting it. Therefore, it is being repeated over again in several codes:

this.InsertMooring = function(ship, states, motion, anchorPoint) {

mooringForce = this.InsertMooring(this.ship, this.states, motion, seaDepth, mooring.anchorPoint);

this.InsertMooring = function(ship, states, motion, seaDepth, anchorPoint) {

function InsertMooring(ship, states, motion, seaDepth, anchorPoint, mooringPointOnShip, anchorLength, radialDistance, density, mooringAngle) {

In aditional, the defined functions are using global variables, preventing the js files to work as snippets, problem stated also in #100:

lwl = floatingStates.LWL/2+floatingStates.trim;

As a solution I will create a snippet InsertCatenary.js which will receive the starting and final points of the line, an object containing the geometry, materials and coefficients of the catenary, the number of division, and the scene. The function itself will be responsible for changing the 3D model according to the initial and final points and return the forces (If appliable).

The function will also calculate for the cases in which the Horizontal Force is known (eletrical cables and uni dimensional mooring) and the cases that it is unknown (6DOF arrangement). I will also make a Observable tutorial to standardize this procedure.

@EliasHasle
Copy link
Collaborator

EliasHasle commented Sep 29, 2019

I suggest making Mooring a subclass of THREE.Group, and hold several Catenary objects as children.

@hmgaspar
Copy link
Member

@ferrari212 - See Elias suggestion.

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

No branches or pull requests

3 participants