Commit graph

238 commits

Author SHA1 Message Date
Leonardo Zide
70da56bb05 More accurate bounding box calculation for submodels. 2020-04-11 11:04:27 -07:00
Johannes Sixt
ca73f3e3ad
Synthesis of Technic Universal Joints (#456)
* Split synth info initialzation by type.

We are going to remove the type enumeration and use a class hierarchy
instead. This preparation will then be helpful.

* Make Add...Parts() overrides of a virtual AddPart() function.

Since we have a class hierarchy for the different synthesized pieces, we
can now turn a case distinction into a virtual function call.

* Move initialization based on type to derived class constructors.

Move initialization of end transformations of flexible parts into
class lcSynthInfoCurved.

* Make GetDefaultControlPoints() virtual with overrides.

* Remove obsolete enum lcSynthType.

We have replaced its purpose by derived classes by now.

* Initialize shock absorbers' spring part ID early.

This removes the awkward early return that is needed in the if-else
cascade.

* Split lcSynthInfo into derived classes for curved and straight pieces.

* Only curved parts have varying sections, start, middle, and end properties.

Move the properties from the base class to the derived class that needs
them.

* Use derived classes to mark synthesized objects of different kinds.

We will extend the derived classes in the upcoming commits.

* PieceInfo is only needed to synthesize some hoses and shock absorbers.

* Initialize edge part IDs of flexible hoses early.

This removes another case distinction in AddParts().

* Verify the number of control points loaded from a model file.

* Synthesize Technic universal joints.

The direction of one end can be changed so that it points to the control
point.

* Technic universal joints need only the position of the control point.

* Synthesize legacy universal joints.
2020-03-30 12:17:08 -07:00
Leonardo Zide
90f1336a48 Scoped enums and constexpr. 2020-03-22 13:44:20 -07:00
Leonardo Zide
ade7334fa1 Support up to 10 control points and prevent the user from adding more. 2020-03-22 11:12:15 -07:00
Leonardo Zide
85a9b19b2c Warning fixes. 2020-02-24 14:31:08 -08:00
Leonardo Zide
e5d06a29a2 Renamed pipette to color picker and fixed indentation. 2020-02-15 11:14:12 -08:00
RenateZwei
aa3ead6504
Added color picker (#446)
Added color picker
2020-02-15 10:59:14 -08:00
Leonardo Zide
3b8b22493a Reorganized PLI function. 2020-01-20 15:39:20 -08:00
Leonardo Zide
6d818d48d2 Fixed HTML export not including submodels. Fixes #429. 2020-01-11 12:45:36 -08:00
Leonardo Zide
cbf534fcdf Added option to fade previous steps. 2020-01-01 17:06:17 -08:00
Leonardo Zide
1f441907ee Fixed crash loading files with invalid type 1 lines. Fixes #413. 2019-12-31 13:07:45 -08:00
Leonardo Zide
eae50b6836 Print submodels. Fixes #409. 2019-12-30 16:04:58 -08:00
Leonardo Zide
e9cdeed008 Sort piece insert preview with the rest of the scene. 2019-11-30 12:19:13 -08:00
Leonardo Zide
9e41edfef0 Fixed loading mpd files with consecutive NOFILE statements. 2019-11-26 12:13:22 -08:00
Leonardo Zide
5854cfce89 Added wrapper for glDepthMask. 2019-11-09 18:11:25 -08:00
Leonardo Zide
4493c3f6f2 Array cleanup. 2019-07-04 17:06:26 -07:00
Leonardo Zide
b42e3b7e31 Array cleanup. 2019-06-23 18:28:14 -07:00
Leonardo Zide
514c1e54ec Moved common includes to precompiled header. 2019-05-30 12:06:54 -07:00
Leonardo Zide
e45fe81ace Array cleanup. 2019-05-27 16:39:51 -07:00
Leonardo Zide
3070d25663 Support exporting flexible parts. Fixes #157. 2019-05-26 11:08:47 -07:00
Leonardo Zide
590422a30a Array cleanup. 2019-03-17 13:27:57 -07:00
Leonardo Zide
b18645b880 Fixed hidden parts being exported and shown in parts lists. 2019-03-13 14:36:40 -07:00
Leonardo Zide
b31d33fd67 Don't show hidden pieces in submodels. 2019-03-12 19:51:04 -07:00
Leonardo Zide
1d8988fbb4 Removed .svg extension from desktop file per @probonopd. 2019-03-10 14:06:01 -07:00
Thomas Cujé
cc2a5156f7 Place new submodel at origin. Fixes #314 2019-03-10 20:28:22 +01:00
Thomas Cujé
94d4e49ed4 Minor improvements
- Fix gcc fallthrough warnings
- Replace deprecated QT QStyleOptionViewItemV3
- Improve translator usage
- Use QString instead of QByteArray
2019-03-10 01:17:24 +01:00
Leonardo Zide
53935734eb Clean up for loops. 2019-03-09 09:50:34 -08:00
Leonardo Zide
319dd3a1a0 Preserve file case when loading a file from the same folder as the current project. Fixes #302. 2019-02-27 16:35:02 -08:00
Leonardo Zide
69d46cc4c4 Allow undoing hiding operations. Fixes #251. 2018-09-02 10:31:57 -07:00
Leonardo Zide
1c1a5fb599 Fixed model comments being duplicated every time undo is used. Fixes #247. 2018-08-01 14:05:01 -07:00
Leonardo Zide
152a3cf7b6 Fixed edit/find/select dialogs not working while editing a submodel. 2018-04-16 18:29:42 -07:00
Leonardo Zide
752ae54788 Fixed interface draw location in active submodels. 2018-04-07 17:17:32 -07:00
Leonardo Zide
718b31a2bd Fixed selection tinting when editing submodels. 2018-04-07 11:45:00 -07:00
Leonardo Zide
b30ffd1b59 Initial implementation of in place submodel editing. 2018-03-29 10:20:36 -07:00
Leonardo Zide
e0acb8f2b3 Fix case of part ids included in models before searching for them. Fixes #215. 2018-03-23 19:03:16 -07:00
jschwender
f1e5796580 Update lc_model.cpp (#208)
Fixed typo in undo string.
2018-02-28 14:07:24 -08:00
Leonardo Zide
51bbdb9b97 Added option to remove key frames from selected objects. 2018-02-24 12:47:19 -08:00
Leonardo Zide
172528ac1f Removed calls to foreach. 2018-02-21 16:12:18 -08:00
Leonardo Zide
10491629b7 Duplicate groups when duplicating pieces. Fixes #158. 2018-02-19 19:12:32 -08:00
Leonardo Zide
5ac11506b0 Fixed parts inside mpd files not drawing. Fixes #178. 2018-02-06 22:07:35 -08:00
Leonardo Zide
7ca156b3a7 Added commands for moving the camera relative to its current orientation. 2018-01-15 11:35:15 -08:00
Leonardo
804e0f6f53 Save MSAA images. Fixes #101. 2017-12-26 10:19:20 -08:00
Leonardo Zide
be3c96006f Removed old DoDialog function. 2017-12-10 18:12:31 -08:00
Leonardo Zide
db1bccfee0 Handle unicode characters on the command line. 2017-12-02 19:42:42 -08:00
Leonardo Zide
d6ba0262af Removed LC_POINTER_TO_INT 2017-12-02 12:33:28 -08:00
Leonardo Zide
636e013455 Removed lcint types. 2017-12-02 12:22:04 -08:00
Leonardo Zide
2071d6810a Don't require a known extension when saving images from the command line. 2017-11-24 11:48:46 -08:00
Leonardo Zide
6878d0157f Support selection mode on all selection tools. 2017-11-21 22:54:49 -08:00
leozide
848cdd9daf Added piece selection modes. 2017-11-21 17:58:36 -08:00
leozide
b1527356a2 Replaced 10 degrees snap with 22.5 degrees. Closes #139. 2017-11-20 16:16:41 -08:00