Roassal ROShorterDistanceAttachPoint: refactoring and possible enhancement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal ROShorterDistanceAttachPoint: refactoring and possible enhancement

Dennis Schenk
Hi all,

I saw two instances of code duplication in ROShorterDistanceAttachPoint so I refactored the class, changed some method names to make their purpose cleaner and added some comments.

@Alexandre: If you like the changes, could you integrate them into Roassal?

The filed out class can be found here:


In a next step I added an offset parameter which can be used to offset the attach point positively or negatively on one of the four possible attach 'sides'.
The purpose of the offset can be seen in the following screenshot:


It allows for example to have multiple edges from and to the same element (with different offsets).

I'm note sure whether you would want the offset-possibility in ROShorterDistanceAttachPoint or if I should create a subclass for it. 
If you'd like to integrate it directly, the filed out class with the offset parameter can be found here:


If not I will create a subclass.

Cheers,
Dennis

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal ROShorterDistanceAttachPoint: refactoring and possible enhancement

abergel
> The filed out class can be found here:
>
> http://cl.ly/code/392s3y1V2A0N

Yes, thanks for removing the duplication. It is now in!

> I'm note sure whether you would want the offset-possibility in ROShorterDistanceAttachPoint or if I should create a subclass for it.
> If you'd like to integrate it directly, the filed out class with the offset parameter can be found here:
>
> http://cl.ly/code/1T3c310J2r06
>
> If not I will create a subclass.

Let's leave the offset in ROShorterDistanceAttachPoint. It does not hurt I feel.

You will find your code in Roassal 1.163

Thanks,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev